Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Overloading scope

 
Thread Tools Search this Thread
Old 03-27-2006, 08:54 PM   #1
Default Overloading scope


Hi,
I have a few procedures in my main thread that I overload in scope.
This allows them to have much shorter calls in the various tests. This
works great, but recently I added some access types to my procedures
and now I can't get the compiler (Modelsim) to recognize the functions.
Ex.

PROCEDURE sendSerialMessage IS
BEGIN
sendSerialMessage(clk=> t_XMIT_CLK,
headPointer => headPointer,
dest=> dest,
parityValid => parityValid);
END sendSerialMessage;

headPointer is a shared variable that is an access type declared in a
separate package. I can make the call in my main thread- but the error
seems to only pop up when I try to overload the scope. It happens in
another procedure that I try to overload too. I tried using a local
variable and I get the same issue. Anyone else seen this?

Thanks,
Mike Scott



wpiman@aol.com
  Reply With Quote
Old 03-27-2006, 10:51 PM   #2
Mike Treseler
 
Posts: n/a
Default Re: Overloading scope
wrote:

> I have a few procedures in my main thread that I overload in scope.
> This allows them to have much shorter calls in the various tests.


This is a good idea when using packaged procedures.

An alternative is to declare the test procedures in a
single test process to eliminate the need for
most of the parameter passing.
For example, see the main process in the testbench here:
http://home.comcast.net/~mike_treseler/

> This
> works great, but recently I added some access types to my procedures
> and now I can't get the compiler (Modelsim) to recognize the functions.


I don't see any functions.


> PROCEDURE sendSerialMessage IS
> BEGIN
> sendSerialMessage(clk=> t_XMIT_CLK,
> headPointer => headPointer,
> dest=> dest,
> parityValid => parityValid);
> END sendSerialMessage;
>
> headPointer is a shared variable that is an access type declared in a
> separate package.


Why do you need to pass a shared variable as a parameter?
Is it not in scope anyway?

> I can make the call in my main thread- but the error
> seems to only pop up when I try to overload the scope.


I wonder what the error message is?
Are you properly dereferencing the pointer?

> It happens in
> another procedure that I try to overload too. I tried using a local
> variable and I get the same issue. Anyone else seen this?


I'm not sure what you are seeing.
Can you make a simple example demonstrating the problem?

-- Mike Treseler



Mike Treseler
  Reply With Quote
Reply

« vhdl code plz | hi »

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable scope toller Hardware 1 04-21-2008 08:28 PM
Out of Scope 70-620 Mike Lynn MCTS 3 03-29-2008 03:36 AM
Ip NAT overloading (VPN is not working) roland1976 Hardware 0 02-25-2008 10:13 AM
Variable Scope in asp.Net jansi_rk Software 1 09-18-2006 06:05 PM
Home Theater Profile Exchange - April 15 2005 David Troxell - Encourager Software DVD Video 0 04-16-2005 06:18 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46