Skip to content

Commit 77e9f58

Browse files
authored
Merge pull request #4173 from grandixximo/cherry-4166-emccalib-master
emccalib: ignore ini refs embedded in pin names (cherry-pick of #4166)
2 parents 2be516b + 717a7d4 commit 77e9f58

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tcl/bin/emccalib.tcl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,16 @@ proc find_ini_refs {stanza} {
179179
if { [lindex $halcommand 1] == "\=" } {
180180
set tmpstring "setp [lindex $halcommand 0] [lindex $halcommand 2]"
181181
}
182+
# tunable item is the setp value (3rd token); ignore ini refs
183+
# that only appear inside the pin name (issue #4165)
184+
set valuestring [lindex $tmpstring 2]
182185
for {set sfx 0} {$sfx < $::EC($stanza,howmany)} {incr sfx} {
183186
set tabno $::EC($stanza,$sfx,tabno)
184187
set itag [lindex $::EC($stanza,suffixes) $sfx]
185-
if {[string match *${stanza}${itag}* $tmpstring]} {
188+
if {[string match *${stanza}${itag}* $valuestring]} {
186189
# this is a hal file search ordered loop
187-
set thisininame [string trimright [lindex [split $tmpstring "\]" ] end ]]
190+
set thisininame [lindex [split $valuestring "\]" ] end ]
191+
set thisininame [string map {( "" ) ""} $thisininame]
188192
set lowername "[string tolower $thisininame]"
189193
set thishalcommand [lindex $tmpstring 1]
190194
set tmpval [string trim [hal getp [halcmdSubstitute $thishalcommand]]]

0 commit comments

Comments
 (0)