mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-04 09:07:42 +00:00
Add test example
This commit is contained in:
parent
a30894e5fa
commit
53a4f0fb56
4 changed files with 51 additions and 0 deletions
28
tests/verific/case.sv
Normal file
28
tests/verific/case.sv
Normal file
|
@ -0,0 +1,28 @@
|
|||
module top (
|
||||
input clk,
|
||||
input [5:0] currentstate,
|
||||
output reg [1:0] o
|
||||
);
|
||||
always @ (posedge clk)
|
||||
begin
|
||||
case (currentstate)
|
||||
5'd1,5'd2, 5'd3:
|
||||
begin
|
||||
o <= 2'b01;
|
||||
end
|
||||
5'd4:
|
||||
begin
|
||||
o <= 2'b10;
|
||||
end
|
||||
5'd5,5'd6,5'd7:
|
||||
begin
|
||||
o <= 2'b11;
|
||||
end
|
||||
default :
|
||||
begin
|
||||
o <= 2'b00;
|
||||
end
|
||||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue