xbase.layout.mos.util
Module Contents
Classes
A data structure that keeps track of used transistors in MOSBase. |
Attributes
- class xbase.layout.mos.util.MOSUsedArray(obj: Union[xbase.layout.mos.placement.data.TilePatternElement, xbase.layout.mos.placement.data.MOSBasePlaceInfo, xbase.layout.mos.placement.data.TilePattern], mirror: bool = True, flip: bool = False, copy: Optional[MOSUsedArray] = None)[source]
A data structure that keeps track of used transistors in MOSBase.
This class is used to automatically fill empty spaces, and also get left/right/top/bottom layout information needed to create space blocks and extension rows. Both tiles and columns are added dynamically.
- Parameters:
obj (Union[MOSBasePlaceInfo, TilePattern]) – the repeating tile pattern.
mirror (bool) – True to mirror every other TilePattern.
flip (bool) – True to flip all tile orientations.
copy (Optional[MOSUsedArray]) – internal parameter used to perform efficient copying of MOSUsedArray.
- property tile_pattern_element: xbase.layout.mos.placement.data.TilePatternElement[source]
- get_copy() MOSUsedArray [source]
- get_tile_pattern_element(mult: int, mirror: bool, flip: bool) xbase.layout.mos.placement.data.TilePatternElement [source]
- get_tile_subpattern(start_idx: int, stop_idx: int, mult: int, mirror: bool, flip: bool) xbase.layout.mos.placement.data.TilePatternElement [source]
- get_tile_info(tile_idx: int) Tuple[xbase.layout.mos.placement.data.MOSBasePlaceInfo, int, bool] [source]
- get_tile_pinfo(tile_idx: int) xbase.layout.mos.placement.data.MOSBasePlaceInfo [source]
- get_num_wires(row_idx: int, wire_type: Union[xbase.layout.enum.MOSWireType, bool], wire_name: str, *, tile_idx: int = 0) int [source]
- get_track_info(row_idx: int, wire_type: Union[xbase.layout.enum.MOSWireType, bool], wire_name: str, wire_idx: int = 0, *, tile_idx: int = 0) Tuple[bag.util.math.HalfInt, int] [source]
- get_track_index(row_idx: int, wire_type: Union[xbase.layout.enum.MOSWireType, bool], wire_name: str, wire_idx: int = 0, *, tile_idx: int = 0) bag.util.math.HalfInt [source]
- get_track_id(row_idx: int, wire_type: Union[xbase.layout.enum.MOSWireType, bool], wire_name: str, wire_idx: int = 0, *, tile_idx: int = 0) bag.layout.routing.base.TrackID [source]
- get_hm_track_info(hm_layer: int, wire_name: str, wire_idx: int = 0, *, tile_idx: int = 0) Tuple[bag.util.math.HalfInt, int] [source]
- get_hm_track_id(hm_layer: int, wire_name: str, wire_idx: int = 0, *, tile_idx: int = 0) bag.layout.routing.base.TrackID [source]
- get_hm_track_index(hm_layer: int, wire_name: str, wire_idx: int = 0, *, tile_idx: int = 0) bag.util.math.HalfInt [source]
- get_edge_info(flat_row_idx: int, col_idx: int) xbase.layout.mos.data.MOSEdgeInfo [source]
- get_bottom_info(flat_row_idx: int) List[xbase.layout.mos.data.BlkExtInfo] [source]
- get_top_info(flat_row_idx: int) List[xbase.layout.mos.data.BlkExtInfo] [source]
- add_mos(tile_idx: int, row_idx: int, col_idx: int, seg: int, flip_lr: bool, flip_ud: bool, left: Optional[xbase.layout.mos.data.MOSEdgeInfo], right: Optional[xbase.layout.mos.data.MOSEdgeInfo], top: xbase.layout.mos.data.BlkExtInfo, bottom: xbase.layout.mos.data.BlkExtInfo, abut_list: Optional[List[xbase.layout.mos.data.MOSAbutInfo]]) None [source]
Add a new interval to this data structure.
- Parameters:
tile_idx (int) – the tile index.
row_idx (int) – the row index.
col_idx (int) – the column index.
seg (int) – the interval length.
flip_lr (bool) – True to flip left-right.
flip_ud (bool) – True to flip up-down.
left (Optional[MOSEdgeInfo]) – left edge info, before flip.
right (Optional[MOSEdgeInfo]) – right edge info, before flip.
top (BlkExtInfo) – top edge info, before flip.
bottom (BlkExtInfo) – bottom edge info, before flip.
abut_list (Optional[List[MOSAbutInfo]]) – list to store abutting transistor edges.
- Returns:
success – True if the given interval is successfully added. False if it overlaps with existing blocks.
- Return type:
- add_mos_raw(flat_row_idx: int, flip_tile: bool, col_idx: int, seg: int, flip_lr: bool, flip_ud: bool, left: Optional[xbase.layout.mos.data.MOSEdgeInfo], right: Optional[xbase.layout.mos.data.MOSEdgeInfo], top: xbase.layout.mos.data.BlkExtInfo, bottom: xbase.layout.mos.data.BlkExtInfo, abut_list: Optional[List[xbase.layout.mos.data.MOSAbutInfo]]) None [source]
- add_tiles(tile_idx: int, col_idx: int, used_arr: MOSUsedArray, flip_lr: bool, abut_list: List[xbase.layout.mos.data.MOSAbutInfo]) None [source]
- get_complement(tile_idx: int, row_idx: int, start: int, stop: int) bag.util.immutable.ImmutableList[Tuple[Tuple[int, int], xbase.layout.mos.data.MOSEdgeInfo, xbase.layout.mos.data.MOSEdgeInfo]] [source]
Returns a list of unused column intervals within the given interval.
- Parameters:
- Returns:
ans – a list of unused column intervals and the associated left/right edge info.
- Return type:
ImmutableList[Tuple[Tuple[int, int], MOSEdgeInfo, MOSEdgeInfo]]
- _get_ext_list_helper(flat_row_idx: int, val_idx: int) List[xbase.layout.mos.data.BlkExtInfo] [source]
- _add_edge_info(key: Tuple[int, int], info: Optional[xbase.layout.mos.data.MOSEdgeInfo], is_right: bool, abut_list: Optional[List[xbase.layout.mos.data.MOSAbutInfo]]) None [source]