helper¶
Helper utilities for GDS generation: die area rounding and pitch parsing.
This module exposes utilities used by the GDS generator flows.
Functions¶
|
Read the FP_TRACKS_INFO file and return layer information. |
|
Read the FP_TRACKS_INFO file and return track offsets for X and Y. |
|
Read the FP_TRACKS_INFO file and return min pitches for X and Y. |
|
Get the routing obstructions from the config. |
|
Round the DIE_AREA to multiples of the minimum pitch. |
|
Round up value to the next multiple of pitch. |
Module Contents¶
- get_layer_info(config) dict[str, dict[str, tuple[Decimal, Decimal]]][source]¶
Read the FP_TRACKS_INFO file and return layer information.
Returns a dictionary mapping layer names to their cardinal directions and corresponding (offset, pitch) tuples.
- get_offset(config) tuple[Decimal, Decimal][source]¶
Read the FP_TRACKS_INFO file and return track offsets for X and Y.
Returns a tuple (x_offset, y_offset) where x_offset is the track offset along X-axis (IO_PIN_V_LAYER X direction) and y_offset is the track offset along Y-axis (IO_PIN_H_LAYER Y direction). The cardinal field in FP_TRACKS_INFO is expected to be ‘X’ or ‘Y’ (case-insensitive).
- get_pitch(config) tuple[Decimal, Decimal][source]¶
Read the FP_TRACKS_INFO file and return min pitches for X and Y.
Returns a tuple (x_pitch, y_pitch) where x_pitch is the minimum pitch along X-axis (IO_PIN_V_LAYER X direction) and y_pitch is minimum pitch along Y-axis (IO_PIN_H_LAYER Y direction). The cardinal field in FP_TRACKS_INFO is expected to be ‘X’ or ‘Y’ (case-insensitive).
- get_routing_obstructions(config) list[tuple[str, Decimal, Decimal, Decimal, Decimal]][source]¶
Get the routing obstructions from the config.
Returns a list of tuples (layer, x1, y1, x2, y2) representing the obstructions in the routing area.
- Parameters:
config (Config) – The configuration object from liberlane.
- Returns:
A list of obstruction tuples.
- Raises:
ValueError – If the entry is not a valid obstruction.