From 14b5cbdad8da4e0957f02dd94e3ff94d49772f18 Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Sun, 6 Oct 2019 18:44:32 +0200 Subject: add shift functions (#54) --- src/ghdl.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ghdl.cc b/src/ghdl.cc index b027204..e44fa78 100644 --- a/src/ghdl.cc +++ b/src/ghdl.cc @@ -297,6 +297,8 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m) case Id_Not: case Id_Red_Or: case Id_Red_And: + case Id_Lsr: + case Id_Lsl: case Id_Assert: // No output case Id_Assume: // No output case Id_Cover: // No output @@ -424,6 +426,12 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m) case Id_Red_And: module->addReduceAnd(to_str(iname), IN(0), OUT(0)); break; + case Id_Lsl: + module->addShl(to_str(iname), IN(0), IN(1), OUT(0)); + break; + case Id_Lsr: + module->addShr(to_str(iname), IN(0), IN(1), OUT(0)); + break; case Id_Mux2: module->addMux(to_str(iname), IN(1), IN(2), IN(0), OUT(0)); break; -- cgit v1.2.3