prga.core.builder.array.tile module¶
-
class
prga.core.builder.array.tile.TileBuilder(context, module)¶ Bases:
prga.core.builder.array.base.BaseArrayBuilderTile builder.
Parameters: -
classmethod
_expose_blockpin(pin)¶ Expose a block pin as a
BlockPinIDnode.
-
auto_connect()¶ Automatically connect submodules.
Returns: - Return
selfto support chaining, e.g., array = builder.fill().auto_connect().commit()
Return type: TileBuilder- Return
-
build_connection_box(ori, offset, **kwargs)¶ Build the connection box at the specific position. Corresponding connection box instance is created and added to this tile if it’s not already added into the tile.
Parameters: - ori (
Orientationorstr) – Orientation of the connection box - offset (
int) – Offset of the connection box in the specified orientation
Keyword Arguments: **kwargs – Additional attributes assigned to the connection box module
Returns: Return type: Note
Connection boxes are indexed as the following:
0 1 2 3 +---------------+ 2 | north | 2 1 | west east | 1 0 | south | 0 +---------------+ 0 1 2 3
- ori (
-
fill(default_fc, *, fc_override=None)¶ Fill connection boxes in the array.
Parameters: default_fc – Default FC value for all blocks whose FC value is not defined. If one single intorfloatis given, this FC value applies to all ports of all blocks. If atupleof twoint`s or :obj:`float`s are given, the first one applies to all input ports while the second one applies to all output ports. Use `BlockFCValuefor more custom options.Keyword Arguments: fc_override ( Mapping) – Override the FC settings for specific blocks. Indexed by block key.Returns: - Return
selfto support chaining, e.g., array = builder.fill().auto_connect().commit()
Return type: TileBuilder- Return
-
instantiate(model, reps=None, *, name=None, **kwargs)¶ Instantiate
modelin the tile.Parameters: Keyword Arguments: - name (
str) – Name of the instance. If not specified,"lb_i{subtile_id}"is used by default. Ifrepsandnameare both specified, each instance is then named"{name}_i{index}". - **kwargs – Additional attributes assigned to each instance
Returns: Return type: - name (
-
classmethod
new(name, width, height, *, disallow_segments_passthru=False, edge=OrientationTuple(north=False, east=False, south=False, west=False), **kwargs)¶ Create a new tile.
Parameters: - name (
str) – Name of the tile - width (
int) – Width of the tile - height (
int) – Height of the tile
Keyword Arguments: - disallow_segments_passthru (
bool) – If set toTrue, segments are not allowed to run over the tile - edge (
OrientationTuple[bool]) – Marks this tile to be on the specified edges of the top-level array. This affects segment instantiation. - **kwargs – Additional attributes assigned to the tile
Returns: Return type: - name (
-
classmethod