• 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 SKILL
  3. how to pass CDF parameter's value of an instance in schematic...

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 144
  • Views 9588
  • 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

how to pass CDF parameter's value of an instance in schematic pcell to CDF parameter of schematic pcell

patwardg
patwardg over 12 years ago

An explanation of the problem I am facing is in order -

I have created a schematic pcell (A) in which I am instantiating the instance of a foundry delivered pcell (B). There are some independent (e.g. Bp, Bq ) and some dependent CDF parameters (e.g. Bx) defined for the CDF  of the pcell B.

So, Bx = FB_callback(Bp Bq)

Bx is calculated whenever I change Bp or Bq, using a call back function which I have absolutely no access to.

I have created 2 independent CDF  parameters for A (which is the pcell I created) - Ap and Aq. In the code for my schematic pcell I pass these values Ap and Aq to Bp and Bq respectively. Something like this -

master_b = dbOpenCellViewByType( "foundry_library" "foundry_cell_B" "symbol" )
inst_b = dbCreateInst( pcCellView master_b "I_B" list( 0.0 0.0 ) "R0")
inst_b~>Bp = Ap
inst_b~>Bq = Aq

However, after this when I print out the inst_b~>Bx then I see that it is not getting changed and is always the default.

How do I make sure that the callback routine for the foudry cell gets called? Also how do I pass the new value of Bx back into my pcell's CDF Ax?

Thanks,

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    I suggest using the code in solution 11018344 to call the callbacks.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • patwardg
    patwardg over 12 years ago

     Hi Andrew,

    Thanks for the quick reply.

    The solution worked and I was able to update the CDF values of the foundry instances.

    Although how do I pass them into the CDF values of the schematic pcell, from the schematic pcell code? When I use cdfgData variable in the pcell code, it's giving me an unbound variable error.

    Thanks,

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

    I don't really understand. The schematic pcell will receive the pcell parameters (which will probably correspond to CDF parameters), and then it can operate on those. It wouldn't access the CDF of the cell. It's quite right that cdfgData should not be defined. So I'm not really sure what you're trying to do and what you are expecting to work - can you describe this carefully (ideally with the code that isn't working)?

    Thanks,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • patwardg
    patwardg over 12 years ago

     Hey Andrew,

    Sorry for not being able to describe it correctly, being a novice in this field. Here's an example of a section of the code that I am working on. I am calling the pcell code first (pcDefinePCell and my_schpcell_code) followed by the code to create the CDF for my schematic pcell. I have also included the relevant section of the cdfdump I performed on the foundry's pcell.

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

     ;;pcell code
    pcDefinePCell(
      list(ddGetObj(<my_lib_name>) <my_cell_name> "schematic" "schematic")
      (
        (gw "float" 5.0)
        (gl "float" 5.0)
        (gtotcap "string" "1p")
      )
      my_schpcell_code(pcCellView gw gl garea gtotcap)
    )

    procedure(my_schpcell_code(id gw gl garea gtotcap gm dnw)
      let((
            master_fc inst_fc master_mos inst_mos master_pin inst_pin_plus inst_pin_minus
            capnet_minus capnet_plus capterm_minus capterm_plus mim_bot_minus mim_top_plus mos_minus_minus mos_plus_plus mos_sub_minus
            pin_plus pin_minus
            pt_mim_top pt_mim_bot pt_mos_plus pt_mos_minus pt_mos_sub
            node_plus node_minus_1 node_minus_2
            wire_mim_top wire_mim_bot wire_mos_plus wire_mos_minus wire_mos_sub wire_mos_sub_1 wire_plus wire_minus
            elipse_radius
          )
        master_fc = dbOpenCellViewByType( "<foundry_lib_name>" "<foundry_cell_name" "symbol" )
        inst_fc = dbCreateInst( pcCellView master_fc "I_MIM_SCH" list( 0.0 0.0 ) "R0")
                               |
                               |
        <other code for creating pins, wires, connections etc. for the schematic pcell>
                               |
                               |
        inst_fc~>w = ftos(gw, 1)
        inst_fc~>l = ftos(gl, 1)
        CCSinvokeInstCdfCallbacks(inst_fc)
        fprintf(stdout "inst_fc~>ctotal = %L\n" inst_fc~>ctotal) [I could see here that the ctotal gets updated after calling CCSinvokeInstCdfCallbacks function]
      )
    )

    procedure(my_callback()
      when(boundp('cdfgData)
        let( ((cdf cdfgData))
            ;cdf~>garea~>value = cdf~>gw~>value * cdf~>gl~>value
          cdf~>gtotcap~>value = ????? [here is where I don't understand how to pass the value of ctotal to the cdf that I defined]
        )
      )
    )

    ;;cdf code without the simulator information
    let( (id cdfid)
      when(id = dbOpenCellViewByType("<my_lib_name>" "<my_cell_name>" "layout")
        when(cdfid=cdfGetBaseCellCDF(id~>cell)
          cdfDeleteCDF(cdfid)
        )
        cdfid = cdfCreateBaseCellCDF(id~>cell)
        foreach(param reverse(id~>parameters~>value)
          unless(param~>name == "dnw"
            cdfCreateParam(cdfid
              ?name        param~>name
                ?type        param~>valueType
                ?prompt        case(param~>name
                          ("gw" "width (um)")
                          ("gl" "length (um)")
                          ("gtotcap" "Total Capacitance")
                        )
                ?defValue    unless(param~>value=="FALSE" param~>value)
                ?callback    "my_callback()"
                ?editable    case(param~>name
                                (("gl" "gw" ) "t")
                                (("gtotcap") "nil")
                        )
              ?display case(param~>name
                         (("gtotcap") "nil")
                         (("gw" "gl") "t")
                       )
            )
          )
        )
      )
    )

    ;;here is the relevant portion of the cdf dump of the foundry cell
        cdfCreateParam( cdfId
            ?name           "l"
                    :
                    :
                    :
            ?callback       "<foundry_callback>('l)"
        )
        cdfCreateParam( cdfId
            ?name           "w"
                    :
                    :
                    :
            ?callback       "<foundry_callback>('w)"
        )
        cdfCreateParam( cdfId
            ?name           "ctotal"
                    :
                    :
                    :
            ?callback       "<foundry_callback>('ctotal )"
        )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

     I hope I have decribed it correctly this time. When I instantiate the schematic pcell that I created and change it's properties, I see that the callbacks get called first followed by my schematic pcell code. So should I be reversing the order in which I tried to create the pcell and the cdf? Am I using the correct way to create the schematic pcell and its CDF?

    Thanks,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • patwardg
    patwardg over 12 years ago

     Hello Andrew,

    Did you get a chance to look at the code example I posted earlier? Any comments?

    Thanks,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 12 years ago

     Looking at your code I see two parameter names: ctotal and gtotcap but I can't find where you set up the relationship. Is gtotcap defined as a vendor parameter?

     Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • patwardg
    patwardg over 12 years ago

     "gtotcap" is a cdf parameter that I defined for my schematic pcell and I want it to assign a value of "ctotal" which is actually a cdf parameter of the foundry delivered pcell that i am instantiating in my schematic pcell

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Garrett Zhou
    Garrett Zhou over 3 years ago in reply to Andrew Beckett

    Hi Andrew, thank you for your previous reply. Actually I encounter the same issue as patwardg.

    The problem is, for example, Foundry PDK resistor only provide parallel multi-link, refuse to provide serial multi-link pcell.
    Foundry's reason is, parallel multi-link res is multiple-instance inherently, but serial multi-link is single-instance, which is not good for layout matching, so we disable it.
    Foundry suggested workaround is to use bus connection for serial connection of resistor, which results in complex schematic, and error-prone net label.

    But actually another foundry can provide both parallel and serial multi-link, each configuration support both single-instance (for layout simplicity) and multiple-instance (for more custom layout better matching).

    I want to create a pcell to instantiate foundry resistor in serial multi-link configuration. I tried the SKILL code provided in another webpage
    https://community.cadence.com/cadence_technology_forums/f/custom-ic-design/40177/changing-the-number-of-series-instances-in-a-schematic# 
    And use CCSinvokeInstCdfCallbacks(instID ?callInitProc t ?useInstCDF nil) to update child pcell r value after wrapper pcell w & l change.

    *** Finally the question, how can I pass child pcell dependent CDF value r, to this wrapper pcell CDF?  ***
    So that when I instantiate the wrapper pcell, it can dispplay w & l & and also r, just like foundry pcell.
    So that I can see the r value of child pcell, without the need to decend into the wrapper pcell.

    Or the question can be in a simpler form, how can I mirror CDF display of child pcell to pcell wrapper. From design geometry, to back annotation operating point.

    Sorry the question is long and complex. Thanks, and best regards.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Garrett Zhou

    You should ask this as a new thread rather than adding onto the end of a 9 year old question. Please do that rather than confusing the original thread (please see the forum guidelines - you can always include a hyperlink to this thread for reference).

    Andrew

    • 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