mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 02:45:52 +00:00
initial import
This commit is contained in:
commit
7764d0ba1d
481 changed files with 54634 additions and 0 deletions
14
tests/asicworld/code_verilog_tutorial_decoder.v
Normal file
14
tests/asicworld/code_verilog_tutorial_decoder.v
Normal file
|
@ -0,0 +1,14 @@
|
|||
module decoder (in,out);
|
||||
input [2:0] in;
|
||||
output [7:0] out;
|
||||
wire [7:0] out;
|
||||
assign out = (in == 3'b000 ) ? 8'b0000_0001 :
|
||||
(in == 3'b001 ) ? 8'b0000_0010 :
|
||||
(in == 3'b010 ) ? 8'b0000_0100 :
|
||||
(in == 3'b011 ) ? 8'b0000_1000 :
|
||||
(in == 3'b100 ) ? 8'b0001_0000 :
|
||||
(in == 3'b101 ) ? 8'b0010_0000 :
|
||||
(in == 3'b110 ) ? 8'b0100_0000 :
|
||||
(in == 3'b111 ) ? 8'b1000_0000 : 8'h00;
|
||||
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue