Home > Community > Forums > Custom IC Design > Import some particular shape in to Cadence layout L

Email

* 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: *

 Import some particular shape in to Cadence layout L 

Last post Sun, May 13 2012 7:22 AM by engine2011. 20 replies.
Started by engine2011 29 Apr 2012 02:13 PM. Topic has 20 replies and 4633 views
Page 2 of 2 (21 items) < Previous 1 2
Sort Posts:
  • Fri, May 11 2012 10:11 PM

    Re: Import some particular shape in to Cadence layout L Reply

    The problem is that you've changed the code so that it is now not syntactically correct! You've changed the name of the argument to that function to be a literal string - and that's not allowed. Nor is it necessary. The whole point of defining a function with an argument is to allow you to call that function with whatever value you like - you should not have to change the code for each pathname you want to use.

    So, leave the code as it was, and then do:

    abPixMapReadFile("/h/efu01/ibm180/final.XPM")

    Or even just call:

    abXpmToLayout()

    and then use the form to navigate to the file you wish to import. Calling abPixMapReadFile alone will not produce the image - it just parses the pixmap and stores it in some data structures, ready to be drawn later. The function that does the drawing is abPixMapDrawLayout() - but you'll need to see how the various callbacks work to see how the data structures are assembled so that they are ready to be called by abPixMapDrawLayout(). Using the form saves you that bother - it will read the file and then pop up another form to get you to choose which layers you want to be used for which colours in the original pixmap file.

    Regards,

    Andrew.

    • Post Points: 20
  • Sat, May 12 2012 8:01 AM

    Re: Import some particular shape in to Cadence layout L Reply

    Hi Andrew,

    I did the following things by steps:

    Firstly I load the code by: load("abXmpToLayout.ils"), it returns "t"

    Then, I run: abPixMapReadFile("final.XPM"), it returns stdobj@0x14a09024, there is not other callbacks.

    However, there is a warning after I load the ils file:

    *WARNING* (TECH-230035): User-defined rule "minExtensionDistance" in constraint
                             group "foundry" of techDB "cmrf7sf" conflicts with
                             a built-in constraint with the same name.
                             You may write out "constraintGroups" section to an
                             ASCII file, reopen the technology database in "a"
                             mode, and reload the file to update the database.
                             Another option is to rename this rule.

    This warning even shows when I start cadence virtuoso, but I will always check the Options-display-grid controls to make sure the minimum snap is correct. So I think this warning doesn't affect custom layout design. I don't know whether it will affect the parse of the Xmp file.

    Thanks,

    EF

    • Post Points: 20
  • Sat, May 12 2012 10:41 AM

    Re: Import some particular shape in to Cadence layout L Reply

    Those warnings can't be coming from loading the file, or from calling that function. They are coming when something is loading in the technology library, I believe - which could be triggered when something first accesses your technology library.

    It certainly won't affect parsing of the XPM file. 

    As I said before though, all you've done by calling abPixMapReadFile is to read the pixmap file and store it in some internal data structures; inside the rest of the code are functions to take that data structure and generate a layout from it.

    As I said before, I would start by using the main entry point into the code and use the user interface (abXpmToLayout).

    Or you could even use the other code I posted which directly generates the circle with only 90 degree angles used. That's even simpler...

    Regards,

    Andrew.

    • Post Points: 20
  • Sat, May 12 2012 2:48 PM

    Re: Import some particular shape in to Cadence layout L Reply

    Hi Andrew,

    We finally got it. Thanks!

    The other coding you gave me last time also works. But we finally want to draw a raster donut but a raster solid circle, so it does not work for that.

    Thanks a lot!

     EF & Liu

    • Post Points: 20
  • Sun, May 13 2012 6:54 AM

    Re: Import some particular shape in to Cadence layout L Reply

    Hi EF & Liu,

    I did two things here - I corrected the previous abGriddedCircle implementation (I'd made a mistake and the direction of one of the halves was wrong - so you had a slightly strange polygon with a line through the middle), and added abGriddedDonut - which gives you the ability to create donuts directly too.

    /*****************************************************************
    *                                                                *
    *           abGriddedCircle(cellView lpp radius grid)            *
    *                                                                *
    * Draw a circle as a polygon, with all the points on a specified *
    *               grid, with all angles 90 degrees.                *
    *                                                                *
    *****************************************************************/

    procedure(abGriddedCircle(cellView lpp radius grid)
        let((point numSteps radSq pointList halfPointList y)
            radSq=radius**2
            numSteps=round(radius/grid)
            for(step -numSteps numSteps
                y=round(sqrt(radSq-(step*grid)**2)/grid)*grid
                point=step*grid:y
                when(halfPointList
                    halfPointList=cons(xCoord(car(halfPointList)):y halfPointList)
                )
                halfPointList=cons(point halfPointList)
            )
            ;----------------------------------------------------------------
            ; Build the complete point list from two halves, one flipped
            ;----------------------------------------------------------------
            pointList=lconc(pointList
                foreach(mapcar xy reverse(halfPointList) xCoord(xy):-yCoord(xy))
            )
            pointList=lconc(pointList halfPointList)
            dbCreatePolygon(cellView lpp car(pointList))
        )
    )

    /***************************************************************
    *                                                              *
    *        abGriddedDonut(cellView lpp outer inner grid)         *
    *                                                              *
    *  Draw a donut as a polygon, with all points on a specified   *
    *              grid, with all angles 90 degrees.               *
    *                                                              *
    ***************************************************************/

    procedure(abGriddedDonut(cellView lpp outer inner grid)
        let((point numSteps radSq pointList halfPointList y)
            foreach((direction radius) '(1 -1) list(outer inner)
                radSq=radius**2
                numSteps=round(radius/grid)
                halfPointList=nil
                for(step -numSteps numSteps
                    y=direction*round(sqrt(radSq-(step*grid)**2)/grid)*grid
                    point=step*grid:y
                    when(halfPointList
                        halfPointList=cons(xCoord(car(halfPointList)):y halfPointList)
                    )
                    halfPointList=cons(point halfPointList)
                )
                ;------------------------------------------------------------
                ; Build the complete point list from two halves, one flipped
                ;------------------------------------------------------------
                pointList=lconc(pointList
                    foreach(mapcar xy reverse(halfPointList) xCoord(xy):-yCoord(xy))
                )
                pointList=lconc(pointList halfPointList)
            )
            dbCreatePolygon(cellView lpp car(pointList))
        )
    )

    Enjoy!

    Andrew

    • Post Points: 20
  • Sun, May 13 2012 7:22 AM

    Re: Import some particular shape in to Cadence layout L Reply

    Thanks a lot, Andrew!!

    • Post Points: 5
Page 2 of 2 (21 items) < Previous 1 2
Sort Posts:
Started by engine2011 at 29 Apr 2012 02:13 PM. Topic has 20 replies.