From b758bf4c7a5468dbf75972b767e3053b16768891 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Wed, 16 Oct 2019 14:40:59 +1100 Subject: Add Id_Smul and Id_Umul (#64) * Add Id_Smul and Id_Umul support * Add testcase for Id_Smul and Id_Umul --- src/ghdl.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ghdl.cc') diff --git a/src/ghdl.cc b/src/ghdl.cc index 1d26ded..91239e5 100644 --- a/src/ghdl.cc +++ b/src/ghdl.cc @@ -306,6 +306,8 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m) case Id_Lsr: case Id_Lsl: case Id_Asr: + case Id_Smul: + case Id_Umul: case Id_Assert: // No output case Id_Assume: // No output case Id_Cover: // No output @@ -443,6 +445,12 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m) case Id_Asr: module->addSshr(to_str(iname), IN(0), IN(1), OUT(0), true); break; + case Id_Smul: + module->addMul(to_str(iname), IN(0), IN(1), OUT(0), true); + break; + case Id_Umul: + module->addMul(to_str(iname), IN(0), IN(1), OUT(0), false); + break; case Id_Mux2: module->addMux(to_str(iname), IN(1), IN(2), IN(0), OUT(0)); break; -- cgit v1.2.3