R
rickman
Guest
I am writing a test bench and I can't get past this one error. It is
saying that the type name is not defined and of course that generates
a few other errors because the signal is not defined then. What am I
missing?
In a library file...
constant CODECDATAWDTH : integer := 24;
subtype CDC_DATA_RNG is natural range CODECDATAWDTH-1 downto 0;
subtype CDC_DATA_TYPE is std_logic_vector(CDC_DATA_RNG); -- data
path to/from codec
type CDC_DATA_BLK is array(natural range <> of CDC_DATA_TYPE;
This is where CDC_DATA_BLK is defined.
This library is included in the test bench (and all other files in the
project). The line that is throwing the error is...
constant CodecSamples : CDC_DATA_BLK (7 downto 0) :=
(X"123456", X"234567", x"345678", X"456789",
X"56789A", X"6789AB", X"789ABC", X"89ABCD");
The error message is...
ERROR:HDLParsers:3312 - "C:/Arius/Boards/IRIG-B/FPGA/IRIG-B-X/
IRIG_TB.vhd" Line 86. Undefined symbol 'CDC_DATA_BLK'.
Other types, subtypes and constants from the same library are seen and
produce no error. In particular, "CDC_DATA_TYPE" is used in the same
test bench without error. So there is either something wrong with the
type definition for CDC_DATA_TYPE, or there is something wrong with
the way I am using it and I don't see either...
Since it compiles the common library without error, "Undefined symbol"
just isn't the error I would expect.
Rick
saying that the type name is not defined and of course that generates
a few other errors because the signal is not defined then. What am I
missing?
In a library file...
constant CODECDATAWDTH : integer := 24;
subtype CDC_DATA_RNG is natural range CODECDATAWDTH-1 downto 0;
subtype CDC_DATA_TYPE is std_logic_vector(CDC_DATA_RNG); -- data
path to/from codec
type CDC_DATA_BLK is array(natural range <> of CDC_DATA_TYPE;
This is where CDC_DATA_BLK is defined.
This library is included in the test bench (and all other files in the
project). The line that is throwing the error is...
constant CodecSamples : CDC_DATA_BLK (7 downto 0) :=
(X"123456", X"234567", x"345678", X"456789",
X"56789A", X"6789AB", X"789ABC", X"89ABCD");
The error message is...
ERROR:HDLParsers:3312 - "C:/Arius/Boards/IRIG-B/FPGA/IRIG-B-X/
IRIG_TB.vhd" Line 86. Undefined symbol 'CDC_DATA_BLK'.
Other types, subtypes and constants from the same library are seen and
produce no error. In particular, "CDC_DATA_TYPE" is used in the same
test bench without error. So there is either something wrong with the
type definition for CDC_DATA_TYPE, or there is something wrong with
the way I am using it and I don't see either...
Since it compiles the common library without error, "Undefined symbol"
just isn't the error I would expect.
Rick