• 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. Manipulating a single Instance Iterations in Virtuoso

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 125
  • Views 18134
  • 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

Manipulating a single Instance Iterations in Virtuoso

Battosai
Battosai over 12 years ago

 

I am trying to manipulate the parameters of a single instance of an array (I1<1024:1>). The instances contain a simple RC network and a current source modelling a rather complex circuit. All the instances are connected in series using a bus-notation. Now I need to add a unique delay to every single one of the current sources in order to simulate a propagating signal through this chain of instances.

My idea was to use a skill function to deduce the number of the instance and use it as a multiplier for a constant delay and add it as a parameter of the internal current source. This way all 1024 instances should have a unique delay that is a function of its instance number.

I am fairly new to Skill and seem to be stuck..I managed to access a single instance using ilInst~>name but this returns me the complete name i.e. I1<x>. That's about as far as I came..

Does anyone have experience with this kind of problem or any hints that might help?
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Samuel,

    You appear to be creating a netlisting function using AMS netlisting functions (which are for the AMS cell-based netlister), but then using the netlist procedure for spectre (which uses the "nl" netlisting functions). So that's why it's not working.

    Personally I would do this using a schematic pcell, then you don't need to worry about different custom netlist procedures for different simulators - the schematic would work in all ADE netlisters (except AMS cell-based, but would work in AMS OSS/irun flow).

    Here's an example:

    let( (CellLibrary pcellId)
      CellLibrary = "training"
      unless( ddGetObj(CellLibrary)
         error("Couldn't open library %L" CellLibrary)
      )
      
      pcellId =  pcDefinePCell(
         list( ddGetObj(CellLibrary) "rnsd" "schematic" "schematic" )
         
         /****************************************************************************
         /*
         /* Default Parameters
         /*
         /***************************************************************************/
         (
            (ns "1")
         )
         
         let(( pcCV masterCv instName instId netP netM numInsts)
           
           /*************************************************************************
           /*
           /* Get parameter values
           /*
           /************************************************************************/
           pcCV = pcCellView
           
           ;; open master cell view
           masterCv = dbOpenCellViewByType( "analogLib" "res" "symbol" nil "r" )
    
           ;; create the nets
           netP=dbMakeNet(pcCV "PLUS")
           netM=dbMakeNet(pcCV "MINUS")
    
           ;; create the terminals
           dbCreateTerm(netP "PLUS" "inputOutput")
           dbCreateTerm(netM "MINUS" "inputOutput")
    
           numInsts=atoi(ns)
           when(numInsts<1 numInsts=1)
           for(inst 1 numInsts
              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))
              )
    
              ;; create instance
              sprintf(instName "R%d" inst)
              instId = dbCreateInst( pcCV masterCv instName (0:0) "R0" )
              dbCreateProp(instId "r" "string" "pPar(\"r\")/pPar(\"ns\")")
    
              ;; create instTerms for the instance to connect it up
              dbCreateInstTerm(netP instId dbFindTermByName(masterCv "PLUS"))
              dbCreateInstTerm(netM instId dbFindTermByName(masterCv "MINUS"))
    
           ) ; for
    
           dbClose( masterCv )
           ;; Always return true
           t
         ) ; ** let **
      )
      ; not sure if below is really necessary
      dbSave(pcellId)
      dbClose( pcellId ) 
    ) ; ** let **

     

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Samuel,

    You appear to be creating a netlisting function using AMS netlisting functions (which are for the AMS cell-based netlister), but then using the netlist procedure for spectre (which uses the "nl" netlisting functions). So that's why it's not working.

    Personally I would do this using a schematic pcell, then you don't need to worry about different custom netlist procedures for different simulators - the schematic would work in all ADE netlisters (except AMS cell-based, but would work in AMS OSS/irun flow).

    Here's an example:

    let( (CellLibrary pcellId)
      CellLibrary = "training"
      unless( ddGetObj(CellLibrary)
         error("Couldn't open library %L" CellLibrary)
      )
      
      pcellId =  pcDefinePCell(
         list( ddGetObj(CellLibrary) "rnsd" "schematic" "schematic" )
         
         /****************************************************************************
         /*
         /* Default Parameters
         /*
         /***************************************************************************/
         (
            (ns "1")
         )
         
         let(( pcCV masterCv instName instId netP netM numInsts)
           
           /*************************************************************************
           /*
           /* Get parameter values
           /*
           /************************************************************************/
           pcCV = pcCellView
           
           ;; open master cell view
           masterCv = dbOpenCellViewByType( "analogLib" "res" "symbol" nil "r" )
    
           ;; create the nets
           netP=dbMakeNet(pcCV "PLUS")
           netM=dbMakeNet(pcCV "MINUS")
    
           ;; create the terminals
           dbCreateTerm(netP "PLUS" "inputOutput")
           dbCreateTerm(netM "MINUS" "inputOutput")
    
           numInsts=atoi(ns)
           when(numInsts<1 numInsts=1)
           for(inst 1 numInsts
              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))
              )
    
              ;; create instance
              sprintf(instName "R%d" inst)
              instId = dbCreateInst( pcCV masterCv instName (0:0) "R0" )
              dbCreateProp(instId "r" "string" "pPar(\"r\")/pPar(\"ns\")")
    
              ;; create instTerms for the instance to connect it up
              dbCreateInstTerm(netP instId dbFindTermByName(masterCv "PLUS"))
              dbCreateInstTerm(netM instId dbFindTermByName(masterCv "MINUS"))
    
           ) ; for
    
           dbClose( masterCv )
           ;; Always return true
           t
         ) ; ** let **
      )
      ; not sure if below is really necessary
      dbSave(pcellId)
      dbClose( pcellId ) 
    ) ; ** let **

     

    Regards,

    Andrew.

    • 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