[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
相关推荐
FPGA小c鸡3 小时前
FPGA卷积层流水线加速:从入门到精通(附完整SystemVerilog实现)
fpga开发
数字芯片实验室3 小时前
仿真器出bug了?分频时钟竞争的诡异仿真现象
fpga开发·bug
从此不归路4 小时前
FPGA 结构与 CAD 设计(第4章)下
fpga开发
Terasic友晶科技5 小时前
7-DE10-Nano的HDMI方块移动案例的整体实现(含Quartus完整工程免费下载)
fpga开发·i2c·pll·de10-nano·hdmi传输·方块移动案例·quartus prime
碎碎思5 小时前
使用 Arm Cortex-M1 实现低成本图像处理系统 的 FPGA 方案详解
arm开发·图像处理·人工智能·fpga开发
minglie16 小时前
PetaLinux工程目录设备树文件结构与作用
fpga开发
最遥远的瞬间6 小时前
二、FPGA程序固化
fpga开发
Ghost Face...6 小时前
内存调试:2T/3T模式配置实战指南
fpga开发
海涛高软6 小时前
Verlog实现串口的收发功能
fpga开发
从此不归路6 小时前
FPGA 结构与 CAD 设计(第4章)上
ide·fpga开发