aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/common
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-08-09 09:46:37 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-08-09 09:46:37 +0200
commit7a860c562323b8279cdbb8626a47ac8466c78b4c (patch)
treed713b5c04ab34aadcbd310237a8cc46951f83e37 /techlibs/common
parent8a3329871ba7bab98982a101327b8375cd73344d (diff)
parentac2fc3a144fe1094bedcc6b3fda8a498ad43ae76 (diff)
downloadyosys-7a860c562323b8279cdbb8626a47ac8466c78b4c.tar.gz
yosys-7a860c562323b8279cdbb8626a47ac8466c78b4c.tar.bz2
yosys-7a860c562323b8279cdbb8626a47ac8466c78b4c.zip
Merge remote-tracking branch 'upstream/master' into efinix
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.