mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-26 10:35:38 +00:00
initial import
This commit is contained in:
commit
7764d0ba1d
481 changed files with 54634 additions and 0 deletions
27
tests/hana/test_simulation_decoder_6_test.v
Normal file
27
tests/hana/test_simulation_decoder_6_test.v
Normal file
|
@ -0,0 +1,27 @@
|
|||
module test (input [3:0] in, input enable, output reg [15:0] out);
|
||||
|
||||
always @(in or enable)
|
||||
if(!enable)
|
||||
out = 16'b0000000000000000;
|
||||
else begin
|
||||
case (in)
|
||||
4'b0000 : out = 16'b0000000000000001;
|
||||
4'b0001 : out = 16'b0000000000000010;
|
||||
4'b0010 : out = 16'b0000000000000100;
|
||||
4'b0011 : out = 16'b0000000000001000;
|
||||
4'b0100 : out = 16'b0000000000010000;
|
||||
4'b0101 : out = 16'b0000000000100000;
|
||||
4'b0110 : out = 16'b0000000001000000;
|
||||
4'b0111 : out = 16'b0000000010000000;
|
||||
4'b1000 : out = 16'b0000000100000000;
|
||||
4'b1001 : out = 16'b0000001000000000;
|
||||
4'b1010 : out = 16'b0000010000000000;
|
||||
4'b1011 : out = 16'b0000100000000000;
|
||||
4'b1100 : out = 16'b0001000000000000;
|
||||
4'b1101 : out = 16'b0010000000000000;
|
||||
4'b1110 : out = 16'b0100000000000000;
|
||||
4'b1111 : out = 16'b1000000000000000;
|
||||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue