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

Reply

VHDL - Use clause usage with XST?

 
Thread Tools Search this Thread
Old 03-23-2006, 09:46 PM   #1
Default Use clause usage with XST?


Hi,
When I heavily make use of a package in a particular source file, I use
the following syntax:

library work;
use work.PkgMisc.all;

....and then happily use anything declared in the package.

But recently I had a situation where I only wanted to use a few things
from a package. According to the "The designers guide to VHDL,
Ashenden", I can do the following:

library work;
use work.PkgMisc; -- no all suffix

then when I come to use specific items from the package:

variable MyVbl : PkgMisc.MyVbl_type;

I like the idea of this syntax when I'm not heavily using the package,
it makes it immediately obvious to the reader where the defintion of
MyVbl_type is located. However, XST gives me this error when I try to
use something from the package:

ERROR:HDLParsers:1217 - "C:/project/.../Src/PcmRxInterface.vhd" Line
167. Symbol PkgMisc can't be used as a prefix in a selected name.

Is there an error in my syntax I'm missing? Does XST support this usage
of the USE clause? Has anyone sucessfully done this before?

Regards
Andrew



Andrew FPGA
  Reply With Quote
Old 03-27-2006, 12:17 PM   #2
Rolf Eike Beer
 
Posts: n/a
Default Re: Use clause usage with XST?
Von Andrew FPGA:

> When I heavily make use of a package in a particular source file, I use
> the following syntax:
>
> library work;
> use work.PkgMisc.all;
>
> ...and then happily use anything declared in the package.
>
> But recently I had a situation where I only wanted to use a few things
> from a package. According to the "The designers guide to VHDL,
> Ashenden", I can do the following:
>
> library work;
> use work.PkgMisc; -- no all suffix
>
> then when I come to use specific items from the package:
>
> variable MyVbl : PkgMisc.MyVbl_type;
>
> I like the idea of this syntax when I'm not heavily using the package,
> it makes it immediately obvious to the reader where the defintion of
> MyVbl_type is located. However, XST gives me this error when I try to
> use something from the package:
>
> ERROR:HDLParsers:1217 - "C:/project/.../Src/PcmRxInterface.vhd" Line
> 167. Symbol PkgMisc can't be used as a prefix in a selected name.
>
> Is there an error in my syntax I'm missing? Does XST support this usage
> of the USE clause? Has anyone sucessfully done this before?


use work.PkgMisc.MyVbl_type;
....
variable MyVbl: MyVbl_type;

HTH

Eike


Rolf Eike Beer
  Reply With Quote
Reply


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
Power DVD Usage John DVD Video 1 06-16-2005 03:07 AM
DVD Verdict reviews: THE SANTA CLAUSE 2, IN COLD BLOOD, and more! DVD Verdict DVD Video 0 12-16-2003 10:05 AM




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