• 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. Preventing Instantiation of Cells from Restricted Libra...

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 143
  • Views 12318
  • 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

Preventing Instantiation of Cells from Restricted Library

Kevin Buck
Kevin Buck over 3 years ago

I'm attempting to (roughly) follow the procedure outlined in example 3 in this article:

https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000naFVEAY&pageName=ArticleContent

I've added the code at the end of the post to my local .cdsinit file to test the implementation but it is not working as expected. I've verified from the CDF base data structure that the formInitProc value is being set correctly (see the screenshot). The commented printf("hello") statement was added at one point to see if the function is being called at all and it appears that it is not as this never shows up in the CIW. I have also opened a schematic and instantiated a cell from the library I'm trying to restrict the usage of and then checked the result of the if statement that controls the schematic checking portion of the code and it evaluates to 't'. I have also verified that the .cdsinit file is being loaded correctly as I can call the second function in my code: CCSCustomMsg from the CIW successfully. I don't understand how the form initialization procedure knows to pass a single correct argument to the CCSFormProc1 function, there isn't anything mentioned about this in the linked article so maybe that's the problem.

;;Prevent usage of ohc15l_digital library
procedure(CCSFormProc1(cdfDataId)
;printf("hello")
when(cdfDataId

if((cdfgForm->hiFormSym == 'schCreateInstForm) && (schCreateInstForm->libraryName->value=="ohc15l_digital")
then
schCreateInstForm->libraryName->value=""
schCreateInstForm->cellName->value=""

warn("\nCannot instantiate the selected cell in this projects' designs\n")
CCSCustomMsg(cdfgForm)
) ;if schCreateInstForm

if(or((cdfgForm->hiFormSym == 'leCreateInstForm) (cdfgForm->hiFormSym == 'leCreateInstLForm) (cdfgForm->hiFormSym == 'leCreateInstXLForm)) && (leCreateInstForm->libName->value=="ohc15l_digital")
then
leCreateInstForm~>libName~>value = ""
leCreateInstForm~>cellName~>value = ""

warn("\nCannot instantiate the selected cell in this projects' designs\n")
CCSCustomMsg(cdfgForm)
) ;if leCreateInstForm

) ;when
) ;procedure CCSFormProc1

procedure(CCSCustomMsg(cdfgForm)
hiDisplayAppDBox(?name 'messg
?dboxBanner "Attempted Use of Restricted Library"
?dboxText
;; You can change the message here in sprintf call
sprintf(nil "Cells from Library %L are NOT ALLOWED in analog schematics, use Library %L."
cdfgForm~>libraryName~>value "ohc15l_digital_ana_lv") ;sprintf
?dialogStyle 'modal
) ;hiDisplayAppDBox
) ;procedure CCSCustomMsg

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

    Hi Kevin,

    I tried your code, and it worked for me - but to be honest it seems to completely mess up the create instance form in schematic. I have to mess around changing the library, cancelling the form and trying a few more things to get it to work.

    I'll contact the author of the article to see if they can investigate further.

    Regards,

    Andrew

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

    Actually, it seems a bit better if I changed the dialog form to have the argument as form rather than cdfgForm, and also changed to be called before it blanked out the library name and cell name fields:

    ;;Prevent usage of ohc15l_digital library
    procedure(CCSFormProc1(cdfDataId)
      ;printf("hello")
      when(cdfDataId
    
        if((cdfgForm->hiFormSym == 'schCreateInstForm) && (schCreateInstForm->libraryName->value=="ohc15l_digital")
          then
            warn("\nCannot instantiate the selected cell in this projects' designs\n")
            CCSCustomMsg(cdfgForm)
            schCreateInstForm->libraryName->value=""
            schCreateInstForm->cellName->value=""
    
        ) ;if schCreateInstForm
    
        if(or((cdfgForm->hiFormSym == 'leCreateInstForm) (cdfgForm->hiFormSym == 'leCreateInstLForm) (cdfgForm->hiFormSym == 'leCreateInstXLForm)) && (leCreateInstForm->libName->value=="ohc15l_digital")
          then
            warn("\nCannot instantiate the selected cell in this projects' designs\n")
            CCSCustomMsg(cdfgForm)
            leCreateInstForm~>libName~>value = ""
            leCreateInstForm~>cellName~>value = ""
    
        ) ;if leCreateInstForm
    
      ) ;when
    ) ;procedure CCSFormProc1
    
    procedure(CCSCustomMsg(form)
      hiDisplayAppDBox(?name 'messg
        ?dboxBanner "Attempted Use of Restricted Library"
        ?dboxText
        ;; You can change the message here in sprintf call
        sprintf(nil "Cells from Library %L are NOT ALLOWED in analog schematics, use Library %L."
        form~>libraryName~>value "ohc15l_digital_ana_lv") ;sprintf
        ?dialogStyle 'modal
      ) ;hiDisplayAppDBox
    ) ;procedure CCSCustomMsg
    
    
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to Andrew Beckett

    Thanks for looking into it. I'll try to circle back on it sometime this afternoon but I need to get back to design tasks. I was curious if there is a way to see how old the referenced procedure is? I thought there may have been some compatibility issue with newer versions of the tool as I was fairly sure I wasn't doing anything too weird with the slight modifications I made to the example.

    I'm using version IC6.1.8-64b.500.9

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Kevin Buck

    The article was originally written in 2016, but I can't see how it's evolved in the meantime. It was last updated in March 2020, but I don't think anything in there is particularly sensitive to the version used (my tests were in the latest .21 subversion of IC6.1.8, but I would be very surprised if the behaviour was different in ISR9). Note that it does seem slightly flaky anyway, which is why I asked the article author to take a look (he was on vacation last week).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to Andrew Beckett

    Hi Andrew. Did your colleague have a chance to look at this?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Kevin Buck

    Hi Kevin,

    I didn't hear back from him (he was probably busy at the time) - I've just prompted him again.

    Kind Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to Andrew Beckett

    Hi Andrew,

    Did you ever receive a reply from your colleague? Thanks.

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Kevin Buck

    Kevin,

    Yes. It turned out that a number of changes in the article had been made by somebody else, not the original author - so he referred this back to the knowledge team for them to address.

    The best thing to do here is to contact customer support, then your underlying request can be properly worked on as a support case.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to Andrew Beckett

    I sent a support request, thanks for looking into it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to Andrew Beckett

    I sent a support request, thanks for looking into it.

    • 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