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_top.v
2022-05-10 17:37:13 +08:00

50 lines
No EOL
723 B
Verilog

`timescale 1ns/1ns
module jyh_4490_6_testbench_top;
reg clk;
wire [6:0] code;
wire [7:0] seg;
wire [19:0] cnt;
reg clr;
reg in;
reg en;
wire subclk;
wire [3:0] out0;
wire [3:0] out1;
initial begin
clk=0;
in=0;
clr=1;
en=1;
end
always#10 clk=~clk;
always
begin
in=0;
#15000000;
repeat(5)
begin
in=1;
#1000000;
in=0;
#1000000;
end
in=1;
#30000000;
repeat(5)
begin
in=0;
#1000000;
in=1;
#1000000;
end
in=0;
#15000000;
end
jyh_4490_6_entry E1(.code(code),.seg(seg),.clk_50m(clk),.clr(clr),.en(en),.in(in),
//数码管型码 数码管位码 50M 清零信号 使能信号 按键
.out0(out0),.out1(out1),.subclk(subclk));
//计数值 消抖值
endmodule