[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
相关推荐
知识充实人生6 小时前
Xilinx 7系列器件特性对比
fpga·xilinx·赛灵思·7系列·器件资源对比
最遥远的瞬间18 小时前
四、Xilinux在线调试方法和XADC的使用
fpga开发
tobias.b1 天前
408真题解析-2010-12-计组-程序执行时间
单片机·嵌入式硬件·fpga开发·计算机考研·408真题解析
洋洋Young1 天前
【Xilinx FPGA】7 Series 收发器架构与时钟设计
fpga开发·xilinx
unicrom_深圳市由你创科技1 天前
XDMA 技术及在 Windows 平台的应用实践
fpga开发
s09071362 天前
【Agent】Claude code辅助verilog编程
fpga开发
3有青年2 天前
altera fpga agilex 5 连接到HVIO BANK上的参考时钟,是否可以作为HSIO BANK内部IOPLL的输入时钟
fpga开发
FPGA_ADDA2 天前
基于ZU47DR 的高性能射频卡
fpga开发
ooo-p2 天前
FPGA学习篇——Verilog学习之“流水灯”
学习·fpga开发
坏孩子的诺亚方舟2 天前
FPGA系统架构设计实践14_OTA升级
fpga·加载