[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
相关推荐
9527华安4 小时前
紫光同创FPGA实现AD7606数据采集转UDP网络传输,提供PDS工程源码和技术支持和QT上位机
网络·qt·fpga开发·udp·紫光同创·ad7606
szxinmai主板定制专家4 小时前
基于TI AM6442+FPGA解决方案,支持6网口,4路CAN,8个串口
arm开发·人工智能·fpga开发
7yewh5 小时前
FPGA前瞻篇-计数器设计与实现实例
arm开发·驱动开发·嵌入式硬件·fpga开发·硬件架构·硬件工程·精益工程
爱学习的张哥6 小时前
UDP--DDR--SFP,FPGA实现之指令监测模块实现
fpga开发·udp·指令
碎碎思9 小时前
FPGA+ESP32 = GameBoy 是你的童年吗?
fpga开发
搬砖的小码农_Sky10 小时前
FPGA:XILINX FPGA产品线以及器件选型建议
嵌入式硬件·fpga开发·硬件架构·硬件工程
YprgDay10 小时前
【Lattice FPGA 开发】Diamond在线调试Reveal逻辑乱跳的解决
fpga开发·diamond·reveal
MVP-curry-萌神10 小时前
FPGA图像处理(六)------ 图像腐蚀and图像膨胀
图像处理·人工智能·fpga开发
&Cheems12 小时前
ZYNQ笔记(二十):Clocking Wizard 动态配置
笔记·fpga开发
怪小庄吖12 小时前
7系列 之 I/O标准和终端技术
经验分享·笔记·fpga开发·硬件架构·硬件工程·xilinx 7系列 fpga·i/o标准和终端技术