are these processes equal???

Status
Not open for further replies.

salma ali bakr

Advanced Member level 3
Joined
Jan 27, 2006
Messages
969
Helped
104
Reputation
206
Reaction score
21
Trophy points
1,298
Activity points
7,491
hi,

i'm a bit confused here, are these processes equal or different?
and if different, what is difference in their behaviours?
do i have to put the wait in the beginning or in the end?
what happens in the initial process evaluation too?

process1: process (A, B)
begin
out<=A and B;
end process;
---------------------------------------
process1: process
begin
out<=A and B;
wait on A, B;
end process;
---------------------------------------
process1: process
begin
wait on A, B;
out<=A and B;
end process;
---------------------------------------

Thanks,
Salma
 

Hi Salma,

All the three methods of describing the suspension of the process are same. they will produce the same results.

Cheers)

Added after 19 minutes:

The wait statements are not synthesizable by most of the synthesis tools and should not be used in synthesisable RTL.
 
But, won't the output use the new values of A and B if the wait statement is used in the beginning...and if it's used in the end then the old values will be used
can u tell me also please what happens in the initial process evaluation
I know it's not synthesizable but we took in class and i wanna understand it clearly

thanks,
Salma
 


The process statement remains either in suspended state or in the execution state. It gets executed when there is any event in the sensitivity list as described either by the sensitivity list with the process statement or with any wait statement. The values of the output get updated at the end of the process.(i.e. when the process gets suspended). In case of wait statement the process is suspended at wait.

say the wait statement is used in the beginning;
The process start executing at any event on A or B and the current values are taken into account. the output is updated accordingly. The process is again suspended and waits for another event on A or B.

Now say the wait statement is used in the last:
The process remains suspended at the wait statement. As soon as there is any event on the input signals, it starts executing. The control will enter into the process statement as there is no sensitivity list and update the values of the A and B to get the new updated output value. thus we again get the output for the current values of the inputs. the process gets suspended again at the wait statement and waits for any event on A or B.

I hope I could make it clear to you. If you still have any doubt, please come out and ask.

Cheers)
 
soooo, does it go like this then:

since the values of signals are all evaluated at the end of the process,
then if i have a wait statement at the end, i will re-evaluate the output before i
leave the process, and it will be with the new values of signals, as if i'm sort of going back to all the statements before this wait and changing them according to the events that occured, and then, it won't matter where the wait is
cause if i start with it, the signals will take the new values
and if i end with it, i will go back and evaluate the signals again and then go out of the process

is that right or there is still something i am missing???

thanks alot,
Salma
 

people generally study the same way as you are thinking that output is updated at the end of the process. This is the case when you are using a sensitivity list. so when end of the process arrives, the control does not go into the process statement again as it waits for the event at the sensitivity list of the process and remains in suspended state untill any event occurs. And hence we say that the outputs are updated at the end of the process.

In case of the wait statement in a process, irrespective of where they are used, the process is suspended at the wait statement and not at the beginning of the process statement. And hence the output is updated at the suspension of the process.(not at the end of the process always)

Good Luck
 
okay, so they are both equal cause the output is already updated if it was after the wait
and even if the statement was before the wait, then they get updated too as soon as an event occurs on one of the signals of the wait (process re-executes after suspension)- as if i have to change all the signals in the current simulation cycle before restarting the process all over again and a new cycle
 

Yes, I think you understand it better now. As the process is a concurrent statement, it executes as soon as there is any event on the signals included in either its sensitivity list or the wait statement.
well do you understand the concepts of delta delays (simulation deltas), coz it will give you a better picture of simulation timing analysis. I found "Bhasker" and "Perry" explain it better.

Cheers
 
are these books here in the board?
what are their full names please?
thanks alot
 

Dont know if these books are available here. But these are quite common books and I think should be available.
"VHDL Primer" by J Bhasker. The other book is by Douglas Perry.

well there is a topic in this forum itself "Best VHDL Book". You may find these books there.
"Lyndth and Stefen" is also a good book.
Pardon me please, spellings may not be correct.

Good Luck For your search.

regards,
 

Dear , why should we use process at there ?
can't we write this :

architecture beh of ent is
begin
out <= a and b ;
end;

what is the difference between my written program and program with process ... in functioning ?
is process something like interrupt in MCU ? so there should be some hardware waiting for changes on inputs to do the process , in MCU it is like external interrupt or pin change interrupt ???
however in MCU , one interrupt can be executed in a time but in vhdl all processes are executed in same time ....
 

actually, i was asking the question just for knowing more about the WAIT
not for the process functionality or its equivalence
my code is already combinational
even with the process included
so it's similar to the code your wrote
cause all the signals used to affect the output are in the sensitivity list
writing a process is usually for sequential execution
and its sensitivity list is the one waiting for signal events in order to execute the corresponding affected statements
i got to know that the difference between the locations of the wait is mainly in the initial simulation cycle
the output will begin with different values
cause it'll have to wait for the WAIT to occur if it's in the start
but if the wait is in the end
it'll start with the initial values of the statement signals
then wait for their events
and after that they will both continue similarly
so for having a process with wait instead of providing a sensitivity list
the WAIT is put in the end to ensure the execution of the initial simulation cycle

to have a wait or a process is somehow like polling on a signal's value
and its changes, like u said, having an interrupt for instance to occur in MCU
but there can be several processes, concurrently executing and communicating through signals


Salma
 

So can we say that

process with sensitivity list and process with wait statement written at last are SAME..
However proess with wait statement written at beginning is different than other 2 in case of initial value only...otherwise all 3 are same...

is my interpretation is correct?....if not please rectify...
thanks
 

YUP, perfecto
we all got it right at last
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…