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)[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)[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)[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)[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.
- Return type:
- Raises:
ValueError – If the entry is not a valid obstruction.
- round_die_area(config)[source]¶
Round the DIE_AREA to multiples of the minimum pitch.
This reads the minimum pitch from FP_TRACKS_INFO and updates the config DIE_AREA to start at (0,0) with width/height rounded up to the next multiple of that pitch.
- Parameters:
config (librelane.config.config.Config)
- Return type:
librelane.config.config.Config