mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-07 11:41:23 +00:00
Add nonexclusive test from @cliffordwolf
This commit is contained in:
parent
887df8914c
commit
e263bc249b
2 changed files with 28 additions and 0 deletions
|
@ -153,3 +153,16 @@ always @*
|
|||
else
|
||||
o <= i[4*W+:W];
|
||||
endmodule
|
||||
|
||||
module cliffordwolf_nonexclusive_select (
|
||||
input wire x, y, z,
|
||||
input wire a, b, c, d,
|
||||
output reg o
|
||||
);
|
||||
always @* begin
|
||||
o = a;
|
||||
if (x) o = b;
|
||||
if (y) o = c;
|
||||
if (z) o = d;
|
||||
end
|
||||
endmodule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue