[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
相关推荐
tju新生代魔迷1 小时前
Verilog HDL 学习笔记(十八)| 附录C:关键字、系统任务和编译指令
fpga开发
free-elcmacom4 小时前
FPGA学习笔记<1>FPGA的开发流程
fpga开发·硬件工程·hdl
明德扬5 小时前
AD9653单通道波形怎么看?幅度、频率与基础测量入门
学习·fpga开发·fpga
ERROR:996 小时前
GPT Images 2.5将手稿转时序图效果不佳
fpga开发
尤老师FPGA6 小时前
声学相机介绍
fpga开发
科恒盛远13 小时前
ZU902 FMC194 可编程宽带信号源实测
fpga开发·硬件工程·信号处理
大盛供应链·卢生16 小时前
哪些国产芯片可以替代进口芯片,哪些替代不了
fpga开发·容器
ALINX技术博客1 天前
跨越 1819 公里,ALINX 携 AI 异构平台、电子后视镜及 HIL 仿真方案亮相深圳国际电子展
ai·fpga开发·汽车
Enclustra_China1 天前
FMC为何成为FPGA生态的“万能扩展接口”?
fpga开发·fpga解决方案
tju新生代魔迷1 天前
Verilog HDL 学习笔记(十七)| 附录B:PLI子程序清单
fpga开发