This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/Quartus/v6/jyh_4490_6_testbench.v
2022-05-10 00:05:50 +08:00

44 lines
No EOL
421 B
Verilog

`timescale 1ns/1ns
module jyh_4490_6_testbench;
reg clk;
reg in;
reg en;
wire out;
wire [19:0] cnt;
initial begin
clk=0;
in=0;
en=1;
end
always#10 clk=~clk;
always#20000000
begin
in=0;
repeat(5)
begin
in=1;
#1000000;
in=0;
#1000000;
end
in=1;
#35000000
repeat(5)
begin
in=0;
#1000000;
in=1;
#1000000;
end
in=0;
end
jyh_4490_mstate M1(
.clk(clk),
.in(in),
.out(out),
.cnt(cnt));
endmodule