[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
相关推荐
Risehuxyc1 小时前
HDL中assigned 与 always 有什么区别?
fpga开发
我爱C编程3 小时前
【3.5】固定旋转因子系数乘法模块的FPGA实现1——45°旋转因子和高阶蝶形修正因子
fpga开发·固定旋转因子·旋转因子
Terasic友晶科技13 小时前
答疑解惑 | DE25-Nano开发板串口在访问FPGA端外设LED时卡死,无任何反应
fpga开发·串口·led·de25-nano
尤老师FPGA17 小时前
LVDS系列46:Xilinx Ultrascale系 ADC LVDS接口参考方法(八)
fpga开发
何如呢1 天前
uw_inserter
fpga开发
何如呢1 天前
SC-FDE_tx_comb_part
fpga开发
LCMICRO-133108477461 天前
长芯微LCMDC8588完全P2P替代ADS8588,是一款16位、8通道同步采样的逐次逼近型(SAR)模数转换器
stm32·单片机·嵌入式硬件·fpga开发·硬件工程·模数转换器
云端码字人1 天前
007、PCIE数据链路层:可靠传输的保障
fpga开发
nuoxin1142 天前
CH6001FN/BW-富利威
网络·人工智能·嵌入式硬件·fpga开发·dsp开发
LCMICRO-133108477462 天前
长芯微LCMDC8685完全P2P替代ADS8685,16位模数转换器(ADC)
单片机·嵌入式硬件·fpga开发·硬件工程·dsp开发·模数转换器adc