prga.passes.translation module

class prga.passes.translation.SwitchDelegate(context)

Bases: prga.util.Object

Switch delegate choosing design-view switch modules for instantiation.

Parameters:context (Context) –
context
get_switch(width, module=None)

Get a switch module with width input bits.

Parameters:
  • width (int) – Number of inputs needed
  • module (Module) – The module in which the switch is going to be added
Returns:

Switch module found

Return type:

Module

Note

The returned switch may have more than width input bits

class prga.passes.translation.Translation(top=None, *, create_blackbox_for_undefined_primitives=False)

Bases: prga.passes.base.AbstractPass

Translate modules in abstract view to design view.

Parameters:top (Module) – Top-level array in abstract view. The top array from the context is selected by default
Keyword Arguments:
 create_blackbox_for_undefined_primitives (bool) – Translation does not know how to translate primitives. By default, if the design view is not defined for a primitive, an error is raised. If create_blackbox_for_undefined_primitives is set to True, an empty design view is created in this case.
classmethod _get_or_create_io(module, iotype, position=Position(0, 0), subtile=0)
_process_module(module, context, *, is_top=False)
create_blackbox_for_undefined_primitives
dependences

Passes that this pass depend on.

key

Key of this pass.

run(context)

Run the pass.

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