simulator_command
attempts to interact with the CLI of the simulator. i.e. the verilog/vhdl simulator TCL CLI. What you're doing there is going into the simulator's CLI and then calling back into specman with the sn [...]
command while using TCL's $env
to grab the environment variable. Something like this call diagram:
Assuming BRUN_MODE
is set to FOO
Specman Runtime Verilog/VHDL CLI
| *
| --> simulator_command( ------>|
* |
* sn $env(BRUN_RUN_MODE)
* | (TCL interpreter string transform)
* v
* sn "FOO"
* |
|<-------- "FOO" <--------------|
| *
|------->(end of `sn` call) --->|
* |
|<--(end of simulator_command)--|
| *
You want to use get_symbol
as Thorsten answered, unless you really do want a simulator command and not an environment variable. In which case, calling simulator_command
and then extracting the output from your simulator may be appropriate. However, that would require looking at your specific simulators documentation which is separate from your Specman documentation.