( ESNUG 422 Item 1 ) -------------------------------------------- [02/19/04]
From: Paul Cole <paul.cole=user domain=synopsys spot calm>
Subject: Script Gets First Encounter DEF Wire Tracks & Rows Data Into Astro
Hi John,
I'm a Synopsys AC supporting Astro and I find users wanting to import
Cadence First Encounter floorplan DEF data into Astro. Generally this is
accomplished through either PDEF or DEF interfaces. This usually works
reasonably well except when it comes to wire tracks and rows.
All floorplan and P&R tools know how to define a wire track and a row. That
is not the problem. The issue is how a wire track or row is used. The
usage model for wire track and rows differs among different vendors and this
is often the beginning of a painful learning experience for many Astro users
when trying to debug the problems that arise from it.
For example, Astro does not require off grid wire tracks to be defined
for off grid pins. Some tools do require this however so floorplanning
information originating in these tools will also contain the off grid
tracks. Astro does not require these and in fact their presence can degrade
performance or even cause routing to fail to start at all. Another common
issue is the handling of multi-height cells. Some tools require special
multi-height rows to be created in addition to the normal single height row,
in order to show the valid placements of these cells. Again Astro does not
require these. In fact Astro considers rows that are overlapping to be
an illegal situation.
The following script creates the Scheme function regenFloorplan. This
function should be executed from the Astro GUI command line after opening
a design cell that has at least a core area and a cell boundary.
This script will consider the existing cell boundary and core cell area and
instructs Astro to regenerate a floorplan with the same characteristics
core to left spacing
core to right spacing
core to bottom spacing
core to right spacing
cell boundary coordinates
cell placements are unchanged
pin placements are unchanged
pad placements are unchanged
As a result, Astro will recreate the floorplan, filling the core cavity
defined by the core to boundary spacings with unitTile based rows. It will
also recreate the routing wire tracks based upon the unitTile cell's
definitions.
This script is configured to fill the core area with rows that flip and abut
and have the first row flipped. These characteristics are easily modified
in the script if this is not exactly your situation.
;;;;;;;;;;;;;;;;;
(define regenFloorplan.scm "$Id: regenFloorplan.scm,v 1.1 2003/01/17 \
21:01:37 synopsys Exp $")
(display regenFloorplan.scm)
(newline)
;
; $Log: regenFloorplan.scm,v $
;Revision 1.1 2003/01/17 21:01:37 synopsys
;Initial revision
;;;;;;;;;;;;;;;;;
;; pull out the x-coordinate from an x/y pair
;; e.g.
;; x-coord '( 100 200 )
;; --> 100
(define x-coord
(lambda (xy)
(car xy)
)
)
;; pull out the y-coordinate from an x/y pair
;; e.g.
;; y-coord '( 100 200 )
;; --> 200
(define y-coord
(lambda (xy)
(cadr xy)
)
)
;; regenerate the floorplan of the opened cell
;; use the current boundary and BaseArray as guides
;; preserve pin/pad/cell/macro placements
(define regenFloorplan
(lambda ()
(begin
;; get the current cell and cellBoundary
(let*
(
(cellId (geGetEditCell))
(cellBoundary (car (cdr (dbFetchObjectField cellId '()
"cellBoundary"))))
)
(begin
;; get the BaseArray (assume a simple floorplan with only one
;; BaseArray)
(db-foreach cellId '() "BaseArray" base
(define baseArray (dbFetchObjectField cellId base "bbox"))
)
)
(let* (
;; fetch LowerLeft/UpperRight coordinates from the
;; cellBoundary and BaseArray
(cellBoundaryLL (list-ref cellBoundary 0))
(cellBoundaryUR (list-ref cellBoundary 2))
(baseArrayLL (list-ref baseArray 0))
(baseArrayUR (list-ref baseArray 1))
;; calculate core to boundary spacings
(coreToLeft (- (x-coord baseArrayLL) (x-coord cellBoundaryLL)))
(coreToBottom (- (y-coord baseArrayLL) (y-coord cellBoundaryLL)))
(coreToRight (- (x-coord cellBoundaryUR) (x-coord baseArrayUR)))
(coreToTop (- (y-coord cellBoundaryUR) (y-coord baseArrayUR)))
)
;; drive the Floor Planning form to regenerate floorplan
(axgPlanner)
(setFormField "Floor Planning" "Control Parameter" "boundary")
(setFormField "Floor Planning" "Row/Core Ratio" "1")
(setFormField "Floor Planning" "Double Back" "1")
(setFormField "Floor Planning" "Start from first row" "1")
(setFormField "Floor Planning" "Flip first row" "1")
(setFormField "Floor Planning" "keep macro placement" "1")
(setFormField "Floor Planning" "keep standard cell placement" "1")
(setFormField "Floor Planning" "Pin Snap" "0")
(setFormField "Floor Planning" "Keep I/O Placement" "1")
; fill in the core to side spacings calculated earlier
(setFormField "Floor Planning" "Core To Left" coreToLeft)
(setFormField "Floor Planning" "Core To Right" coreToRight)
(setFormField "Floor Planning" "Core To Bottom" coreToBottom)
(setFormField "Floor Planning" "Core To Top" coreToTop)
(formButton "Floor Planning" "Set")
(formOK "Floor Planning")
)
)
)
)
)
I hope this helps your readers out there and maybe some can learn a bit
about the Milkyway Scheme API as well.
- Paul Cole
Synopsys, Inc. Dallas, TX
|
|