• 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. Creating a Polygon with a Hole

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 11715
  • 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

Creating a Polygon with a Hole

Ynishant
Ynishant over 3 years ago

Hi,

    I'm currently drawing an octagonal pad using the rodCreatePolygon() function. The resulting polygon drawn is shown on the right below. In SKILL, after drawing the polygon, I'd like to chop off a rectangular section defined on another layer as shown on the left below. I've been thinking of different ways of doing it but I'm curious if you have any recommendations on how to go about this. The pad is a pCell, so I know that I can't use any functions from the "le" family. The code is also included below with what I'd like to do commented. 

Regards,

Nishant. 

strLibName = "MIM_Test"
strCellName = "bump_pad"

pcDefinePCell(list(ddGetObj(strLibName), strCellName, "layout"),

	;Define default pcell parameter values
	(
	(Width "string" "85u")
	(Length "string" "85u")	
	(Mesh "string" "0")
	);end of default values
	
	let((scale 
		 MTOP OPENING SLOT
		 w l 
		 x y cv radius D mfgGrid d side 
		 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 sil_inset
		 poly1 poly2
		 mesh_w mesh_l r_tmp hole_x hole_y bar_w
		 cvId shp ovShpList	ov 
		)
		
		cvId = pcCellView
		
		scale = 1.0e6
		; Define the layers
		MTOP     = list("metal4" "drawing")
		OPENING  = list("silox"  "drawing")
		SLOT	 = list("metal4" "slot")
		MTOP1    = list("metal2" "drawing")
		w = evalstring(Width)*scale
		l = evalstring(Length)*scale
		; radius of the pad is half the width	
		; origin is the bottom center of the octagon
		x = 0
		y = 0
		sil_inset = 2.1
		bar_w = 2.5
		hole_x = 3.0
		hole_y = 3.0
		mesh_w = 15
		mesh_l = 15
		
		radius = 0.5*w
		D = radius/sqrt(2)
		d = 2*D - radius
		; start from the center of the octagonal pad
		p1 = list(x+radius y+d)
		p2 = list(x+d y+radius)
		p3 = list(x-d y+radius)
		p4 = list(x-radius y+d)
		p5 = list(x-radius y-d)
		p6 = list(x-d y-radius)
		p7 = list(x+d y-radius)
		p8 = list(x+radius y-d)
		
		p9 = list(x-0.5*mesh_w y-0.5*mesh_l)
		p10 = list(x+0.5*mesh_w y-0.5*mesh_l)
		p11 = list(x+0.5*mesh_w y+0.5*mesh_l)
		p12 = list(x-0.5*mesh_w y+0.5*mesh_l)
		
		;want to maintain the polygon below as is
		poly1 = rodCreatePolygon(
			?layer MTOP
			?pts   list( p1 p2 p3 p4 p5 p6 p7 p8)		
		)
		
		; want to chop the polygon defined below
		poly2 = rodCreatePolygon(
			?layer SLOT
			?pts   list( p9 p10 p11 p12)		
		)
				
		radius = 0.5*w - sil_inset
		D = radius/sqrt(2)
		d = 2*D - radius 
		p1 = list(x+radius y+d)
		p2 = list(x+d y+radius)
		p3 = list(x-d y+radius)
		p4 = list(x-radius y+d)
		p5 = list(x-radius y-d)
		p6 = list(x-d y-radius)
		p7 = list(x+d y-radius)
		p8 = list(x+radius y-d)
		rodCreatePolygon(
			?layer OPENING
			?pts   list( p1 p2 p3 p4 p5 p6 p7 p8)		
		)	
		
	); end of let
); end of pCell definition
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Something like this at the end of your code:

    		opening = rodCreatePolygon(
    			?layer OPENING
    			?pts   list( p1 p2 p3 p4 p5 p6 p7 p8)		
    		)	
    		dbLayerAndNot(pcCellView OPENING list(opening~>dbId) list(poly2~>dbId))
    		dbLayerAndNot(pcCellView MTOP list(poly1~>dbId) list(poly2~>dbId))
    		dbDeleteObject(opening~>dbId)
    		dbDeleteObject(poly1~>dbId)

    (I added opening as a variable in the let too)

    I may have misinterpreted your precise requirements, but this should give you a clue at least.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ynishant
    Ynishant over 3 years ago in reply to Andrew Beckett

    Thank you Andrew, this is exactly what I'm looking for! Just two follow up questions:

    1. I noticed that the advanced Boolean engine(ABE) also has an abeLayerAndNot() function. I assume using that would also accomplish what I want?

    2. Does chopping the above ROD Object cause it to lose its ROD attributes?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Ynishant
    1. Yes, you could also use the advanced boolean engine APIs too. This is limited to 45-degree polygons but does support shapes through the hierarchy. It also involves a few steps to convert to and from abe layers - probably no benefit in this example.
    2. You're not actually chopping the ROD object, but creating a new database object from the original (I was deleting the original objects). You could use rodNameShape to create a rod object from the new shapes created by dbLayerAndNot (note that dbLayerAndNot returns a list of objects it created, as it could end up with more than one object).

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Ynishant
    Ynishant over 3 years ago in reply to Andrew Beckett

    Got it, thank you again Andrew!

    • Cancel
    • Vote Up 0 Vote Down
    • 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