mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-30 23:10:09 +00:00
Add tests for Xilinx UG901 examples
This commit is contained in:
parent
0d037bf9d8
commit
2ae7dec530
89 changed files with 2962 additions and 0 deletions
18
tests/xilinx_ug901/top_mux.v
Normal file
18
tests/xilinx_ug901/top_mux.v
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Multiplexer using case statement
|
||||
module mux4 (sel, a, b, c, d, outmux);
|
||||
input [1:0] sel;
|
||||
input [1:0] a, b, c, d;
|
||||
output [1:0] outmux;
|
||||
reg [1:0] outmux;
|
||||
|
||||
always @ *
|
||||
begin
|
||||
case(sel)
|
||||
2'b00 : outmux = a;
|
||||
2'b01 : outmux = b;
|
||||
2'b10 : outmux = c;
|
||||
2'b11 : outmux = d;
|
||||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue