DFConnection¶
DFConnection is used to represent a connection between two DFPorts or a tie-off where a DFConstantTie drives a DFPort. DFBlocks contain a list of connections, only ever spanning between its boundary ports and the boundary ports of its children (i.e. connections should not traverse a hierarchy).
As with every tag, DFConnection inherits from DFBase, so has support for all of the core attributes (id, description, and attributes). However DFConnections are not often named, or described, so the id and description properties may be left empty.
The structures for a connection between two DFPorts and those involving a DFConstantTie differ slightly - firstly for a connection between two DFPorts:
{
"id": "optional_id",
"description": "Optional free-form description - not often populated",
"attributes": { },
"start_port": {
"block": "my_root.my_block",
"port": "clocks"
},
"start_index": 2,
"end_port": {
"block": "my_root.my_block.my_child",
"port": "clk_root"
},
"end_index": 0
}
And then for connections driven by a DFConstantTie:
{
"id": "optional_id",
"description": "Optional free-form description - not often populated",
"attributes": { },
"start_tie": { },
"end_port": {
"block": "my_root.my_block.my_child",
"port": "block_id"
},
"end_index": 0
}
| Property | Usage |
|---|---|
| start_port.block | Hierarchical path to the block where the connection begins |
| start_port.port | Name of the port that drives the connection |
| start_index | Index of the signal within the port that drives the connection |
| start_tie | Dump of a DFConstantTie object that describes the value to drive onto the end port |
| end_port.block | Hierarchical path to the block where the connection ends |
| end_port.port | Name of the port that is driven by the connection |
| end_index | Index of the signal within the port that is driven by the connection |
Note
The properties of start_port and start_tie are mutually exclusive, while end_port is always present. The start_port property is used where one DFPort drives another (for example where a clock signal is distributed from a boundary port to an input port on each child). The start_tie property is used where the driven port is held at a constant value (for example where the value is static, or the pin is an unused input in this particular scenario).
Python API¶
-
class
designformat.connection.DFConnection(start_port=None, start_index=None, end_port=None, end_index=None)¶ DesignFormat representation of an interconnection between two points
-
__init__(start_port=None, start_index=None, end_port=None, end_index=None)¶ Constructor of the connection
- Parameters
start_port – Start point can be a DFPort or DFConstantTie
start_index – Signal index within DFPort to connect
end_port – End point can only be a DFPort
end_index – Signal index within DFPort to connect
-
checkConnection()¶ Check that the connection is sane with sensible signal indexes
-
dumpObject(project)¶ Dump out this node so that it can be reloaded
- Parameters
project – Project definition used to calculate references
-
getInterconnectType()¶ Returns the DFInterconnect type of the end points of this interconnect
-
isTieOff()¶ Returns if this connection is a tie-off (i.e. start point is a DFConstantTie)
-
loadObject(obj, root)¶ Reload this node from passed in object.
- Parameters
obj – Description of this node
root – Root object in the tree
-
Javascript API¶
-
class
DFConnection(start_port, start_index, end_port, end_index)¶ DesignFormat representation of an interconnection between two points
Constructor of the connection
- Arguments
-
DFConnection.checkConnection()¶ Check that the connection is sane with sensible signal indexes
-
DFConnection.dumpObject(project)¶ Dump out this node so that it can be reloaded
- Arguments
project (DFProject) – Project definition used to calculate references
-
DFConnection.getInterconnectType()¶ Returns the DFInterconnect type of the end points of this interconnect
-
DFConnection.isTieOff()¶ Returns if this connection is a tie-off (i.e. start point is a DFConstantTie)