[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
相关推荐
浩子智控2 天前
电子设备DevOps
fpga开发
cycf2 天前
CRC校验
fpga开发
landyjzlai2 天前
AMBA总线(15)关于AXI-stream(sg模式)
arm开发·fpga开发·amba
白狐_7982 天前
Quartus Prime 新手完全使用指南
fpga开发
Aaron15883 天前
三种主流接收机架构(超外差、零中频、射频直采)对比及发展趋势浅析
c语言·人工智能·算法·fpga开发·架构·硬件架构·信号处理
博览鸿蒙3 天前
一颗数字系统是如何在 FPGA 上“跑起来”的?
fpga开发
雨洛lhw3 天前
FPGA JTAG接口设计全解析
fpga开发·jtag
minglie13 天前
iverilog 配合 Makefile 搭建 Verilog 仿真工程
fpga开发
芒果树技术3 天前
MangoTree案例分享:基于AtomRIO FPGA平台,客户实现自适应主动减振
测试工具·fpga开发·模块测试
雨洛lhw3 天前
按键电路设计的细节
fpga开发