Event driven Verilog simulations

  • Thread starter lostinxlation
  • Start date
  • Tags
    Simulations
This is done through event-driven simulation. Verilog simulators are event-driven, meaning that they only take action when an event happens. This means that the simulator does not actively check for changes in the circuit, but waits for an event to occur before updating the circuit's state. In summary, Verilog simulators are event-driven, meaning that they only take action when an event happens. This allows them to accurately model the behavior of digital circuits.
  • #1
lostinxlation
38
0
I know Veriog simulators are event-driven and what matters is the moment that event happens.

Suppose we have a code like,

module inv (in, out);
input in;
output out;

wire inv_s1;
reg out;
assign inv_s1 = ~in;
assign out = ~inv_s1;

endmodule

My question is does inv_s1 maintains any state between the events ?
Let's say in=0 initially, and it gets changed to in=1. It propagates through inv_s1 and changes the state of 'out'. 'out' is declared as reg so that it maintains some state all the time, but what happens to inv_s1 which is declared as wire once the event settles ?
Does it still maintain the value 0, or it has no value or state assigned till the next event happens ?

More specifically, what value am I supposed to see on inv_s1 if I poke inv_s1 at #25 in the following simulation ?

initial begin
#10 in = 0;
#10 in = 1;
#10 in = 0;
#10 $finish;
end
 
Engineering news on Phys.org
  • #2
Verilog is a time-based simulation. Therefore, it must recognize state.
 

What is an event driven Verilog simulation?

An event driven Verilog simulation is a type of simulation used to model the behavior of a digital system using the Verilog hardware description language. It mimics the behavior of real hardware by reacting to events, such as changes in inputs, and updating the state of the system accordingly.

What is the purpose of an event driven Verilog simulation?

The purpose of an event driven Verilog simulation is to test and verify the functionality of a digital system before it is physically implemented. It allows designers to identify and correct any errors or bugs in the system design before production.

How does an event driven Verilog simulation work?

An event driven Verilog simulation works by using a time-based model, where events are scheduled to occur at specific times. When an event occurs, the simulation updates the state of the system and schedules any future events that may result from the change. This process continues until the simulation reaches a predefined time limit or all events have been processed.

What are the advantages of using an event driven Verilog simulation?

One advantage of an event driven Verilog simulation is that it allows for efficient testing and debugging of digital systems. It also allows for the evaluation of system performance and can help identify potential timing issues that may occur in the physical implementation. Additionally, it can save time and resources by catching errors early in the design process.

What are the limitations of event driven Verilog simulations?

One limitation of event driven Verilog simulations is that they may not accurately reflect the behavior of the physical system due to simplifications and assumptions made in the modeling process. Additionally, simulations may take a long time to run if the design is complex, and they may require significant computing resources.

Similar threads

  • Electrical Engineering
Replies
6
Views
4K
  • Electrical Engineering
Replies
2
Views
2K
Replies
2
Views
6K
  • Science Fiction and Fantasy Media
Replies
13
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Electrical Engineering
Replies
2
Views
2K
  • Electrical Engineering
Replies
2
Views
2K
  • Special and General Relativity
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • General Engineering
Replies
1
Views
2K
Back
Top