aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnton Blanchard <anton@ozlabs.org>2019-10-16 14:41:56 +1100
committertgingold <tgingold@users.noreply.github.com>2019-10-16 05:41:56 +0200
commit96ceed2f296a44ca60fc8cd0f91c35edcc2d7b41 (patch)
tree34e228b8db3afd45702866a3ae61b59f688ae5a0 /src
parentb758bf4c7a5468dbf75972b767e3053b16768891 (diff)
downloadghdl-yosys-plugin-96ceed2f296a44ca60fc8cd0f91c35edcc2d7b41.tar.gz
ghdl-yosys-plugin-96ceed2f296a44ca60fc8cd0f91c35edcc2d7b41.tar.bz2
ghdl-yosys-plugin-96ceed2f296a44ca60fc8cd0f91c35edcc2d7b41.zip
Add Id_Neg support (#63)
* Add Id_Neg support * Add testcase for Id_Neg Thanks to Pepijn for the example I based this on.
Diffstat (limited to 'src')
-rw-r--r--src/ghdl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ghdl.cc b/src/ghdl.cc
index 91239e5..8d6a287 100644
--- a/src/ghdl.cc
+++ b/src/ghdl.cc
@@ -285,6 +285,7 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m)
case Id_Xnor:
case Id_Add:
case Id_Sub:
+ case Id_Neg:
case Id_Mux2:
case Id_Mux4:
case Id_Dff:
@@ -397,6 +398,9 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m)
case Id_Sub:
module->addSub(to_str(iname), IN(0), IN(1), OUT(0));
break;
+ case Id_Neg:
+ module->addNeg(to_str(iname), IN(0), OUT(0), true);
+ break;
case Id_Not:
module->addNot(to_str(iname), IN(0), OUT(0));
break;