list-transactions ll
Simics Reference Manual  /  3 Commands  /  3.2 Command List  / 

list-variables

Synopsis

list-variables ["substr"]

Description

Lists all CLI variables and their current values. Use substr to filter for matching variable names. If the command is used in an expression, a list is returned instead.

CLI variables can be used to store temporary values. To set a variable, write $variable = value at the Simics prompt. The value can be of type integer, string, float, boolean or a list or values. To access a variable, prefix the name with a dollar sign ($); e.g., $variable. A variable can be used wherever an expression can be used. For example:

simics> $tmp = %pc + 4
simics> $count = 10
simics> disassemble $tmp $count

They can also be accessed from Python by using the namespace simenv (simenv is imported into global namespace by default, but if it is needed elsewhere, it can be imported from the cli module):

simics> $foo = 1 + 4 * 4
simics> @print(simenv.foo)
17
simics> @simenv.bar = "hello"
simics> echo $bar
hello

Provided By

Simics Core

See Also

$, read-variable, defined
list-transactions ll