DFInterconnect¶
DFInterconnect represents a signal type within the design - this can be as simple as a clock signal, or as complex as an AXI bus. Interconnects are able to carry an arbitrary number of components, and signals can either pass from the master to the slave or vice-versa.
DFInterconnects are stored as first class citizens in the DFProject’s node list, rather than being scattered throughout the design - this allows them to be referenced by DFPort instances. Every DFPort uses the type property to reference the id of the DFInterconnect it instantiates. Your library may choose to provide helper functions to convert from this reference into the DFInterconnect instance - for example in the Javascript and Python libraries you can use the getInterconnectType() function on a DFPort to resolve the interconnect type.
As with every tag, DFInterconnect inherits from DFBase, so has support for all of the core attributes (id, description, and attributes).
{
"id": "axi4",
"description": "AMBA standardised interconnect",
"attributes": { },
"role": "MASTER",
"components": [ ]
}
| Property | Usage |
|---|---|
| role | Overrides the role of the interconnect set when declaring a DFPort |
| components | A list of dumped DFInterconnectComponent objects |
Warning
The role attribute is only included as a hang-over from previous versions of the BLADE YAML syntax. It will be deprecated shortly as it unnecessarily complicates the process of determining master/slave roles, where you could just as easily change the role of the DFPort.
Python API¶
-
class
designformat.interconnect.DFInterconnect(id=None, role=None, description='', project=None)¶ DesignFormat representation of a type of interconnection
-
__init__(id=None, role=None, description='', project=None)¶ Constructor for the interconnect type
- Parameters
id – Name of the interconnect type
role – The role - one of ‘MASTER’, ‘SLAVE’ or ‘BIDIR’
description – Human-readable description of the interconnect
project – Reference to the top-level DFProject
-
addComponent(comp)¶ Attach a component to the interconnect
- Parameters
comp – The component to attach
-
checkRole()¶ Checks that the configured role is valid (SLAVE, MASTER, or BIDIR)
-
dumpObject(project)¶ Dump out this node so that it can be reloaded
- Parameters
project – Project definition used to calculate references
-
getAllRoles()¶ Return all of the roles offered by this interconnect type, taking account of any child components and interconnects they may reference.
-
getBidirectionalComponents()¶ Returns a list of only the components with a bidirectional role
-
getBidirectionalWidth()¶ Get the total bidirectional width of the interconnect
-
getMasterComponents()¶ Returns a list of only the components with a master role
-
getMasterWidth()¶ Get the total width of the interconnect as a master
-
getRoleComponents(role)¶ Returns only the components of the interconnect matching a particular role.
- Parameters
role – The role to lookup
-
getRoleWidth(role)¶ Get the total width of the interconnect in a particular role
- Parameters
role – The role to lookup
-
getSlaveComponents()¶ Returns a list of only the components with a slave role
-
getSlaveWidth()¶ Get the total width of the interconnect as a slave
-
hasComplexComponents()¶ Check if the interconnect contains any complex components
-
hasMasterRole()¶ Checks that the interconnect has components with the Master role
-
hasRole(role)¶ Checks that the interconnect has components of the specified role.
- Parameters
role – The role to check for
-
hasSimpleComponents()¶ Checks if the interconnect contains any simple components
-
hasSlaveRole()¶ Checks that the interconnect has components with the Slave role
-
loadObject(obj, project)¶ Reload this node from passed in object.
- Parameters
obj – Description of this node
root – Root object in the tree
-
Javascript API¶
-
class
DFInterconnect(id, role, description, project)¶ DesignFormat representation of a type of interconnection
Constructor for the interconnect type
- Arguments
id (string) – Name of the interconnect type
role (string) – The role - one of ‘MASTER’, ‘SLAVE’ or ‘BIDIR’
description (string) – Human-readable description of the interconnect
project (DFProject) – Reference to the top-level DFProject
-
DFInterconnect.addComponent(comp)¶ Attach a component to the interconnect
- Arguments
comp (DFInterconnectComponent) – The component to attach
-
DFInterconnect.checkRole()¶ Checks that the configured role is valid (SLAVE, MASTER, or BIDIR)
-
DFInterconnect.dumpObject(project)¶ Dump out this node so that it can be reloaded
- Arguments
project (DFProject) – Project definition used to calculate references
-
DFInterconnect.getAllRoles()¶ Return all of the roles offered by this interconnect type, taking account of any child components and interconnects they may reference.
-
DFInterconnect.getBidirectionalComponents()¶ Returns a list of only the components with a bidirectional role
-
DFInterconnect.getBidirectionalWidth()¶ Get the total bidirectional width of the interconnect
-
DFInterconnect.getMasterComponents()¶ Returns a list of only the components with a master role
-
DFInterconnect.getMasterWidth()¶ Get the total width of the interconnect as a master
-
DFInterconnect.getRoleComponents(role)¶ Returns only the components of the interconnect matching a particular role.
- Arguments
role (string) – The role to lookup
-
DFInterconnect.getRoleWidth(role)¶ Get the total width of the interconnect in a particular role
- Arguments
role (string) – The role to lookup
-
DFInterconnect.getSlaveComponents()¶ Returns a list of only the components with a slave role
-
DFInterconnect.getSlaveWidth()¶ Get the total width of the interconnect as a slave
-
DFInterconnect.hasComplexComponents()¶ Check if the interconnect contains any complex components
-
DFInterconnect.hasMasterRole()¶ Checks that the interconnect has components with the Master role
-
DFInterconnect.hasRole(role)¶ Checks that the interconnect has components of the specified role.
- Arguments
role (string) – The role to check for
-
DFInterconnect.hasSimpleComponents()¶ Checks if the interconnect contains any simple components
-
DFInterconnect.hasSlaveRole()¶ Checks that the interconnect has components with the Slave role