Home > Community > Blogs > Digital Implementation > adding custom shapes and text is new and improved in edi system 11
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more conveniennt.

Register | Membership benefits
Get email delivery of the Digital Implementation blog (individual posts).


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

Adding Custom Shapes and Text is New and Improved in EDI System 11

Comments(0)Filed under: dbGet, Encounter Digital Implementation, EDI 11, EDI 11.1, digital implementation, OpenAccess, custom shapes, add_shape, custom text, add_text

You may have noticed that in the Encounter Digital Implementation (EDI) System 11 the commands addCustomBox, addCustomLine and addCustomText are no longer in the documentation. These previous commands weren't cutting it when it came to the features customers wanted and were not supported by OpenAccess or database commands like dbGet. So they've been replaced in EDI 11 by the commands add_shape and add_text. I think you will like the expanded features and database support of these new commands over their predecessors. Following are some of the highlights. Note the previous addCustom* commands will still work in EDI 11 but may be disabled in the future.


Use add_shape to add custom retangles, polygons and path segments to your design. These shapes are represented as Special Nets (snet) in the database. Use the -net option to specify the net name to associate the shape to. If -net is omitted the shape is assigned the net name _NULL to indicate it is floating. This allows you to still access the shape through database commands (i.e. dbGet).

As you can see below add_shape has significantly more features compared to addCustomBox:

add_shape [-help]
-layer {layerNameOrPointer}
-net {string}]
{-rect {x1 y1 x2 y2} | -polygon {x1 y1 x2 y2 ...xn yn} |
[-pathSeg {x1 y1 x2 y2}
-width <value>
[-beginExt <value> -endExt <value>]]}
addCustomBox layerName x1 y1 x2 y2

Here's an example of adding a rectangle for net VDD on layer M1:

     add_shape -net VDD -layer M1 -rect {1 1 25 9}


When adding path segments you can specify begin and end extension values. The extensions can be any positive value which is on the manufacturing grid. Also, paths are center-line based so in the example below X=2.5 is where I want the center of the wire. Here's an example of adding a vertical segment on M1:

     add_shape -net VDD -layer M1 -pathSeg {2.5 1 2.5 25} -width 3 -beginExt 0 -endExt 0


Combining add_shape with dbGet leads to some nice automation. For example, say I select the rectangle and path I created above. I can then create a polygon on M3 overlapping them using:

     add_shape -polygon [lindex [dbShape [dbGet selected.polyPts -i 0] OR [dbGet selected.polyPts -i 1] \

     -output polygon] 0] -layer M3 -net VDD

As I mentioned above these shapes are represented as special nets so you can use commands such as editSelect, editDelete, etc. with them just like other special nets.

Here is an example of how the above shapes are represented in DEF:



     - VDD

       + POLYGON Metal3 ( 50000 18000 ) ( 8000 18000 )

         ( 8000 50000 ) ( 2000 50000 ) ( 2000 2000 ) ( 50000 2000 )

      + ROUTED Metal1 6000 ( 5000 2000 0 ) ( * 50000 0 )

       + RECT Metal1 ( 2000 2000 ) ( 50000 18000 )

       + USE POWER



Another nice feature of add_shape is it will return the pointer of the new object. For example:

     encounter 42> set rectPtr [add_shape -rect {10 10 12 12} -layer M4]


     encounter 43> dbGet $rectPtr.??

     beginExt: 0

     box: {10 10 12 12}

     endExt: 0

     geomType: rect

     layer: 0x1a7afa48

     net: 0x2aaab3834ef8

     objType: sWire

     polyPts: {{10 10} {12 10} {12 12} {10 12}}

     pts: 0x0

     shape: notype

     shieldNet: 0x0

     status: routed

     subClass: {}

     width: 2

Lastly, you stream out the objects to GDS just like other special nets.

     # streamOut map file:

     M1  SPNET  1  0


Use add_text to add custom text on the desired layer. You can see below add_text has significantly more features than addCustomText had:

add_text [-help]

[-alignment {centerCenter centerLeft centerRight lowerCenter lowerLeft lowerRight upperCenter upperLeft upperRight}]

 [-drafting {true false}]

 [-font {euroStyle gothic math roman script stick fixed swedish milSpec}]

 [-height <value>] -label {string} [-layer {layerNameOrPointer}]

 [-orient {MX MX90 MY90 R0 R180 R270 R90}] -pt <x> <y>


addCustomText  layerName "text" x1 y1 height


For example, to add text on layer M1:

     add_text -label "Hello World!" -pt {1 1} -layer M1

When you add text to a specific layer its visibility/selectability is controlled by both the layer and the overall text control.


You can also omit the layer. When you do this the text is added to the general text layer:

     add_text -label "Hello World!" -pt {1 1}

Below is the respective stream out mapping depending on whether the text is on a metal layer or the general text layer:

     # Mapping text of a specific metal layer:

     M1    TEXT  1  0

     # Mapping general text:

     text  TEXT  2  0

Note: If you specify values for font, height, orientation, or alignment it will not be reflected in the EDI System GUI. EDI will display it in the default values. But these properties are saved for Open Access interoperability with Virtuoso. So if you open the design in Virtuoso you'll see the text displayed as you specified.

Brian Wallace







Leave a Comment

E-mail (will not be published)
 I have read and agree to the Terms of use and Community Guidelines.
Community Guidelines
The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.