Example for all pcdb Functions
; Open the pc.db file (Get a pcdb "handle")
pcdb = pcdbOpen("lib" "cell" "schematic" "r")
; get a "generator" that can be used to get the "masters"
masterGen = pcdbGetInstMasterGen(pcdb)
; get the first master
master = pcdbNextInstMaster(masterGen)
; loop through all the masters
while( master != nil
; get the lib, cell and view name of this master
lib = pcdbInstMasterLib(master)
cell = pcdbInstMasterCell(master)
view = pcdbInstMasterView(master)
; Get whether lib, cell, and view are "fixed".
; "fixed" means that any elaboration (say using a configuration)
; should NOT do anything that would replace the master name with a
; different name supplied via the elaboration process (e.g a configuration)
libfixed = pcdbInstMasterLibFixed(master)
cellfixed = pcdbInstMasterCellFixed(master)
viewfixed = pcdbInstMasterViewFixed(master)
; For this demo code, just print the information.
printf("Master: %s %s %s %L %L %L\n"
lib cell view libfixed cellfixed viewfixed)
; get a "generator" that can be used to get the instances of this
; master
instGen = pcdbGetInstGen(master)
; get the first instance
inst = pcdbNextInst(instGen)
; loop through all the instances
while( inst != nil
; get the instance name and width
instName = pcdbInstName(inst)
instWidth = pcdbInstWidth(inst)
; For this demo code, just print the information
printf(" Inst: %s width: %d\n" instName instWidth)
inst = pcdbNextInst(instGen)
)
master = pcdbNextInstMaster(masterGen)
)
; free up resources associated with this pcdb "handle"
pcdbClose(pcdb
Related Topics
Parent/Child Database Functions
Return to top