• 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. PCell callbacks and cdfgData variable

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 144
  • Views 19032
  • 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

PCell callbacks and cdfgData variable

VadimBorisov
VadimBorisov over 8 years ago

I want to execute the callback from a cell(pcell) after instantiation it to a layout, in order to check if chosen parameters are correct (no callback validation). 

evalstring(callbackOfPcell)

and it always returns t, even for the obviously mistaken setup for the inst. parameters. 

I've checked the source code of the "callbackOfPcell" callback function, and for getting the value from the cell it's using the cdfgData variable. The documentation and internet didn't give me an answer how cdfgData knows which cell is under test now.

So, the question is how cdfgData gets the right value for a cell, and why it has nil value after executing it in the CIW.

  • Cancel
Parents
  • VadimBorisov
    VadimBorisov over 8 years ago

    An interesting solution, thank you for sharing.

    Sorry, one more question, if you have a time, could you please tell me do you know how to switch off the option which returns a PCell to the default state... Sorry for asking it here, but the code is quite advance for me...

    I found the part of code, which does it, however, to my regret, I can't find there exactly...



    (procedure (CCScreateEffectiveCDFLookalike cdf @optional lookalikeParams
    (resetLookalikeParams t))
    (let (new cdfFields newParam)
    (unless (getd 'make_CCSeffCDF)
    ;---------------------------------------------------------
    ; Because some slots appear twice in cdf->? have
    ; to make the list unique
    ;---------------------------------------------------------
    (setq cdfFields (makeTable 'cdfFields))
    (foreach field (getq cdf ?)
    (setarray cdfFields field t)
    )
    (eval `(defstruct CCSeffCDF ,@(getq cdfFields ?))))
    (setq new (make_CCSeffCDF))
    (when (and lookalikeParams (null (getd 'make_CCSeffCDFparam)))
    (setq cdfFields (makeTable 'cdfFields))
    (foreach field (getq (car (getq cdf parameters)) ?)
    (setarray cdfFields field t))
    (eval `(defstruct CCSeffCDFparam ,@(getq cdfFields ?))))
    ;-----------------------------------------------------------------
    ; populate the effective cdf with the top level cdf attributes
    ;-----------------------------------------------------------------
    (foreach param (getq cdf ?)
    (putprop new (get cdf param) param))
    ;-----------------------------------------------------------------
    ; Set the id and type attributes appropriately
    ;-----------------------------------------------------------------
    (when (equal (getq new type) "instData")
    (putpropq new (dbGetq (dbGetq (getq cdf id) master) cell) id)
    (putpropq new "cellData" type)
    )
    ;-----------------------------------------------------------------
    ; If we want the parameters to be lookalike too, create those
    ;-----------------------------------------------------------------
    (when lookalikeParams
    (putpropq new
    (foreach mapcar param (getq cdf parameters)
    (setq newParam (make_CCSeffCDFparam))
    (foreach slot (getq param ?)
    (putprop newParam (get param slot) slot))
    (when resetLookalikeParams
    ; reset the value to defValue for safety
    (putpropq newParam (getq newParam defValue) value)
    )
    newParam
    )
    parameters)
    ) ; when
    ;-----------------------------------------------------------------
    ; Add the parameters as properties in the effective cdf
    ;-----------------------------------------------------------------
    (foreach param (getq new parameters)
    (putprop new param (getq param name))
    )
    new
    )
    )

    Best regards,
    Vadim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • VadimBorisov
    VadimBorisov over 8 years ago

    An interesting solution, thank you for sharing.

    Sorry, one more question, if you have a time, could you please tell me do you know how to switch off the option which returns a PCell to the default state... Sorry for asking it here, but the code is quite advance for me...

    I found the part of code, which does it, however, to my regret, I can't find there exactly...



    (procedure (CCScreateEffectiveCDFLookalike cdf @optional lookalikeParams
    (resetLookalikeParams t))
    (let (new cdfFields newParam)
    (unless (getd 'make_CCSeffCDF)
    ;---------------------------------------------------------
    ; Because some slots appear twice in cdf->? have
    ; to make the list unique
    ;---------------------------------------------------------
    (setq cdfFields (makeTable 'cdfFields))
    (foreach field (getq cdf ?)
    (setarray cdfFields field t)
    )
    (eval `(defstruct CCSeffCDF ,@(getq cdfFields ?))))
    (setq new (make_CCSeffCDF))
    (when (and lookalikeParams (null (getd 'make_CCSeffCDFparam)))
    (setq cdfFields (makeTable 'cdfFields))
    (foreach field (getq (car (getq cdf parameters)) ?)
    (setarray cdfFields field t))
    (eval `(defstruct CCSeffCDFparam ,@(getq cdfFields ?))))
    ;-----------------------------------------------------------------
    ; populate the effective cdf with the top level cdf attributes
    ;-----------------------------------------------------------------
    (foreach param (getq cdf ?)
    (putprop new (get cdf param) param))
    ;-----------------------------------------------------------------
    ; Set the id and type attributes appropriately
    ;-----------------------------------------------------------------
    (when (equal (getq new type) "instData")
    (putpropq new (dbGetq (dbGetq (getq cdf id) master) cell) id)
    (putpropq new "cellData" type)
    )
    ;-----------------------------------------------------------------
    ; If we want the parameters to be lookalike too, create those
    ;-----------------------------------------------------------------
    (when lookalikeParams
    (putpropq new
    (foreach mapcar param (getq cdf parameters)
    (setq newParam (make_CCSeffCDFparam))
    (foreach slot (getq param ?)
    (putprop newParam (get param slot) slot))
    (when resetLookalikeParams
    ; reset the value to defValue for safety
    (putpropq newParam (getq newParam defValue) value)
    )
    newParam
    )
    parameters)
    ) ; when
    ;-----------------------------------------------------------------
    ; Add the parameters as properties in the effective cdf
    ;-----------------------------------------------------------------
    (foreach param (getq new parameters)
    (putprop new param (getq param name))
    )
    new
    )
    )

    Best regards,
    Vadim

    • 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