+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Advanced Member level 5
    Points: 12,859, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,586
    Helped
    300 / 300
    Points
    12,859
    Level
    27

    Using different time units in Verilog simulation

    Hello,

    In VHDL one can use different time units to schedule simulation events. For example:
    Code:
    x <= '0' , '1' after 2 ns , '0' after 4 ms ;
    From what I know for similar purposes Verilog uses the # sign followed by the number of simulation time units.
    Is there something equivalent in Verilog to my VHDL example ?

    •   AltAdvertisment

        
       

  2. #2
    Advanced Member level 3
    Points: 6,244, Level: 18
    Achievements:
    Created Blog entry 7 years registered

    Join Date
    Dec 2011
    Location
    Fremont, CA, USA
    Posts
    764
    Helped
    350 / 350
    Points
    6,244
    Level
    18
    Blog Entries
    4

    Re: Using different time units in Verilog simulation

    SystemVerilog allows time units.
    Code Verilog - [expand]
    1
    2
    3
    
    x <= 0;
    x <= #2ns 1;
    x <= #4ms 0;
    Dave Rich
    Senior Verification Consultant
    Mentor Graphics Corporation


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  3. #3
    Advanced Member level 5
    Points: 7,230, Level: 20

    Join Date
    Apr 2016
    Posts
    1,536
    Helped
    265 / 265
    Points
    7,230
    Level
    20

    Re: Using different time units in Verilog simulation

    verilog has no equivalent that I know of. it gets ugly when folks try to do gate level simulations with multiple clocks/frequencies and no common multiplier can be applied.
    Really, I am not Sam.


    1 members found this post helpful.

--[[ ]]--