Event is an attribute that returns information about signals (such as whether that signal has changed its value or its previous value)
If the value of a signal has an event (changed its value) in the current simulation cycle, this attribute returns TRUE.
Event is an important and commonly used attribute in VHDL.
Any change on a signal can be detected by usign event.
Its function is based on checking any change on the edges of clock signal. The last change on the clock signal can be detected by using LAST_EVENT attribute. Â This attribute returns the time elapsed since the previous event occurring on this signal.
When execution reaches the end of the process, the process suspends itself, and waits for another event to occur on a signal in its sensitivity list.
variable T: time;
Â Â b <= a after 20 ns;
Â Â wait 50 ns;
Â T := b'last_event; -- Value of T becomes 50 ns
. . .
Â Â if Rst = '0' then
Â Â Â Â Â b <= a;
Â elsif CLK'event and CLK='1' then Â -- The expression returns TRUE on the rising edge of the clock signal.
Â Â Â Â a <= '1';
Â end if;
If Rst is '0' vaue of âaâ is assigned to âbâ. If Rst is '1' and if an event occurs on the CLK signal while its value is '1', variable âaâ becomes '1'.