[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
相关推荐
GateWorld15 小时前
FPGA内部模块详解之九 FPGA内部模块的协同作战与设计流程精要
fpga开发·fpga设计流程
嵌入式-老费18 小时前
vivado hls的应用(hls需要verilog基础)
fpga开发
FPGA小迷弟1 天前
FPGA工程师面试题汇总(九)
网络协议·tcp/ip·fpga开发·面试·verilog·fpga
fei_sun1 天前
逻辑设计概念及Vivado基础
fpga开发
发光的沙子2 天前
FPGA----vitis测试linux程序
fpga开发
初夏正浓2 天前
一文读懂“JESD204B”之链路建立与xilinx IP仿真
fpga开发·xilinx·jesd204b
FPGA-ADDA3 天前
第一篇:从“软件无线电”到“单芯片无线电”——RFSoC如何重塑无线系统设计
arm开发·信号处理·fpga·通信系统·rfsoc
s09071363 天前
【Zynq 进阶一】深度解析 PetaLinux 存储布局:NAND Flash 分区与 DDR 内存分配全攻略
linux·fpga开发·设备树·zynq·nand flash启动·flash分区
Kong_19943 天前
芯片开发学习笔记·二十——时序报告分析
fpga开发·芯片开发
凌盛羽3 天前
使用python绘图分析电池充电曲线
开发语言·python·stm32·单片机·fpga开发·51单片机