[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
相关推荐
续写烂尾19 小时前
SD NAND vs SPI NAND:接口协议、坏块管理与开发成本全面对比
fpga开发
叶子野格21 小时前
《Verilog学习:数字系统设计基础》
学习·fpga开发
花 满 楼1 天前
TPWM — PWM 测量模式(TIM PWM Measurement Mode)
单片机·嵌入式硬件·fpga开发
叶子野格1 天前
《Verilog学习:前置知识》
学习·fpga开发
科恒盛远2 天前
RFSoC XCZU47DR 100G UDP高速数据传输的实现与调试(PCIE908 板卡技术系列三)
fpga开发
小麦嵌入式2 天前
FPGA入门(十一):受控线性序列机 UART 发送升级
stm32·单片机·嵌入式硬件·mcu·fpga开发·硬件工程
X_xcccc2 天前
2026硬核拆解:高性能异构计算板卡选型指南
fpga开发
tju新生代魔迷3 天前
Verilog HDL 学习笔记(十)| 第10章 时序和延迟
笔记·学习·fpga开发
aprilaaaaa4 天前
(TC397 学习笔记)二、ICU和TIM的时钟计算
笔记·学习·fpga开发
X_xcccc4 天前
2026高端FPGA开发平台权威评测与选型指南
fpga开发