aboutsummaryrefslogtreecommitdiffstats
path: root/ghdl
diff options
context:
space:
mode:
authorPepijn de Vos <pepijndevos@gmail.com>2019-08-01 19:10:02 +0200
committertgingold <tgingold@users.noreply.github.com>2019-08-01 19:10:01 +0200
commit3a0e7ec94e8b144ef32dfb2b34cec189999f6700 (patch)
tree1b4ce99f908546037fd977ac1484eee9f7b0ec18 /ghdl
parentb6e2889c604c07dc3f4d2fde5aed1b29e1285e25 (diff)
downloadghdl-yosys-plugin-3a0e7ec94e8b144ef32dfb2b34cec189999f6700.tar.gz
ghdl-yosys-plugin-3a0e7ec94e8b144ef32dfb2b34cec189999f6700.tar.bz2
ghdl-yosys-plugin-3a0e7ec94e8b144ef32dfb2b34cec189999f6700.zip
add subtract (#30)
Diffstat (limited to 'ghdl')
-rw-r--r--ghdl/ghdl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ghdl/ghdl.cc b/ghdl/ghdl.cc
index 6926cfd..0fc1d0a 100644
--- a/ghdl/ghdl.cc
+++ b/ghdl/ghdl.cc
@@ -260,6 +260,7 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m)
case Id_Nor:
case Id_Xnor:
case Id_Add:
+ case Id_Sub:
case Id_Mux2:
case Id_Mux4:
case Id_Dff:
@@ -357,6 +358,9 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m)
case Id_Add:
module->addAdd(to_str(iname), IN(0), IN(1), OUT(0));
break;
+ case Id_Sub:
+ module->addSub(to_str(iname), IN(0), IN(1), OUT(0));
+ break;
case Id_Not:
module->addNot(to_str(iname), IN(0), OUT(0));
break;