Reputation: 26
I am writing a TCL script for modelsim, and I want to compare the output value of a signal to a constant to know the circuit is working correctly. I know how to control the input signals but can't figure out how to echo the output.
Ideally I'd be able to pipe everything to a csv file, but it'd be enough to have the script return a pass/fail.
Still I need to read the value of an output (in my case it's sim:/union/outf) in a similar way to something like [$echo outf] on bash
PS. I realize the title may be misleading, because I can print the value of a variable declared inside the script. I need to print the current value of a wave output.
Upvotes: 0
Views: 4225
Reputation: 21
When using Modelsim, the TCL command to echo the output is to use "examine"
examine -hex /tb/my_signal
Upvotes: 2
Reputation: 137587
The direct equivalent in Tcl of bash's echo $out
is:
puts $out
Or, if the variable is an environment variable:
puts $env(out)
Upvotes: 0