• 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. Strange parameter setting behaviour in a specific PDK

Stats

  • Replies 4
  • Subscribers 143
  • Views 89
  • Members are here 0

Strange parameter setting behaviour in a specific PDK

BS202501273649
BS202501273649 7 hours ago

I use some generic code to set parameters on various PDKs.  This generally works but I am just now getting errors when trying to build a metal resistor on GF cmos28slpe.  What seems to happen is that the PDK issues a warning message for this device, but once only.   If the warning message happens during the callbacks then the value is not changed.   So the first time I try to change the value I get the warning message and the value is not changed but every subsequent time no warning message is issued and everything works fine.  It all seems to work fine via Virtuoso so I'm not sure if the problem is somehow the fault of the PDK, or if the CCSinvokeInstCdfCallbacks should or can be working around it.

This code looks a bit lengthy but it's not complex - it just creates a metal resistor and tries to set the layerName parameter.  The first time that fails and the second time it succeeds.

Note that the warning message does not seem to be correct - it seems to say that only layer M1 is available whereas M2 is valid, I think.

loadi("path to the 1.21 version of Andrew Beckett's CCSinvokeInstCdfCallbacks script as obtained from ">support.cadence.com/.../ArticleAttachmentPortal)

procedure( createSchematic(pdkLibraryName libraryName cellName)
if(!ddGetObj(libraryName)
ddCreateLib( libraryName ".")
techBindTechFile( (ddGetObj libraryName) pdkLibraryName)
)
; Create Cellview
dbOpenCellViewByType(libraryName cellName "schematic" "schematic" "w")
)

procedure( createInst(cellview pdkLibraryName masterName instanceName)
let( (master instance)
master=dbOpenCellViewByType(pdkLibraryName masterName "symbol" "schematicSymbol" nil)
instance = dbCreateParamInst( cellview master instanceName 0:0 "R0" 1 )
schCheck(cellview)
dbSave(cellview)
instance
)
)

cellview = createSchematic("cmos28slpe" "testLib" "testCell")
instance = createInst(cellview "cmos28slpe" "metalres" "I0")
CDF = cdfGetInstCDF(instance)

param = cdfFindParamByName(CDF "layerName")
param->value = "M2"

;; During this call we see the warning message
;; *WARNING* (CDF-354): Specified value 'M2' is not one of the available choices '("M1")' for parameter 'layerName' in effective CDF from cell 'cmos28slpe/metalres'.
(CCSinvokeInstCdfCallbacks instance ?callInitProc t ?useInstCDF t ?setCdfgForm t ?order '("layerName"))

;; Somehow the warning message has prevented the update to the parameter
param->value

;; But if we try again
param->value = "M2"

;; During this call there is no warning message

(CCSinvokeInstCdfCallbacks instance ?callInitProc t ?useInstCDF t ?setCdfgForm t ?order '("layerName"))

;; The parameter has been updated.
param->value

  • Cancel
  • Sign in to reply
  • BS202501273649
    BS202501273649 7 hours ago

    Probably worth adding that in my example code I do supply the "?useInstCDF t" flag - but that is legacy code that probably shouldn't be there.  If I take it out I get the same result.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 5 hours ago in reply to BS202501273649

    I'm just about to be travelling today, but will do some checks on both this and your other post during my travels. I did notice a corner scenario in the code which might break in certain situations, so I'll see if it's that or something else. I have the PDK to hand, so should be able to check.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • BS202501273649
    BS202501273649 5 hours ago in reply to Andrew Beckett

    Thanks!  It's not blocking since I have a workaround - I simply make the changes twice and everything works.  But it would be good to get to the bottom of it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 8 minutes ago in reply to BS202501273649

    This is not anything to do with the callback calling code - it's due to the strange way that this device has been implemented. The CDF has a default choice list of just "M1", and the formInitProc updates the list of choices to be a more complete set (presumably based on the metal stack option). This means that (at least) the formInitProc needs to have been called first before you set the parameter. If you change the code to do this:

    cellview = createSchematic("cmos28slpe" "testLib" "testCell")
    instance = createInst(cellview "cmos28slpe" "metalres" "I0")
    (CCSinvokeInstCdfCallbacks instance ?callInitProc t ?setCdfgForm t ?order '("layerName"))
    CDF = cdfGetInstCDF(instance)

    param = cdfFindParamByName(CDF "layerName")
    param->value = "M2"

    (probably call the callbacks again afterwards to ensure that the M2 setting is taken into account if needed by callbacks) - but you will find that this proceeds without any issues. 

    Of course, this explains why doing it twice works. I don't provide an option to only call the formInitProc, but calling it with some single parameter should be OK. 

    I would not use the instance CDF (there's a hole in the code I think that ?useInstCdf t probably doesn't behave properly unless you also pass ?useCellCdf nil - if I have a moment, I'll try to tidy that up). However, there's really little reason to use the instance CDF these days anyway as I think the cell CDF support is pretty good in the code.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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