FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-09-2004, 06:27 PM
VHDL User
Guest
 
Posts: n/a
Default Process...

Hi All,
I have a very basic doubt,which may probably have been answered before,
but nevertheless, here it is:
Is a process with NO wait and NO sensitivity list executed only once
(at the start of the simulation) or forever ? As in,
process ()
begin
A<=B and C;
end process

Suppose B and C are changed in some other part of the code.Then,will A
change at all ? that is,will the process keep executing ?
Also,if I synthesise this process, will there be anything generated at
all,since there is no sensitivity list?
Thanks a lot,
Bye
Reply With Quote
  #2 (permalink)  
Old 10-09-2004, 07:19 PM
Jim Lewis
Guest
 
Posts: n/a
Default Re: Process...

Actually quite the opposite. If you write your process
without a sensitivity list, it runs until it hits a wait
statement. If there is no wait statement, it loops
continuously. This is bad as it loops without any
time passing (including delta cycles) and if the simulator
does not detect it, then the simulation hangs.

The behavior of what your proposed circuit does is
consistent with the following. The following creates
a clock waveform with a period of 20 ns that runs forever.


ClkProc : process
begin
Clk <= '0' ;
wait for 10 ns ;
Clk <= '1' ;
wait for 10 ns ;
end process ;

Cheers,
Jim

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
Jim Lewis
Director of Training mailto:[email protected]
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~

> Hi All,
> I have a very basic doubt,which may probably have been answered
> before, but nevertheless, here it is:
> Is a process with NO wait and NO sensitivity list executed only once
> (at the start of the simulation) or forever ? As in,
> process ()
> begin
> A<=B and C;
> end process
>
> Suppose B and C are changed in some other part of the code.Then,will
> A change at all ? that is,will the process keep executing ?
> Also,if I synthesise this process, will there be anything generated at
> all,since there is no sensitivity list?
> Thanks a lot,
> Bye


Reply With Quote
  #3 (permalink)  
Old 10-12-2004, 06:41 PM
VHDL User
Guest
 
Posts: n/a
Default Re: Process...



On Sat, 9 Oct 2004, Jim Lewis wrote:

> Actually quite the opposite. If you write your process
> without a sensitivity list, it runs until it hits a wait
> statement. If there is no wait statement, it loops continuously.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is this a simulator dependent phenomenon or is it specified in the VHDL
language reference ?? While what you say is consistent with Verilog always
construct, it doesnt somehow fit in with the functioning of wait
statement.
When in the execution of a process, simulator encounters a wait, it
waits until the wait condition is satisfied. The release from wait
generates a event causing scheduling of the process to be executed at the
next free delta cycle.So,after completing the process, the scheduled event
is executed,i.e, the process is executed again. This is what happens in
your example of Clock generation.
However,if there is no wait statement, then WHY should there be a
process (re)execution event scheduled for the future ?
Thanks a lot for your reply.
Bye.

> This is bad as it loops without any
> time passing (including delta cycles) and if the simulator
> does not detect it, then the simulation hangs.
>
> The behavior of what your proposed circuit does is
> consistent with the following. The following creates
> a clock waveform with a period of 20 ns that runs forever.
>
>
> ClkProc : process
> begin
> Clk <= '0' ;
> wait for 10 ns ;
> Clk <= '1' ;
> wait for 10 ns ;
> end process ;
>
> Cheers,
> Jim
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
> Jim Lewis
> Director of Training mailto:[email protected]
> SynthWorks Design Inc. http://www.SynthWorks.com
> 1-503-590-4787
>
> Expert VHDL Training for Hardware Design and Verification
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
>
>> Hi All,
>> I have a very basic doubt,which may probably have been answered before,
>> but nevertheless, here it is:
>> Is a process with NO wait and NO sensitivity list executed only once
>> (at the start of the simulation) or forever ? As in,
>> process ()
>> begin
>> A<=B and C;
>> end process
>>
>> Suppose B and C are changed in some other part of the code.Then,will A
>> change at all ? that is,will the process keep executing ?
>> Also,if I synthesise this process, will there be anything generated at
>> all,since there is no sensitivity list?
>> Thanks a lot,
>> Bye

>
>

Reply With Quote
  #4 (permalink)  
Old 10-13-2004, 09:43 AM
Alan Fitch
Guest
 
Posts: n/a
Default Re: Process...


"VHDL User" <[email protected]> wrote in message
news:[email protected] hell.be...
>
>
> On Sat, 9 Oct 2004, Jim Lewis wrote:
>
> > Actually quite the opposite. If you write your process
> > without a sensitivity list, it runs until it hits a wait
> > statement. If there is no wait statement, it loops continuously.

> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Is this a simulator dependent phenomenon or is it specified in the

VHDL
> language reference ?? While what you say is consistent with Verilog

always
> construct, it doesnt somehow fit in with the functioning of wait
> statement.
> When in the execution of a process, simulator encounters a wait,

it
> waits until the wait condition is satisfied. The release from wait
> generates a event causing scheduling of the process to be executed

at the
> next free delta cycle.So,after completing the process, the scheduled

event
> is executed,i.e, the process is executed again. This is what happens

in
> your example of Clock generation.
> However,if there is no wait statement, then WHY should there be a
> process (re)execution event scheduled for the future ?
> Thanks a lot for your reply.
> Bye.
>

<snip>

In VHDL processes always execute in a loop continuously, unless there
is a means of suspending them. Your idea that the resumption of the
process after a wait generates an event is not correct. All processes
"want" to execute all the time unless they are suspended.

Your statement "at the next free delta cycle" is also not quite right.
The basic operation of the scheduler is

1. processes run until they suspend (the evaluate phase)
During evaluation, assignments to signals are made.

2. when *all* processes have suspended in the design, the
simulator updates any signals that may have been assigned
(the update phase)

3. Updating the signals may cause events that trigger processes
to run again without time advancing - if so go back to step 1

4. advance time

5. advancing time may result in timeouts occuring (e.g. wait for 10
ns
resumes)
or signals changing value (e.g. s <= '0', '1' after 10 ns If so
mark those processes as "need to run" and go back to step 1

6. if no events are scheduled and no timeouts are pending,
simulation ends


The loop from 1 to 3 is the delta cycle.

This a simplified description of the scheduler - see the LRM for the
full
details.


The basic point (compared to your original post) is that all processes
must
suspend before time can advance (either "real" time or a delta cycle
step).

So if a process has no wait statements and no sensitivity list, the
simulator
cannot advance and will get stuck in a loop.

This behaviour is described in the LRM.

regards

Alan


--
Alan Fitch
Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project
Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24
1AW, UK
Tel: +44 (0)1425 471223 mail:
[email protected]
Fax: +44 (0)1425 471573 Web:
http://www.doulos.com

The contents of this message may contain personal views which are not
the
views of Doulos Ltd., unless specifically stated.

Reply With Quote
  #5 (permalink)  
Old 10-14-2004, 02:26 PM
Srinivasan Venkataramanan
Guest
 
Posts: n/a
Default Re: Process...

Hi,
In addition to Alan's excellent "quick ref" on VHDL Scheduling, since you
are comparing it against Verilog, here is a simple mapping:

Verilog VHDL
--------------------
always process
initial process with a "wait;" at the end

i.e. there is no direct counter-part to Verilog's initial.

HTH,
Srinivasan
--
Srinivasan Venkataramanan
Corp. Appl. Engineer
Synopsys India Pvt. Ltd.
Bangalore, India
email:synopsys.com@svenkat
I own my words and not my employer, unless specifically mentioned
"VHDL User" <[email protected]> wrote in message
news:[email protected] hell.be...
>
>
> On Sat, 9 Oct 2004, Jim Lewis wrote:
>
> > Actually quite the opposite. If you write your process
> > without a sensitivity list, it runs until it hits a wait
> > statement. If there is no wait statement, it loops continuously.

> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Is this a simulator dependent phenomenon or is it specified in the VHDL
> language reference ?? While what you say is consistent with Verilog always
> construct, it doesnt somehow fit in with the functioning of wait
> statement.
> When in the execution of a process, simulator encounters a wait, it
> waits until the wait condition is satisfied. The release from wait
> generates a event causing scheduling of the process to be executed at the
> next free delta cycle.So,after completing the process, the scheduled event
> is executed,i.e, the process is executed again. This is what happens in
> your example of Clock generation.
> However,if there is no wait statement, then WHY should there be a
> process (re)execution event scheduled for the future ?
> Thanks a lot for your reply.
> Bye.
>
> > This is bad as it loops without any
> > time passing (including delta cycles) and if the simulator
> > does not detect it, then the simulation hangs.
> >
> > The behavior of what your proposed circuit does is
> > consistent with the following. The following creates
> > a clock waveform with a period of 20 ns that runs forever.
> >
> >
> > ClkProc : process
> > begin
> > Clk <= '0' ;
> > wait for 10 ns ;
> > Clk <= '1' ;
> > wait for 10 ns ;
> > end process ;
> >
> > Cheers,
> > Jim
> >
> > --



Reply With Quote
Reply

Bookmarks


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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the difference between two process model & one process model GrIsH FPGA 6 01-12-2009 03:26 PM
Map process failed sundar Verilog 2 08-19-2004 01:08 PM
Can there be 2 loops in one process Sujatha FPGA 1 11-25-2003 06:23 PM
Are all the signals read in the process should appear in the sensitivity list of the process? walala VHDL 3 09-09-2003 08:47 AM
XST Process Failure Jeremy Pyle VHDL 0 07-14-2003 05:35 AM


All times are GMT +1. The time now is 11:59 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved