• 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. Error encountered during pcell instantiation??

Stats

  • Locked Locked
  • Replies 24
  • Subscribers 143
  • Views 21273
  • 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

Error encountered during pcell instantiation??

Messi
Messi over 14 years ago
 Hai,

     

    This is the code i have written to read a file and then instantiate a pcell inside an already created pcell:

procedure(mypcell(ruleFile pcellInfo)

  let( (ruleFileTable purposeList mastercv inst )

  ruleFileTable  =  readFile( ruleFile )

;readFile is the function name for another procedure I created to read an file and drop its contents into a table

           foreach(line FileTable

           purposeList = caddr(line)

    ;the table has mainly four elements and I want the third element based on which instantiation has to be carried out

          unless(rexMatchp(pcellinfo purposeList)

           case(pcellinfo

             ("a"

         ;;To Create PCell for “a”

                    mastercv   = dbOpenCellViewByType("test" "pcell" "layout" "" "w")

                  ;mastercv is an already created pcell

                    inst           = dbCreateParamInst(

                                         "pcell" mastercv "a" list(0 0) "R0" 1

                                           list(

                                               list( "w"  "float" 0.5)

                                                )

                                                );dbCreateParamInst

                                         dbClose(mastercv)

                                      ); for case “a”

           ("b"

;;To Create PCell for "b"                   

                     mastercv   = dbOpenCellViewByType("test" "pcell" "layout" "" "w")

                     inst           =  dbCreateParamInst(

                                        "pcell" mastercv "b" list(0 0) "R0" 2

                                           list(

                                                list( "w"  "float" 0.5)

                                                list( "s"  "float" 0.25)

                                                )

                                            );dbCreateParamInst

                                          dbClose(mastercv)

                                          );case

                                   );for case  "b"               

                           );unless

        );foreach

    );let

);procedure

But i am generating errors while i run this code :

Can anyone look into and this find the error in it.....

Thanks,

  Messi
  • Cancel
Parents
  • Messi
    Messi over 14 years ago

    Hai,

      Thanks for the explanation.Explaantion was superb...i didnt know abt ~>? operator until u helped me out...Thanks 4 that....

    I am reading a rule file then make it into a table and based on the entry in table i create or instantiate a pcell inside another.ie..if the purpose in table i made is WIDTH it should be able to make a pcell for width case...similarly for others,for this i have written the code.

     

      procedure(instPcell(ruleFile libName @rest Info)
      let( (ruleTable  mastercv cvd)
         ruleTable = parseFile(ruleFile)
         mastercv  = dbOpenCellViewByType(nthelem(1 Info) nthelem(2  lnfo)
                       nthelem(3 lnfo))
         foreach(i ruleTable~>?
            cvd = dbOpenCellViewByType(libName ruleTable[i] "layout" "maskLayout" "w")
             cond(
                rexMatchp("WIDTH" nth(1 ruleTable[i]))        
                dbCreateParamInst( 
                        cvd mastercv ruleTable[i] list(0 0) "R0" 1
                 list(
                                  list( "width"  "float" 0.5)
                      )
                                  );dbCreateParamInst
                    rexMatchp("SPACING" nth(1 ruleTable[i]))  
           dbCreateParamInst( 
                           cvd mastercv ruleTable[i] list(0 0) "R0" 2
                                list(
                                       list( "width"  "float" 0.5)
                                       list( "space"  "float" 0.25)
                                  )
                                );dbCreateParamInst
                        dbSave(cvd)
            (t println "Arg is an unknown type")
     )
      dbClose(cvd)
      dbClose(mastercv)
        );foreach
      );let
    );procedure

     

    when i run this program as a whole the rexMatchp error is encountered...ie it says unbound variable rexMatchp..

    How to eliminate this error..Any changes i need make in code..pls tell..

    Regards,

     Messi

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Messi
    Messi over 14 years ago

    Hai,

      Thanks for the explanation.Explaantion was superb...i didnt know abt ~>? operator until u helped me out...Thanks 4 that....

    I am reading a rule file then make it into a table and based on the entry in table i create or instantiate a pcell inside another.ie..if the purpose in table i made is WIDTH it should be able to make a pcell for width case...similarly for others,for this i have written the code.

     

      procedure(instPcell(ruleFile libName @rest Info)
      let( (ruleTable  mastercv cvd)
         ruleTable = parseFile(ruleFile)
         mastercv  = dbOpenCellViewByType(nthelem(1 Info) nthelem(2  lnfo)
                       nthelem(3 lnfo))
         foreach(i ruleTable~>?
            cvd = dbOpenCellViewByType(libName ruleTable[i] "layout" "maskLayout" "w")
             cond(
                rexMatchp("WIDTH" nth(1 ruleTable[i]))        
                dbCreateParamInst( 
                        cvd mastercv ruleTable[i] list(0 0) "R0" 1
                 list(
                                  list( "width"  "float" 0.5)
                      )
                                  );dbCreateParamInst
                    rexMatchp("SPACING" nth(1 ruleTable[i]))  
           dbCreateParamInst( 
                           cvd mastercv ruleTable[i] list(0 0) "R0" 2
                                list(
                                       list( "width"  "float" 0.5)
                                       list( "space"  "float" 0.25)
                                  )
                                );dbCreateParamInst
                        dbSave(cvd)
            (t println "Arg is an unknown type")
     )
      dbClose(cvd)
      dbClose(mastercv)
        );foreach
      );let
    );procedure

     

    when i run this program as a whole the rexMatchp error is encountered...ie it says unbound variable rexMatchp..

    How to eliminate this error..Any changes i need make in code..pls tell..

    Regards,

     Messi

     

     

    • 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