[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
相关推荐
千宇宙航3 小时前
闲庭信步使用图像验证平台加速FPGA的开发:第十四课——图像二值化的FPGA实现
图像处理·计算机视觉·fpga开发
千宇宙航7 小时前
闲庭信步使用图像验证平台加速FPGA的开发:第十五课——基于sobel算子边缘检测的FPGA实现
图像处理·计算机视觉·fpga开发
szxinmai主板定制专家9 小时前
基于光栅传感器+FPGA+ARM的测量控制解决方案
arm开发·人工智能·嵌入式硬件·fpga开发
千宇宙航1 天前
闲庭信步使用图像验证平台加速FPGA的开发:第十课——图像gamma矫正的FPGA实现
图像处理·计算机视觉·缓存·fpga开发
fei_sun1 天前
【FPGA】LUT如何实现组合逻辑、时序逻辑
fpga开发
小眼睛FPGA1 天前
【RK3568+PG2L50H开发板实验例程】FPGA部分 | 以太网传输实验例程
科技·单片机·嵌入式硬件·ai·fpga开发·fpga
千宇宙航1 天前
闲庭信步使用图像验证平台加速FPGA的开发:第十二课——图像增强的FPGA实现
图像处理·计算机视觉·fpga开发
hahaha60162 天前
通过Tcl脚本命令:set_param labtools.auto_update_hardware 0
fpga开发
霖002 天前
FPGA通信设计十问
运维·人工智能·经验分享·vscode·fpga开发·编辑器
稀液蟹-plus3 天前
zynq-PS篇——bperez77中DMA驱动注意事项
linux·fpga