• 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. How can I make this code to work in CDB database

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 13671
  • 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

How can I make this code to work in CDB database

varun kumar D
varun kumar D over 10 years ago

Hello,

Following density code I have written for the cadence OA database but it is not working in CDB since the command is not available.

Do we have any alternate of this   dbGetHierPathTransform(overlap)  to return the list of databse ID in the CDB databse.

cadence version ( 5141usr6_ams13.1_mmsim)

************************************************
id=nil
m2=list("M2" "drawing")
m3=list("M3" "drawing")
m5=list("M5" "drawing")
procedure(vdDensity()
cv=geGetEditCellView()
;m3ob=nil
bbox=nil
total_area=nil
area1=nil
area_final=0

points= enterBox(
?prompts list("Enter the first corner of your box."
"Enter the last corner of your box.")
; ?doneProc "boxDone"

)

x1=car(car(points))
y1=car(cdr(car(points)))
x2=caadr(points)
y2=car(cdr(yCoord(points)))
;bbox=list(list(x1 y1) list(x2 y2))


if(id then dbDeleteObject( id))

when(cv~>mode!="r"
id=dbCreateRect(cv list("text" "drawing") list(list(x1 y1) list(x2 y2)))
)
wid=x2-x1
leng=y2-y1
total_area=abs(wid*leng)

;name= enterString(
;?prompts list( "Enter order of Devices" )
;)

name=CSVreport~>width~>value

Ent=dbGetOverlaps(cv points list(name "drawing") 32 t)
cv1=dbOpenCellViewByType(cv~>libName symbolToString(gensym(cv~>cellName))
"layout" "maskLayout" "s" )

rectid=dbCreateRect(cv1 m2 list(list(x1 y1) list(x2 y2)))

abCopyOverlapShapeToNewCell(Ent cv1)

andIds=dbLayerAnd(cv1 m3 tempObjs list(rectid))
tileid=dbLayerTile(cv1 m5 andIds)

foreach(den tileid

bbox=den~>bBox
x3=caar(bbox)
y3=cadar(bbox)
x4=caadr(bbox)
y4=cadadr(bbox)
dx=x4-x3 dy=y4-y3
area1=abs(dx*dy)

area_final=area1+area_final


)

TotalDen=area_final/total_area


DENSITY=TotalDen*100

printf("%f " DENSITY)


outputWindow()
dbClose(cv1)
)

procedure(abCopyOverlapShapeToNewCell(objcts cv1)
tempObjs=nil
flattenendFigList2=foreach(mapcar overlap objcts
srcShape=abGetOverlapShape(overlap)
tempObj=dbCopyFig(srcShape cv1 dbGetHierPathTransform(overlap))
tempObjs=cons(tempObj tempObjs)
)
)

procedure(abCopyOverlapShape(objcts)
tempObjs=nil
flattenendFigList2=foreach(mapcar overlap objcts
srcShape=abGetOverlapShape(overlap)
tempObj=dbCopyFig(srcShape cv dbGetHierPathTransform(overlap))
tempObjs=cons(tempObj tempObjs)
)
)

procedure(abGetOverlapShape(overlap)
if(listp(overlap) then
when(overlap
abGetOverlapShape(cadr(overlap))
)
else
overlap
)
)

procedure(vdWindow()
width = hiCreateStringField(
?name 'width
?prompt "LAYER_NAME"
)

CSVreport = hiCreateAppForm(
?name 'CSVreport
?formTitle "ENTER LAYER NAME"
?formType 'nonoptions
?callback "vdDensity()"
?fields list(list(width 0:10 200:30 100) )
)
hiDisplayForm(CSVreport)
)

procedure(outputWindow()
DENSITY1=sprintf(DENSITY1 "%f " DENSITY)
density = hiCreateOutputStringField(
?name 'density
?prompt strcat(name " density is in %")
?value DENSITY1
)

CSVrepor11 = hiCreateAppForm(
?name 'CSVreport11
?formTitle "Output Density"
?formType 'nonoptions
?fields list(list(density 0:10 200:30 150) )
)
hiDisplayForm(CSVreport11)
)

  • Cancel
Parents
  • varun kumar D
    varun kumar D over 10 years ago
    thanks..function solved the purpose
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • varun kumar D
    varun kumar D over 10 years ago
    thanks..function solved the purpose
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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