• 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 21302
  • 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,

       i understood i had to use atof since my values were in string.I was trying to tell that, in the first condition i gave the width as it is read from rules file.Now consider second condition when case is "SPACE" ie as per my code variable i will have rule no."R1B" (foreach loop i use so after carrying out "R1A" it will go to "R1B" or the next key),so in this second condition as per rule i can take value only as space which i feed inside list( "space" "float" nth(2 ruleTable[i])),but in the width section i want to give value as read from rule no. "R1A".

    ie   list( list( "w2" "float" "here value of POLY WIDTH as given in "R1A")

                list ("space" "float" nth(2 ruleTable[i]))

              )

    This was the confusion i had in my mind on how to get the value..

    I have run the code as per your suggestions and able to get cellviews with names of rule no.But the instantiation is not done properly i feel as each of them is empty.

    I have pasted the code by which i created my intial pcell...which i instanstiate in the cellviews named as rule numbers.

                       procedure(masterpcell(cv type)
                         let( ()
                          case(type
                             ("WIDTH"
                                 rodCreateRect(
                                         ?layer   list(layer1 "drawing")
                                         ?cvId    cv
                                         ?width   l1
                                         ?length  w1
                                         ?origin  list(0 0))
                             )
                          ("SPACE"
                                   lay1Id = rodCreateRect(
                                                   ?layer  list(layer1 "drawing")
                                                   ?cvId   cv
                                                   ?width  l1
                                                   ?length w1)
                                   lay2Id = rodCreateRect(
                                                     ?layer  list(layer2 "drawing")
                                                     ?cvId   cv
                                                     ?width  l2
                                                     ?length w2 )
                                    rodAlign(
                                                   ?alignObj lay1Id
                                                  ?alignHandle "lowerLeft"
                                                    ?refObj  lay2Id
                                                     ?refHandle "lowerLeft"
                                                      ?xSep -(space+l1) )
                               )
                    ("OVERLAP"
                            rodCreatePath(
                                         ?layer list(layer2 "drawing")
                                         ?width l2
                                          ?pts list(0.0:0.0 0.0:w2)
                                          ?encSubPath
                                                     list(
                                                            list(
                                                             ?layer   list(layer1 "drawing")
                                                              ?enclosure      l1
                                                              ?beginOffset   -overlap
                                                              ?endOffset     -overlap  )
                         )
                   );rodCreatePath
           )  
      );case
     );let
    );procedure

    ;;To Create PCell

                pcDefinePCell(
                       ;;Identify the target cellview.
                                 list(ddGetObj("lib1") "test" "layout"
                             ); end of list
        
                   ;;Declare parameter name-value pairs.
                              (
                                    (layer1 "POLY")
                                     (l1  0.5)
                                     (w1  0.6)
                                     (layer2 "ACTIVE")
                                     (l2  1.5)
                                     (w2  1.6)
                                     (type "WIDTH")
                                     (space 0.75)
                                     (overlap 0.5)
     
                       );end of parameters
        
                 let((cv)
                            cv = pcCellView
                             masterpcell(cv type)
          );let 
    ); end of pcDefinePCell    

     

    Is this code wrong? But a generated pcell with this code and when i test by instanstiating this pcell by making new cellviews by going to library manager file>new>cellview it runs fine.But when instantiate the same inside the cellviews using dbCreateParamInst with cellview name "Rule no." i am getting empty set.Why is it so??Hope you got my problem.

    Regards,

    Messi

     

           

     

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

    Hai,

       i understood i had to use atof since my values were in string.I was trying to tell that, in the first condition i gave the width as it is read from rules file.Now consider second condition when case is "SPACE" ie as per my code variable i will have rule no."R1B" (foreach loop i use so after carrying out "R1A" it will go to "R1B" or the next key),so in this second condition as per rule i can take value only as space which i feed inside list( "space" "float" nth(2 ruleTable[i])),but in the width section i want to give value as read from rule no. "R1A".

    ie   list( list( "w2" "float" "here value of POLY WIDTH as given in "R1A")

                list ("space" "float" nth(2 ruleTable[i]))

              )

    This was the confusion i had in my mind on how to get the value..

    I have run the code as per your suggestions and able to get cellviews with names of rule no.But the instantiation is not done properly i feel as each of them is empty.

    I have pasted the code by which i created my intial pcell...which i instanstiate in the cellviews named as rule numbers.

                       procedure(masterpcell(cv type)
                         let( ()
                          case(type
                             ("WIDTH"
                                 rodCreateRect(
                                         ?layer   list(layer1 "drawing")
                                         ?cvId    cv
                                         ?width   l1
                                         ?length  w1
                                         ?origin  list(0 0))
                             )
                          ("SPACE"
                                   lay1Id = rodCreateRect(
                                                   ?layer  list(layer1 "drawing")
                                                   ?cvId   cv
                                                   ?width  l1
                                                   ?length w1)
                                   lay2Id = rodCreateRect(
                                                     ?layer  list(layer2 "drawing")
                                                     ?cvId   cv
                                                     ?width  l2
                                                     ?length w2 )
                                    rodAlign(
                                                   ?alignObj lay1Id
                                                  ?alignHandle "lowerLeft"
                                                    ?refObj  lay2Id
                                                     ?refHandle "lowerLeft"
                                                      ?xSep -(space+l1) )
                               )
                    ("OVERLAP"
                            rodCreatePath(
                                         ?layer list(layer2 "drawing")
                                         ?width l2
                                          ?pts list(0.0:0.0 0.0:w2)
                                          ?encSubPath
                                                     list(
                                                            list(
                                                             ?layer   list(layer1 "drawing")
                                                              ?enclosure      l1
                                                              ?beginOffset   -overlap
                                                              ?endOffset     -overlap  )
                         )
                   );rodCreatePath
           )  
      );case
     );let
    );procedure

    ;;To Create PCell

                pcDefinePCell(
                       ;;Identify the target cellview.
                                 list(ddGetObj("lib1") "test" "layout"
                             ); end of list
        
                   ;;Declare parameter name-value pairs.
                              (
                                    (layer1 "POLY")
                                     (l1  0.5)
                                     (w1  0.6)
                                     (layer2 "ACTIVE")
                                     (l2  1.5)
                                     (w2  1.6)
                                     (type "WIDTH")
                                     (space 0.75)
                                     (overlap 0.5)
     
                       );end of parameters
        
                 let((cv)
                            cv = pcCellView
                             masterpcell(cv type)
          );let 
    ); end of pcDefinePCell    

     

    Is this code wrong? But a generated pcell with this code and when i test by instanstiating this pcell by making new cellviews by going to library manager file>new>cellview it runs fine.But when instantiate the same inside the cellviews using dbCreateParamInst with cellview name "Rule no." i am getting empty set.Why is it so??Hope you got my problem.

    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