drawing buses using enterPath() function

A

Abi

Guest
Hi All,

Is there any way to draw buses using enterPath() function.

In that i need to get 'width' 'space' and 'path name' for all the
paths as user input.

Thanks in advance.

Regards,

Abirami
 
i hv written code to draw the path with shielding in any one of the
direction...

but i want to draw the paths in both the directions..Can anyone help
me with this

code .


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.
 

Welcome to EDABoard.com

Sponsor

Back
Top