aboutsummaryrefslogtreecommitdiffstats
path: root/tests/various/muxpack.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-07 12:12:11 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-07 12:12:11 -0700
commit1da12c5071a738504d22e68d66cab7c5c5afb07e (patch)
tree07f7190f8c76d4edda9e4caf569d23c300e96b53 /tests/various/muxpack.v
parente263bc249b905195120fbc074c6f80d03fb21cf8 (diff)
downloadyosys-1da12c5071a738504d22e68d66cab7c5c5afb07e.tar.gz
yosys-1da12c5071a738504d22e68d66cab7c5c5afb07e.tar.bz2
yosys-1da12c5071a738504d22e68d66cab7c5c5afb07e.zip
Add @cliffordwolf freduce testcase
Diffstat (limited to 'tests/various/muxpack.v')
-rw-r--r--tests/various/muxpack.v13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/various/muxpack.v b/tests/various/muxpack.v
index f3c25db8d..d45ce4045 100644
--- a/tests/various/muxpack.v
+++ b/tests/various/muxpack.v
@@ -166,3 +166,16 @@ module cliffordwolf_nonexclusive_select (
if (z) o = d;
end
endmodule
+
+module cliffordwolf_freduce (
+ input wire [1:0] s,
+ input wire a, b, c, d,
+ output reg [3:0] o
+);
+ always @* begin
+ o = {4{a}};
+ if (s == 0) o = {3{b}};
+ if (s == 1) o = {2{c}};
+ if (s == 2) o = d;
+ end
+endmodule