• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. SKILL: How to have multiple schematics open and modify the...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 126
  • Views 12589
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SKILL: How to have multiple schematics open and modify the instance properties in them without closing the schematics

ExcaIibur
ExcaIibur over 4 years ago

My situation is I need to copy the instance property from one schematic to another one. For example, I have schematic_source and schematic_target. The instances in schematic_target is a subset of schematic_source.

For example, schematic_source has C0-C99. schematic_target has C0-C9. I need to copy the width and length property from source to targer for C0-C9.

It seems that I am encounting an issue that I cannot select the schematic I want: The ddsServOpen command automatically select the new opened schematic. So, when I first open the source and target schematics, the selected schematic is the one that is opened latter. And when I loop through C0-C9, there is no way for me to tell the tool to select the source schematic and query the property there.

Below is my pseudo code: 

ddsServOpen(schematic_source )
ddsServOpen(schematic_target )

source_cvId = dbOpenCellViewByType( schematic_source )
target_cvId = dbOpenCellViewByType( schematic_target )

instances_target= target_cvId->instances;

foreach( instance instances_target

instance_name=instance~>name
printf("instance name is: %s\n",instance_name)
refObj_source = rodGetObj( instance_name source_cvId)
instance_dbId_source = refObj_source~>dbId
;get the values {w,l,connection,segments} FROM source
geDeselectAll()
geSelectObject( instance_dbId_source )
schHiObjectProperty()
w=schObjPropForm->w->value;
printf("w=%s \n",w)
l=schObjPropForm->l->value;
printf("l=%s \n",l)
hiFormDone(schObjPropForm)
geDeselectAll()
; put the values {w,l,connection,segments} TO target
refObj_target = rodGetObj( instance_name target_cvId)
instance_dbId_target = refObj_target~>dbId
geDeselectAll()
geSelectObject( instance_dbId_target )
schHiObjectProperty()
schObjPropForm->w->value=w
schObjPropForm->l->value=l
hiFormDone(schObjPropForm)
geDeselectAll()

);end foreach

It seems that when the first schHiObjectProperty() is executed. The tools has the target schematic selected. So, although the instance in the source schematic is selected as I can see it, the "q" button is applied on the target schematic, and therefore, will not pop up the property window of the instance from the source schematic, and therefore, the w and l is nil in the first place.

The non-elegant solution is probably is probably I open and close the schematic on the fly, each time having only one opened schematic. But I fear that it creates too much overhead in opening and closing. I wonder whether is a more timing efficient to tell the tool that I want to select one of the two windows that are open, by name or ID.

 

  • Cancel
  • drdanmc
    drdanmc over 4 years ago

    I don't think you want the ddsServOpen() or all the hi* stuff.  I'd probably do something like use the two calls to dbOpenCellViewByType() being sure to use "r" mode for the source and "a" for the target.  Then do something like:

    for(i 0 9

      inst_name = sprintf(nil "C%d" i)

      src_inst = car(setof(X source_cv->instances X->name == inst_name))

      dst_inst = car(setof(X target_cv->instances X->name == inst_name))

      cdfgData = cdfGetInstCDF(dst_inst)

      dst_inst->w = src_inst->w

      ;; this business of looking for a callback and if found, triggering it is because just changing a value via the db interface won't trigger

      ;; callbacks and those can be important.

      param = car(setof(X cdfgData->parameters X->name == "w"))

      when(param->callback

         errsetstring(param->callback t)

      )

      dst_inst->l = src_inst->l

      param = car(setof(X cdfgData->parameters X->name == "l"))

      when(param->callback

         errsetstring(param->callback t)

      )

    )

    ;; these are if you want the script to check and save for you

    schCheck(target_cv)

    dbSave(target_cv)

    dbClose(target_cv)

    dbClose(source_cv)

    Hope this helps.

    -Dan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information