U
unfrostedpoptart
Guest
I'm stumped on this problem that only exists because of SystemVerilog's and waveform viewers' issues dealing with dynamic object.
I just want to make a simple function that takes a string as an input and both does a print of it (actually UVM_INFO) and assigns it to a variable I can display in waveforms.
From what I've seen, waveform viewers won't display variables of type string since they're dynamically sized. So, I'm using the old, pre-SystemVerilog cheat of storing strings in bit vectors - e.g.
string. my_string
bit [32*8:1] pseudo_string;
However, I can't figure out how to get the real string into the pseudo-string. I tried $cast:
$cast(pseudo_string, my_string);
But I get a run-time error on this.
Ideas?
Thanks,
David
I just want to make a simple function that takes a string as an input and both does a print of it (actually UVM_INFO) and assigns it to a variable I can display in waveforms.
From what I've seen, waveform viewers won't display variables of type string since they're dynamically sized. So, I'm using the old, pre-SystemVerilog cheat of storing strings in bit vectors - e.g.
string. my_string
bit [32*8:1] pseudo_string;
However, I can't figure out how to get the real string into the pseudo-string. I tried $cast:
$cast(pseudo_string, my_string);
But I get a run-time error on this.
Ideas?
Thanks,
David