admin管理员组

文章数量:1122832

So there's an array which contains all the from and to registers to create path groups inside Innovus Implementation System, but I don't understand why it doesn't create a path group named r2m. Any suggestions?

foreach groupPathName [array names CDNC_PATH_GROUPS] {
    set run_group_path 1
    if {[regexp all_registers $CDNC_PATH_GROUPS($groupPathName)] && [sizeof_collection [all_registers]] == 0} {
        set run_group_path 0
    }
    if {$run_group_path} {
        eval group_path -name $groupPathName $CDNC_PATH_GROUPS($groupPathName)"
    }
}

Initially I thought it's not creating that path group because of command length truncation of Innovus, but that's not the case, I tried to shrink the register names, but still it doesn't create. Is there any other way to take care of this?

So there's an array which contains all the from and to registers to create path groups inside Innovus Implementation System, but I don't understand why it doesn't create a path group named r2m. Any suggestions?

foreach groupPathName [array names CDNC_PATH_GROUPS] {
    set run_group_path 1
    if {[regexp all_registers $CDNC_PATH_GROUPS($groupPathName)] && [sizeof_collection [all_registers]] == 0} {
        set run_group_path 0
    }
    if {$run_group_path} {
        eval group_path -name $groupPathName $CDNC_PATH_GROUPS($groupPathName)"
    }
}

Initially I thought it's not creating that path group because of command length truncation of Innovus, but that's not the case, I tried to shrink the register names, but still it doesn't create. Is there any other way to take care of this?

Share Improve this question asked Nov 22, 2024 at 10:51 MercuryMercury 12 bronze badges 4
  • Does $CDNC_PATH_GROUPS(r2m) exist? Does the value of $CDNC_PATH_GROUPS(r2m) include the string all_registers? Why are you maintaining the run_group_path variable? Instead, you could use continue in the first if statement, or you could change the second if statement to a elseif statement. – Chris Heithoff Commented Nov 22, 2024 at 13:28
  • 2 The eval statement has the wrong number of double quotes. Why do you need eval anyway? – glenn jackman Commented Nov 22, 2024 at 13:49
  • ... and there is a single quote " at the end of $CDNC_PATH_GROUPS($groupPathName)" – thomas Commented Nov 24, 2024 at 16:12
  • check if r2m path group exists in your array puts [array names CDNC_PATH_GROUPS] – flash Commented Dec 6, 2024 at 14:44
Add a comment  | 

1 Answer 1

Reset to default 0

does:

  • $CDNC_PATH_GROUPS($groupPathName) contain a list of names?
  • group_path require not one list but one or more individual names?

If yes, then use

group_path -name $groupPathName {*}$CDNC_PATH_GROUPS($groupPathName)
# ..............................^^^

See Argument expansion in the Tcl syntax rules.

本文标签: tclI am having issue with quotevalquot while trying to build a command inside foreach loopStack Overflow