aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/common
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-08-08 11:40:09 +0100
committerDavid Shah <dave@ds0.me>2019-08-08 11:40:09 +0100
commit83b2e0272333cfcc2529e0833723a52c066146a6 (patch)
tree9985b7f840383419ebd5b189023ca6871a02d5a9 /techlibs/common
parentb8cd4ad64ae9a45faecffc1a6b92a8219755bc60 (diff)
parentfb568ddb4e2ccaab352d9d062f6b4926aca75680 (diff)
downloadyosys-83b2e0272333cfcc2529e0833723a52c066146a6.tar.gz
yosys-83b2e0272333cfcc2529e0833723a52c066146a6.tar.bz2
yosys-83b2e0272333cfcc2529e0833723a52c066146a6.zip
Merge branch 'xc7dsp' of github.com:YosysHQ/yosys into xc7dsp
Diffstat (limited to 'techlibs/common')
-rw-r--r--techlibs/common/simcells.v19
1 files changed, 19 insertions, 0 deletions
diff --git a/techlibs/common/simcells.v b/techlibs/common/simcells.v
index 289673e82..64720e598 100644
--- a/techlibs/common/simcells.v
+++ b/techlibs/common/simcells.v
@@ -230,6 +230,25 @@ endmodule
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
//-
+//- $_NMUX_ (A, B, S, Y)
+//-
+//- A 2-input inverting MUX gate.
+//-
+//- Truth table: A B S | Y
+//- -------+---
+//- 0 - 0 | 1
+//- 1 - 0 | 0
+//- - 0 1 | 1
+//- - 1 1 | 0
+//-
+module \$_NMUX_ (A, B, S, Y);
+input A, B, S;
+output Y;
+assign Y = S ? !B : !A;
+endmodule
+
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
//- $_MUX4_ (A, B, C, D, S, T, Y)
//-
//- A 4-input MUX gate.