2021年5月11日 星期二

HBLbits_Verilog Basic_Tb/clock

 HBLbits_Verilog Basic_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.


`timescale 1ps / 1ps

module top_module ( );
    reg clk;
    
    dut u_dut(
        .clk(clk)
    );
    
    initial begin
            clk = 1'b0;
        end
    
        always begin
            #5
            clk = ~clk;
        end
endmodule

沒有留言:

張貼留言

Telegram +ESP32自動發報機

  Telegram   +ESP32自動發報機 這套系統是一個典型的 IoT(物聯網)架構 ,結合了遠端配置(Python)、通訊中介(MQTT)與硬體執行(ESP32)。 以下我為您拆解這兩支程式的核心運作原理: 一、 系統架構流程 Python 端 (控制台) :使用者輸入...