0

I want to create a signal group with generic TOP name in session file for Synopsys DVE. My purpose is to use the same tcl file for block and system level debugs by defining correct 'TOP' value.

set TOP "TOP.Block_level"
#set TOP "TOP.SYSTEM_LEVEL.HIER1.HIER2"

set _session_group_1 Group1
gui_sg_create "$_session_group_1"
set Group1 "$_session_group_1"

set a "${TOP}.level1.signal1"
#add_wave $a # Works

# Oringial code
gui_sg_addsignal -group "$_session_group_1" { topA.level1.signal1  topA.level1.signal2 }

# Expected implementation similar to: but fires error that "$TOP.level1.signal1" not found
gui_sg_addsignal -group "$_session_group_1" { $TOP.level1.signal1  topA.level1.signal2 }

Appreciate the solution. Thanks

1 Answers1

0

The braces ({}) prevent the TCL interpreter from evaluating the variable content of $TOP. You should use double quotes (") as list delimiters or use the list command:

gui_sg_addsignal -group "$_session_group_1" "$TOP.level1.signal1  topA.level1.signal2"

or

gui_sg_addsignal -group "$_session_group_1" [list $TOP.level1.signal1  topA.level1.signal2]
bmk
  • 13,849
  • 5
  • 37
  • 46