• 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 Design
  3. Automatic schematic generation using SKILL

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 128
  • Views 21874
  • 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

Automatic schematic generation using SKILL

shamore
shamore over 13 years ago

Hello,

I am currently using Cadence version IC6.1.5.500.8. I am a regular user of Virtuoso Schematic Editor. However I don't have any experience related to automation in Schematic editor.

I am currently designing an IC that has around 15 - 20 IO Pads. Between each of these Pad's and internal logic (input or output) port, series of buffers (50-200) needs to be placed. I have the information related to the number of buffers corresponding to each Pad in an excels sheet. Doing this work manually is very boring and also tiring?

Would you kindly advice if its possible to automate the placement of buffers in the schematic between two signals based on the information provided via text file or .xls file.

Thanks and Best Regards,

Shailesh 

  • Cancel
Parents
  • dmay
    dmay over 13 years ago

    Yes, this can be done. You need to first write some Skill code to read the text file using code like the following:

    ;Assume the txt file is a csv (comma separated values) dumped from an Excel spreadsheet looking like this:
    ;portName,numBuffers

    txtFileName="/tmp/my.csv"
    /*
    The text file for this example looks like this:
    port1,10
    port2,5
    port3,6
    */
    procedure(myReadCsv(txtFileName)
      let((portTable filePtr lineData line)
        portTable = makeTable("portTable" nil)
        filePtr = infile(txtFileName)
        while(gets(line filePtr)
            lineData = parseString(line ",")
            portTable[car(lineData)] = evalstring(cadr(lineData))
        )
        close(filePtr)
        portTable
      ) ;let
    ) ;proc

    procedure(myBuildBufferSchematic(txtFileName)
      let((portTable cv x y dx inPinId outPinId buffId wireId bufInst bufWidth )
        cv = geGetEditCellView()
        portTable = myReadCsv(txtFileName)
        x = y = 0
        dx = 5.0
        inPinId = dbOpenCellViewByType("basic" "ipin" "symbol")
        outPinId = dbOpenCellViewByType("basic" "opin" "symbol")
        buffId = dbOpenCellViewByType("myLib" "myBuf" "symbol")
        foreach(port portTable
            schCreatePin(cv inPinId port "input" nil x:y "R0")
            for(i 1 portTable[port]
                wireId=schCreateWire(cv "draw" "full" list(x:y x+dx:y) 0.05 0.05 0.0)
                bufInst = dbCreateInst(cv buffId nil x+dx:y "R0")
                bufWidth = abs(rightEdge(bufInst~>bBox) - leftEdge(bufInst~>bBox))
                ;Subtract 0.05 so the wire overlaps the instance pin (adjust as needed for your buffer)
                x = x + dx + bufWidth - 0.05
            )
            wireId=schCreateWire(cv "draw" "full" list(x:y x+dx:y) 0.05 0.05 0.0)
            schCreatePin(cv outPinId strcat(port "_out") "output" nil x+dx:y "R0")
            y=y+1
            x=0
        )
        printf("Finished\n")
      ) ;let
    ) ;proc

    ;lbl = schCreateWireLabel(cv car(wireId) x:y+0.05 labelName "lowerCenter" "R0"  "stick" 0.05 nil)

    Your needs will certainly vary from what I've provided, but here are some things to note:

    1. Paste the above in a file like with a .il extension.
    2. Modify the code to specify your text file name (use the sample lines so you can see what this does) 
    3. Modify the line that sets buffId to provide your buffer library and cell name
    4. If your input and output pins are not basic ipin and opin, then update inPinId and outPinId
    5. Open an empty schematic in edit mode
    6. Load your Skill file in your CIW: load("mySkillFileName.il")
    7. Run: myBuildBufferSchematic(txtFileName)
    8. Look at the results. You can use "undo" to get your empty schematic back. Edit the skill, and try again.

    I didn't name the wires between the buffers, but if you need to you can use the schCreateWireLabel command shown above.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 13 years ago

    Yes, this can be done. You need to first write some Skill code to read the text file using code like the following:

    ;Assume the txt file is a csv (comma separated values) dumped from an Excel spreadsheet looking like this:
    ;portName,numBuffers

    txtFileName="/tmp/my.csv"
    /*
    The text file for this example looks like this:
    port1,10
    port2,5
    port3,6
    */
    procedure(myReadCsv(txtFileName)
      let((portTable filePtr lineData line)
        portTable = makeTable("portTable" nil)
        filePtr = infile(txtFileName)
        while(gets(line filePtr)
            lineData = parseString(line ",")
            portTable[car(lineData)] = evalstring(cadr(lineData))
        )
        close(filePtr)
        portTable
      ) ;let
    ) ;proc

    procedure(myBuildBufferSchematic(txtFileName)
      let((portTable cv x y dx inPinId outPinId buffId wireId bufInst bufWidth )
        cv = geGetEditCellView()
        portTable = myReadCsv(txtFileName)
        x = y = 0
        dx = 5.0
        inPinId = dbOpenCellViewByType("basic" "ipin" "symbol")
        outPinId = dbOpenCellViewByType("basic" "opin" "symbol")
        buffId = dbOpenCellViewByType("myLib" "myBuf" "symbol")
        foreach(port portTable
            schCreatePin(cv inPinId port "input" nil x:y "R0")
            for(i 1 portTable[port]
                wireId=schCreateWire(cv "draw" "full" list(x:y x+dx:y) 0.05 0.05 0.0)
                bufInst = dbCreateInst(cv buffId nil x+dx:y "R0")
                bufWidth = abs(rightEdge(bufInst~>bBox) - leftEdge(bufInst~>bBox))
                ;Subtract 0.05 so the wire overlaps the instance pin (adjust as needed for your buffer)
                x = x + dx + bufWidth - 0.05
            )
            wireId=schCreateWire(cv "draw" "full" list(x:y x+dx:y) 0.05 0.05 0.0)
            schCreatePin(cv outPinId strcat(port "_out") "output" nil x+dx:y "R0")
            y=y+1
            x=0
        )
        printf("Finished\n")
      ) ;let
    ) ;proc

    ;lbl = schCreateWireLabel(cv car(wireId) x:y+0.05 labelName "lowerCenter" "R0"  "stick" 0.05 nil)

    Your needs will certainly vary from what I've provided, but here are some things to note:

    1. Paste the above in a file like with a .il extension.
    2. Modify the code to specify your text file name (use the sample lines so you can see what this does) 
    3. Modify the line that sets buffId to provide your buffer library and cell name
    4. If your input and output pins are not basic ipin and opin, then update inPinId and outPinId
    5. Open an empty schematic in edit mode
    6. Load your Skill file in your CIW: load("mySkillFileName.il")
    7. Run: myBuildBufferSchematic(txtFileName)
    8. Look at the results. You can use "undo" to get your empty schematic back. Edit the skill, and try again.

    I didn't name the wires between the buffers, but if you need to you can use the schCreateWireLabel command shown above.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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