aboutsummaryrefslogtreecommitdiffstats
path: root/tests/various/muxpack.v
diff options
context:
space:
mode:
Diffstat (limited to 'tests/various/muxpack.v')
-rw-r--r--tests/various/muxpack.v18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/various/muxpack.v b/tests/various/muxpack.v
index d45ce4045..3a1086dbf 100644
--- a/tests/various/muxpack.v
+++ b/tests/various/muxpack.v
@@ -179,3 +179,21 @@ module cliffordwolf_freduce (
if (s == 2) o = d;
end
endmodule
+
+module case_nonexclusive_select (
+ input wire [1:0] x, y,
+ input wire a, b, c, d, e,
+ output reg o
+);
+ always @* begin
+ case (x)
+ 0, 2: o = b;
+ 1: o = c;
+ default: begin
+ o = a;
+ if (y == 0) o = d;
+ if (y == 1) o = e;
+ end
+ endcase
+ end
+endmodule