• 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. create bus labels from CSV file

Stats

  • Replies 2
  • Subscribers 137
  • Views 297
  • Members are here 0

create bus labels from CSV file

Darrell L
Darrell L 25 days ago

We have a digital control circuit that uses 1232 hardwired inputs to set the trim values for an RF circuit.  The hardwired inputs are organized as 176 busses with 7bits each.  After simulation and lab testing, we will have a csv file with the optimum values for each bus.  I would like to have some automated way to label the bus connections to each input based on a csv file values.  IE if the csv file has 1001000 for bus x, and 0110011 for bus y, then I want some way to label the wire connected to bus x '1,0,0,1,0,0,0", and bus y "0,1,1,0,0,1,1".  Is there any way to do this?

Alternatively, is there some way to create a schematic block with labeled wires and pins based on the csv file?  I could then place that block in the main schematic to set all the trim values.

Thanks in advance,

Darrell

  • Sign in to reply
  • Cancel
Parents
  • IN2FAB
    IN2FAB 18 days ago

    It should be fairly straightforward to write some Skill code to do this.  You'll probably need to do a little processing on each bus label once you've read it in to separate out the bus name from the bits, assuming it's all csv.  If each csv line reads "busx,1,0,0.1,0,0,0" after you pull in from the file, it would be something like:

    data = <function to read the file>

    allBusses = foreach(mapcar datum data
                           busData = parseString(datum ",")
                           busName = car(busData)
                           busBits = buildString(cdr(busData ","))
    )

    That will give you a list containing each bus in two parts:

    '(
        '("busx" "1,0,1,0,0,0")
        '("busy" "0,1,1,0,0,1")
        etc.
    )


    Then step through each one to find the appropriate wire on your schematic and add the label.  Getting the wire that connects to a pin rather than a random wire on each net will give a neater result.  

    foreach(bus allBusses
        <find the pin based on the name in car(bus)>
        myWire = <find the wire that connects to the pin>
        myCoord = <get your coordinate based on the wire>
        myLabel = dbCreateLabel(cellId "device" myCoord cadr(bus) "lowerLeft" "R0" "stick" textSize)
        schGlueLabel(myLabel myWire)
    )

    Label attachment is done through parent/child connections in a schematic so you can attach the net that way if you want to stick with db functions.

    Once you've done all this, you'll need to add tieHi and tieLo cells to your schematic and label the wires attached to them as 1 and 0.

    Your proposed schematic will work electrically but it's going to cause you problems in the layout.  If you connect all the 1 and 0 bits together as single nets, you'll end up with two wires with over 600 connections that each hang off one resistor.  You're much better off creating local 1 and 0 connections for each bus and tying them off separately.  

    Given this is for trim, you might also consider adding a tieHi or tieLo connection for each bit of every bus.  That would allow you to adjust the trim based on post-layout extraction simply by flipping the tie cells from one to the other.  

    - Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • IN2FAB
    IN2FAB 18 days ago

    It should be fairly straightforward to write some Skill code to do this.  You'll probably need to do a little processing on each bus label once you've read it in to separate out the bus name from the bits, assuming it's all csv.  If each csv line reads "busx,1,0,0.1,0,0,0" after you pull in from the file, it would be something like:

    data = <function to read the file>

    allBusses = foreach(mapcar datum data
                           busData = parseString(datum ",")
                           busName = car(busData)
                           busBits = buildString(cdr(busData ","))
    )

    That will give you a list containing each bus in two parts:

    '(
        '("busx" "1,0,1,0,0,0")
        '("busy" "0,1,1,0,0,1")
        etc.
    )


    Then step through each one to find the appropriate wire on your schematic and add the label.  Getting the wire that connects to a pin rather than a random wire on each net will give a neater result.  

    foreach(bus allBusses
        <find the pin based on the name in car(bus)>
        myWire = <find the wire that connects to the pin>
        myCoord = <get your coordinate based on the wire>
        myLabel = dbCreateLabel(cellId "device" myCoord cadr(bus) "lowerLeft" "R0" "stick" textSize)
        schGlueLabel(myLabel myWire)
    )

    Label attachment is done through parent/child connections in a schematic so you can attach the net that way if you want to stick with db functions.

    Once you've done all this, you'll need to add tieHi and tieLo cells to your schematic and label the wires attached to them as 1 and 0.

    Your proposed schematic will work electrically but it's going to cause you problems in the layout.  If you connect all the 1 and 0 bits together as single nets, you'll end up with two wires with over 600 connections that each hang off one resistor.  You're much better off creating local 1 and 0 connections for each bus and tying them off separately.  

    Given this is for trim, you might also consider adding a tieHi or tieLo connection for each bit of every bus.  That would allow you to adjust the trim based on post-layout extraction simply by flipping the tie cells from one to the other.  

    - Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • IN2FAB
    IN2FAB 18 days ago in reply to IN2FAB

    Actually, this bit:

    allBusses = foreach(mapcar datum data
                           busData = parseString(datum ",")
                           busName = car(busData)
                           busBits = buildString(cdr(busData ","))
    )

    Should read:

    allBusses = foreach(mapcar datum data
                            list(car(parseString(datum ",")) buildString(cdr(parseString(datum ","))))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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.

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

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