- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm having a procedure (non-synthesizable code) and I am trying to use the 'event attribute on a signal declared as input to the procedure: procedure priority_req(signal tb_control : in t_tb_control) is
begin
while (tb_control.command /= priority_grant) loop
wait for tb_control.cycle_time;
wait until tb_control.command'event;
end loop;
end priority_req;
tb_control is a signal (although mode 'in' within procedure) of type t_command where t_command is a record. From the compiler I am getting the error: Error, attribute event is only defined for signals.
I have tried all language syntaxes from '87 to '2008, all see it as an error. Does anyone have an ideea how I can fix/rewrite it so it gets compiled?
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thats because the 'event attribute is not a signal, and hence cannot be waited on.
instead, use: wait on tb_control.command;- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tricky
thank you, the compiler is happy with "wait on". Is "wait on signal" accomplished on assignment of signal or value change?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wait on waits until an event occurs on the signals in the list, so you can list multiple signals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to wait until the the assignment of a signal, you can use:
wait on my_signal'transaction; So in this case it is every time a signal is assigned, even if it is from the same state, eg:
my_signal <= '1';
wait for 10 ns;
my_signal <= '1';
creates 2 'transactions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using HDL Designer flow and the error I initially mentioned occurs in the "Generation step" of the ModelSim TCL flow.
With the proposed 'transaction attribute the tool passes the generation step but triggeres a compile error in ModelSim:wait on tb_control.command'transaction;
tb_control is a record containing a signal "command" ModelSim error:
Attribute "transaction" may not be read from formal signal parameter "tb_control".
VHDL Compiler exiting
It seems that various tools interpret these attributes differently: 1. ModelSim accepts 'event, HDL Designer doesn't 2. HDL Designer accepts 'transaction, ModelSim doesn't

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page