prga.core.builder.box.cbox module¶
-
class
prga.core.builder.box.cbox.ConnectionBoxBuilder(context, module)¶ Bases:
prga.core.builder.box.base.BaseRoutingBoxBuilderConnection box builder.
Parameters: -
classmethod
_cbox_key(tile, orientation, offset=None)¶
-
classmethod
_segment_relative_position(cbox_ori, segment, segment_ori, section=0)¶
-
fill(default_fc, *, fc_override=None, dont_create=False)¶ Automatically create port-segment connections using FC values.
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. - dont_create (
bool) – If set, connections are made only between already created nodes
- fc_override (
-
get_blockpin(pin, *, dont_create=False)¶ Get or create a blockpin input/output port in this connection box.
Parameters: pin ( Pin) – Pin of a block instance in the tile that this connection box is inKeyword Arguments: dont_create ( bool) – If set, returnNonewhen the requested block pin is not already createdReturns: Return type: Port
-
get_segment_input(segment, orientation, section=0, *, dont_create=False)¶ Get or create a segment input port in this connection box.
Parameters: - segment (
prga.core.common.Segment) – Prototype of the segment - orientation (
Orientationorstr) – Orientation of the segment - section (
int) – Section of the segment
Keyword Arguments: dont_create (
bool) – If set, returnNonewhen the requested segment input is not already createdReturns: Return type: - segment (
-
get_segment_output(segment, orientation, *, dont_create=False)¶ Get or create a segment output port in this connection box.
Parameters: - segment (
prga.core.common.Segment) – Prototype of the segment - orientation (
Orientationorstr) – Orientation of the segment
Keyword Arguments: dont_create (
bool) – If set, returnNonewhen the requested segment output is not already createdReturns: Return type: - segment (
-
classmethod
new(tile, orientation, offset=None, *, name=None, **kwargs)¶ Create a new connection box in abstract view at a specific location in
tile.Parameters: - tile (
Module) – The tile that this connection box is in - orientation (
Orientationorstr) – On which side of the tile is the connection box - offset (
int) – Offset of the connection box in the specified orientation
Keyword Arguments: - name (
str) – Name of the connection box. If not specified, the box is named"cbox_{tile.name}_{orientation}{offset}" - **kwargs – Additional attributes assigned to the connection box. Beware that these
attributes are NOT carried over to the design view automatically generated by
Translation
Returns: Return type: - tile (
-
classmethod
-
class
prga.core.builder.box.cbox._ConnectionBoxKey¶ Bases:
prga.core.builder.box.cbox._ConnectionBoxKeyConnection box key.
Parameters: - tile (
Module) – The tile which this connection box is in - orientation (
Orientation) – On which side of the tile is the connection box - offset (
int) – Offset of the connection box on the specified edge
- tile (