A component object corresponding to a fully parameterized soclib module. This is created by a soclib.platform.Macrocell.create() call.
This object holds all the information about the component:
This objects also offers accessors for common extended attributes used by DSX:
Component inherits dsx.ware.WNode and PortOwner.
Creates a new component.
| Parameters: |
|
|---|
Signal-specific API
When the created module is actually a signal, some accessors are implemented to permit signal’s feature list.
Subsignal hacky accessor.
Maximal connection count to port of given type.
| Parameters: | port – A port index name |
|---|---|
| Returns: | the maximal count |
Whether this Signal’s implementation has a () operator defined that can connect all subsignals at once.
| Returns: | True or False |
|---|
Common API
See dsx.ware.WNode.prepare()
DSX high-level module parameters API
Retrieves the cpuid (cpu number used to identify a processor from the software). Only relevant for processor components.
| Returns: | an integer. |
|---|
Retrieves the CPU type name as defined by the dsx:cpu extension of the metadata file.
| Returns: | a cpu type name string |
|---|
Retrieves a metadata extension value
| Parameters: | name (str) – Extension class |
|---|---|
| Returns: | an iterable of strings containing extensions |
Adds segments associated to this component to the relevant mapping tables found in the passed architecture.
| Parameters: | arch (soclib.platform.Macrocell) – Architecture containing the mapping tables to register segments in |
|---|
Adds a segment to the list of segments associated to this component.
| Parameters: | |
|---|---|
| Raises : | ValueError if address or size is invalid. |
Netlist generation specific stuff
Retrieves the static configurators to call on the type.
This is a mechanism specific to the C++ objects. Sometimes, netlist must contain calls to static functions of the class prior to the objects instantiations. This method retrieves relevant lines for the C++ class corresponding to this module.
| Returns: | an iterable of strings containing C++ code. |
|---|
Retrieves the configurators to call on the object.
This is a mechanism specific to the C++ objects. Sometimes, netlist must contain calls to methods of the object after its instantiation. This method retrieves relevant lines for the C++ class corresponding to this module.
| Returns: | an iterable of strings containing C++ code. |
|---|
| Returns: | the module name in Module Index |
|---|
| Returns: | the entity name |
|---|
| Returns: | the list of C++ header files involved with this |
|---|
component
Retrieves the instantiation parameter values for the component.
| Returns: | an iterable of values. |
|---|
Retrieves the instance name
| Returns: | a name string |
|---|
Retrieves the instantiation parameters as a string suitable for C++ code generation (to put between the () of the constructor.
| Returns: | a C++ code substring. |
|---|
A signal object. This actually inherits Component.
Exports the signal to the boundary of the architecture. This permits to build hierarchical netlists.
| Parameters: |
|
|---|
Tells whether this signal got exported to the interface.
| Returns: | True or False |
|---|
Spawns the external port declaration component
| Returns: | an ExternalPort object |
|---|
Returns the current external port declaration
| Returns: | an ExternalPort object or None |
|---|
Retrieves or compute the instance name for the signal
| Returns: | an instance name string |
|---|
The // operator.
Connects the signal to the given port.
| Parameters: | port (Port) – a compatible port |
|---|---|
| Returns: | the signal itself (so that you can use the return value for another connection). |
Retrieves the list of connections made to this signal.
| Returns: | an iterable of Port objects. |
|---|
Retrieves the different types of ports connected to this signal (not the names nor modules, only the different port types).
| Returns: | an iterable of names in Module Index. |
|---|
An external port declaration. soclib.platform.Macrocell contains one object of this type for any export signal or port.
Creates a new external port declaration.
| Parameters: |
|
|---|
See Component.ports()
See Component.fullName()
Whether the underlying signal is primary. See Signal.isPrimary().