Parameterized Schematic Instances?

Discussion in 'Cadence' started by Spaceghost, Jul 31, 2004.

  1. Spaceghost

    Spaceghost Guest

    Hi, I'm trying to find out how to make parameterized schematic instances.
    For example, I would like to create an inverter and be able to place many
    instances that all have different transistor aspect ratios, settable on the
    properties dialog for the instance.

    I've tried filling in pParam("nwidth") for the nfet width. This then
    appears in the CDF when I go to make a symbol. When I place an inverter
    instance in the schematic, I can specify the nwidth parameter. However,
    when Spectre netlists the instance, it set w=pParam("nwidth"), instead of
    correctly placing a number in the netlist.

    Anyhow, I'm sure this is a common thing, otherwise you've have to create way
    too many different schematics. In fact, I used this setup in Cadence before
    but don't remember exactly how it's done.

    Help! :) Thanks!

    Marc
     
    Spaceghost, Jul 31, 2004
    #1
  2. Spaceghost

    Erik Wanta Guest

    Marc:
    Use pPar() instead of pParam().
     
    Erik Wanta, Jul 31, 2004
    #2
  3. Spaceghost

    Spaceghost Guest

    Oops, I guess I just made a mistake somewhere...the procedure was
    right.

    Here's a summary of how to make parameterized schematic instances for
    future explorers:

    Create a schematic. Fill in pPar("nwidth"), instead of a number like
    you usually would. pPar is a command to look for and use the "nwidth"
    parameter at the next level "up". Create a symbol from the cellview.
    This will automatically add the nwidth parameter to the CDF.

    Now when you go to place the symbol, you can edit its properties...it
    has the property 'nwidth'.

    Also, in the symbol editing view, add the label [@nwidth] to display
    the value of nwidth whenever the symbol instance is placed.

    Marc
     
    Spaceghost, Jul 31, 2004
    #3
  4. Spaceghost

    Spaceghost Guest

    Hmm, I wish I could help but don't really know what the goal is.

    Marc
     
    Spaceghost, Aug 1, 2004
    #4
  5. Spaceghost

    oghdayan Guest

    Hi Marc,
    I wish to make stg related, but slightly more complicated: a schematic
    with N series resistors.
    The resistors could come from any PDK. The symbol would have a
    annotation with the cell name of the PDK resistor, and either nominal
    resistance or current.
    I suppose this can be done with a pcell schematic view, but if any of
    you have more precise ideas to kickstart me, that would be welcome.
     
    oghdayan, Aug 1, 2004
    #5
  6. Spaceghost

    fogh Guest

    Have a versatile symbol for placing foundry resistors in series. The PDK resistors very often do not support a parameter for number of series elements ( or "number of fingers" ). And when they do, it is often necessary to avoid using it because the layouter want something else than what the pcell generates. As a design house, we are not supposed to mess with the PDK, so it is not really possible to simply add the CDF and put support for this in model files, decks, netlisters, etc.
    This results in schematics that have "shish kebabs" of resistors, unreadable, ugly, not maintainable. Of course the situation could be helped if the fonts in composer had been chosen more carefully. It is easy to read a schematic with 50 devices on screen when using microsim schematic, but it is a tour-de-force with composer.

    Anyway, the best solution I can see is a schematic generating cell that has 4 parameters: lib/cell/view, and number of series elemements. After that the property form of the instanced PDK resistor would pop-up, and when OK'ed, the schematic be created.
     
    fogh, Aug 2, 2004
    #6
  7. I've always done this with a schematic pcell. The schematic pcell doesn't need
    to have the graphical information for the wiring, just the connectivity.
    Something like the following. Of course, this assumes that the PDK's resistors
    support pPar() at all - not all do because of the evil callbacks that they
    sometimes employ.

    Andrew.

    let( (CellLibrary pcellId)
    CellLibrary = "test"
    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 **
    )
    dbSave(pcellId)
    dbClose( pcellId )
    ) ; ** let **
     
    Andrew Beckett, Aug 2, 2004
    #7
  8. Spaceghost

    fogh Guest

    Andrew,

    that is a good starting point. I will try and make it work for any PDK, for example by using a "reference resistor instance". And maybe customise the displayed OP/MP data.
     
    fogh, Aug 5, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.