editing connectivity database (cdlin schematic) with skill

D

danmc

Guest
Hi,

I want to make some changes to some "schematics" which were originally
generated by cdlin. The 2 operations I'm interested in are

1) changing some properties and

2) adding some extra devices in parallel with existing devices

For changing properties something like:

cvId = dbOpenCellViewByType( libName cellName viewName nil "a" )
instId = dbFindAnyInstByName( cvId, instName)
propId = dbGetPropByName(instId, pName)
propId->value = newValue

seems to work, but I can no longer netlist because I get a complaint
that the schematic has changed since last extraction.

For adding devices in parallel, I've tried something like:

cvId = dbOpenCellViewByType( libName cellName viewName nil "a" )
instId = dbFindAnyInstByName( cvId, instName)
instId2 = schCopy(instId, cvId, nil)
instId2->name = inst2Name

but I still have the extraction problem as well as the problem where I
havent' figured out how to set the connectivity of my new instance
(instId2).

Any suggestions?

Thanks
-Dan
 
propId = dbGetPropByName(instId, pName)
propId->value = newValue
you could rather use dbReplaceProp( instId pName pType value )

seems to work, but I can no longer netlist because I get a complaint
that the schematic has changed since last extraction.
use
schHiCheckAndSave()
or
schCheck( cvId )
dbSave( cvId )

cvId = dbOpenCellViewByType( libName cellName viewName nil "a" )
instId = dbFindAnyInstByName( cvId, instName)
instId2 = schCopy(instId, cvId, nil)
instId2->name = inst2Name
if you do this your new instance is not connected to anything.

but I still have the extraction problem as well as the problem where I
havent' figured out how to set the connectivity of my new instance
(instId2).
get the connectivity from instId~>instTerms, the create instTerms for
your new instance with dbCreateInstTerm(), ie

foreach( instTerm instId~>instTerms
net = instTerm~>net
termName = instTerm~>name
term = dbFindTermByName( instId~>master termName )
dbCreateInstTerm( net instId2 term )
)

Another option is to turn your instance into an iterated instance. much
easier:
instId~>numInst = 2*instId~>numInst

cheers,

stéphane
 
the connectivity part works like a champ. The schCheck() part doesn't
because the schematics created by cdlin are really just a connectivity
database and it has this schType=schNoEdit set on them which prevents
schCheck() from doing anything.

-Dan
 

Welcome to EDABoard.com

Sponsor

Back
Top