In Java, there is a facility for the program to wait and listen for an event to happen so that a particular piece of code can be executed. For example, when the mouse pointer moves over a button, then it's an event. This can be used to change the visual properties of the button. Similarly, System Verilog has introduced a data-type called
event that can be triggered by another piece of code from another place. So, we can have a piece of code wait until a particular event happens and then continue executing the main code.
So, an event is a means of communicating or synchronizing between two or more concurrently active processes. The event data type basically provides a handle to a synchronization object. An event variable can be assigned or compared to another event variable or assigned to
null. When assigned to another event variable, both variables point to the same synchronization object.
event over; // a new event is created called over event over_again = over; // over_again becomes an alias to over event empty = null; // event variable with no synchronization object