Guest
Hello Gurus of VHDL,
I have synthesizable VHDL code for a receiver (my DUT).
In my VHDL testbench, I want to model an *arbitrary* number of
overlapping transmitters in the area, each of which can generate a
"long" waveform (2000 to 20000 clocked samples, depending on message
format).
Can I dynamically (and at random) instantiate (and destroy) instances
of a transmitter model/component?
I'd like to have transmitters randomly enter and leave the reception
area, and while in range, independently of (and asynchronous to) each
other, transmit their signal to my DUT. The input to my DUT comes from
an A/D converter model, whose output should be the sum of all the
currently active transmitter signals.
ANY SUGGESTIONS ON THE BEST APPROACH? (Should I switch to SystemC?)
Some considerations follow:
If not multiple dynamic instantiations of a transmitter "component",
might it be better to create ONE transmitter model that can generate an
arbitrary number of signals itself?
Since each transmitter's output is async wrt others, and the output
waveforms vary between 2000 and 20000 clock cycles, a single model (one
instance) would have to keep track of all state info (including time,
or relative time) for each waveform being generated.
If the number of overlapping transmitter waveforms is arbitrary, would
I have to use dynamic memory allocation (access types?) to do this?
Less elegant methods would include instantiating a fixed number of
simple transmitters, or writing an arrayed implementation of a
transmitter/summer. In either case, some upper limit on the number of
transmitters would likely be hardcoded.
Either way, I need to have ONE adder (with appropriate number of
inputs) summing the transmitter outputs and producing one output to
drive my A/D converter model.
I currently use an ugly, standalone C program to generate text files
that represent the summed (superimposed) overlapping waveforms. These
files are read in by the A/D converter model in my testbench, and
that's what drives the DUT.
C does not model the concurrency well, and the limitations of reading a
canned file (slow I/O, no dynamic adaptation of the transmitted
signals, difficulty in self-checking) are my motivations do this all
dynamically (in simulator memory).
I did something like the dynamic multiple instantiations in an Ada
project 15 years ago, but can't find the code or remember how I did it.
Would something like SystemC (which I barely know) constructors and
destructors make this easier, and integrate well into a VHDL (ModelSim)
testbench?
Thanks very much for any and all constructive feedback. I really do
appreciate it.
mj
I have synthesizable VHDL code for a receiver (my DUT).
In my VHDL testbench, I want to model an *arbitrary* number of
overlapping transmitters in the area, each of which can generate a
"long" waveform (2000 to 20000 clocked samples, depending on message
format).
Can I dynamically (and at random) instantiate (and destroy) instances
of a transmitter model/component?
I'd like to have transmitters randomly enter and leave the reception
area, and while in range, independently of (and asynchronous to) each
other, transmit their signal to my DUT. The input to my DUT comes from
an A/D converter model, whose output should be the sum of all the
currently active transmitter signals.
ANY SUGGESTIONS ON THE BEST APPROACH? (Should I switch to SystemC?)
Some considerations follow:
If not multiple dynamic instantiations of a transmitter "component",
might it be better to create ONE transmitter model that can generate an
arbitrary number of signals itself?
Since each transmitter's output is async wrt others, and the output
waveforms vary between 2000 and 20000 clock cycles, a single model (one
instance) would have to keep track of all state info (including time,
or relative time) for each waveform being generated.
If the number of overlapping transmitter waveforms is arbitrary, would
I have to use dynamic memory allocation (access types?) to do this?
Less elegant methods would include instantiating a fixed number of
simple transmitters, or writing an arrayed implementation of a
transmitter/summer. In either case, some upper limit on the number of
transmitters would likely be hardcoded.
Either way, I need to have ONE adder (with appropriate number of
inputs) summing the transmitter outputs and producing one output to
drive my A/D converter model.
I currently use an ugly, standalone C program to generate text files
that represent the summed (superimposed) overlapping waveforms. These
files are read in by the A/D converter model in my testbench, and
that's what drives the DUT.
C does not model the concurrency well, and the limitations of reading a
canned file (slow I/O, no dynamic adaptation of the transmitted
signals, difficulty in self-checking) are my motivations do this all
dynamically (in simulator memory).
I did something like the dynamic multiple instantiations in an Ada
project 15 years ago, but can't find the code or remember how I did it.
Would something like SystemC (which I barely know) constructors and
destructors make this easier, and integrate well into a VHDL (ModelSim)
testbench?
Thanks very much for any and all constructive feedback. I really do
appreciate it.
mj