Main Content

padStack

Create padstack object

Since R2025a

    Description

    A padstack is a 3D structure associated with holes that pass through multiple layers in a PCB allowing for the interconnection of components in different layers.

    Create a padStack object from a pcbFileReadObject.

    Creation

    Description

    stackobj = padStack(pfile,'PadStackName') creates a pcbFileRead and a 'PadStackName.

    example

    Input Arguments

    expand all

    pcbFileRead object specified as a string.

    Example: stackobj = padStack(pfilename,'MHYC012') creates a padStack object.

    Name of the padstack in the pcb database.

    Example: stackobj = padStack(pfilename,'MHYC012') creates apadStack object using PadStackName set to 'MHYC012'.

    Data Types: string

    Properties

    expand all

    This property is read-only.

    Number of pads in a padStack.

    Example: 4

    Data Types: int8

    This property is read-only.

    Types of pads in the padStack

    Example: 'pin'

    Data Types: string

    This property is read-only.

    Shape of the pads in the padStack.

    Example: 1x1 Polygon

    Data Types: cell

    This property is read-only.

    Center location of the pad.

    Example: [6x2 double]

    Data Types: cell

    This property is read-only.

    Length of the pad in inches when PadShape is Rectangle.

    Example: 0.05

    Data Types: double

    This property is read-only.

    Width of the pad in inches when Padshape is Rectangle.

    Example: 0.025

    Data Types: double

    This property is read-only.

    Hole diameter of the pad in inches when Padshape is Circle.

    Example: 0.005

    Data Types: double

    This property is read-only.

    Pad diameter in inches when PadShape is Circle.

    Example: 0.012

    Data Types: double

    This property is read-only.

    Shape of the antipad when PadType is Via.

    Example: 'Circle'

    Data Types: string

    This property is read-only.

    Diameter of the antipad in inches when AntipadShape is Circle.

    Example: 0.012

    Data Types: double

    This property is read-only.

    Width of the antipad in inches when AntipadShape is Rectangle.

    Example: 0.03

    Data Types: double

    Height of the antipad in inches when AntipadShape is Rectangle.

    Example: 0.02

    Data Types: double

    Information table of the pads when padType is Via.

    Via Pad Information

    NameInformation
    PadIndexIndex of each pad
    StartLayerNumberStart layer number of the pad
    StartLayerNameStart layer name of the pad
    StopLayerNumberStop layer of the pad
    StopLayerNameStop layer name of the pad
    LayerHeightLayer height in inches from the bottom to the pad

    Data Types: table

    This property is read-only.

    Information table of the pads when PadType is Pin.

    Pin Pad Information

    NameInformation
    PadIndexIndex of each pad
    ComponentName of the component associated with the pad
    PinNumberPin number of the component with which the pad is associated.
    StartLayerNumberStart layer number of the pad
    StartLayerNameStart layer name of the pad
    StopLayerNumberStop layer number of the pad
    StopLayerNameStop layer name of the pad
    LayerHeightLayer height in inches from the bottom to the pad

    Object Functions

    shapesExtract all metal layer shapes of PCB component

    Examples

    collapse all

    This example shows how to read an Allegro file and create a pcbFileRead object. After this the following opertations will be executed:

    • Create layer, cadnet, padstack, part, and component objects form the pcbFileRead object

    • Create a powerDistributionNetwork object from the cadnet object

    • Set the properties of the powerDistributionNetwork object for voltage and current density anlysis

    • Analyse and visualize the voltage and current density

    Here is the circuit:

    image-20250103-104840.png

    Here is the pcb layout:

    image-20241231-053523.png

    Read file

    Read a native format Allegro file and look at the propeties of the pcb

    pfile = pcbFileRead('native_ExampleBoard_Allegro')
    pfile = 
      pcbFileRead with properties:
    
               FileName: 'native_ExampleBoard_Allegro'
              NumLayers: 5
             MetalLayer: [1 3 5]
        DielectricLayer: [2 4]
            LayerHeight: [0.0184 0.0104 0.0092 0.0012 0]
             NumCadnets: 7
           NumPadStacks: 6
          NumComponents: 8
               NumParts: 5
    
    
    cadnetList(pfile)
    ans=7×4 table
        CadnetIdx        CadnetName         NumPins    Length
        _________    ___________________    _______    ______
    
            1        {'Unconnected_Net'}       3           0 
            2        {'NET_OUTV'       }       2       0.615 
            3        {'NET_GND'        }       1        0.46 
            4        {'NET_IN22'       }       2       0.645 
            5        {'NET_IN11'       }       4       0.488 
            6        {'NET_INNEG'      }       2       0.515 
            7        {'NET_INPOS'      }       2       0.676 
    
    
    componentList(pfile)
    ans=8×3 table
        ComponentIdx    ComponentName    NumPins
        ____________    _____________    _______
    
             1            {'OUT_V'}         1   
             2            {'U1'   }         6   
             3            {'C3'   }         2   
             4            {'R1'   }         2   
             5            {'TP1'  }         1   
             6            {'R2'   }         2   
             7            {'IN_N' }         1   
             8            {'IN_P' }         1   
    
    
    partList(pfile)
    ans=5×2 table
        PartIdx       PartName    
        _______    _______________
    
           1       {'IOSINGLEPIN'}
           2       {'IC6ANT'     }
           3       {'CAPGEN080'  }
           4       {'RESGENH40'  }
           5       {'RESGEN080'  }
    
    
    padStackList(pfile)
    ans=6×2 table
        PadstackIdx        PadstackName    
        ___________    ____________________
    
             1         {'MHYCIRCLE009'    }
             2         {'MHYC012'         }
             3         {'MHYRECT46X59'    }
             4         {'MHYRECT80X60H40' }
             5         {'VIA'             }
             6         {'MHYRECT46X59_TOP'}
    
    
    stackUp(pfile)
    ans=5×8 table
        LayerNumber      LayerName         LayerType        Material     Thickness    EpsilonR    LossTangent    Conductivity
        ___________    ______________    ______________    __________    _________    ________    ___________    ____________
    
             1         {'TOP'       }    {'Signal'    }    {'COPPER'}     0.0012          1              0         5.96e+07  
             2         {'Dielectric'}    {'Dielectric'}    {'FR-4'  }      0.008        4.5          0.035                0  
             3         {'LAYER2'    }    {'Plane'     }    {'COPPER'}     0.0012          1              0         5.96e+07  
             4         {'Dielectric'}    {'Dielectric'}    {'FR-4'  }      0.008        4.5          0.035                0  
             5         {'BOTTOM'    }    {'Signal'    }    {'COPPER'}     0.0012          1              0         5.96e+07  
    
    

    Create layer object

    Create and visualize a layer object

    layerobj = layer(pfile,1,Type= 'All')
    layerobj = 
      layer with properties:
    
            pcBoard: [1×1 pcbFileRead]
        LayerNumber: 1
               Type: "All"
        LayerHeight: 0.0184
        NumSurfaces: 1
            NumPins: 14
            NumVias: 4
          NumTraces: []
         EntityList: [1×1 struct]
    
    
    show(layerobj)

    Figure contains an axes object. The axes object with title layer element: layer 2, xlabel x (inch), ylabel y (inch) contains 38 objects of type patch.

    Create a cadnet object

    Create cadnet object and look at it data

    cadobj = cadnet(pfile,'NET_IN11')
    cadobj = 
      cadnet with properties:
    
            pcBoard: [1×1 pcbFileRead]
         CadnetName: 'NET_IN11'
            NumPins: 4
        NumSurfaces: 2
            NumVias: 4
          NumTraces: 4
        TotalLength: 0.4880
            Voltage: 'NoDef'
         LayerRange: [1 3 5]
         EntityList: [1×1 struct]
    
    
    figure
    show(cadobj)

    Figure PCB Cadnet UI contains an axes object and another object of type uigridlayout. The axes object with title Visualize cadnet, xlabel x (inch), ylabel y (inch) contains 44 objects of type patch.

    Create a padstack object

    Create a padstack object and look at its data

    stackobj = padStack(pfile,'MHYC012')
    stackobj = 
      padStack with properties:
    
             pcBoard: [1×1 pcbFileRead]
        PadStackName: 'MHYC012'
             PadType: 'Pin'
            PadShape: 'Circle'
             NumPads: 6
           PadCenter: [6×2 double]
        HoleDiameter: 0
         PadDiameter: 0.0120
          PinPadInfo: [6×8 table]
    
    
    shapes(stackobj)
    ans=6×1 cell array
        {1×1 antenna.Polygon}
        {1×1 antenna.Polygon}
        {1×1 antenna.Polygon}
        {1×1 antenna.Polygon}
        {1×1 antenna.Polygon}
        {1×1 antenna.Polygon}
    
    

    Create a part object

    Create a part object and look at its data

    partobj = part(pfile,"IC6ANT")
    partobj = 
      part with properties:
    
              pcBoard: [1×1 pcbFileRead]
             PartName: 'IC6ANT'
        NumComponents: 1
        ComponentInfo: [1×7 table]
    
    
    componentData(partobj)
    ans = 
      component with properties:
    
                 pcBoard: [1×1 pcbFileRead]
           ComponentName: 'U1'
                PartName: 'IC6ANT'
           ComponentType: 'IC'
                 NumPins: 6
                   Value: ''
                Facement: 'TOP'
        ComponentPinInfo: [6×7 table]
    
    

    Create component object

    Create a component object and look at its pin data

    componentobj = component(pfile,'U1')
    componentobj = 
      component with properties:
    
                 pcBoard: [1×1 pcbFileRead]
           ComponentName: 'U1'
                PartName: 'IC6ANT'
           ComponentType: 'IC'
                 NumPins: 6
                   Value: ''
                Facement: 'TOP'
        ComponentPinInfo: [6×7 table]
    
    
    componentPinData(componentobj,1)
    ans = 
      pinsData with properties:
    
                 PinShape: 'Circle'
               PartNumber: 'IC6ANT'
                Component: 'U1'
                PinNumber: 'A3'
                    Value: ''
                 PadStack: 'MHYC012'
               CadnetName: 'NET_OUTV'
               StartLayer: 1
                StopLayer: 1
    
       Circular pin dimensions:
                   Center: [0.1010 0.2690]
                 Diameter: 0.0120
        DrillHoleDiameter: 0
    
    

    Create a power distribution network object

    Create a power distribution network object from a cadnet object. After this the following operations can be performed:

    • Set up the the Network Parameters, DC Parameters, and DC Rules properties of the power distribution network for power integrity analysis

    • Analyse and visualize the voltage and current desnsity of the power distribution network

    Here is the cadnet for power integrity analysis

    image-20250103-105555.png

    pdnobj = powerDistributionNetwork(cadobj)
    pdnobj = 
      powerDistributionNetwork with properties:
    
       Network Parameters:
                  NetType: [1×1 cadnet]
                   Source: []
                     Load: []
                    Sense: []
         PlatingThickness: []
    
       DC Parameters:
           NominalVoltage: []
              LoadCurrent: []
    
       DC Rules
        MaxCurrentDensity: []
               MinVoltage: []
               MaxVoltage: []
            MaxViaCurrent: []
    
    To Analyse PDN:
    Set Network Parameters: setNetworkParameters
    Set DC Parameters: setDCParameters
    Set DC Rules: setDCRules
    

    Find the pins connected to the cadnet using the findComponents function

    ConnPins = findComponents(cadobj)
    ConnPins=4×5 table
        ComponentIndex    Refdes    PinList    ComponentType          Part      
        ______________    ______    _______    ______________    _______________
    
              1           "C3"       "1"       {'Capacitor' }    {'CAPGEN080'  }
              2           "R2"       "2"       {'Resistor'  }    {'RESGEN080'  }
              3           "TP1"      "1"       {'Test Point'}    {'IOSINGLEPIN'}
              4           "U1"       "A1"      {'IC'        }    {'IC6ANT'     }
    
    
    in = ConnPins.Refdes(2);
    out = [ConnPins.Refdes(1),ConnPins.Refdes(4)];
    SensePin = ConnPins.Refdes(3);

    Set the network parameters

    setNetworkParameters(pdnobj,Source=in,Load=out,Sense=SensePin,PlatingThickness=0.0003);
      powerDistributionNetwork with properties:
    
       Network Parameters:
                  NetType: [1×1 cadnet]
                   Source: "R2"
                     Load: ["C3"    "U1"]
                    Sense: "TP1"
         PlatingThickness: 3.0000e-04
    
       DC Parameters:
           NominalVoltage: []
              LoadCurrent: []
    
       DC Rules
        MaxCurrentDensity: []
               MinVoltage: []
               MaxVoltage: []
            MaxViaCurrent: []
    
    To Analyse PDN:
    Set DC Parameters: setDCParameters
    Set DC Rules: setDCRules
    

    Set the DC parameters

    setDCParameters(pdnobj,"LoadCurrent",[10e-3,10e-3],"NominalVoltage",2)
      powerDistributionNetwork with properties:
    
       Network Parameters:
                  NetType: [1×1 cadnet]
                   Source: "R2"
                     Load: ["C3"    "U1"]
                    Sense: "TP1"
         PlatingThickness: 3.0000e-04
    
       DC Parameters:
           NominalVoltage: 2
              LoadCurrent: [0.0100 0.0100]
    
       DC Rules
        MaxCurrentDensity: []
               MinVoltage: []
               MaxVoltage: []
            MaxViaCurrent: []
    
    To Analyse PDN:
    Set DC Rules: setDCRules
    

    Set the DC rules

    setDCRules(pdnobj,MinVoltage=1,MaxVoltage=2.00002,MaxCurrentDensity=4,MaxViaCurrent=2)
      powerDistributionNetwork with properties:
    
       Network Parameters:
                  NetType: [1×1 cadnet]
                   Source: "R2"
                     Load: ["C3"    "U1"]
                    Sense: "TP1"
         PlatingThickness: 3.0000e-04
    
       DC Parameters:
           NominalVoltage: 2
              LoadCurrent: [0.0100 0.0100]
    
       DC Rules
        MaxCurrentDensity: 4
               MinVoltage: 1
               MaxVoltage: 2.0000
            MaxViaCurrent: 2
    

    Analyze voltage deviation

    voltage(pdnobj);

    Figure DC Drop Analysis contains an axes object and another object of type uigridlayout. The axes object with title Voltage deviation from nominal (mV) Nominal Voltage: (2V), xlabel x (inch), ylabel y (inch) contains 10 objects of type line, patch.

    Analyze current desnsity with direction enabled

    current(pdnobj,Direction="on")

    Figure DC Drop Analysis contains an axes object and another object of type uigridlayout. The axes object with title Current Density (mA/mil Squared baseline ) blank Current blank Density blank Limit: blank ( 4 blank mA/mil Squared baseline ), xlabel x (inch), ylabel y (inch) contains 14 objects of type line, patch, quiver.

    Version History

    Introduced in R2025a