[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
相关推荐
xgbing5 小时前
在ubuntu中安装modelsim
fpga开发·modelsim
碎碎思10 小时前
SURF:SLAC 开源 FPGA 与 ASIC 通用 RTL 框架详解
fpga开发
FPGA小迷弟13 小时前
FPGA在工业控制行业的应用,行业研究文章
fpga开发·制造·数据采集·fpga·工业控制
洋洋Young13 小时前
【Xilinx FPGA】CLB SliceL 与 SliceM
fpga开发·xilinx·clb
集芯微电科技有限公司13 小时前
PC1001超高频率(50HMZ)单通单低侧GaN FET驱动器支持正负相位配置
数据结构·人工智能·单片机·嵌入式硬件·神经网络·生成对抗网络·fpga开发
stars-he15 小时前
FPGA学习笔记(8)以太网UDP数据报文发送电路设计(二)
网络·笔记·学习·fpga开发
FPGA_小田老师16 小时前
FPGA例程(3):按键检测实验
fpga开发·verilog·vivado·led灯·按键测试
博览鸿蒙17 小时前
想考研到电子类,未来从事 FPGA/IC方向,目前该怎么准备?
考研·fpga开发
m0_5557629017 小时前
FPGA + AD7768-4 实现数据采集的可能方案
fpga开发
whik119417 小时前
Xilinx ZYNQ-7000系列FPGA选型指南
fpga·xilinx·zynq·选型·高速接口·资源