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

49 lines
685 B
Coq
Raw Permalink Normal View History

2022-05-10 09:37:13 +00:00
`timescale 1ns/1ns
module jyh_4490_6_testbench_top;
reg clk;
wire [6:0] code;
wire [7:0] seg;
wire [19:0] cnt;
reg in;
reg en;
wire subclk;
wire [3:0] out0;
initial begin
clk=0;
in=0;
en=1;
end
always#10 clk=~clk;
always
begin
2022-05-11 03:49:38 +00:00
#1500000;
2022-05-10 09:37:13 +00:00
in=0;
repeat(5)
begin
in=1;
#1000000;
in=0;
#1000000;
end
in=1;
2022-05-11 03:49:38 +00:00
#35000000
2022-05-10 09:37:13 +00:00
repeat(5)
begin
in=0;
#1000000;
in=1;
#1000000;
end
in=0;
#15000000;
end
2022-05-11 03:49:38 +00:00
2022-05-10 10:11:28 +00:00
jyh_4490_6_entry E1(.code(code),.seg(seg),.clk_50m(clk),.en(en),.in(in),
2022-05-10 09:37:13 +00:00
//数码管型码 数码管位码 50M 清零信号 使能信号 按键
2022-05-11 03:49:38 +00:00
.out0(out0),.subclk(subclk),.cnt(cnt));
2022-05-10 09:37:13 +00:00
//计数值 消抖值
endmodule