Does anyone know what the difference between <signal>'event and
<signal>'transaction is? Anyone has a precise definition of these
<sig>'event is a boolean value that is TRUE in a delta cycle when
<sig> has just changed, and FALSE at other times. You can test
'event in an IF statement. Take, for example, the not-very-pretty
traditional form of clocked process:
process(clk, rst)
begin
if rst='1' then
-- do reset actions
elsif clk='1' and clk'event then
-- clk has just changed to '1', and
-- that change triggered the process
-- so do clocked actions
<sig>'transaction allows you to check whether some assignment was
made to the signal, even if that assignment didn't change the
signal's value. <sig>'transaction is a completely new signal,
of type BIT, that toggles from '0' to '1' or back again in each
delta cycle when one or more assignment is made to <sig>.
This is occasionally useful if you have a data structure representing
a transaction, and you would like to detect when someone puts
a new value on that data structure - even if it's the same as
the existing value. Because it's a new signal in its own right,
you can use it in a sensitivity list...
wait on thing'transaction;
-- someone has written to "thing"
-- so we need to process the new value
Fairly obviously, 'transaction is not synthesisable. 'event is
synthesisable in a few special cases.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
(e-mail address removed)
http://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.