prga.prog.pktchain.lib module

class prga.prog.pktchain.lib.Pktchain

Bases: prga.prog.scanchain.lib.Scanchain

Entry point for pktchain programming circuitry.

class BuildSystemPitonVanilla(io_constraints_f='io.pads', *, name='prga_system', fabric_wrapper=None, prog_be_in_wrapper=False)

Bases: prga.passes.base.AbstractPass

Create a system for SoC integration, specifically for OpenPiton vanilla.

dependences

Passes that this pass depend on.

fabric_wrapper
io_constraints_f
key

Key of this pass.

name
passes_after_self

Passes that should be executed after this pass.

prog_be_in_wrapper
run(context, renderer=None)

Run the pass.

Parameters:context (Context) – The context which manages all architecture data
class DefaultInstanceIterator(context)

Bases: prga.util.Object

Default implementation of iter_instances to be used by Pktchain.insert_prog_circuitry.

Parameters:context (Context) –
context
TERMINATE_BRANCH = 1
TERMINATE_LEAF = 0
class _PktchainRouterCtrl

Bases: prga.util.Enum

An enumeration.

_terminate_branch = 1
_terminate_leaf = 0
classmethod _Pktchain__install_cells(context, chain_width, phit_width)
classmethod _connect_pktchain_leaf(context, module, instance, leaf_prog_nets)
classmethod _get_or_create_pktchain_fifo_nets(module, phit_width, branch_id=None, ixy=False, oxy=False)
classmethod _insert_pktchain(context, design_view=None, *, iter_instances=None, insert_delimiter=None, _not_top=False)

Inject pktchain network and routers in module. This method should be called only on arrays.

Parameters:
  • context (Context) –
  • design_view (Module) – The module (design view) in which pktchain network and routers are injected. If not specified, the top-level array in context is selected
Keyword Arguments:
 
  • iter_instances (Callable [Module ] -> Iterable [Instance ]) – Custom ordering of the instances in a module. In addition, when the module is an array, Pktchain.TERMINATE_LEAF can be yielded to control pktchain router injection. Furthermore, Pktchain.TERMINATE_BRANCH can be yielded to terminate the current branch and attach the branch to the main programming backbone (chunk).
  • insert_delimiter (Function [Module ] -> bool) – Determine if we buffers are inserted at the beginning and end of the scanchain inside design_view. By default, buffers are inserted in all logic/IO blocks and routing boxes.
  • _not_top (bool) – If set, the array is treated as a non-top level array. This is primarily used when this method calls itself recursively
classmethod _insert_pktchain_leaf(context, module, instance, iter_instances, insert_delimiter, leaf_prog_nets, scanchain_offset, branch_id, leaf_id)
classmethod _pktchain_phit_port_name(type_, branch_id=None)
classmethod _wrap_pktchain_branch(context, module, dispatcher, gatherer, branch_prog_nets, branches, leaves, _not_top)
classmethod _wrap_pktchain_leaf(context, module, branch_id, branch_prog_nets, leaves, leaf_prog_nets, scanchain_bitcount)
classmethod insert_prog_circuitry(context, *, iter_instances=None, insert_delimiter=None)

Insert programming circuitry into the FPGA. This method will be called by the ProgCircuitryInsertion pass.

Parameters:context (Context) –
classmethod materialize(ctx, inplace=False, *, phit_width=8, chain_width=1, router_fifo_depth_log2=4)

Materialize the abstract context to this configuration circuitry type.

Parameters:
  • ctx (Context) – An abstract context, or a context previously materialized to another configuration circuitry type.
  • inplace (bool) – If set, the context is modified in-place. Otherwise (by default), ctx is deep-copied before processed
Keyword Arguments:
 

**kwargs – Additional keyword parameters specific to the programming circuitry type.

Returns:

Return type:

Context