The most efficient way to create pcells ?

Guest
Hello,

Once again, i need your lights. I need to create some pcells for
transistors. Pdk's pcells are very useful, but i can not set up all i
need. That's why i need to create my own pcells.

I started to write it in skill. It's ok, it works fine, but i would
like to add some features, like:
-a radio button to add/remove contacts
-an information field for user
-a cyclic field to choose the number of contacts
- ...


I don't know how to implement these buttons. I read something about
CDF, but i don't know if it's the good way to develop or not. i
understood that the .cdf will contains the description of all buttons/
field i need, but i don't understand how to use it with my .il file
(the one who will do my rodcreate functions )

I read the example provided by Cadence, in path
~/rodPcells/components/simple_mos/simple_mos.cdf

but i don't understand the link between the .cdf and the .il. How to
compile it to have a layout view in dfII that allows me to add/remove
contacts by just pushing the button ?

Any example is welcome :)

thanks and Regards,

b.
 
Hi,

What you're looking for is pretty well explained in the VirtuosoŽ
Parameterized Cell Reference. You can get it from your IC stream.
I would advice the chapter 'Advance Features'. It explains how Pcells
are linked to CDFs, bits of callbacks and so on.

In few words: when you develop a skill pcell using pcDefinePCell, this
will create a pcell master, the compiler attaches the compiled code to
the master cell. Bear in mind that a compiled PCell is stored in
the .cdb binary file in cellView directory. When you create a CDF
file and load into your target library/cell, it will be attached to
the pcell master. The CDF data is stored into a a binary file called
prop.xx in the lib/cell directory. Again, please look at the above
mentioned doc

CDFs are pretty much easy to make, the hardest thing is to work with
callbacks. Andrew has made a very nice AN note about it : 'The Danger
of CDF Callbacks'. You may need to go through it to make your
callbacks fine.

To start with, You can dump a CDF file of a cell that you like by
using the following skill command like :
cdfDump("libName" "outputFile" ?cellName "cellName")
eg: cdfDump("analogLib" "edtmp" ?cellName "nfet")

Hope this help !
Riad.
 
Hello Riad,

Thank you for your answer, but i still don't understand how to use
cdf.

What i did:

- a .cdf file which contents the parameters (width, number of
fingers ...)
each parameters is described like this:

cdfCreateParam( cdfId
?name "Width"
?prompt "Width:"
?defValue WidthMin
?type "float"
?editable "t"
?callback "DrawDiff"
)
I also added the following header:
libId = ddGetObj("tmpskill")
cellId = ddGetObj(libId "AdvancedMos")


- a .il file , with my procedure DrawDiff()
I extract the values from cdf by using:
CdfWidth = cdfgData->Width->value

and then create my rectangle by using rodCreate...

These files are in a lib/dir called : tmpskill.
then i load into ciw by using command:
cdfDump("tmpskill" "tmp" ?cellName "AdvancedMos")

but i get the following error message:
*Error* Could not get cell AdvancedMos in lib. tmpskill.

So i created an empty layout called AdvancedMos et then ran the
cdfDump again. The error message disappeared, but nothing special
happened to my AdvancedMos cell.

Even by reading the documentation (Pcell reference guide and CDF user
guide) i don't understand how to create my Pcell. CDF user guide is
very CDF Editor oriented; but i would prefer to use only text editor
to create my pcell.

so if someone could provide me a short example on how to use cdf, or
practical advices, it can be very helpful.
sorry for being so drag.

thanks and regards,

b.
 
Dear b.

This is a little example as you requested.

1. save the below script into a skill file and load it into your CIW
; The main skill Pcell file starts here
pcDefinePCell(

; Target cellView
list(ddGetObj("rkWorkLib") "rkRectanglePcell" "layout")

; Pcell Parameters
(
(lengthVariableIsNotHumanReadable 2.0)
(widthVariableIsNotHumanReadable 5.0)
(met1drg '("METAL1" "drawing"))
)

; The main Pcell's code
let((labelTextInstName labelTextW labelTextL pcInst)

rodCreateRect(
?layer met1drg
?width widthVariableIsNotHumanReadable
?length lengthVariableIsNotHumanReadable
?origin list(0 0)
)

sprintf(labelTextW "W= %g" widthVariableIsNotHumanReadable)
sprintf(labelTextL "L= %g" lengthVariableIsNotHumanReadable)
labelTextInstName = "[@instanceName]"
pcInst = dbCreateLabel(pcCellView "text" 0:0 labelTextInstName
"lowerLeft" "R0" "stick" 0.2)
dbCreateLabel(pcCellView "text" 0:0.3 pcCellView~>cellName
"lowerLeft" "R0" "stick" 0.2)
dbCreateLabel(pcCellView "text" 0:0.6 labelTextW "lowerLeft" "R0"
"stick" 0.2)
dbCreateLabel(pcCellView "text" 0:0.9 labelTextL "lowerLeft" "R0"
"stick" 0.2)
dbSetq(pcInst "NLPLabel" labelType)
)
)
; End

This skill code will be compiled into a layout PCell :
"rkWorkLib"/"rkRectanglePcell"/"layout"
When you load this file, your CIW must come with :
CIW>> Loading pCellGen.cxt
CIW>> Generating Pcell for 'rkRectanglePcell layout'.
CIW>> t

Your Pcell master view would look something like this:
http://riad-kaced-usenet-group.googlegroups.com/web/pc0.png?gda=BytwkjgAAABy94CwPrldXC4M94iwGutzSvRLCB9GPwUvV53Ulh4x12G1qiJ7UbTIup-M2XPURDSmyHxI2wsYW4xQVVOi85W-&gsc=xQWcUQsAAADoDrujNAsDdAVUkMSwpYTu

2. Open a new cellView and instanciate the newly created Pcell.
The Form that comes should look like:
http://riad-kaced-usenet-group.googlegroups.com/web/pc2.png?gda=g24StjgAAABy94CwPrldXC4M94iwGutzDWQj1nCb-I-kXNXW3Ce31mG1qiJ7UbTIup-M2XPURDQb7h9XpjVlBS8b4898nPTk&gsc=xQWcUQsAAADoDrujNAsDdAVUkMSwpYTu

In this form:
.. The variable names are not really handy to read
.. The users can enter whatever they want for the values of W/L. We may
need to put some restrictions ...
.. I don't want the users to change the layer of the Pcell, how can I
prevent people from doing it ?
All these questions could be easily answered by binding CDF descrption
for the Pcell.
Here is a a quick example. Please save it into an ASCII file and then
load it into your CIW. Please update the libname/cellName to match the
pcell you've created.
;; CDF starts here
/****************************************************/
LIBRARY = "rkWorkLib"
CELL = "rkRectanglePcell"
/****************************************************/

let( ( libId cellId cdfId )
unless( cellId = ddGetObj( LIBRARY CELL )
error( "Could not get cell %s." CELL )
)
when( cdfId = cdfGetBaseCellCDF( cellId )
cdfDeleteCDF( cdfId )
)
cdfId = cdfCreateBaseCellCDF( cellId )

;;; Parameters
cdfCreateParam( cdfId
?name "lengthVariableIsNotHumanReadable"
?prompt "Length in um"
?defValue "2"
?units "lengthMetric"
?type "string"
?display "t"
?editable "t"
?callback
"rkCheckRange( 'lengthVariableIsNotHumanReadable )"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "widthVariableIsNotHumanReadable"
?prompt "Length in um"
?defValue "5"
?units "lengthMetric"
?type "string"
?display "t"
?editable "t"
?callback
"rkCheckRange( 'widthVariableIsNotHumanReadable )"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "met1drg"
?prompt "Rectangle Layer, Not visible ..."
?defValue "METAL1"
?choices '("METAL1" "METAL2")
?type "cyclic"
?display nil
?editable nil
)
)
;; CDF ends here

Normally, a new instantiation of the Pcell would pop up a form which
looks like:
http://riad-kaced-usenet-group.googlegroups.com/web/pc3.png?gda=dbEooDgAAABy94CwPrldXC4M94iwGutzylcEpnhbjvAtsvg2UMyNFmG1qiJ7UbTIup-M2XPURDRAGUvHEUHTkYjWu1b4P_k1

This new Form is of course more handy and user firndly.
Do note the callBacks in the above. These are skill functions that
will check for the user-eneterd parameters and eventually raise errors
if something goes wrong.

So hope this example would help you in a better understanding
things ...
Again, feel free to back should you need any further details.

Riad.
 
Hello Riad,

thanks a lot for this very nice example. I guess you spent a lot of
time to write it.

but now, thanks to you, i understand where i did mistakes.

thanks again!

Regards,

b.
 
On Wednesday, July 23, 2008 at 1:13:34 AM UTC-7, bed...@gmail.com wrote:
Hello,

Once again, i need your lights. I need to create some pcells for
transistors. Pdk's pcells are very useful, but i can not set up all i
need. That's why i need to create my own pcells.

I started to write it in skill. It's ok, it works fine, but i would
like to add some features, like:
-a radio button to add/remove contacts
-an information field for user
-a cyclic field to choose the number of contacts
- ...


I don't know how to implement these buttons. I read something about
CDF, but i don't know if it's the good way to develop or not. i
understood that the .cdf will contains the description of all buttons/
field i need, but i don't understand how to use it with my .il file
(the one who will do my rodcreate functions )

I read the example provided by Cadence, in path
~/rodPcells/components/simple_mos/simple_mos.cdf

but i don't understand the link between the .cdf and the .il. How to
compile it to have a layout view in dfII that allows me to add/remove
contacts by just pushing the button ?

Any example is welcome :)

thanks and Regards,

b.

Thanks Riad... I found what you posted here very helpful. The same detail was not evident from Cadence set of docs....
 
вторник, 29 июля 2008 г., 1:34:30 UTC+1 пользователь Riad KACED написал:
Dear b.

This is a little example as you requested.

1. save the below script into a skill file and load it into your CIW
; The main skill Pcell file starts here
pcDefinePCell(

; Target cellView
list(ddGetObj("rkWorkLib") "rkRectanglePcell" "layout")

; Pcell Parameters
(
(lengthVariableIsNotHumanReadable 2.0)
(widthVariableIsNotHumanReadable 5.0)
(met1drg '("METAL1" "drawing"))
)

; The main Pcell's code
let((labelTextInstName labelTextW labelTextL pcInst)

rodCreateRect(
?layer met1drg
?width widthVariableIsNotHumanReadable
?length lengthVariableIsNotHumanReadable
?origin list(0 0)
)

sprintf(labelTextW "W= %g" widthVariableIsNotHumanReadable)
sprintf(labelTextL "L= %g" lengthVariableIsNotHumanReadable)
labelTextInstName = "[@instanceName]"
pcInst = dbCreateLabel(pcCellView "text" 0:0 labelTextInstName
"lowerLeft" "R0" "stick" 0.2)
dbCreateLabel(pcCellView "text" 0:0.3 pcCellView~>cellName
"lowerLeft" "R0" "stick" 0.2)
dbCreateLabel(pcCellView "text" 0:0.6 labelTextW "lowerLeft" "R0"
"stick" 0.2)
dbCreateLabel(pcCellView "text" 0:0.9 labelTextL "lowerLeft" "R0"
"stick" 0.2)
dbSetq(pcInst "NLPLabel" labelType)
)
)
; End

This skill code will be compiled into a layout PCell :
"rkWorkLib"/"rkRectanglePcell"/"layout"
When you load this file, your CIW must come with :
CIW>> Loading pCellGen.cxt
CIW>> Generating Pcell for 'rkRectanglePcell layout'.
CIW>> t

Your Pcell master view would look something like this:
http://riad-kaced-usenet-group.googlegroups.com/web/pc0.png?gda=BytwkjgAAABy94CwPrldXC4M94iwGutzSvRLCB9GPwUvV53Ulh4x12G1qiJ7UbTIup-M2XPURDSmyHxI2wsYW4xQVVOi85W-&gsc=xQWcUQsAAADoDrujNAsDdAVUkMSwpYTu

2. Open a new cellView and instanciate the newly created Pcell.
The Form that comes should look like:
http://riad-kaced-usenet-group.googlegroups.com/web/pc2.png?gda=g24StjgAAABy94CwPrldXC4M94iwGutzDWQj1nCb-I-kXNXW3Ce31mG1qiJ7UbTIup-M2XPURDQb7h9XpjVlBS8b4898nPTk&gsc=xQWcUQsAAADoDrujNAsDdAVUkMSwpYTu

In this form:
. The variable names are not really handy to read
. The users can enter whatever they want for the values of W/L. We may
need to put some restrictions ...
. I don't want the users to change the layer of the Pcell, how can I
prevent people from doing it ?
All these questions could be easily answered by binding CDF descrption
for the Pcell.
Here is a a quick example. Please save it into an ASCII file and then
load it into your CIW. Please update the libname/cellName to match the
pcell you've created.
;; CDF starts here
/****************************************************/
LIBRARY = "rkWorkLib"
CELL = "rkRectanglePcell"
/****************************************************/

let( ( libId cellId cdfId )
unless( cellId = ddGetObj( LIBRARY CELL )
error( "Could not get cell %s." CELL )
)
when( cdfId = cdfGetBaseCellCDF( cellId )
cdfDeleteCDF( cdfId )
)
cdfId = cdfCreateBaseCellCDF( cellId )

;;; Parameters
cdfCreateParam( cdfId
?name "lengthVariableIsNotHumanReadable"
?prompt "Length in um"
?defValue "2"
?units "lengthMetric"
?type "string"
?display "t"
?editable "t"
?callback
"rkCheckRange( 'lengthVariableIsNotHumanReadable )"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "widthVariableIsNotHumanReadable"
?prompt "Length in um"
?defValue "5"
?units "lengthMetric"
?type "string"
?display "t"
?editable "t"
?callback
"rkCheckRange( 'widthVariableIsNotHumanReadable )"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "met1drg"
?prompt "Rectangle Layer, Not visible ..."
?defValue "METAL1"
?choices '("METAL1" "METAL2")
?type "cyclic"
?display nil
?editable nil
)
)
;; CDF ends here

Normally, a new instantiation of the Pcell would pop up a form which
looks like:
http://riad-kaced-usenet-group.googlegroups.com/web/pc3.png?gda=dbEooDgAAABy94CwPrldXC4M94iwGutzylcEpnhbjvAtsvg2UMyNFmG1qiJ7UbTIup-M2XPURDRAGUvHEUHTkYjWu1b4P_k1

This new Form is of course more handy and user firndly.
Do note the callBacks in the above. These are skill functions that
will check for the user-eneterd parameters and eventually raise errors
if something goes wrong.

So hope this example would help you in a better understanding
things ...
Again, feel free to back should you need any further details.

Riad.

Hi Raid,

Thanks a million! It's a most powerful and simple answer for newbies in SKILL an PCell designers!

Kindest regards,
Aleks
 

Welcome to EDABoard.com

Sponsor

Back
Top