26 lines
242 B
Coq
26 lines
242 B
Coq
|
`timescale 1ns/1ns
|
||
|
module tb;
|
||
|
reg clk;
|
||
|
reg key;
|
||
|
wire [3:0] out;
|
||
|
|
||
|
initial begin
|
||
|
clk=0;
|
||
|
key=0;
|
||
|
end
|
||
|
|
||
|
always#10 clk=~clk;
|
||
|
always begin
|
||
|
repeat(10)
|
||
|
#15 key=~key;
|
||
|
|
||
|
repeat(10)
|
||
|
#15 key=0;
|
||
|
end
|
||
|
|
||
|
mstate M1(
|
||
|
.clk(clk),
|
||
|
.key(key),
|
||
|
.out(out));
|
||
|
|
||
|
endmodule
|