免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1457 | 回复: 0
打印 上一主题 下一主题

[Linux] candence skill問題 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-07-07 13:30 |只看该作者 |倒序浏览
我有一個修正layout offgrid的skill如下
====================================
;;---------------------------------------------------------

;; Process each selected object and fix the off grid issue

;;---------------------------------------------------------

procedure( howFixOffGrid(@optional (selset geGetSelSet()))

foreach( obj selset()

howPutObjOnGrid(obj car(howSnapGetGrids()) cadr(howSnapGetGrids()) 0 0)

);foreach

);proc



;;--------------------------------------

;; Get manufacturing grid from techFile

;;;-------------------------------------

procedure( howSnapGetGrids(@optional (cv geGetEditCellView()))

let(( grids grid (dft list(0.001 0.001)) )

if( cv then

grid = techGetMfgGridResolution(techGetTechFile(cv))

grids = list(grid grid)

else

grids = dft

)

grids

);let

);proc



;;----------------------------

;; Process input obj to grid

;;----------------------------

procedure( howPutObjOnGrid(obj @optional

(gridX 0.001)

(gridY 0.001)

(offsetX 0.0)

(offsetY 0.0))

let(( changeFlag newPoints newObj)

case( obj~>objType

(("rect")

when( (newPoints = _howPutObjOnGridGtPts( obj~>bBox gridX gridY offsetX offsetY ))

obj~>bBox = newPoints

changeFlag = t

);when

)

(("stdVia")

when( (newPoints = _howPutObjOnGridGtPts( list(obj~>origin) gridX gridY offsetX offsetY ))

obj~>origin = car(newPoints)

changeFlag = t

);when

)

(("pathSeg" )

when( (newPoints = _howPutObjOnGridGtPts( list(obj~>beginPt obj~>endPt) gridX gridY offsetX offsetY )) newObj = dbCreatePathSeg(obj~>cellView obj~>lpp car(newPoints) cadr(newPoints) obj~>width

obj~>beginStyle obj~>endStyle)

newObj~>net = obj~>net

dbDeleteObject(obj)

changeFlag = t

);when

)

(("path" "polygon" "layerBlockage")

when( (newPoints = _howPutObjOnGridGtPts( obj~>points gridX gridY offsetX offsetY ))

obj~>points = newPoints

changeFlag = t

)

)

(("inst" "label" "mosaic")

when( (newPoints = _howPutObjOnGridGtPts( list(obj~>xy) gridX gridY offsetX offsetY ))

obj~>xy = car(newPoints)

changeFlag = t

)

)

(("PRBoundary")

when( (newPoints = _howPutObjOnGridGtPts( obj~>points gridX gridY offsetX offsetY ))

dbSetBoundaryEdge(obj newPoints)

changeFlag = t

)

)

);case

changeFlag

);let

);proc

;;-------------------

;; Get new points

;;-------------------

procedure( _howPutObjOnGridGtPts( pts gridX gridY offsetX offsetY )

let(( newListOfPts newPt changedFlag )

foreach( pt pts

if( (newPt = _howPutObjOnGridGtLoc( pt gridX gridY offsetX offsetY )) then

newListOfPts = cons(newPt newListOfPts)

changedFlag = t

else

newListOfPts = cons(pt newListOfPts)

);if

);foreach

if( changedFlag then

newListOfPts = reverse(newListOfPts)

else

newListOfPts = nil

)

newListOfPts

);let

);proc



;;---------------------

;; Get obj new point

;; --------------------

procedure( _howPutObjOnGridGtLoc( pt gridX gridY offsetX offsetY)

let(( newPt (factor 10000.0) compFactor tempPt )

;--------------------------------------------------------------------

; Get compare factor with smaller tolerance up to 4 decimal points

;-------------------------------------------------------------------

compFactor = 1 / factor

if( zerop(offsetX) && zerop(offsetY) then

newPt = _howPutObjOnGridRoundCor( pt gridX gridY compFactor )

when( newPt == pt newPt = nil)

else

;---------------------------------

; Substract offset before round up

;---------------------------------

tempPt = list(car(pt)-offsetX cadr(pt)-offsetY)

newPt = _howPutObjOnGridRoundCor( tempPt gridX gridY compFactor )

newPt = list(car(newPt)+offsetX cadr(newPt)+offsetY)

when( newPt == pt newPt = nil)

);if

newPt

);let

);pro



;;--------------------

;; Round coordinate

;;--------------------

procedure( _howPutObjOnGridRoundCor( point gridX gridY compFactor "gfff")

let( (x y)

x = round((xCoord(point) + compFactor) / gridX) * gridX

y = round((yCoord(point) + compFactor) / gridY) * gridY

list( x y )

);let

);proc

===============================================================
我使用之後出現undefine function selset,我已經有選了可是還是無法運作
該怎麼修改才可以選取layout之後可以運作這skill

謝謝各位大大
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP