DFAddressMap¶
DFAddressMap specifies the address map between input and output boundary ports on a leaf DFBlock. It is formed of DFAddressMapInitiators, DFAddressMapTargets, and DFAddressMapConstraints - which together provide a flexible scheme for describing the translations, apertures, and access limitations of an arbitrary transaction distributor or aggregator.
The use of DFAddressMapConstraints is optional, if they are omitted then every DFAddressMapInitiator can access every DFAddressMapTarget. Partial use is also possible, in which case an unconstrained initiator can access every unconstrained target, but constrained initiators can only access an allowed set of targets and equally constrained targets can only be accessed by an allowed set of initiators.
As with every tag, DFAddressMap inherits from DFBase, so has support for all of the core attributes (id, description, and attributes).
{
"id": "my_address_map",
"description": "Free-form description",
"attributes": { },
"initiators": [ ],
"targets": [ ],
"constraints": { }
}
| Property | Usage |
|---|---|
| initiators | Contains a list of DFAddressMapInitiators |
| targets | Contains a list of DFAddressMapTargets |
| constraints | A map of DFAddressMapConstraints, keyed uniquely using the form " |
Python API¶
-
class
designformat.address_map.DFAddressMap(block=None)¶ DesignFormat description of an address map aperture from a specific initiator to a specific target. It also describes any translation that is performed to the address as it passes through the block (masking and offset).
-
__init__(block=None)¶ Constructor for an address map
- Parameters
block – The DFBlock this address map is associated with
-
addConstraint(initiator, target)¶ Add a constraint to limit which targets can be accessed from an initiator
- Parameters
initiator – The initiator
target – The target
-
addInitiator(initiator)¶ Add an initiator to this address map
- Parameters
initiator – The initiator
-
addTarget(target)¶ Add a target to this address map
- Parameters
target – The target
-
dumpObject(project)¶ Dump out the address map so that it can be reloaded
- Parameters
project – Project definition used to calculate references
-
getInitiator(port, index)¶ Get the DFAddressMapInitiator associated to a specific port and index
- Parameters
port – Port to lookup
index – Signal index within the port
-
getInitiatorsForTarget(target)¶ Get all of the initiators in the address map that can reach a particular target, taking into account constraints on either initiator or target.
- Parameters
target – The target to search for
-
getTarget(port, index)¶ Get the DFAddressMapTarget associated to a specific port
- Parameters
port – Port to lookup
index – Signal index within the port
-
getTargetsForInitiator(initiator)¶ Get all of the targets in the address map that can be reached from a particular initiator, taking into account constraints on either initiator or target.
- Parameters
initiator – The initiator to search for
-
loadObject(obj, root)¶ Reload the address map from passed in object.
- Parameters
obj – Description of this node
root – Root object in the tree
types – Map from class name to class definition
-
resolveTarget(address, initiator=None)¶ Resolve the target port in the address map from a given address. The address is assumed to be relative to the address map, if an initiator is provided then any known constraints will be applied.
- Parameters
address – Address being accessed
initiator – Which initiator is handling the access
-
Javascript API¶
-
class
DFAddressMap(block)¶ DesignFormat description of an address map aperture from a specific initiator to a specific target. It also describes any translation that is performed to the address as it passes through the block (masking and offset).
Constructor for an address map
- Arguments
block (DFBlock) – The DFBlock this address map is associated with
-
DFAddressMap.addConstraint(initiator, target)¶ Add a constraint to limit which targets can be accessed from an initiator
- Arguments
initiator (DFAddressMapInitiator) – The initiator
target (DFAddressMapTarget) – The target
-
DFAddressMap.addInitiator(initiator)¶ Add an initiator to this address map
- Arguments
initiator (DFAddressMapInitiator) – The initiator
-
DFAddressMap.addTarget(target)¶ Add a target to this address map
- Arguments
target (DFAddressMapTarget) – The target
-
DFAddressMap.dumpObject(project)¶ Dump out the address map so that it can be reloaded
- Arguments
project (DFProject) – Project definition used to calculate references
-
DFAddressMap.getInitiator(port, index)¶ Get the DFAddressMapInitiator associated to a specific port and index
- Arguments
port (DFPort) – Port to lookup
index (integer) – Signal index within the port
-
DFAddressMap.getInitiatorsForTarget(target)¶ Get all of the initiators in the address map that can reach a particular target, taking into account constraints on either initiator or target.
- Arguments
target (DFAddressMapTarget) – The target to search for
-
DFAddressMap.getTarget(port, index)¶ Get the DFAddressMapTarget associated to a specific port
- Arguments
port (DFPort) – Port to lookup
index (integer) – Signal index within the port
-
DFAddressMap.getTargetsForInitiator(initiator)¶ Get all of the targets in the address map that can be reached from a particular initiator, taking into account constraints on either initiator or target.
- Arguments
initiator (DFAddressMapInitiator) – The initiator to search for
-
DFAddressMap.loadObject(obj, root, types)¶ Reload the address map from passed in object.
- Arguments
obj (object) – Description of this node
root (DFBase) – Root object in the tree
types (object) – Map from class name to class definition
-
DFAddressMap.resolveTarget(address, initiator)¶ Resolve the target port in the address map from a given address. The address is assumed to be relative to the address map, if an initiator is provided then any known constraints will be applied.
- Arguments
address (*) – Address being accessed
initiator (*) – Which initiator is handling the access