N
newdaddy
Hi all,
There's an example in Chap 18 of Ashenden's THE DESIGNER'S GUIDE TO
VHDL which reads a stimulus file using textIO and assigns signals from
a case statement whose case expression is a string naming the input to
be assigned. The stimulus file looks like
0ms signal1 0
10ms signal2 56
15ms otherSig 70
[...]
The case statement in the stimulus_interpreter process (after a line
is read from the stimulus file and converted) looks like
case signal_ID_string is
when "signal1" =>
read (command, signal1, read_ok);
[...]
when "signal2" =>
read (command, signal2, read_ok);
[...]
I feel that this is going to be cumbersome to maintain as several
hundred IO signals get added, resized, etc. Moreover it is starkly
inelegant. What I really want here is to simply to force a level of
evaluation on the string containing the signal name to be changed
(signal_ID_string in the example above) and simply assign the read
value to that signal, and get rid of the case statement altogether.
Something like
read (command, [eval signal_ID_string], read_ok);
though I know this syntax does not exist in the language.
Does anything exist in vhdl that would let me do that? What other
approaches are people using? I'd like to avoid reading values for
every port of the device at every simulation cycle as that would cause
a lot of unnecessary simulation events.
Thanks for any info you can share,
newdaddy
There's an example in Chap 18 of Ashenden's THE DESIGNER'S GUIDE TO
VHDL which reads a stimulus file using textIO and assigns signals from
a case statement whose case expression is a string naming the input to
be assigned. The stimulus file looks like
0ms signal1 0
10ms signal2 56
15ms otherSig 70
[...]
The case statement in the stimulus_interpreter process (after a line
is read from the stimulus file and converted) looks like
case signal_ID_string is
when "signal1" =>
read (command, signal1, read_ok);
[...]
when "signal2" =>
read (command, signal2, read_ok);
[...]
I feel that this is going to be cumbersome to maintain as several
hundred IO signals get added, resized, etc. Moreover it is starkly
inelegant. What I really want here is to simply to force a level of
evaluation on the string containing the signal name to be changed
(signal_ID_string in the example above) and simply assign the read
value to that signal, and get rid of the case statement altogether.
Something like
read (command, [eval signal_ID_string], read_ok);
though I know this syntax does not exist in the language.
Does anything exist in vhdl that would let me do that? What other
approaches are people using? I'd like to avoid reading values for
every port of the device at every simulation cycle as that would cause
a lot of unnecessary simulation events.
Thanks for any info you can share,
newdaddy