[HDLBits] Tb/clock

You are provided a module with the following declaration:

复制代码
module dut ( input clk ) ;

Write a testbench that creates one instance of module dut (with any instance name), and create a clock signal to drive the module's clk input. The clock has a period of 10 ps. The clock should be initialized to zero with its first transition being 0 to 1.

051015202530354045...

复制代码
`timescale 1ps/1ps

//注意仿真单位ps
module top_module ( );
	parameter clk_period = 10;  
	reg clk;  
	initial
    	clk = 0;  
	always #(clk_period/2) clk = ~clk;  

    dut instance1(clk);
endmodule
相关推荐
博览鸿蒙16 小时前
FPGA 开发软件学习笔记分享(内含安装与环境配置)
笔记·学习·fpga开发
希言自然也19 小时前
赛灵思KU系列FPGA的ICAPE3原语和MultiBoot功能
fpga开发
Flamingˢ19 小时前
FPGA实战:基于Verilog的数码管动态扫描驱动设计与仿真验证
fpga开发
GateWorld20 小时前
跨时钟域同步(CDC)握手协议
fpga开发·cdc·asic·跨时钟域同步·握手协议
Flamingˢ21 小时前
Verilog中reg与wire的区别:从语法到实战
学习·fpga开发·硬件工程
数字芯片实验室21 小时前
边界值测试:一个”==”引发的芯片bug
fpga开发·bug
9527华安21 小时前
FPGA实现Aurora8B10B视频转UVC传输,基于GTP高速收发器+FT602芯片架构,提供4套工程源码和技术支持
fpga开发·gtp·uvc·aurora8b10b·ft602
tiantianuser21 小时前
RDMA设计31:RoCE v2 发送模块3
fpga开发·rdma·cmac·roce v2
海涛高软2 天前
verlog中阻塞赋值和非阻塞赋值
fpga开发
tiantianuser2 天前
RDMA设计29:RoCE v2 发送及接收模块设计2
服务器·fpga开发·rdma·fpga设计·高速传输