[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
相关推荐
第二层皮-合肥1 小时前
FPGA硬件开发-Xilinx产品介绍
fpga开发
XINVRY-FPGA1 小时前
XCVP1902-2MSEVSVA6865 AMD 赛灵思 XilinxVersal Premium FPGA
人工智能·嵌入式硬件·神经网络·fpga开发·云计算·腾讯云·fpga
热爱学习地派大星1 小时前
FPGA实现CRC校验
fpga开发
芒果树技术3 小时前
MT-PXle RIO模块【高性能FPGA+ LVDS】采用FPGA实现高效LVDS通讯
fpga开发·模块测试·fpga
明月清了个风5 小时前
STM32初始化串口重定向后printf调试信息不输出的问题
stm32·单片机·fpga开发·嵌入式软件
通信小呆呆9 小时前
电路思维下的 Verilog:如何区分组合逻辑与时序逻辑
fpga开发·电路·时序逻辑·跨时钟域·组合逻辑
嵌入式-老费9 小时前
Zynq开发实践(FPGA之uart接收)
fpga开发
ShiMetaPi1 天前
操作【GM3568JHF】FPGA+ARM异构开发板 使用指南:蓝牙
arm开发·嵌入式硬件·fpga开发·rk3568
知识充实人生1 天前
静态时序分析详解之时序路径类型
fpga开发·时序路径·关键路径
9527华安2 天前
Xilinx系列FPGA实现DP1.4视频收发,支持4K60帧分辨率,提供2套工程源码和技术支持
fpga开发·音视频·dp1.4·4k60帧