[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
相关推荐
深圳信迈科技DSP+ARM+FPGA3 小时前
基于X86+FPGA+AI的智能仓储AGV机器人解决方案
fpga开发
LEEE@FPGA10 小时前
FPGA DDR4读写实验(1)
fpga开发
顺子学不会FPGA10 小时前
SerDes介绍以及原语使用介绍(2)OSERDESE2原语仿真
fpga开发
小慧同学~15 小时前
FPGA/数字IC复习八股
fpga开发
qq_3923999017 小时前
FPGA的理解,个人的见解,不一定对
fpga开发
king8888666618 小时前
FPGA学习路线
fpga开发
神仙约架18 小时前
【总线】AXI4第六课时:寻址选项深入解析
fpga开发·axi·axi4·总线
零度随想18 小时前
使用fifo IP核,给fifo写数据,当检测到ALMOST_EMPTY时,为什么不能立即赋值
fpga开发
深圳信迈科技DSP+ARM+FPGA1 天前
基于x86/ARM+FPGA+AI工业相机的智能工艺缺陷检测,可以检测点状,线状,面状的缺陷
arm开发·fpga开发
攸志1 天前
Chirp信号生成(FPGA、基于cordic IP核)
fpga开发