• 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 SKILL
  3. Can I define modgen trunk routing topologies and generate...

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 143
  • Views 13060
  • 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

Can I define modgen trunk routing topologies and generate routing from topologies using skill?

venuuuuu
venuuuuu over 7 years ago

Hi All,

I use modgen in layout I am having standard pattern for all devices So I am planning to write a skill script to do placement and routing of it automatically. Here is what I wrote by following documents but couldn't able to generate proper trunk and twig topologies topologies. Please help me if you have any idea of it.

trunkLayer = list("METAL1" "METAL2")

techFile = techGetTechFile( cv )

trunkWidth = 0.26

sbox = gpeEditSandbox( leGetEditFigGroup())

numRows = sbox~>grid->rowCount
numCols = sbox~>grid->colCount

channelTrunkConstraints = list('("validLayers" nil
("METAL2")
)
'("minWidth"
'("METAL2") 0.29
)
)

deviceTrunkConstraints = list(

list("minWidth" list("METAL2") trunkWidth)

list("validLayers" nil list("METAL2"))

)

gateTwigConstraints =
list('("validLayers" nil
'("METAL1")
)
'("minWidth"
'("METAL1") 0.2
)
'("minNumCuts"
'("METAL1") 2
)
)


sourceDrainTwigConstraints =
list('("validLayers" nil
'("METAL1")
)
'("minWidth"
'("METAL1") 0.2
)
'("minNumCuts"
'("METAL1") 2
)
)

iterm = gpeCreateInstTermEntries(?deviceNames deviceNames ?instTermNames list("G" "D"))
sourceDrainTwigTemplate = gpeCreateTwigEntries(?instTermEntries list(iterm)
?constraints sourceDrainTwigConstraints)

itermG = gpeCreateInstTermEntries(?deviceNames deviceNames ?instTermNames list("G"))
gateTwigTemplate = gpeCreateTwigEntries(?instTermEntries list(itermG)
?constraints gateTwigConstraints)

channelTrunks = gpeCreateTrunkEntries( ?netNames list("Gate") ?offset trunkWidth*2 ?constraints channelTrunkConstraints )
channelWidth = gpeGetChannelWidthEntry(sandbox 1 "horizontal")


for(rowNum 1 numRows-1
cw=gpeCreateChannelWidthEntry(?width 0.3 ?reference list("METAL2" "drawing"))
gpeSetChannelWidthEntry(sandbox 2 "horizontal" cw)
;gpeSetChannelWidth(rowNum channelWidth)

deviceNames = gpeGetGridEntries(sbox ?row list(rowNum-1 rowNum))~>name
iterm = gpeCreateInstTermEntries(?deviceNames deviceNames ?instTermNames list("S" "D"))
sourceDrainTwigs = gpeCreateTwigEntries(?instTermEntries list(iterm) ?template sourceDrainTwigTemplate)


itermG = gpeCreateInstTermEntries(?deviceNames deviceNames ?instTermNames list("G"))
gateTwigs = gpeCreateTwigEntries(?instTermEntries list(itermG)
?constraints gateTwigConstraints)


;gpeAddTwigEntries(car(channelTrunks) list( channelGateTwigs sourceDrainGateTwigs) )

channelTrunkChain =gpeCreateTrunkChain(?trunks trunks ?anchorIndex 0 ?trunkDirection "horizontal"
?offsetDirection "positive" ?anchorPoint "topRight" ?anchorReference "METAL2")
;channelTrunkChain = gpeCreateTrunkChain( ?index rowNum ?trunks channelTrunks ?anchorSide "top" ?anchorDirection "up" )

gpeAddTrunkChains(sbox list(channelTrunkChain ))

; gpeClearTwigEntries(car(channelTrunks))

)


;gateStraps = gpeCreateStraps( ?netNames list("Gate") ?instTermNames list("G") ?directions ;list("Horizontal") )

;gpeAddStraps( sbox gateStraps )

for(rowNum 0 numRows-1

deviceNames = gpeGetGridEntries(sbox ?row list(rowNum))~>name
cw=gpeCreateChannelWidthEntry(?width 0.3 ?reference list("METAL1" "drawing"))
gpeSetChannelWidthEntry(sandbox 2 "horizontal" cw)
;gpeSetChannelWidth(rowNum channelWidth)

deviceNames = gpeGetGridEntries(sbox ?row list(rowNum-1 rowNum))~>name
iterm = gpeCreateInstTermEntries(?deviceNames deviceNames ?instTermNames list("S" "D"))
deviceTwigs = gpeCreateTwigEntries(?instTermEntries list(iterm) ?constraints sourceDrainTwigConstraints)


deviceTrunkTemplate = gpeCreateTrunkEntries( ?twigs list(deviceTwigs)
?constraints channelTrunkConstraints )

drainTrunks = gpeCreateTrunkEntries(?netNames list("D1" "D2")
?template deviceTrunkTemplate )

bottomTrunkChain = gpeCreateTrunkChain(?anchorIndex rowNum ?trunks drainTrunks
)

gpeAddTrunkChains( sbox list(bottomTrunkChain ))
sourceTrunk = gpeCreateTrunkEntries( ?netNames list("Source")
?template deviceTrunkTemplate)

topTrunkChain = gpeCreateTrunkChain(?anchorIndex rowNum ?trunks sourceTrunk )

gpeAddTrunkChains( sbox list( topTrunkChain ))

; foreach( trunk append(sourceTrunk drainTrunks)

; gpeClearTwigEntries( trunk ) )

)

;k=gpeSetRouter(sbox "pinToTrunk")

;;;

My sandbox  output

sbox~>??
((map
((nil type "dummy" schName ""
symbol "*" availableInsts nil placedCount
0 totalCount 0
)
)
)
(grid
(nil entries
((nil col 6 row 4
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 5 row 4
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 4 row 4
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 3 row 4
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 2 row 4
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 1 row 4
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 0 row 4
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM0" inst
db:0xc0f0239c
)
(nil col 6 row 3
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 5 row 3
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 4 row 3
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 3 row 3
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM1.4" inst
db:0xc0f0239d
)
(nil col 2 row 3
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM1.3" inst
db:0xc0f0239e
)
(nil col 1 row 3
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM1.2" inst
db:0xc0f0239f
)
(nil col 0 row 3
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM1.1" inst
db:0xc0f023a0
)
(nil col 6 row 2
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 5 row 2
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 4 row 2
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.16" inst
db:0xc0f023a1
)
(nil col 3 row 2
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.15" inst
db:0xc0f023a2
)
(nil col 2 row 2
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.14" inst
db:0xc0f023a8
)
(nil col 1 row 2
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.13" inst
db:0xc0f023a7
)
(nil col 0 row 2
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 6 row 1
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.12" inst
db:0xc0f023a6
)
(nil col 5 row 1
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.11" inst
db:0xc0f023a5
)
(nil col 4 row 1
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.10" inst
db:0xc0f023a4
)
(nil col 3 row 1
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.9" inst
db:0xc0f023a3
)
(nil col 2 row 1
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.8" inst
db:0xc0f0239a
)
(nil col 1 row 1
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.7" inst
db:0xc0f023ad
)
(nil col 0 row 1
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
(nil col 6 row 0
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.6" inst
db:0xc0f023ac
)
(nil col 5 row 0
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.5" inst
db:0xc0f023ab
)
(nil col 4 row 0
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.4" inst
db:0xc0f023aa
)
(nil col 3 row 0
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.3" inst
db:0xc0f023ae
)
(nil col 2 row 0
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.2" inst
db:0xc0f023af
)
(nil col 1 row 0
vAlign
(nil type "top") hAlign
(nil type "left") dummyConfig
(nil lcv "tsmc013/nch_tgo5_mac/layout" src_index
(0 0)
type "neighbor"
) type "dummy" orient "R0"
symbol "*" name "NM2.1" inst
db:0xc0f023b0
)
(nil col 0 row 0
type "inst" orient "R0" symbol
"" name "" inst db:0x00000000
)
) colCount 7
rowCount 5
)
)
(abut nil)
(id 144)
(figGroup db:0xc0f0681a)
(cellView db:0x2c10cc9a)
(topo
(nil router "none" trunkChains
((nil trunks
((nil netName "net011" offset 0.4
longOffsetSource1 "twigExtents" longOffset1 0.2 longOffsetSource2
"instanceExtents" longOffset2 0.3 constraints
(("minWidth" nil 0.0))
)
(nil netName "vss" offset 0.4
longOffsetSource1 "twigExtents" longOffset1 0.2 longOffsetSource2
"instanceExtents" longOffset2 0.3 constraints
(("minWidth" nil 0.0))
)
) anchorIndex 0
trunkDirection "horizontal" offsetDirection "positive" anchorPoint
"topRight" anchorReference "METAL2"
)
(nil trunks
((nil netName "net011" offset 0.4
longOffsetSource1 "twigExtents" longOffset1 0.2 longOffsetSource2
"instanceExtents" longOffset2 0.3 constraints
(("minWidth" nil 0.0))
)
(nil netName "vss" offset 0.4
longOffsetSource1 "twigExtents" longOffset1 0.2 longOffsetSource2
"instanceExtents" longOffset2 0.3 constraints
(("minWidth" nil 0.0))
)
) anchorIndex 0
trunkDirection "horizontal" offsetDirection "positive" anchorPoint
"topRight" anchorReference "METAL2"
)
(nil trunks
((nil netName "net011" offset 0.4
longOffsetSource1 "twigExtents" longOffset1 0.2 longOffsetSource2
"instanceExtents" longOffset2 0.3 constraints
(("minWidth" nil 0.0))
)
(nil netName "vss" offset 0.4
longOffsetSource1 "twigExtents" longOffset1 0.2 longOffsetSource2
"instanceExtents" longOffset2 0.3 constraints
(("minWidth" nil 0.0))
)
) anchorIndex 0
trunkDirection "horizontal" offsetDirection "positive" anchorPoint
"topRight" anchorReference "METAL2"
)
(nil trunks
((nil netName "net011" offset 0.4
longOffsetSource1 "twigExtents" longOffset1 0.2 longOffsetSource2
"instanceExtents" longOffset2 0.3 constraints
(("minWidth" nil 0.0))
)
(nil netName "vss" offset 0.4
longOffsetSource1 "twigExtents" longOffset1 0.2 longOffsetSource2
"instanceExtents" longOffset2 0.3 constraints
(("minWidth" nil 0.0))
)
) anchorIndex 0
trunkDirection "horizontal" offsetDirection "positive" anchorPoint
"topRight" anchorReference "METAL2"
)
(nil trunks
((nil netName "D1" offset 0.0
constraints
(("minWidth" nil 0.0))
)
(nil netName "D2" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 0
)
(nil trunks
((nil netName "Source" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 0
)
(nil trunks
((nil netName "D1" offset 0.0
constraints
(("minWidth" nil 0.0))
)
(nil netName "D2" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 1
)
(nil trunks
((nil netName "Source" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 1
)
(nil trunks
((nil netName "D1" offset 0.0
constraints
(("minWidth" nil 0.0))
)
(nil netName "D2" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 2
)
(nil trunks
((nil netName "Source" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 2
)
(nil trunks
((nil netName "D1" offset 0.0
constraints
(("minWidth" nil 0.0))
)
(nil netName "D2" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 3
)
(nil trunks
((nil netName "Source" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 3
)
(nil trunks
((nil netName "D1" offset 0.0
constraints
(("minWidth" nil 0.0))
)
(nil netName "D2" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 4
)
(nil trunks
((nil netName "Source" offset 0.0
constraints
(("minWidth" nil 0.0))
)
) anchorIndex 4
)
)
)
)
)

  • 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