Debug intermediate variables of built-in language calculations in calibre -lvs -hier

Version 1
    • Debug intermediate variables of built-in language calculations in calibre -lvs -hier

      When running -hier, the "debug" feature in the DEVICE operation was being used, but the LVS report does not list device number as shown in manual.

      Current output looks like this:

      LVS REPORT (A)
      *********************************************************************************
                                 PROPERTY ERRORS
      DISC#         LAYOUT                    SOURCE                    ERROR
      *********************************************************************************

      1         X277/X15/R0(1.490,10.410) R(yh) XI0/XI2/XI0/XR39/RR0 R(YH)
               R: 123.309 ohm                   R: 208 ohm           40.7%

      2         X277/X15/R1(4.215,10.510) R(yh) XI0/XI2/XI0/XR38/RR0 R(YH)
               R: -13.0957 ohm                   R: 133 ohm   110%


      The Manual shows this example:
      LVS REPORT (B)
      *********************************************************************************
                                 PROPERTY ERRORS
      DISC#                LAYOUT                     SOURCE           ERROR
      *********************************************************************************
      1         5         (1258.000,390.000) (mp)  m5
                        ad: 5.6e-11                    ad: 6e-11          7%
                        as: 7.2e-11                    as: 6e-11          21%
                        w: 31u                     w: 30u          4%



      where:
      · “1” is the discrepancy number.
      · “5” is the device instance number.


      Note that the (A) output does not have the equivalent device number such as "5" in (B) output.


    Causes

    • The LVS REPORT (A) section is from a hierarchical run. LVS REPORT (B) illustrates a flat run output. Hierarchical LVS REPORTs do not list the device numbers as do the flat outputs. The reason for this is that the device numbering restarts for each cell in the hierarchy, so selecting device 5 for debug is meaningless - which cell's device 5 do you want?


    • Solution

      There are 2 workarounds:
      1. Run the cell with the devices in flat mode to debug their calculation.

      2. assign intermediate variables in the calculation to "properties", then list them in the "property" section of the calculation. For example, if "perim_inside" is used in a calculation and you wish to see its value, assign it like this: X=perim_inside(...) . You don't need to modify the calculation itself. Then add X to the property list at the top of the bracketed calculation area.


     

     



    • Additional Tips from the Calibre Verification User's Manual:

      In a hierarchical run, the instance number is not provided in the LVS Report. To determine the instance number, put an INSTance() function and an I property into each property computation for each qualifying DEVice statement, such as here:

      device mp(pmos) gate gate(G) diff(S) diff(D) base(B)
             [  property W, L, I
                 I = INST()
              ...

      The I property appears in the extracted device netlist such as here:

              M0 Y IN1 PWR PWR p L=8.75e-07 W=4e-05 i=3 $X=5125 $Y=51000 $D=1

      You can use the instance name, device type, and the $X and $Y coordinates in the extracted netlist to determine which instance matches the LVS Report discrepancy you want to debug. The $D property tells you which DEVice statement to place the DEBUG command into. The $D properties are indexed starting with 0 and correspond to the order of the DEVice statements as they appear in the rule file.

      ------------------------------

      This advice can reduce the frustration of using the debug utility in cases of lots of the same device types where one is not calculating as you expect:

      In large hierarchical designs, it may be useful to specify a Layout Primary or Layout Window statement that limits the processing to a cell or area of interest when performing debugging.