Quantcast
Channel: Cadence Custom IC Skill Forum
Viewing all articles
Browse latest Browse all 5067

Preventing Instantiation of Cells from Restricted Library

$
0
0

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


Viewing all articles
Browse latest Browse all 5067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>