[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
相关推荐
brave and determined6 小时前
可编程逻辑器件学习(day26):低主频FPGA为何能碾压高主频CPU?
人工智能·嵌入式硬件·深度学习·学习·fpga开发·云计算·fpga
邮专薛之谦7 小时前
Verilog 语言基础学习
fpga开发
the sun348 小时前
数电基础:移位寄存器、顺序脉冲、序列信号发生器
单片机·嵌入式硬件·fpga开发·数电
brave and determined1 天前
可编程逻辑器件学习(day24):异构计算:突破算力瓶颈的未来之路
人工智能·嵌入式硬件·深度学习·学习·算法·fpga·asic
海涛高软2 天前
yolov8目标检测训练在rk3588上部署
fpga开发
第二层皮-合肥2 天前
USB3.0专题-硬件的测试
fpga开发
hexiaoyan8272 天前
高速数据采集卡设计方案:886-基于RFSOC的8路5G ADC和8路9G的DAC PCIe卡
fpga开发·高速数据采集卡·光纤pcie卡·通用pcie卡·xc7a100t板卡
坏孩子的诺亚方舟2 天前
FPGA系统架构设计实践7_时序收敛作业概述
fpga·xilinx·时序收敛·作业流程
嵌入式软硬件攻城狮2 天前
2.FPGA板卡通过电脑映射连接上网
fpga开发·电脑
brave and determined2 天前
可编程逻辑器件学习(day22):“让ARM穿上FPGA的马甲“:赛灵思Zynq的命名哲学与技术革命
arm开发·嵌入式硬件·fpga开发·zynq·fpga设计·嵌入式设计·fpga开发流程