• 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. Avoid/Blacklist model instance from PDK

Stats

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

Avoid/Blacklist model instance from PDK

HoWei
HoWei over 7 years ago

Îs there a way to blacklist/whitelist dedicated models from a PDK ?

I my case, we do have a PDK with different models for a MOSFET - standard models ("nch") and macro models (nch_mac").

The macro models ("nch_mac") are allowed to be used in schematic design, the other models shall be avoided/forbidden.

How can I forbid the usage of these models or create a warning when used ?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 7 years ago

    I have a check and save example which does something very like this (and could be adapted to solve your other question too). I’m travelling at the moment so will upload it once I arrive in a few hours.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to Andrew Beckett

    Here's a link to a post (I found four posts where I'd posted this code!) which shows an example of adding a custom check.

    Then you'd need to add code something like this:

        /***************************************************************
        *                                                              *
        *   checkComponentsInCategory (cv libName categName severity)  *
        *                                                              *
        *      Private function to check for any components which      *
        *    are in a category of the PDK intended not to be used.     *
        *                                                              *
        ***************************************************************/
    
        defun(checkComponentsInCategory (cv libName categName severity)
            let((catId libId)
                ;------------------------------------------------------------
                ; If the cache has not been populated yet, do so now
                ;------------------------------------------------------------
                when(libName && !categCache
                    libId=ddGetObj(libName)
                    when(libId
                        categCache=makeTable('categCache nil)
                        catId=ddCatOpen(libId categName "r")
                        foreach(catMember catId && ddCatGetCatMembers(catId)
                            when(cadr(catMember)=="cell"
                                categCache[car(catMember)]=t
                            )
                        )
                        when(catId
                            ddCatClose(catId)
                        )
                    )
                )
                ;------------------------------------------------------------
                ; Check for any instances which are from the PDK, and are
                ; in the cache of the disallowed category
                ;------------------------------------------------------------
                when(libName && categCache
                    foreach(inst cv~>instances
                        when(inst~>libName==libName && categCache[inst~>cellName]
                            placeMarker(inst 
                                sprintf(nil "%s is in the %s category of %s" 
                                    inst~>cellName
                                    categName
                                    libName
                                ) ; sprintf
                                severity
                            ) ; placeMarker
                        )
                    )
                ) ; when libName && categCache
            ) ; let
        ) ; defun

    This code is from an earlier implementation of abExampleSchematicChecksNew which had to add the markers itself. Instead of the call to placeMarker, you'd use schReportCheckFailure (see the other code for an example). You'd need to call the code above with schRegisterCheckRule. Of course, you may not quite implement it that way - this checks to see if components are in a particular category - you might have some other criteria for determining they are not to be used.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • HoWei
    HoWei over 7 years ago in reply to Andrew Beckett

    Hi Andrew,

    I found that code in the other post as well, but I would need some advice how to execute it. I think the adaption to my requirement I can do myself, but where do I save the file and how would I compile/start it ? And what do I have to do, to make it started automatically by pressing "Check&Save" ?

    If you could post a link to a tutorial would be helpful - as you see, I am a newbie in skill customization.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to HoWei

    Sorry - been a bit busy last week with CDNLive, so haven't had a chance to respond yet. I've not forgotten - just not got to it yet!

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • HoWei
    HoWei over 7 years ago in reply to Andrew Beckett

    Hi,

    I tried a very simpistic function "checkHWeCheck()" to generate an error when Check&Save, called "myskill.il".

    I loaded the script from the CIW window, via "load("myskill.il") and got the message

    "function checkHWeCheck redefined

    t"

    wich means the function was properly defined.

    But when doing a Check&Save in schematic, I do not get the expected error - it just says "Schematic check completed with no errors". - Why ?

    Here is the script "myskill.il" (sorry for the format, but I did not find a way how to format it as nice as you did - how do you format code ?):

    ;------------------------------------------------------------------------
    ; The let is to create a lexical scope, so that there can be
    ; private functions which are used for some of the implementation
    ;------------------------------------------------------------------------
    let(()

    /***************************************************************
    * *
    * abRegExampleSchematicCheckNew([?customerName "Customer"]) *
    * *
    * PUBLIC GLOBAL function used to register the new check group *
    * and any specific check - in this case an example of a naming *
    * convention. *
    * *
    ***************************************************************/
    defglobalfun(abRegExampleSchematicCheckNew (@optional (customerName "Customer"))
    ;----------------------------------------------------------------
    ; This registers a new tab on Check->Rules Setup
    ;----------------------------------------------------------------
    schRegisterCheckGroup(
    ?name concat(customerName)
    ?description strcat(customerName " checks")
    )
    ;----------------------------------------------------------------
    ; This registers the specific rule and default severity
    ;----------------------------------------------------------------
    schRegisterCheckRule(
    ?title "My HWE check"
    ?name 'myhweCheck
    ?groupName concat(customerName)
    ?severity 'error
    ?checkCB checkHWeCheck
    )
    )

    /***************************************************************
    * *
    * checkComponentsInCategory (cv libName categName severity) *
    * *
    * Private function to check for any components which *
    * are in a category of the PDK intended not to be used. *
    * *
    ***************************************************************/

    defun(checkHWeCheck (cv ruleObject)
    foreach(inst cv~>instances
    cdf=cdfGetInstCDF(inst)
    sprintf(nil "TESTOUT")
    schReportCheckFailure(
    ?object cv
    ?checkRule ruleObject
    ?short "DFM option not set"
    ?message
    sprintf(nil "DFM options not to set in %s" cdf )
    ) ;schReport
    ) ;foreach

    ) ; defun

    ) ;let

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • HoWei
    HoWei over 7 years ago in reply to HoWei

    Now, its working. I was missing a backtick " ' " at "?checkCB 'checkHWeCheck" and I had to rearrange the functions.

    Also I removed the let() for simplicity.

    Here is the working code:

    defun(checkHWeCheck (cv ruleObject)
    foreach(inst cv~>instances
    schReportCheckFailure(
    ?object inst
    ?checkRule ruleObject
    ?short "CntDFM"
    ?message
    sprintf(nil "DFM options not to set in %s (%s)" inst->name inst->cellName )
    ) ;schReport
    ) ;foreach

    ) ; defun


    /***************************************************************
    * *
    * abRegExampleSchematicCheckNew([?customerName "Customer"]) *
    * *
    * PUBLIC GLOBAL function used to register the new check group *
    * and any specific check - in this case an example of a naming *
    * convention. *
    * *
    ***************************************************************/
    defun(abRegExampleSchematicCheckNew (@optional (customerName "CNTchecks"))
    ;----------------------------------------------------------------
    ; This registers a new tab on Check->Rules Setup
    ;----------------------------------------------------------------
    schRegisterCheckGroup(
    ?name concat(customerName)
    ?title customerName
    ?description strcat(customerName " checks")
    )
    ;----------------------------------------------------------------
    ; This registers the specific rule and default severity
    ;----------------------------------------------------------------
    schRegisterCheckRule(
    ?title "My HWE check"
    ?name 'myhweCheck
    ?groupName concat(customerName)
    ?severity 'error
    ?checkCB 'checkHWeCheck
    )
    )
    abRegExampleSchematicCheckNew()
    /***************************************************************
    * *
    * checkComponentsInCategory (cv libName categName severity) *
    * *
    * Private function to check for any components which *
    * are in a category of the PDK intended not to be used. *
    * *
    ***************************************************************/

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to HoWei

    That's because your checking function is outside of the scope of the abRegExampleSchematicCheckNew function; in my code it was within the scope and because the file had a .ils suffix, it was using lexical scoping.

    The schRegisterCheckRule function can take either the name of the function (where you have to use ') or the function object itself (which is what I was doing; in SKILL++ mode you have your functions stored in variables with the same name as the function).

    Anyway, glad it's working and apologies in my tardiness in responding (I've been travelling a lot over the last 6 weeks and got rather behind on email and forum posts).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to HoWei

    That's because your checking function is outside of the scope of the abRegExampleSchematicCheckNew function; in my code it was within the scope and because the file had a .ils suffix, it was using lexical scoping.

    The schRegisterCheckRule function can take either the name of the function (where you have to use ') or the function object itself (which is what I was doing; in SKILL++ mode you have your functions stored in variables with the same name as the function).

    Anyway, glad it's working and apologies in my tardiness in responding (I've been travelling a lot over the last 6 weeks and got rather behind on email and forum posts).

    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