prga.core.builder.base module

class prga.core.builder.base.BaseBuilder(context, module)

Bases: prga.util.Object

Base class for all module builders.

Parameters:
  • context (Context) – The context of the builder
  • module (Module) – The module to be built
_context
_module
commit()

Commit and return the module.

Returns:
Return type:Module
connect(sources, sinks, *, fully=False, **kwargs)

Connect sources to sinks.

Parameters:
  • sources – Source nets, i.e., an input port, an output pin of an instance, a subset of the above, or a list of a combination of the above
  • sinks – Sink nets, i.e., an output port, an input pin of an instance, a subset of the above, or a list of a combination of the above
Keyword Arguments:
 
  • fully (bool) – If set to True, connections are made between every source and every sink
  • **kwargs – Additional attibutes assigned to all connections
instances

Proxy to module.instances.

Type:Mapping [Hashable, Instance ]
instantiate(model, name, **kwargs)

Add an instance to the module.

Parameters:
  • model (Module) – Module to be instantiated
  • name (str) – Name of the instance
Keyword Arguments:
 

**kwargs – Custom attibutes assigned to the instance

Returns:

Return type:

Instance

module

The module being built.

Type:Module
ports

Proxy to module.ports.

Type:Mapping [Hashable, Port ]