Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > wait for, vhdl

Reply
Thread Tools

wait for, vhdl

 
 
Ramya Murali
Guest
Posts: n/a
 
      06-23-2012
signal a : std_logic;
p1 : process
begin
a<= '0';
wait for 5 ns;
a <= '1';
end process p1;

My questions are:

a) Is the process suspended when 'wait for' is encountered and resumed
when 'wait for' is satisfied? Hence, a sensitivity list is redundant
when 'wait for' is used in a process?

b) Will there be signal assignment when the process is suspended (as
opposed to the conventional signal assignment at the end of the
process)? i.e., @ 0 ns, a is 0 and @ 5 ns, a is 1;

 
Reply With Quote
 
 
 
 
Enrik Berkhan
Guest
Posts: n/a
 
      06-23-2012
Ramya Murali <> wrote:
> signal a : std_logic;
> p1 : process
> begin
> a<= '0';
> wait for 5 ns;
> a <= '1';
> end process p1;
>
> My questions are:
>
> a) Is the process suspended when 'wait for' is encountered and resumed
> when 'wait for' is satisfied? Hence, a sensitivity list is redundant
> when 'wait for' is used in a process?


Actually, waits in a process - be it directly visible or in a procedure
called by the process - and process sensitivity lists are mutually
exclusive.

Further, a process sensitivity list is equivalent to a wait statement at
the end of the process using the same sensitivity list (or an
automatically constructed list in the case of VHDL-2008 'all').

> b) Will there be signal assignment when the process is suspended (as
> opposed to the conventional signal assignment at the end of the
> process)? i.e., @ 0 ns, a is 0 and @ 5 ns, a is 1;


That 'conventional signal assignment at the end' is nothing else than the
update at the above mentioned implicit wait.

In your example there will be repeated assignments of '0', because there
is no implicit wait in a non-sensitivity-list-process. The process will
directly continue with "a <= '0'" after "a <= '1'", with '0' overwriting
'1'. The waveform will never change. Only transactions will be generated
on s1, but no events.

I assume what you want might be:

p1: process is
begin
a <= '0';
wait for 5 ns;
a <= '1';
wait for 5 ns;
end process p1;


Enrik
 
Reply With Quote
 
 
 
 
Paul Uiterlinden
Guest
Posts: n/a
 
      06-27-2012
Alan Fitch wrote:


> When all processes in a model are suspended, that's when signals update.


In my opinion that is an unnecessary mystification, and I guess it is even
wrong. Maybe it is true for synthesisable VHDL, where signal assignments
never have an "after" clause.

A signal assignment creates an event (if at all) in the future. Without
an "after" specification the event is projected to happen after one delta
delay. With an "after" specification the event is projected to happen after
the specified time. And if that time happens to be zero, the event will
happen after one delta.

--
Paul Uiterlinden
www.aimvalley.nl
e-mail addres: remove the not.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL--usage of WAIT statement in PROCESS anil VHDL 2 03-04-2010 10:43 AM
VHDL Wait-Statement after Synthese Roman VHDL 2 03-04-2010 10:41 AM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
Wait statement in vhdl anuaravind VHDL 1 11-01-2006 06:17 PM
How to make "fork/wait" to WAIT longer? Huey C Programming 1 03-01-2004 02:01 PM



Advertisments