Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using different time units in Verilog simulation

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
Hello,

In VHDL one can use different time units to schedule simulation events. For example:
Code:
x <= '0' , '1' after 2 [COLOR="#FF0000"]ns[/COLOR] , '0' after 4 [COLOR="#0000FF"]ms[/COLOR] ;

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 ?
 

SystemVerilog allows time units.

Code Verilog - [expand]
1
2
3
x <= 0;
x <= #2ns 1;
x <= #4ms 0;

 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
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.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top