[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
相关推荐
码农小韩7 小时前
FPGA学习(一)——LED点灯与开发流程
学习·fpga开发·入门·环境配置·仿真·点灯
FPGA小迷弟7 小时前
FPGA 与千兆以太网:各类物理接口的形式、区别、使用方法与应用场景详解
tcp/ip·macos·fpga开发·udp·fpga
NamoAmitabha1288 小时前
Zynq 的 AXI GPIO,是“ARM 通过一条国际标准高速公路(AXI 总线),去遥控 FPGA 里的一个寄存器”。---deepseek
fpga开发·zynq--ps
NamoAmitabha1289 小时前
ARM 不懂寄存器,它只懂内存地址---deepseek
fpga开发·zynq--ps
FPGA小迷弟11 小时前
FPGA 千兆以太网帧格式全解:从 IEEE 802.3 帧结构到 Verilog 收发实现
人工智能·5g·fpga开发·架构·硬件架构
幻智星科技12 小时前
FPGA数据采集接口选型终极指南
fpga开发·udp·硬件架构
星夜离尘5612 小时前
用 SystemVerilog 写一个可背压的流式 RLE 编码器:计数拆分、包尾与 flush 的完整实现
fpga开发
NamoAmitabha12816 小时前
ARM 不懂寄存器,它只懂内存地址--deepseek
fpga开发·zynq--ps
hahaha60161 天前
3NRD降噪算法FPGA实现8并行度设计
fpga开发
松小白song1 天前
一次“载电流显示为 0“的排查经历:负值钳位引发的踩坑
fpga开发