Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

deallocate function in VHDL

387 views
Skip to first unread message

Arvind Kumar

unread,
Mar 29, 2002, 12:18:08 PM3/29/02
to
Hi all,
While using deallocate function in my vhdl source, modelsim gives
me this error.

ERROR: 2 subprograms named "deallocate" are valid in this context

Can someone quickly tell me why is this error message generated?? I
searched the library to see where is this function defined. But
couldn't find any. This is included automatically. Waiting for clues..

Thanks in advance.
Arvind

David Bishop

unread,
Mar 29, 2002, 12:32:20 PM3/29/02
to

Check your package definitions. You apparently have two functions
named "deallocate" which are visible in this context. The rule in
VHDL is that if there are two things named the same visible at the
same time, then NEITHER are visible.

Two ways to fix this:
1) Call out the function explicitly with libname.packagename.deallocate
2) Use the -explicit switch in Modeltech when you compile.

--
NAME: David W. Bishop INTERNET: dbi...@vhdl.org ( \ )
US MAIL: Hilton NY A Long time ago, \__\/
PHYSICAL: 43:17:17N 77:47:37W 281' In a Galaxy far, far away... | |
For Supernova info: http://www.RochesterAstronomy.org/snimages/ | |
For VHDL/Synthesis info: http://www.vhdl.org/siwg _/___\_
All standard disclaimers apply. [_______]

Andreas Gieriet

unread,
Mar 29, 2002, 12:31:37 PM3/29/02
to
Try the -explicit option.

...and/or show us your offending code.

Andi
--
Andreas Gieriet mailto:andreas...@externsoft.ch
eXternSoft GmbH http://www.externsoft.com/
Zurlindenstrasse 49 phone:++41 1 454 3077
CH-8003 Zurich/SWITZERLAND fax: ++41 1 454 3078


Arvind Kumar schrieb:

Mike Treseler

unread,
Mar 29, 2002, 12:59:37 PM3/29/02
to
Arvind Kumar wrote:

> While using deallocate function in my vhdl source, modelsim gives
> me this error.
>
> ERROR: 2 subprograms named "deallocate" are valid in this context

Comment out USE clauses one at a time to find
the location of the duplicate declaration.
If it's your code, consider a name change.

There is a predefined VHDL function

deallocate(access_type_object)


-- Mike Treseler

Mike Treseler

unread,
Apr 3, 2002, 4:47:33 PM4/3/02
to
Arvind:

This was intended for this thread from Paul Mariott
---------------------------

> I had an error like this when I used an alias to the actual type of the
> object I was trying to deallocate. I did this because I wanted to build
> a general-purpose binary tree and use an alias to the actual type of
> the leaves and branches of the tree. I was unable to resolve this problem
> (I was using modelsim). My only solution was to remove the alias declaration.
> I had no problems with "new" though. I figured it must be a modelsim bug
> but didn't persue the issue.

> Hope this helps,

> Paul.

0 new messages