[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的数字示波器设计和硬件调试,将正弦波形通过HDMI接口在屏幕上动态显示
fpga开发·hdmi·数字示波器·正弦波形
风_峰2 天前
AMD FPGA产品系列讲解
fpga开发
碎碎思2 天前
FINN:FPGA AI 推理新范式 —— 定制化、高性能、量化神经网络编译器框架
人工智能·深度学习·神经网络·机器学习·fpga开发
ShiMetaPi2 天前
GM-3568JHF丨ARM+FPGA异构开发板系列教程:外设教程 05 蓝牙
arm开发·fpga开发·fpga·rk3568
无情的8863 天前
硬件中的端接设计
fpga开发·硬件工程
快乐的划水a3 天前
存储器介绍(2)
fpga开发
leixj0253 天前
MultiBoot中的两个WatchDog时间设置及跳转调试
fpga开发
博览鸿蒙3 天前
FPGA 经典面试题目及答案汇总
fpga开发·面试·职场和发展
步达硬件4 天前
【FPGA】DP、HDMI、USB4、GPMI、eDP、LVDS等音视频协议及性能对比
fpga开发
-木槿昔年-5 天前
【米尔-安路MYD-YM90X创意秀】飞龙派学习和PS串口实践
学习·fpga开发