• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Drawing path using SKILL

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 144
  • Views 19182
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Drawing path using SKILL

wakeup12
wakeup12 over 11 years ago

Hello,

 I have modified a SKILL file to draw a path from one point to another. However, this function takes two arguments: starting and ending point.

 I was wondering if it is possible to write the corner points to make it really look like a path.

 Here is the code:

 pastebin.ubuntu.com/.../

 Currently, when we specify another location after the end point, we see a result like the right side of this image:

 

However, I would like to make it look like the one on the left using our function if possible.

 

Thank you for your response. 

 

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    dbCreatePath accepts a list of points - so you could just give a list of three points. It's not at all obvious to me why your code is creating a pcell, when the pcell doesn't appear to have any parameters (so it's a not-very-parameterized parameterized cell!). Couldn't you just draw the path using dbCreatePath?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NiallDuncan
    NiallDuncan over 11 years ago

     The easiest way to do this is to gather more points before you run the function. Instead of having a "begin" and "end" point, modify the function so that it accepts a list of points:

     List_Of_Points = list((0:0) (10:0) (10:10) (10:30) (30:30))

    procedure( drawPath( List_Of_Points layer @optional (width 0.5))
       ...
    ) 

     

    Then place these into your dbCreatePath command as:

    dbCreatePath( cvID list(pcLayer pcPurpose) List_Of_Points width "truncateExtend" )

     If you are adament that you must use the function you have, then I would recommend extending the end point by "width/2" before you run the function

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NiallDuncan
    NiallDuncan over 11 years ago

     [Sorry, had not seen Andrews response when I replied. Agree with him entirely.]

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • wakeup12
    wakeup12 over 11 years ago

    Thank you for answers.

     We are first creating transistor with a procedure and this procedure returns some values, for example. 

     One of the values is contacts[ array which contains the contact coordinates.

     Assuming we created two transistors with these commands:

     

    1. tCreate(1 1 0 0 "nmos")
    2. tCreate(1 1 0 -5 "nmos") 

     

    contacts[0:0] (first transistor, first contact on the left) gives ((-0.798 0.05)) while contacts[1:0] (second transistor, first contact on the left) gives ((-0.798 -4.95)).

     

    To connect these two, I write: drawPath(contacts[0:0] contacts[1:0] "MET1")

    However, I was not able to use the built-in method to do the same.

     Thank you again. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    This doesn't make a lot of sense. I can't see how calling a function that creates a pcell with some fixed values helps you in any way. If you just want to create a path, why can't you just use dbCreatePath with a list of points? It's not difficult... the list of points could be derived from the contacts array.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • wakeup12
    wakeup12 over 11 years ago

    Thank you for the answer.

    Actually the reason of using the method was to create somehow a layout in the background and call these functions to create a design.

    Let's say we will use OCEAN to load those files and call them one by one.

    According to your answer, it seems there is a way to create a layout and use it to add new devices. As you can see from the function, currently we are creating a dummy layout not to cause a syntax error (which is not well written), but using the currentCellView to create paths and transistors.

     

    Could you give a small example or link so that I could do the following?

     

     

    1. Create a layout in the background
    2. Use this layout to create paths using those point formats: '((x1 y1)) '((x2 y2)) '((x3 y3)) ... etc (we can also use (x1:y1) format, but I am not sure how I can convert our contacts[ array to this format.
    Thank you very much.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Your question is really confusing. OCEAN is for simulation and nothing to do with creating layout!

    Without knowing precisely how your contacts array is created, it's hard to advise how to convert it into a list, but you wouldn't be using '((x1 y1)). That's a quoted list which would mean that variables aren't evaluated.

    Maybe showing you an example would give you enough:

    defMathConstants('CCFmath)
    procedure(CCFdrawSillyPath(cv layer width periodLength pathAmplitude @optional (nPoints 100))
    let((x y points)
      for(i 0 nPoints
        x=i*float(periodLength)/nPoints
        y=pathAmplitude*sin(i*CCFmath.PI*2/nPoints)
        points=cons(list(x y) points)
      )
      dbCreatePath(cv layer points width)
    ))

    cv=dbOpenCellViewByType("myLib" "myCell" "layout" "maskLayout" "a")
    CCFdrawSillyPath(cv "Metal2" 1.0 100.0 20.0)
    dbSave(cv)
    dbClose(cv)

    An utterly silly example, but it should show you how to create a list of points (where each point is a list of an x and a y value), and then open a cellView, create some shapes, save and close it. No need to have any windows open when you do this.

    You could do this with "virtuoso -nograph" so no need to have any graphics either.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • wakeup12
    wakeup12 over 11 years ago

    Woow. This was a great example :). Thank you very much.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information