aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/common
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-07 13:44:08 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-07 13:44:08 -0700
commite3d898dccb3cf535a213f313693b2b7a4ede7c68 (patch)
treeca5dfdf506a9a5bc37178eaa06f0d285b7649ff5 /techlibs/common
parentcdf9c801347693c273309694685b2080ef00fd02 (diff)
parent3414ee1e3fe37d4bf383621542828d4fc8fc987f (diff)
downloadyosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.tar.gz
yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.tar.bz2
yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.zip
Merge remote-tracking branch 'origin/master' 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.