• 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. Changing the number of series instances in a schematic

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 125
  • Views 22730
  • 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

Changing the number of series instances in a schematic

MoHas
MoHas over 6 years ago

Hi,

Is there a way to parameterize the number of series instances in a schematic and be able to change that from the symbol parameters? 

Thanks,

Mohammed

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    Hi Mohammed,

    This will depend on whether it's supported by the specific component in the specific PDK you're using. 

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MoHas
    MoHas over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    It's not a PDK component. I'm having a schematic/symbol of a model of wire of unit length. And I want to be able to change the number of units when I instantiate that cell.

    Mohammed

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to MoHas

    So if this is for instantiation in VLS XL, you could add a CDF parameter to your component called s and then you can set it to whatever you want. VLS XL will then use this parameter to generate multiple instances in the layout, which are series connected. You can see which parameters are honoured for VLS XL by going to Options->Layout XL, going to the Parameters tab, and in the Schematic Parameter Names section changing the cyclic choice to Series-connected factor and seeing the available parameter names.

    If you want your model to honour that in simulation (if you have a simulation model) you'll need to reference the s parameter in your model too.

    Does that help?

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Andrew Beckett

    By the way, it rather helps if you say what tools you're actually using, which version and so on - the Forum Guidelines (pinned post at the top of each forum) explain this. Otherwise there ends up being quite a bit of guesswork in what you're really asking...

    I may have incorrectly guessed in this case, or I may have got lucky?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MoHas
    MoHas over 6 years ago in reply to Andrew Beckett

    I'm using Virtuoso6/123 and MMSIM/161. I will read the Forum Guidelines soon, I've just created the account this afternoon Slight smile

    I'm trying to do that for simulation purpose only, I don't have a layout. So I need this "s" parameter to generate a schematic/netlist with multiple instances connected in series.

    Is that possible?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to MoHas

    Well, you can do it by doing something like:

    You can't parameterise the bus widths though (this is 6 in series - and so you have 5 internal nodes). The only real way to do this is to build a schematic pcell for your block - there's no simple "just add a parameter" means of doing this.

    Even if you made it a schematic pcell, you wouldn't be able to sweep the number of series-connected devices anyway because that would require the netlist to be rebuilt for each parameter value. That's me guessing again that this was your motivation...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MoHas
    MoHas over 6 years ago in reply to Andrew Beckett

    That's exactly what I want to do. I want to parameterise the number of series elements. The intention is not to do sweep but to be able to use this pcell multiple times without the need to edit the bus widths manually each time.

    Thanks, Mohammed

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to MoHas

    Hi Mohammed,

    Here's an example of a schematic pcell for a series resistor. In essence it's a cell with a parameter "ns" (you'd need to add this to your CDF as a string parameter, with parseAsNum set to "yes" ideally) and then inside the code change what it is instantiating. Obviously you'll be creating a new cell here at a higher level than your current wire component, but hopefully you get the idea.

    Regards,

    Andrew

    /* respcell.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Apr 07, 2014 
    Modified   
    By         
    
    Example of a series resistor pcell.
    
    Original version only contained connectivity - this one contains "graphics"
    too so that if you descend into the schematic you can probe nets.
    
    ***************************************************
    
    SCCS Info: @(#) respcell.il 04/07/14.11:02:22 1.2
    
    */
     
    procedure(abCreateResPcell(libName cellName) 
      let( (pcellId)
        unless( ddGetObj(libName)
          error("Couldn't open library %L" libName)
        )
    
        pcellId =  pcDefinePCell(
          list( ddGetObj(libName) cellName "schematic" "schematic" )
    
          ;------------------------------------------------------------------
          ; Default Parameters
          ;------------------------------------------------------------------
          (
            (ns "1")
          )
          let(( pcCV masterCv instName instId netP netM numInsts y (resHeight 0.375)
            (wireLen 0.125) pinMaster pinFig wire lastCoord)
    
            pcCV = pcCellView
    
            ;------------------------------------------------------------------
            ; open master cellviews
            ;------------------------------------------------------------------
            masterCv = dbOpenCellViewByType( "analogLib" "res" "symbol" nil "r" )
            pinMaster=dbOpenCellViewByType("basic" "iopin" "symbol")
    
            numInsts=atoi(ns)
            when(numInsts<1 numInsts=1)
    
            ;----------------------------------------------------------------
            ; Create nets and terminals
            ;----------------------------------------------------------------
            netP=dbMakeNet(pcCV "PLUS")
            netM=dbMakeNet(pcCV "MINUS")
            dbCreateTerm(netP "PLUS" "inputOutput")
            dbCreateTerm(netM "MINUS" "inputOutput")
            y=0
            pinFig=dbCreateInst(pcCV pinMaster "" 0:y "R0")
            dbCreatePin(netP pinFig)
            lastCoord=0:y
            for(inst 1 numInsts
              ;--------------------------------------------------------------
              ; Create the nets connected to either side
              ;--------------------------------------------------------------
              if(inst==1 then
                netP=dbMakeNet(pcCV "PLUS")
              else 
                netP=dbMakeNet(pcCV sprintf(nil "net%d" inst-1))
              ) ; if
              if(inst==numInsts then
                netM=dbMakeNet(pcCV "MINUS")
              else 
                netM=dbMakeNet(pcCV sprintf(nil "net%d" inst))
              )
              sprintf(instName "R%d" inst)
              y=y-wireLen
              instId = dbCreateInst( pcCV masterCv instName (0:y) "R0" )
              dbCreateProp(instId "r" "string" "pPar(\"r\")/pPar(\"ns\")")
              ;--------------------------------------------------------------
              ; Connect up the instance
              ;--------------------------------------------------------------
              dbCreateInstTerm(netP instId dbFindTermByName(masterCv "PLUS"))
              dbCreateInstTerm(netM instId dbFindTermByName(masterCv "MINUS"))
              wire=dbCreateLine(pcCV list("wire" "drawing") list(lastCoord 0:y))
              dbAddFigToNet(wire netP)
              y=y-resHeight
              lastCoord=0:y
            )
            y=y-wireLen
            pinFig=dbCreateInst(pcCV pinMaster "" 0:y "R0")
            dbCreatePin(netM pinFig)
            wire=dbCreateLine(pcCV list("wire" "drawing") list(lastCoord 0:y))
            dbAddFigToNet(wire netM)
    
            dbSetConnCurrent(pcCV)
    
            dbClose( masterCv )
            ;; Always return true
            t
          ) ; ** let **
        )
        ; not sure if below is really necessary
        dbSave(pcellId)
        dbClose( pcellId ) 
      ) ; ** let **
    )
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MoHas
    MoHas over 6 years ago in reply to Andrew Beckett

    Perfect! I will give it a go.

    Many thanks!

    Mohammed

    • 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