How to create shielded path?

J

Juve

Guest
Hi,

I have written the following code for creating a shielded path. The
below mentioned code is having a fix set of coordinates: i.e. "pts".
How to add the functionality that a user can draw shield where ever he
feels like:

;; Create a shielded path
procedure( shield()
errset(
(let (cv layer purpose list_draw_layer tech width1 tfId)
cv= geGetEditCellView()
layer = car(leGetEntryLayer()) ;displays layer on LSW is taken
purpose = cadr(leGetEntryLayer()); displays drawing or pin on the
selected lsw
list_draw_layer =list(layer purpose)
tech = techGetTechFile(geGetWindowCellView()); rule deck file id is
stored in tech
width1 = techGetSpacingRule(tech "minWidth" layer) ; the minimum width
is stored in width1
rodCreatePath(
?name "shield"
?layer list( layer purpose )
?pts list(2:-15 2:-5 15:-5 15:-15) If this is not fixed, the user
can draw shield anywhere. What changes are needed?
?width .8
?justification "center"
?cvId cv
?offsetSubPath
list(
list(
?layer list( layer purpose )
?justification "left"
?sep 1
?width .4
) ;end of offset sublist1
list(
?layer list( layer purpose )
?justification "right"
?sep 1
?width .4
) ;end of offset sublist2
) ;end of offset list of lists
) ;end of rodCreatePath
) ; end of let
t
) ; end of errset
) ; end of procedure
 
Juve wrote:
Hi,

I have written the following code for creating a shielded path. The
below mentioned code is having a fix set of coordinates: i.e. "pts".
How to add the functionality that a user can draw shield where ever he
feels like:

;; Create a shielded path
procedure( shield()
..
) ; end of procedure
Thats neat but there are several already build in ways to create a shielded
path. You could:

a) define a Multi Part Path with two offset paths as shields
b) use the Wire Editor and script a "do-File" (VCAR Syntax) to
define a shielding ( 5.1.41 )
c) create a shielding constraint for the net ( IC6.1)

Kind regards,
Marc
 
How about this?
(I started off with the simplest I could think of: enterPoints() and
then realised how ridiculously counter-productive that was.)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

/*
enterPoints(
?prompts list("Enter 1st point:" "Enter next point:")
?doneProc "Shield"
)
*/

enterPath(
?prompts list("Enter 1st point:" "Enter next point:")
?doneProc "Shield"
)


;; Create a shielded path
procedure( Shield(win done pts)
errset(
(let (cv layer purpose list_draw_layer tech width1 tfId)

unless( done printf("Finished!") )

cv = geGetEditCellView()
layer = car(leGetEntryLayer()) ;displays layer on LSW is taken
purpose = cadr(leGetEntryLayer()); displays drawing or pin on
the selected lsw
list_draw_layer =list(layer purpose)
tech = techGetTechFile(geGetWindowCellView())
; rule deck file id is stored in tech
width1 = techGetSpacingRule(tech "minWidth" layer)
; the minimum width is stored in width1
rodCreatePath(
;;;;;; ?name "shield" ;;;;;;CHANGE HERE ?
?layer list( layer purpose )

?pts foreach( mapcar point pts
geWindowToEditPoint(hiGetCurrentWindow() point) )

;;;;;; ?pts list(2:-15 2:-5 15:-5 15:-15) ;;;;;;CHANGE HERE
;if this is not fixed, the user can draw shield anywhere.
;What changes are needed?

?width .8
?justification "center"
?cvId cv
?offsetSubPath
list(
list(
?layer list( layer purpose )
?justification "left"
?sep 1
?width .4
) ;end of offset sublist1
list(
?layer list( layer purpose )
?justification "right"
?sep 1
?width .4
) ;end of offset sublist2
) ;end of offset list of lists
) ;end of rodCreatePath
) ; end of let
t
) ; end of errset
) ; end of procedure

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Best Regards,
I-FAB
 
Thanks. It works awesomely. What I need to do if I want the user
specified "spacing" and the "width"

I-F AB wrote:
How about this?
(I started off with the simplest I could think of: enterPoints() and
then realised how ridiculously counter-productive that was.)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

/*
enterPoints(
?prompts list("Enter 1st point:" "Enter next point:")
?doneProc "Shield"
)
*/

enterPath(
?prompts list("Enter 1st point:" "Enter next point:")
?doneProc "Shield"
)


;; Create a shielded path
procedure( Shield(win done pts)
errset(
(let (cv layer purpose list_draw_layer tech width1 tfId)

unless( done printf("Finished!") )

cv = geGetEditCellView()
layer = car(leGetEntryLayer()) ;displays layer on LSW is taken
purpose = cadr(leGetEntryLayer()); displays drawing or pin on
the selected lsw
list_draw_layer =list(layer purpose)
tech = techGetTechFile(geGetWindowCellView())
; rule deck file id is stored in tech
width1 = techGetSpacingRule(tech "minWidth" layer)
; the minimum width is stored in width1
rodCreatePath(
;;;;;; ?name "shield" ;;;;;;CHANGE HERE ?
?layer list( layer purpose )

?pts foreach( mapcar point pts
geWindowToEditPoint(hiGetCurrentWindow() point) )

;;;;;; ?pts list(2:-15 2:-5 15:-5 15:-15) ;;;;;;CHANGE HERE
;if this is not fixed, the user can draw shield anywhere.
;What changes are needed?

?width .8
?justification "center"
?cvId cv
?offsetSubPath
list(
list(
?layer list( layer purpose )
?justification "left"
?sep 1
?width .4
) ;end of offset sublist1
list(
?layer list( layer purpose )
?justification "right"
?sep 1
?width .4
) ;end of offset sublist2
) ;end of offset list of lists
) ;end of rodCreatePath
) ; end of let
t
) ; end of errset
) ; end of procedure

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Best Regards,
I-FAB
 
Juve wrote, on 03/16/09 11:28:
Thanks. It works awesomely. What I need to do if I want the user
specified "spacing" and the "width"
You can specify an options form to be associated with the enterPath() function,
so that the width/spacing info can be entered on the associated form
(toggle-able with F3).

See the ?form argument for enterPath in the documentation.

Regards,

Andrew.
 
Hi,

I have written code to draw path with shielding.I am able to draw the
paths only in

horizontal or vertical directions.i want to draw the path in both the
directions( like L

shape).Can anyone help me with this.

I am posting the code below

hiSetBindKey("Layout" "<key>p" "Aenterpath()")
procedure(CreatePathForm()
validlayer=techGetLayerFunctions(techGetTechFile(geGetWindowCellView
()))
j=0
declare(neededlayer[length(validlayer)])
for(i 0 (length(validlayer)-1)
l=nth(i validlayer)
if((nth(1 l)=="metal")
then
neededlayer[j]=list(nth(0 l) "drawing")
j= j+1
)
)
layerlist=layerlist1=vectorToList(neededlayer)

netname=hiCreateStringField(
?name 'netname
?prompt "Netname"
)

width=hiCreateFloatField(
?name 'width
?prompt "Width"
?value 0.0
?range '(0 5)
)

layer=hiCreateLayerCyclicField(
techGetTechFile(geGetWindowCellView())
"Layer"
"ChangeLayer()"
layerlist
)

uppershield=hiCreateStringField(
?name 'uppershield
?prompt "UShield Name"
;?choices list("VSS" "VCC")
)

width1=hiCreateFloatField(
?name 'width1
?prompt "UShield Width"
?value 0.0
?range '(0 5)
)

space1=hiCreateFloatField(
?name 'space1
?prompt "USpace"
?value 0.0
?range '(0 5)
)

lowershield=hiCreateStringField(
?name 'lowershield
?prompt "LShield Name"
;?choices list("VSS" "VCC")
)

width2=hiCreateFloatField(
?name 'width2
?prompt "LShield Width"
?value 0.0
?range '(0 5)
)

space2=hiCreateFloatField(
?name 'space2
?prompt "LSpace"
?value 0.0
?range '(0 5)
)

Direction=hiCreateCyclicField(
?name 'Direction
?prompt "Path Direction"
?choices list("Horizontal" "Vertical")
)

hiCreateAppForm(
?name 'PathForm
?formTitle "Path with shielding"
?fields list(
list(netname 0:0 200:30 80)

list(layer 220:0 200:30 50)
list(width 420:0 200:30 80)
list(uppershield 0:50 200:30 90)
list(width1 200:50 200:30 80)
list(space1 420:50 200:30 80)
list(lowershield 0:100 200:30 90)
list(width2 200:100 200:30 80)
list(space2 420:100 200:30 80)
list(Direction 0:150 200:30 100)
)
;?help "cream"
;status=hiDisplayForm(f)
)
;hiDisplayForm(PathForm)
procedure(ChangeLayer()
setlayer=hiGetLayerCyclicValue(techGetTechFile(geGetWindowCellView())
PathForm)
leSetEntryLayer(list(setlayer~>name setlayer~>purpose))
tec=techGetTechFile(geGetWindowCellView())
layername=setlayer~>name
minspace=techGetSpacingRule(tec "minSpacing" layername)
minwidth=techGetSpacingRule(tec "minWidth" layername)
PathForm~>width~>value=minwidth
PathForm~>width1~>value=minwidth
PathForm~>width2~>value=minwidth
PathForm~>space1~>value=minspace
PathForm~>space2~>value=minspace
PathForm~>Direction~>value=dir
PathForm~>netname~>value=pathname
PathForm~>uppershield~>value=name1
PathForm~>lowershield~>value=name2

; offset1=(PathForm~>space1~>value)+((PathForm~>width~>value)/
2)+ ((PathForm~>width1~>value)/2)
; offset2=(PathForm~>space2~>value)+((PathForm~>width~>value)/
2)+ ((PathForm~>width2~>value)/2)
ChangePathWidth(hiGetCurrentForm())

)

procedure(ChangeWidth()
PathForm~>width~>value=minwidth+(PathForm~>space1~>value)
+PathForm~>space2~>value)
;PathForm~>width1~>value=minwidth+(2*
(PathForm~>space1~>value))
; PathForm~>width2~>value=minwidth+(2*(PathForm~>space2~>value))
)
;procedure(ChangeOffset()
; offset1=(PathForm~>space1~>value)+((PathForm~>width~>value)/
2)+ ((PathForm~>width1~>value)/2)
; offset2=(PathForm~>space2~>value)+((PathForm~>width~>value)/
2)+ ((PathForm~>width2~>value)/2)
;)
;procedure(changeSpace()
; PathForm~>space1~>value=PathForm~>space1~>value
; PathForm~>space2~>value=PathForm~>space2~>value
;)

procedure(ChangeOffset()
offset1=(PathForm~>space1~>value)+((PathForm~>width~>value)/
2)+ ((PathForm~>width1~>value)/2)
offset2=(PathForm~>space2~>value)+((PathForm~>width~>value)/
2)+ ((PathForm~>width2~>value)/2)
)
;procedure(changeSpace()
; PathForm~>space1~>value=minspace+PathForm~>space1~>value
; PathForm~>space2~>value=minspace+PathForm~>space2~>value
;)

procedure(ChangePathWidth(form)
changeEnterFun(
'enterPath
?prompts '("Enter points")
?pathWidth form->width->value
?doneProc "FinishPath"
?form PathForm
)
)

procedure(Aenterpath()
unless(boundp('PathForm)
CreatePathForm()
)
CreatePathForm()
enterPath(
?prompts '("Enter points")
?pathWidth PathForm->width->value
?doneProc "FinishPath"
?form PathForm
)
)

procedure(FinishPath( w_windowId b_done l_points )
layer = car(leGetEntryLayer())
purpose = cadr(leGetEntryLayer())
list_draw_layer=list(layer purpose)
pathname=PathForm~>netname~>value
path=dbCreatePath(geGetWindowCellView() list_draw_layer l_points
form~>width~>value)
Cv=geGetEditCellView()
myNet = dbCreateNet(Cv pathname)
dbAddFigToNet(path myNet)
println(l_points)
a=nth(0 l_points)
b=nth(1 l_points)
c=nth(0 a)
d=nth(1 a)
e=nth(0 b)
f=nth(1 b)
dir=PathForm~>Direction~>value
offset1=(PathForm~>space1~>value)+((PathForm~>width~>value)/2)+
((PathForm~>width1~>value)/2)
offset2=(PathForm~>space2~>value)+((PathForm~>width~>value)/2)+
((PathForm~>width2~>value)/2)
;dir=PathForm~>Direction~>value;println(d)
if((dir=="Vertical")
then
x1=c-offset1
y1=d+0.2
x2=e-offset1
y2=f-0.2
l1=list(x1 y1)
l2=list(x2 y2)
shield1=list(l1 l2)
x3=c+offset2
y3=d+0.2
x4=e+offset2
y4=f-0.2
l3=list(x3 y3)
l4=list(x4 y4)
shield2=list(l3 l4)
;dbCreatePath(geGetWindowCellView() list_draw_layer shield1
form~>width1~>value)
;dbCreatePath(geGetWindowCellView() list_draw_layer shield2
form~>width2~>value)
else
x1=c-0.2
y1=d+offset1
x2=e+0.2
y2=f+offset1
l1=list(x1 y1)
l2=list(x2 y2)
shield1=list(l1 l2)
x3=c-0.2
y3=d-offset2
x4=e+0.2
y4=f-offset2
l3=list(x3 y3)
l4=list(x4 y4)
shield2=list(l3 l4)
)
name1=PathForm~>uppershield~>value
path1=dbCreatePath(geGetWindowCellView() list_draw_layer shield1
form~>width1~>value)
Cv1=geGetEditCellView()
myNet1 = dbCreateNet(Cv1 name1)
dbAddFigToNet(path1 myNet1)
name2=PathForm~>lowershield~>value
path2=dbCreatePath(geGetWindowCellView() list_draw_layer shield2
form~>width2~>value)
Cv2=geGetEditCellView()
myNet2 = dbCreateNet(Cv2 name2)
dbAddFigToNet(path2 myNet2)
)

Regards,

Abirami.
 
On Mar 16, 9:37 pm, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
Juve wrote, on 03/16/09 11:28:

Thanks. It works awesomely. What I need to do if I want the user
specified "spacing" and the "width"

You can specify an options form to be associated with the enterPath() function,
so that the width/spacing info can be entered on the associated form
(toggle-able with F3).

See the ?form argument for enterPath in the documentation.

Regards,

Andrew.
Hi Andrew,

I am newbie in SKILL coding. I have tried to draw a multipart with
SKILL, and I have basically come out with an OptionsForm as you've
suggested, the thing is I couldn't find a way to retrieve and
manipulate the user entry data (the width and spacing) to my
rodCreatePath. It would be nice if you could give some idea to me.
Thanks.

-Kevin.
 
kevinchin84@gmail.com wrote, on 04/21/09 15:38:
On Mar 16, 9:37 pm, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm
wrote:
Juve wrote, on 03/16/09 11:28:

Thanks. It works awesomely. What I need to do if I want the user
specified "spacing" and the "width"
You can specify an options form to be associated with the enterPath() function,
so that the width/spacing info can be entered on the associated form
(toggle-able with F3).

See the ?form argument for enterPath in the documentation.

Regards,

Andrew.

Hi Andrew,

I am newbie in SKILL coding. I have tried to draw a multipart with
SKILL, and I have basically come out with an OptionsForm as you've
suggested, the thing is I couldn't find a way to retrieve and
manipulate the user entry data (the width and spacing) to my
rodCreatePath. It would be nice if you could give some idea to me.
Thanks.

-Kevin.
Is this some question in a university course? There have been questions galore
on this in both this forum and on the Community Forums on www.cadence.com

I'm trying to work out why so many people seem to be posting related questions
(often using very similar SKILL code) on creating shielded paths and busses and
so on.

I recently answered a question on passing the width and spacing information on
the Cadence web site forum: http://www.cadence.com/community/forums/T/12168.aspx

Regards,

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top