A
Analog_Guy
Guest
I am trying to declare a SIGNAL of type STRING in a testbench package.
The signal is strictly used to contain information for a header that I
want to WRITE from within the testbench.
I want to FORCE the value of the signal with a ModelSim DO file, so
that I don't have to re-compile the package each time I need a
different header (i.e. Date, Device, Simulation Type, etc.).
Previously, I just used a CONSTANT declaration, and all was fine
(except that I have to re-compile the package each time I change the
CONSTANT value for successive runs).
How come I can do the following:
CONSTANT SIM_TYPE : STRING := "Behavioral";
But not the following:
SIGNAL SIM_TYPE : STRING := "Behavioral";
ModelSim complains of an array type that is unconstrained.
How can I make the SIGNAL declaration generic, so that I don't have to
manually set the RANGE each time? I just want to feed in various
length STRINGs from my DO file.
The signal is strictly used to contain information for a header that I
want to WRITE from within the testbench.
I want to FORCE the value of the signal with a ModelSim DO file, so
that I don't have to re-compile the package each time I need a
different header (i.e. Date, Device, Simulation Type, etc.).
Previously, I just used a CONSTANT declaration, and all was fine
(except that I have to re-compile the package each time I change the
CONSTANT value for successive runs).
How come I can do the following:
CONSTANT SIM_TYPE : STRING := "Behavioral";
But not the following:
SIGNAL SIM_TYPE : STRING := "Behavioral";
ModelSim complains of an array type that is unconstrained.
How can I make the SIGNAL declaration generic, so that I don't have to
manually set the RANGE each time? I just want to feed in various
length STRINGs from my DO file.