I tried to use the results browser to search in the files generated by
the netlisting process during simulation (I am using Spectre, btw),
but found nothing. Any ideas?
Thanks in advance and best regards,
Jorge Luis.
There's currently nothing to produce this BOM-like information (Bill of
Materials) - you could of course do it with some SKILL code to traverse the
hierarchy and count all the components.
I don't have anything lying around to do this - perhaps somebody else in the
group does?
Regards,
Andrew.
Unfortunatly, this menu Tree does not exist in Virtuoso Schematic.
======================
Kholdou...@imag.fr
http://cmp.imag.fr
======================
I didn't have time to thouroughly check the output but I think this will do an accurate
count. It was correct for a schematic with a couple of levels of hierearchy and some
iterated instances.
The fucntion will print out the instance information as well as define a global
table called _schTreeTable that can be accessed outside the function.
procedure(getSchAllInstCnt(@optional (start geGetWindowCellView()) (firstTime t) (itInstCnt 1))
let((cells instSch cl cn startTime)
when(firstTime
startTime = getCurrentTime()
_schTreeTable = makeTable("tree" 0)
_schTreeTable[start~>cellName] = 1
)
cells = setof(x start~>instances x~>purpose == "cell" && x~>instTerms)
foreach(inst cells
cl = inst~>master~>lib~>name
cn = inst~>master~>cellName
_schTreeTable[cn] = _schTreeTable[cn] + itInstCnt*inst~>numInst
instSch = nil
when(ddGetObj(cl cn "schematic")
instSch = dbOpenCellViewByType(cl cn "schematic" nil "r"))
when(instSch getSchAllInstCountFromHier(instSch nil inst~>numInst*itInstCnt))
);foreach inst
when(firstTime
foreach(x _schTreeTable[?] printf("%L ------> %L\n" x _schTreeTable[x]))
printf("Instance count took %L seconds \n" compareTime( getCurrentTime() startTime))
)
t
); let
);procedure
Thanks for posting the skill but the getSchAllInstCountFromHier()
procedure is missing.
Tim
procedure(getSchAllInstCnt(@optional (start geGetWindowCellView()) (firstTime t) (itInstCnt 1))
let((cells instSch cl cn startTime)
when(firstTime
startTime = getCurrentTime()
_schTreeTable = makeTable("tree" 0)
_schTreeTable[start~>cellName] = 1
)
cells = setof(x start~>instances x~>purpose == "cell" && x~>instTerms)
foreach(inst cells
cl = inst~>master~>lib~>name
cn = inst~>master~>cellName
_schTreeTable[cn] = _schTreeTable[cn] + itInstCnt*inst~>numInst
instSch = nil
when(ddGetObj(cl cn "schematic") instSch = dbOpenCellViewByType(cl cn
"schematic" nil "r"))
when(instSch getSchAllInstCnt( instSch nil inst~>numInst*itInstCnt))
);foreach inst
when(firstTime
foreach(x _schTreeTable[?] printf("%L ------> %L\n" x _schTreeTable[x]))
printf("Instance count took %L seconds \n" compareTime( getCurrentTime() startTime))
)
t
); let
);procedure
That worked great.
Tim
untested
;; call a given function on all instances found in a schematic
hierarchy
(defun traverse (d_cv u_fun)
(foreach d_inst d_cv~>instances
(funcall u_fun d_inst)
(when (ddGetObj d_inst~>libName d_inst~>cellName "schematic")
(traverse (dbOpenCellViewByType d_inst~>libName
d_inst~>cellName
"schematic"
nil
"r")))))
(inScheme
;; build a hash table which counts all instances in a schematic
hierarchy.
;; and finally print out a report of the hierarchy
(defun count_instances (@optional (d_cv (geGetEditCellView)))
(let ((hash (makeTable 'count 0)))
(traverse d_cv
(lambda (inst)
hash[(list inst~>libName inst~>cellName)] = 1 + hash[(list
inst~>libName inst~>cellName)]))
(foreach key hash
(printf "%d: %L\n" key)))))