Improvement of the code

N

noreply

Guest
Hi i wrote the following code for creating a bus:
;To Create a ROD bus
procedure(inputBus(myLayer myWidth mySpacing);Remember to enter the
myLayer in double quotes like "ME1"
rodCreatePath(
?name "inputBus"
?layer myLayer
?pts list(0:0 10:0 )
?width myWidth
?justification "left";this is used to say where the path has to
start,that is if given "center" the center of the path will lie on the
starting point
?cvId deGetCellView()
?offsetSubPath list(
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing);end of subpath1
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing*2+myWidth);end of subpath2
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing*3+myWidth*2);end of subpath3

);list
);rodCreatePath
);procedure
Using the above code we can create a bus with four metals..
I'm now trying to create a more flexible code in which the user has
the option to specify the number of "subpath"(metals)...
any comments please.......
regards,
Lokesh rajendran.
 
hi all ,
could you please help me with the above code....
Although the code seems lengthy its quite simple and simple (people
who went through cadence tutorial must be knowing the above code)

regards,
Lokesh rajendran

On Jun 16, 3:38 pm, noreply <lokeshr...@gmail.com> wrote:
Hi i wrote the following code for creating a bus:
;To Create a ROD bus
procedure(inputBus(myLayer myWidth mySpacing);Remember to enter the
myLayer in double quotes like "ME1"
rodCreatePath(
?name "inputBus"
?layer myLayer
?pts list(0:0 10:0 )
?width myWidth
?justification "left";this is used to say where the path has to
start,that is if given "center" the center of the path will lie on the
starting point
?cvId deGetCellView()
?offsetSubPath list(
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing);end of subpath1
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing*2+myWidth);end of subpath2
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing*3+myWidth*2);end of subpath3

);list
);rodCreatePath
);procedure
Using the above code we can create a bus with four metals..
I'm now trying to create a more flexible code in which the user has
the option to specify the number of "subpath"(metals)...
any comments please.......
regards,
Lokesh rajendran.
 
On 17 Giu, 13:17, noreply <lokeshr...@gmail.com> wrote:
hi all ,
could you please help me with the above code....
Although the code seems lengthy its quite simple and simple (people
who went through cadence tutorial must be knowing the above code)

regards,
Lokesh rajendran

On Jun 16, 3:38 pm, noreply <lokeshr...@gmail.com> wrote:



Hi i wrote the following code for creating a bus:
;To Create a ROD bus
procedure(inputBus(myLayer myWidth mySpacing);Remember to enter the
myLayer in double quotes like "ME1"
rodCreatePath(
?name "inputBus"
?layer myLayer
?pts list(0:0 10:0 )
?width myWidth
?justification "left";this is used to say where the path has to
start,that is if given "center" the center of the path will lie on the
starting point
?cvId deGetCellView()
?offsetSubPath list(
        list(
        ?layer myLayer
        ?width myWidth
        ?justification "right"
        ?sep mySpacing);end of subpath1
        list(
        ?layer myLayer
        ?width myWidth
        ?justification "right"
        ?sep mySpacing*2+myWidth);end of subpath2
        list(
        ?layer myLayer
        ?width myWidth
        ?justification "right"
        ?sep mySpacing*3+myWidth*2);end of subpath3

);list
);rodCreatePath
);procedure
Using the above code we can create a bus with four metals..
I'm now trying to create a more flexible code in which the user has
the option to specify the number of "subpath"(metals)...
any comments please.......
regards,
Lokesh rajendran.- Nascondi testo citato

- Mostra testo citato -
Just a simple solution: inside the procedure try to manage several
cases by adding multiple path definitions... the choose could be done
thorugh a parameter passed to the function...

Camelot
 
Hi camelot ,
I'm trying the same as you told......
Hope to see some improvement......
Regards,
Lokesh rajendran

camelot wrote:
On 17 Giu, 13:17, noreply <lokeshr...@gmail.com> wrote:
hi all ,
could you please help me with the above code....
Although the code seems lengthy its quite simple and simple (people
who went through cadence tutorial must be knowing the above code)

regards,
Lokesh rajendran

On Jun 16, 3:38 pm, noreply <lokeshr...@gmail.com> wrote:



Hi i wrote the following code for creating a bus:
;To Create a ROD bus
procedure(inputBus(myLayer myWidth mySpacing);Remember to enter the
myLayer in double quotes like "ME1"
rodCreatePath(
?name "inputBus"
?layer myLayer
?pts list(0:0 10:0 )
?width myWidth
?justification "left";this is used to say where the path has to
start,that is if given "center" the center of the path will lie on the
starting point
?cvId deGetCellView()
?offsetSubPath list(
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing);end of subpath1
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing*2+myWidth);end of subpath2
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing*3+myWidth*2);end of subpath3

);list
);rodCreatePath
);procedure
Using the above code we can create a bus with four metals..
I'm now trying to create a more flexible code in which the user has
the option to specify the number of "subpath"(metals)...
any comments please.......
regards,
Lokesh rajendran.- Nascondi testo citato

- Mostra testo citato -

Just a simple solution: inside the procedure try to manage several
cases by adding multiple path definitions... the choose could be done
thorugh a parameter passed to the function...

Camelot
 
Hi andrew,
could you please help me out or give me some hint on how to
proceed...
I'm stuck with the code...
Regards,
lokesh rajendran.

noreply wrote:
Hi camelot ,
I'm trying the same as you told......
Hope to see some improvement......
Regards,
Lokesh rajendran

camelot wrote:
On 17 Giu, 13:17, noreply <lokeshr...@gmail.com> wrote:
hi all ,
could you please help me with the above code....
Although the code seems lengthy its quite simple and simple (people
who went through cadence tutorial must be knowing the above code)

regards,
Lokesh rajendran

On Jun 16, 3:38 pm, noreply <lokeshr...@gmail.com> wrote:



Hi i wrote the following code for creating a bus:
;To Create a ROD bus
procedure(inputBus(myLayer myWidth mySpacing);Remember to enter the
myLayer in double quotes like "ME1"
rodCreatePath(
?name "inputBus"
?layer myLayer
?pts list(0:0 10:0 )
?width myWidth
?justification "left";this is used to say where the path has to
start,that is if given "center" the center of the path will lie on the
starting point
?cvId deGetCellView()
?offsetSubPath list(
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing);end of subpath1
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing*2+myWidth);end of subpath2
list(
?layer myLayer
?width myWidth
?justification "right"
?sep mySpacing*3+myWidth*2);end of subpath3

);list
);rodCreatePath
);procedure
Using the above code we can create a bus with four metals..
I'm now trying to create a more flexible code in which the user has
the option to specify the number of "subpath"(metals)...
any comments please.......
regards,
Lokesh rajendran.- Nascondi testo citato

- Mostra testo citato -

Just a simple solution: inside the procedure try to manage several
cases by adding multiple path definitions... the choose could be done
thorugh a parameter passed to the function...

Camelot
 
Hi,
How about a for loop?

e.g.
procedure( inputBus( myLayer myWidth mySpacing NoOfPaths )
let(( (SUBPATHList nil) SUBPATH) ;initialise SUBPATHList
as nil
.....
.....
.....
?cvId deGetCellView()
?offsetSubPath
{
for( SubP 0 sub1(NoOfPaths) ;here comes
the for loop...
SUBPATH = list(
?layer myLayer
?width myWidth
?justification "right"
?sep (SubP+1)*mySpacing + SubP*myWidth
) ;end of subpath
SUBPATHList = cons( SUBPATH SUBPATHList )
) ;for
}
);rodCreatePath
) ;let
);procedure


Best Regards,
I-FAB
 
Hi I-F AB,
Thank you very much...
Your code is working perfectly fine...(I did little modification to
suit my code)
Regards,
Lokesh rajendran.

I-F AB wrote:
Hi,
How about a for loop?

e.g.
procedure( inputBus( myLayer myWidth mySpacing NoOfPaths )
let(( (SUBPATHList nil) SUBPATH) ;initialise SUBPATHList
as nil
....
....
....
?cvId deGetCellView()
?offsetSubPath
{
for( SubP 0 sub1(NoOfPaths) ;here comes
the for loop...
SUBPATH = list(
?layer myLayer
?width myWidth
?justification "right"
?sep (SubP+1)*mySpacing + SubP*myWidth
) ;end of subpath
SUBPATHList = cons( SUBPATH SUBPATHList )
) ;for
}
);rodCreatePath
) ;let
);procedure


Best Regards,
I-FAB
 

Welcome to EDABoard.com

Sponsor

Back
Top