A
Andrew FPGA
Guest
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
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