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 09-12-2006, 07:32 AM
Ved
Guest
 
Posts: n/a
Default signals in Procedure

Hi all,

Here is a syntex for procedure declaration:

-----------------
procedure my_proc (parameter_interface_list)
{subprogram declarative part}
begin
{sequential statement}
end procedure;
-----------------
Where are signals defined in procedure ? (These signals are used for
implementing pipelining)

For example how will below signal be defined in procedure ?
if I decleare it in (parameter_interface_list) as

SIGNAL dat1s0: std_logic_vector(15 DOWNTO 0);
than it is assumed to be as input and I can't do something
like this
dat1s0 <= in1;
Where in1 is the input .

All the examples in books use variables in {subprogram declarative
part} .
So ambiguity remains in my mind regarding usuage of intermediate
signals in procedure.

Am I clear with my question ?
Should I paste my codes ?

Regards
Ved

Reply With Quote
  #2 (permalink)  
Old 09-12-2006, 09:59 AM
Paul Uiterlinden
Guest
 
Posts: n/a
Default Re: signals in Procedure

Ved wrote:

> Hi all,
>
> Here is a syntex for procedure declaration:
>
> -----------------
> procedure my_proc (parameter_interface_list)
> {subprogram declarative part}
> begin
> {sequential statement}
> end procedure;
> -----------------
> Where are signals defined in procedure ? (These signals are used
> for implementing pipelining)


You can't declare signals in a procedure.

You can have parameters declared as signals though. The signals they
are associated with (connected to) are declared in the architecture.

--
Paul.

Reply With Quote
  #3 (permalink)  
Old 09-12-2006, 02:59 PM
Andy
Guest
 
Posts: n/a
Default Re: signals in Procedure

You cannot declare signals inside a procedure, but if the procedure is
defined inside a process, then it has visibility and can assign to any
signal that is visible to the process.

When you say you need pipelining in the procedure, remember that most
synthesis tools do not accept subprograms (functions or procedures)
with wait statements. Therefore the entire procedure has to operate in
one clock. If it is called once every clock then it can implement
pipelining.

Variables can also imply registers if they are read before being
written during a clock cycle execution, forcing them to "remember" the
value from the last clock. Note that variables declared internally to
the procedure have no "memory" from one execution of the procedure to
the next, and therefore cannot be used for registers. Variables
declared before the procedure in the same process do. They can either
be accessed directly, or passed as inout parameters to the procedure.

Andy


Paul Uiterlinden wrote:
> Ved wrote:
>
> > Hi all,
> >
> > Here is a syntex for procedure declaration:
> >
> > -----------------
> > procedure my_proc (parameter_interface_list)
> > {subprogram declarative part}
> > begin
> > {sequential statement}
> > end procedure;
> > -----------------
> > Where are signals defined in procedure ? (These signals are used
> > for implementing pipelining)

>
> You can't declare signals in a procedure.
>
> You can have parameters declared as signals though. The signals they
> are associated with (connected to) are declared in the architecture.
>
> --
> Paul.


Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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
Passing Signals to Procedure Analog_Guy VHDL 4 10-04-2005 04:26 PM
Driving signals from a procedure Andy Peters VHDL 4 05-20-2005 10:51 AM
Accesing a procedure ALuPin FPGA 2 04-07-2004 10:42 AM
procedure Salman Sheikh VHDL 2 09-30-2003 06:39 PM
Help with procedure Willem Oosthuizen VHDL 1 08-20-2003 10:02 AM


All times are GMT +1. The time now is 08:37 AM.


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