prga.tools.ioplan.ioplan module¶
-
class
prga.tools.ioplan.ioplan.IOPlanner(summary, start_pos=(0, 0), subtile=0, counterclockwise=False)¶ Bases:
prga.util.ObjectHelper class for creating I/O constraints.
Parameters: - summary (
ContextorContextSummary) – - start_pos (
tuple[int,int]) – Starting position for auto-planning - start_subtile (
int) – Starting subtile for auto-planning - counterclockwise (
bool) – If set, auto-plan IO in counter-clockwise order.
-
_IOPlanner__next_position()¶
-
_reprog_bit= re.compile('^(?P<out>out:)?(?P<name>.*?)(?:\\[(?P<index>\\d+)\\])?$')¶
-
classmethod
autoplan(summary, app, *, random=False)¶ Automatically generate IO constraints and write into
app.Parameters: - summary (
ContextorContextSummary) – - app (
AppIntf) – Interface of the application. May contain partial IO constraints.
Keyword Arguments: random (
bool) – If set, IOs are assigned randomly- summary (
-
avail_globals¶
-
avail_nonglobals¶
-
counterclockwise¶
-
globals_¶
-
classmethod
parse_io_constraints(app, f)¶ Parse a partial or complete IO constraint file.
Parameters: - app (
AppIntf) – Interface of the application. - f (
strof file-like object) –
- app (
-
pop(direction, *, random=False, force_change_tile=False, use_global_driver_as_normal=False)¶ Pop the next available IO of for
direction.Parameters: direction (
PortDirectionorstr) –Keyword Arguments: - random (
bool) – If set, pop a random IO instead of the next one in the scanning - force_change_tile (
bool) – If set, the scanning will start from a new tile. This is useful when trying to reduce routing congestion - use_global_driver_as_normal (
bool) – If set, global driver I/O pins are used as regular IO pins
Returns: Return type: tuple[Position,int]- random (
-
position¶
-
classmethod
print_io_constraints(app, ostream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶ Print IO constraints.
Parameters: - app (
AppIntf) – Interface of the application. - ostream (
stror file-like object) –
- app (
-
reset_scanning(position=None, subtile=None, counterclockwise=None)¶ Reset scanning pointer.
Parameters: - position (
tuple[int,int]) – - subtile (
int) – - counterclockwise (
bool) –
- position (
-
subtile¶
-
use(direction, position, subtile)¶ Mark the IO at the specified location as used.
Parameters: - direction (
PortDirectionorstr) – - position (
tuple[int,int]) – - subtile (
int) –
- direction (
-
used¶
-
xmax¶
-
ymax¶
- summary (