Signal Attribute 'Transaction 
Author Message
 Signal Attribute 'Transaction

I have a question about signal attribute 'transaction.  I've included a
simple piece of code where I would I am monitoring the transactions on
two signals out1 and out2.  Signal out1 is assigned in a process while
signal out2 is assigned outside of the process to signal out1.  Now I
would expect that if you simulate this then signal toggle2 would change
states  as signal out1 changes and it does.  Now if I switch the line
temp:=not(temp) to temp:='0'; then I would expect the toggle2 to change
states still because signal out1 still gets a transaction but no
scheduled event, but this does not happen.  The question is why does
toggle 2 not change?

entity test is
end test;

library ieee;
use ieee.std_logic_1164.all;
architecture junk of test is
  signal out1   : std_logic;
  signal out2 : std_logic;
  signal toggle : bit;
  signal toggle1 : bit;
  signal toggle2 : bit;
  signal tester : std_logic;

begin  -- junk
  tester    <= '0' after 0 ns, '0'  after 10 ns, '1' after 20 ns, '1'
after 40 ns, '0' after 60 ns;
  toggle   <= tester'transaction;
  toggle1 <= out1'transaction;
  toggle2 <= out2'transaction;

  test_process: process (toggle)
  variable temp : std_logic:='0';
  begin  -- process test_process
    temp := not(temp);
    -- temp := '0';
    out1 <= temp;
   end process test_process;

    out2 <= out1;

end junk;

Thank You

Craig



Mon, 27 Jan 2003 03:00:00 GMT  
 Signal Attribute 'Transaction
Hi Craig,

Why should signal "toggle2" change ? You are assigning "out1" to '0' within
the process and then you assign "out2" to "out1" in a concurrent statement.
So out2 gets the value '0' for all the simulation time, because out1 does
not change -> no transaction happened. A transaction only occurs when a
signal changes from '1' to '0' or vice versa.

hope this helps,

    Markus Sponsel

Quote:
>I have a question about signal attribute 'transaction.  I've included a
>simple piece of code where I would I am monitoring the transactions on
>two signals out1 and out2.  Signal out1 is assigned in a process while
>signal out2 is assigned outside of the process to signal out1.  Now I
>would expect that if you simulate this then signal toggle2 would change
>states  as signal out1 changes and it does.  Now if I switch the line
>temp:=not(temp) to temp:='0'; then I would expect the toggle2 to change
>states still because signal out1 still gets a transaction but no
>scheduled event, but this does not happen.  The question is why does
>toggle 2 not change?

>entity test is
>end test;

>library ieee;
>use ieee.std_logic_1164.all;
>architecture junk of test is
>  signal out1   : std_logic;
>  signal out2 : std_logic;
>  signal toggle : bit;
>  signal toggle1 : bit;
>  signal toggle2 : bit;
>  signal tester : std_logic;

>begin  -- junk
>  tester    <= '0' after 0 ns, '0'  after 10 ns, '1' after 20 ns, '1'
>after 40 ns, '0' after 60 ns;
>  toggle   <= tester'transaction;
>  toggle1 <= out1'transaction;
>  toggle2 <= out2'transaction;

>  test_process: process (toggle)
>  variable temp : std_logic:='0';
>  begin  -- process test_process
>    temp := not(temp);
>    -- temp := '0';
>    out1 <= temp;
>   end process test_process;

>    out2 <= out1;

>end junk;

>Thank You

>Craig



Tue, 28 Jan 2003 03:00:00 GMT  
 Signal Attribute 'Transaction
Hi Craig,
The main problem here is, that VHDL-Simulators are EVENT-driven!
To make the explanation a little bit easier think of the second
assignment as a process
like
implied_proces: process (out1);
   begin
     out2<=out1;
   end;

So, if there's no change in out1, there will be no assignment to out2
since there is no assignment to out1 that causes an EVENT.

Have a nice simulation

  Eilert

Quote:
>>>>>>>>>>>>>>>>>> Ursprngliche Nachricht <<<<<<<<<<<<<<<<<<


Attribute 'Transaction:
Quote:
> I have a question about signal attribute 'transaction.  I've included a
> simple piece of code where I would I am monitoring the transactions on
> two signals out1 and out2.  Signal out1 is assigned in a process while
> signal out2 is assigned outside of the process to signal out1.  Now I
> would expect that if you simulate this then signal toggle2 would change
> states  as signal out1 changes and it does.  Now if I switch the line
> temp:=not(temp) to temp:='0'; then I would expect the toggle2 to change
> states still because signal out1 still gets a transaction but no
> scheduled event, but this does not happen.  The question is why does
> toggle 2 not change?
> entity test is
> end test;
> library ieee;
> use ieee.std_logic_1164.all;
> architecture junk of test is
>   signal out1   : std_logic;
>   signal out2 : std_logic;
>   signal toggle : bit;
>   signal toggle1 : bit;
>   signal toggle2 : bit;
>   signal tester : std_logic;
> begin  -- junk
>   tester    <= '0' after 0 ns, '0'  after 10 ns, '1' after 20 ns, '1'
> after 40 ns, '0' after 60 ns;
>   toggle   <= tester'transaction;
>   toggle1 <= out1'transaction;
>   toggle2 <= out2'transaction;
>   test_process: process (toggle)
>   variable temp : std_logic:='0';
>   begin  -- process test_process
>     temp := not(temp);
>     -- temp := '0';
>     out1 <= temp;
>    end process test_process;
>     out2 <= out1;
> end junk;
> Thank You
> Craig



Tue, 28 Jan 2003 03:00:00 GMT  
 Signal Attribute 'Transaction
Hi,


Quote:
> Hi Craig,
> The main problem here is, that VHDL-Simulators are EVENT-driven!

  I am not sure if it has to with the concept of "Event Driven" simulation.
As far as I understand it is the "Concurrent Signal Assignment in VHDL"
itself that makes the "target" "sensitive" to any EVENTS on the objects on
the RHS. In otherwords in this case, out2 is sensitive to any EVENTS on out1
and not to TRANSACTIONS.

Correct me if I am wrong.

Srini

Quote:
> To make the explanation a little bit easier think of the second
> assignment as a process like

> implied_proces: process (out1);
>   begin
>     out2<=out1;
>   end;

  That's a pretty good explanation :-)


Tue, 28 Jan 2003 03:00:00 GMT  
 Signal Attribute 'Transaction
Sorry Marcus,
A Transaction happens everytime a signal becomes active (even WITHOUT
changing)
The attribut changes the level when this happens.
Compare it to the 'active attribute!

Both are unlike the 'event attribute wich shows assignments WITH signal
changes only!

Have a nice day
   Eilert

Quote:
>>>>>>>>>>>>>>>>>> Ursprngliche Nachricht <<<<<<<<<<<<<<<<<<


Re: Signal Attribute 'Transaction:

Quote:
> Hi Craig,
> Why should signal "toggle2" change ? You are assigning "out1" to '0'
within
> the process and then you assign "out2" to "out1" in a concurrent
statement.
> So out2 gets the value '0' for all the simulation time, because out1 does
> not change -> no transaction happened. A transaction only occurs when a
> signal changes from '1' to '0' or vice versa.
> hope this helps,
>     Markus Sponsel
> >I have a question about signal attribute 'transaction.  I've included a
> >simple piece of code where I would I am monitoring the transactions on
> >two signals out1 and out2.  Signal out1 is assigned in a process while
> >signal out2 is assigned outside of the process to signal out1.  Now I
> >would expect that if you simulate this then signal toggle2 would change
> >states  as signal out1 changes and it does.  Now if I switch the line
> >temp:=not(temp) to temp:='0'; then I would expect the toggle2 to change
> >states still because signal out1 still gets a transaction but no
> >scheduled event, but this does not happen.  The question is why does
> >toggle 2 not change?

> >entity test is
> >end test;

> >library ieee;
> >use ieee.std_logic_1164.all;
> >architecture junk of test is
> >  signal out1   : std_logic;
> >  signal out2 : std_logic;
> >  signal toggle : bit;
> >  signal toggle1 : bit;
> >  signal toggle2 : bit;
> >  signal tester : std_logic;

> >begin  -- junk
> >  tester    <= '0' after 0 ns, '0'  after 10 ns, '1' after 20 ns, '1'
> >after 40 ns, '0' after 60 ns;
> >  toggle   <= tester'transaction;
> >  toggle1 <= out1'transaction;
> >  toggle2 <= out2'transaction;

> >  test_process: process (toggle)
> >  variable temp : std_logic:='0';
> >  begin  -- process test_process
> >    temp := not(temp);
> >    -- temp := '0';
> >    out1 <= temp;
> >   end process test_process;

> >    out2 <= out1;

> >end junk;

> >Thank You

> >Craig



Tue, 28 Jan 2003 03:00:00 GMT  
 Signal Attribute 'Transaction
Hi,


Quote:
> Hi Craig,

> not change -> no transaction happened. A transaction only occurs when a
> signal changes from '1' to '0' or vice versa.

  That's an EVENT and not TRANSACTION. The initial example had a line:

  tester    <= '0' after 0 ns, '0'  after 10 ns, '1' after 20 ns, '1'

Here the signal "tester" receives TRANSACTION at "0" ns, "10" ns, "20 ns"
etc. But EVENT only at "20 ns" & "60 ns".

Hope this helps,
Srini



Tue, 28 Jan 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Determining 'high attribute of a signal without access to type

2. Signal attributes on a signal vector

3. CW 4.0 and 'Transaction Framing Error'

4. Query on Signal Attributes

5. How to use signal attributes on type BIT_VECTOR()?

6. RE : Signal Attributes in Viewlogic VHDL

7. Making the attribute 'self' preferred

8. 'Pre' attribute

9. 'Out of attribute space' error

10. Eiffel's attributes (was: Kent Beck's List)

11. Attributes 'Version and 'Body_Version

12. Strange Attribute Errors from 'frozen' exe

 

 
Powered by phpBB® Forum Software