![]() |
|
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Posts: n/a
|
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 |
|
![]() |
| Thread Tools | Search this Thread |
|
|
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 |