Guest
Hi,
I picked up the dynamic switch schematic pcell symbol again in order to
see if I could turn it into a wire setting cell. I have two
possibilities: Either the wire is set to "1" or it is set to "0" and
this is depicted by the symbol having either a 1 or a 0 label. When
netlisting, the symbol should be replaced with VDD or VSS respectively
so that I don't need to use so many independent voltage sources
connected to buses.
So far I can't find out how to get this replacement happening. I have
tried to create a schematic for the symbol but I don't get it to switch
to schematic0 when using symbol0 and to schematic1 when using symbol1
Here is the code I have so far:
The cellView is "setting" in library "wk_bjerkem"
(pcDefinePCell
; target cellView
(list (ddGetObj "wk_bjerkem") "setting" "symbol" "schematicSymbol")
; formal parameters
((position "0"))
; code itself
(let (instId master)
(setq viewName
(case position
("0" "symbol0")
("1" "symbol1")
(t "symbol1")))
(setq master (dbOpenCellViewByType "wk_bjerkem" "setting"
viewName))
(setq instId (dbCreateInst pcCellView master "" 0:0 "R0"))
; Copy the instance box - this vanishes during the flatten
(foreach shape car(
exists( lpp master~>lpps lpp~>layerName=="instance" ))~>shapes
(dbCopyFig shape pcCellView))
; flatten the instance, preserving the pins
(dbFlattenInst instId 1 t t)))
--
Svenn
I picked up the dynamic switch schematic pcell symbol again in order to
see if I could turn it into a wire setting cell. I have two
possibilities: Either the wire is set to "1" or it is set to "0" and
this is depicted by the symbol having either a 1 or a 0 label. When
netlisting, the symbol should be replaced with VDD or VSS respectively
so that I don't need to use so many independent voltage sources
connected to buses.
So far I can't find out how to get this replacement happening. I have
tried to create a schematic for the symbol but I don't get it to switch
to schematic0 when using symbol0 and to schematic1 when using symbol1
Here is the code I have so far:
The cellView is "setting" in library "wk_bjerkem"
(pcDefinePCell
; target cellView
(list (ddGetObj "wk_bjerkem") "setting" "symbol" "schematicSymbol")
; formal parameters
((position "0"))
; code itself
(let (instId master)
(setq viewName
(case position
("0" "symbol0")
("1" "symbol1")
(t "symbol1")))
(setq master (dbOpenCellViewByType "wk_bjerkem" "setting"
viewName))
(setq instId (dbCreateInst pcCellView master "" 0:0 "R0"))
; Copy the instance box - this vanishes during the flatten
(foreach shape car(
exists( lpp master~>lpps lpp~>layerName=="instance" ))~>shapes
(dbCopyFig shape pcCellView))
; flatten the instance, preserving the pins
(dbFlattenInst instId 1 t t)))
--
Svenn