ACG package¶
Submodules¶
ACG.AutoRouter module¶
ACG.AutoRouterExtension module¶
ACG.AyarDesignManager module¶
-
class
ACG.AyarDesignManager.
AyarDesignManager
(bprj, spec_file, gds_layermap='')[source]¶ Bases:
object
Class that oversees the creation of layouts, schematics, testbenches, and simulations. Overrides DesignMaster for more intuitive yaml file organization and handles the RoutingGrid in grid-free layouts
-
generate_layout
(layout_params_list=None, cell_name_list=None)[source]¶ Generates a batch of layouts with the layout package/class in the spec file with parameters set by layout_params_list and names them according to cell_name_list. Each dict in the layout_params_list creates a new layout
- layout_params_list:obj:’list’ of :obj:’dict’
list of parameter dicts to be applied to the specified layout class
- cell_name_list:obj:’list’ of :obj:’str’
list of names to be applied to each implementation of the layout class
-
generate_schematic
(sch_params_list=None, cell_name_list=None)[source]¶ Generates a batch of schematics specified by sch_params_list and names them according to cell_name_list. Each dict in the sch_params_list creates a new schematic
- Parameters
sch_params_list (:obj:'list' of :obj:'dict') – parameter dicts to be applied to the specified layout class
cell_name_list (:obj:'list' of :obj:'str') – list of names to be applied to each implementation of the layout class
-
generate_tb
(tb_params_list=None, tb_name_list=None)[source]¶ Generates a batch of testbenches specified by tb_params_list and names them according to tb_name_list. Each dict in tb_params_list creates a new set of tb’s
- Parameters
tb_params_list (:obj:'list' of :obj:'dict') – list of parameter dicts to be applied to the testbench generator class
tb_name_list (:obj:'list' of :obj:'str') – list of names to be applied to each implementation of the tb class
-
import_schematic_library
(lib_name)[source]¶ Imports a Cadence library containing schematic templates for use in BAG, this must be called if changes to the schematic were made since the last run
- Parameters
lib_name (str) – string containing name of the library to be imported
-
make_tdb
(layermap='')[source]¶ Makes a new TemplateDB object. If no routing grid parameters are sent in, dummy parameters are used.
-
run_LVS
(cell_name_list=None)[source]¶ Runs LVS on a batch of cells contained within the implementation library
- Parameters
cell_name_list (:obj:'list' of :obj:'str') – list of strings containing the names of the cells we should run LVS on
-
ACG.AyarLayoutGenerator module¶
ACG.Label module¶
ACG.LayoutParse module¶
ACG.PrimitiveUtil module¶
Utility functions
ACG.Rectangle module¶
-
class
ACG.Rectangle.
Rectangle
(xy, layer, virtual=False)[source]¶ Bases:
ACG.VirtualObj.VirtualObj
Creates a better rectangle object with stretch and align capabilities
-
align
(target_handle: str, ref_rect: Optional[ACG.Rectangle.Rectangle] = None, ref_handle: str = None, track=None, align_opt: Tuple[bool, bool] = True, True, offset: Union[Tuple[float, float], ACG.XY.XY] = 0, 0) → ACG.Rectangle.Rectangle[source]¶ Moves the rectangle to co-locate the target and ref handles
-
property
center
¶
-
copy
(virtual=False, layer=None) → ACG.Rectangle.Rectangle[source]¶
-
dict_compatability
= ('handle0', 'handle1', 'xy0', 'xy1', 'layer')¶
-
export_locations
()[source]¶ This method should return a dict of relevant locations for the virtual obj
-
classmethod
from_dict
(params: dict) → ACG.Rectangle.Rectangle[source]¶ Enable the creation of a rectangle from a dictionary of parameters
-
get_enclosure
(rect: ACG.Rectangle.Rectangle, virtual: bool = True) → ACG.Rectangle.Rectangle[source]¶ Returns a rectangle that encloses all provided rectangles
-
get_highest_layer
(rect: Optional[Rectangle] = None, layer: Optional[str] = None) → Tuple[str, str][source]¶ Returns the highest layer used by provided rectangles
-
get_midpoint
(handle: str, coord: Union[Tuple[float, float], ACG.XY.XY]) → Union[Tuple[float, float], ACG.XY.XY][source]¶ Gets the midpoint between a location on this rectangle and another coordinate
-
get_overlap
(rect: ACG.Rectangle.Rectangle, virtual: bool = True) → ACG.Rectangle.Rectangle[source]¶ Returns a rectangle corresponding to the overlapped region between two rectangles
-
property
height
¶
-
property
layer
¶
-
property
ll
¶
-
property
lpp
¶
-
scale
(size, dim=None) → ACG.Rectangle.Rectangle[source]¶ Additvely resizes the rectangle by the provided size
-
set_dim
(dim: str, size: float) → ACG.Rectangle.Rectangle[source]¶ Sets either the width or height of the rect to desired value. Maintains center location of rect
-
shift_origin
(origin=0, 0, orient='R0', virtual=True) → ACG.Rectangle.Rectangle[source]¶ Takes xy coordinates and rotation, returns a virtual Rect2 that is re-referenced to the new origin Assumes that the origin of the rectangle is (0, 0)
-
stretch
(target_handle: str, ref_rect=None, ref_handle: str = None, track=None, stretch_opt=True, True, offset=0, 0) → ACG.Rectangle.Rectangle[source]¶ Stretches rectangle to co-locate the target and ref handles. If ref handles are not provided, stretch by given offset
-
property
ur
¶
-
property
width
¶
-
property
xy
¶
-
ACG.Track module¶
-
class
ACG.Track.
Track
(dim, spacing, origin=0)[source]¶ Bases:
object
A class for creating consistently spaced reference lines
-
align
(ref_rect, ref_handle, num=0, offset=0)[source]¶ Aligns the provided track number to handle of reference rectangle
-
property
dim
¶
-
property
origin
¶
-
property
spacing
¶
-
-
class
ACG.Track.
TrackManager
[source]¶ Bases:
object
A class that enables users to create tracks and use them as references for routing
-
add_track
(name, dim, spacing, origin=0)[source]¶ Adds a track to the database.
- Parameters
name – name to associate with the added track
dim – ‘x’ or ‘y’ for the desired routing direction
spacing – space between tracks
origin – coordinate to place the zero track
-
ACG.Via module¶
ACG.VirtualInst module¶
-
class
ACG.VirtualInst.
VirtualInst
(master, origin=0, 0, orient='R0', inst_name=None)[source]¶ Bases:
ACG.VirtualObj.VirtualObj
A class to enable movement/access of low level instances without directly accessing the master class
-
align
(target_handle: str, target_rect: ACG.VirtualObj.VirtualObj = None, ref_rect: ACG.VirtualObj.VirtualObj = None, ref_handle: str = None, align_opt: Tuple[bool, bool] = True, True, offset: Union[Tuple[Union[float, int], Union[float, int]], ACG.XY.XY] = 0, 0) → ACG.VirtualInst.VirtualInst[source]¶ Moves the instance to co-locate target rect handle and reference rect handle
-
edges
= ('l', 'b', 'r', 't')¶
-
move
(origin=None, orient=None) → ACG.VirtualInst.VirtualInst[source]¶ Set the origin and orientation to new values
-
property
orient
¶
-
property
origin
¶
-
shift_origin
(origin=None, orient=None) → ACG.VirtualInst.VirtualInst[source]¶ Moves the instance origin to the provided coordinates and performs transformation
-
valid_orientation
= ('R0', 'MX', 'MY', 'R180')¶
-
vertices
= ('ll', 'lr', 'ur', 'ul', 'c', 'cl', 'cb', 'cr', 'ct')¶
-
ACG.VirtualObj module¶
ACG.XY module¶
-
class
ACG.XY.
XY
(xy, res=0.001)[source]¶ Bases:
ACG.VirtualObj.VirtualObj
Primitive class to describe a single coordinate on xy plane and various associated utility functions Keeps all coordinates on the grid
-
shift_origin
(origin=0, 0, orient='R0')[source]¶ This method should shift the coordinates of relevant locations according to provided origin/transformation, and return a new shifted object. This is important to allow for deep manipulation in the hierarchy
-
property
x
¶
-
property
xy
¶
-
property
y
¶
-
ACG.tech module¶
When imported, this module will extract tech information for easy access from a module specified by the ‘ACG_TECH’ environment variable