DFAddressMapInitiator¶
DFAddressMapInitiator describes an initiator within an address map - i.e. a point where transactions enter a block for distribution to the correct DFAddressMapTarget.
A DFAddressMap can contain any number of initiators and targets, provided that there is at least one of each.
As with every tag, DFAddressMapInitiator inherits from DFBase, so has support for all of the core attributes (id, description, and attributes).
{
"id": "my_initiator",
"description": "Free-form description",
"attributes": { },
"mask": 131071,
"offset": 0,
"port": {
"block": "my_root.my_sub.my_block.my_noc",
"port": "pcie_i",
"index": 0
}
}
| Property | Usage |
|---|---|
| mask | Mask applied to inbound address before looking up in address map |
| offset | Offset applied to the masked inbound address before looking up in address map |
| port | Details which port on the DFAddressMap's block acts as the initiator |
| port.block | The hierarchical path to the port's parent block |
| port.port | The name of the port acting as the initiator |
| port.index | Which signal index within the port acts as the initiator |
Note
While a DFPort usually carries only one signal, it is capable of carrying any number - this allows signal arrays with a common purpose to be referred to using one name and still separately selectable using an index.
You can define a unique initiator for every signal carried by a DFPort - allowing you to uniquely specify masking and offsets.
Python API¶
-
class
designformat.address_map.DFAddressMapInitiator(port=None, port_index=0, mask=None, offset=None, map=None)¶ DesignFormat description of an initiator within an address map, it defines any transformation (masking and offset) that is applied to the inbound request.
-
__init__(port=None, port_index=0, mask=None, offset=None, map=None)¶ Construct the address map initiator.
- Parameters
port – The port initiating the transaction to the address map
port_index – The index of the initiator signal within the port
mask – The mask applied to the inbound transaction by the map
offset – The signed offset applied to the inbound transaction
map – The DFAddressMap containing this initiator
-
dumpObject(project)¶ Dump out the initiator so that it can be reloaded
- Parameters
project – Project for resolving references
-
inboundAddress(address)¶ Translate an outbound address into an inbound address (out of the address map) using the offset parameters. Note that this is only a guess because an address loses information!
- Parameters
address – The address to translate
-
loadObject(obj, root)¶ Reload a stored initiator
- Parameters
obj – Description of this node
root – Root object in the tree
types – Map from class name to class definition
-
outboundAddress(address)¶ Translate an inbound address using the mask and offset parameters
- Parameters
address – The address to translate
-
resolveAddress(address)¶ Resolve an inbound address on the initiator to the correct target
- Parameters
address – The address to resolve
-
translateAddress(address)¶ Deprecated version of ‘outboundAddress’
- Parameters
address – The address to translate
-
Javascript API¶
-
class
DFAddressMapInitiator(port, port_index, mask, offset, map)¶ DesignFormat description of an initiator within an address map, it defines any transformation (masking and offset) that is applied to the inbound request.
Construct the address map initiator.
- Arguments
port (DFPort) – The port initiating the transaction to the address map
port_index (integer) – The index of the initiator signal within the port
mask (integer) – The mask applied to the inbound transaction by the map
offset (integer) – The signed offset applied to the inbound transaction
map (DFAddressMap) – The DFAddressMap containing this initiator
-
DFAddressMapInitiator.dumpObject(project)¶ Dump out the initiator so that it can be reloaded
- Arguments
project (DFProject) – Project for resolving references
-
DFAddressMapInitiator.inboundAddress(address)¶ Translate an outbound address into an inbound address (out of the address map) using the offset parameters. Note that this is only a guess because an address loses information!
- Arguments
address (integer) – The address to translate
-
DFAddressMapInitiator.loadObject(obj, root, types)¶ Reload a stored initiator
- Arguments
obj (object) – Description of this node
root (DFBase) – Root object in the tree
types (object) – Map from class name to class definition
-
DFAddressMapInitiator.outboundAddress(address)¶ Translate an inbound address using the mask and offset parameters
- Arguments
address (integer) – The address to translate
-
DFAddressMapInitiator.resolveAddress(address)¶ Resolve an inbound address on the initiator to the correct target
- Arguments
address (integer) – The address to resolve
-
DFAddressMapInitiator.translateAddress(address)¶ Note
Deprecated.
Deprecated version of ‘outboundAddress’
- Arguments
address (*) – The address to translate