DFInterconnectComponent

DFInterconnectComponent represents a component of a wider signal, which is modelled by a DFInterconnect. The component can be either simple or complex:

  • A simple component can be regarded as a collection of wires of a specified width, for example an address field of a data bus.

  • A complex component is a collection of other components, which is represented by another DFInterconnect.

For simple components the DFInterconnectComponent has properties of width and count, which specify how wide the component is and how many times it should be instanced. For complex components it retains the count property, but replaces width with ref - this new field references the name of another DFInterconnect that should be instantiated as the component.

As many layers of interconnect as required can be instantiated - so for example you could split an AXI bus into read and write “channels”, and each of those channels into “request” and “response” buses, with each layer represented by a different DFInterconnect. For example:

AXI4
 |-- Read Channel (COMPLEX, M->S)
 |    |-- Request Bus (COMPLEX, M->S)
 |    |    |-- ARADDR[31:0] (SIMPLE, M->S)
 |    |    |-- ARVALID (SIMPLE, M->S)
 |    |    |-- ARREADY (SIMPLE, S->M)
 |    |    ...
 |    |-- Response Bus (COMPLEX, M->S)
 |         |-- RDATA[31:0] (SIMPLE, S->M)
 |         |-- RVALID (SIMPLE, S->M)
 |         |-- RREADY (SIMPLE, M->S)
 |         ...
 |-- Write Channel (COMPLEX, M->S)
      |-- Request Bus (COMPLEX, M->S)
      |    |-- AWADDR[31:0] (SIMPLE, M->S)
      |    ...
      |-- Response Bus
           |-- BVALID (SIMPLE, S->M)
           ...

As with every tag, DFInterconnectComponent inherits from DFBase, so has support for all of the core attributes (id, description, and attributes).

Firstly, an example showing a complex component instantiating a referenced DFInterconnect called axi4_read_channel:

{
    "id": "read_channel",
    "description": "Read channel component of AMBA AXI4 bus",
    "attributes": { },
    "role": "MASTER",
    "type": "COMPLEX",
    "count": 1,
    "ref": "axi4_read_channel"
}

Secondly, an example showing a simple 32-bit RDATA component of the AMBA AXI4 bus, note that it has a slave role so will transfer data against the overall direction of the bus:

{
    "id": "WDATA",
    "description": "32-bit write data component",
    "attributes": { },
    "role": "SLAVE",
    "type": "SIMPLE",
    "count": 1,
    "width": 32,
    "default": 0,
    "enum": { }
}
Property Usage
role Either MASTER or SLAVE to define whether data flows with or against the direction of the bus respectively.
type SIMPLE for basic components representing a bundle of wires, or COMPLEX when instantiating another DFInterconnect.
count How many instances of this component should be placed
width For simple components, how wide is the data signal.
default For simple components, what value should they take at reset.
enum For simple components, the value can be enumerated using DFDefine nodes - just like a DFCommandField.

Python API

class designformat.interconnect.DFInterconnectComponent(id=None, role=None, description='', type=None, width_or_ref=None, count=1, default=0, enum=None, project=None)

DesignFormat representation for a component within a type of interconnection

__init__(id=None, role=None, description='', type=None, width_or_ref=None, count=1, default=0, enum=None, project=None)

Constructor for the interconnect component.

Parameters
  • id – Name of the interconnect component

  • role – Whether the port is a slave or master

  • description – Description of the component

  • type – Whether this is simple or complex (references another interconnect)

  • width_or_ref – For simple connections, how many bits wide is the component. For complex connections, what DFInterconnect is referenced.

  • count – Number of instances of this component

  • def – For simple components, what is the default state of this signal

  • enumlist – Enumeration of values that the component can carry

  • project – Reference to the top level project (used for lookups)

addEnumValue(key, value, description=None)

Add a new enumerated value for the value of this interconnect (if simple)

Parameters
  • key – Name of the value to enumerate

  • value – Value to name

  • description – Human-readable description of the value

checkRole()

Checks that the configured role is valid (SLAVE or MASTER)

checkType()

Check that the component type is allowed.

dumpObject(project)

Dump out this node so that it can be reloaded

Parameters

project – Project definition used to calculate references

getAllRoles()

Return all the roles that are offered by this interconnect component, takes account of the roles of any reference component.

getBidirectionalWidth()

Get the total bidirectional width of the interconnect

getMasterWidth()

Get the total width of the interconnect component as a master

getReference()

Convert from the string ID reference to a DFInterconnect

getRoleWidth(role)

Get the total width of the interconnect in a particular role

Parameters

role – The role to resolve

getSlaveWidth()

Get the total width of the interconnect component as a slave

hasBidirectionalRole()

Checks that the interconnect component offers a BIDIR role

hasMasterRole()

Checks that the interconnect component offers a MASTER role

hasRole(role)

Checks that the interconnect component offers a specified role

Parameters

role – The role to lookup

hasSlaveRole()

Checks that the interconnect component offers a SLAVE role

isComplex()

Return whether or not the component is complex (whether it references another DFInterconnect).

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 DFInterconnectComponent(id, role, description, type, width_or_ref, count, def, enumlist, project)

DesignFormat representation for a component within a type of interconnection

Constructor for the interconnect component.

Arguments
  • id (string) – Name of the interconnect component

  • role (string) – Whether the port is a slave or master

  • description (string) – Description of the component

  • type (string) – Whether this is simple or complex (references another interconnect)

  • width_or_ref (any) – For simple connections, how many bits wide is the component. For complex connections, what DFInterconnect is referenced.

  • count (integer) – Number of instances of this component

  • def (integer) – For simple components, what is the default state of this signal

  • enumlist (dictionary) – Enumeration of values that the component can carry

  • project (DFProject) – Reference to the top level project (used for lookups)

DFInterconnectComponent.addEnumValue(key, value, description)

Add a new enumerated value for the value of this interconnect (if simple)

Arguments
  • key (string) – Name of the value to enumerate

  • value (integer) – Value to name

  • description (string) – Human-readable description of the value

DFInterconnectComponent.checkRole()

Checks that the configured role is valid (SLAVE or MASTER)

DFInterconnectComponent.checkType()

Check that the component type is allowed.

DFInterconnectComponent.dumpObject(project)

Dump out this node so that it can be reloaded

Arguments
  • project (DFProject) – Project definition used to calculate references

DFInterconnectComponent.getAllRoles()

Return all the roles that are offered by this interconnect component, takes account of the roles of any reference component.

DFInterconnectComponent.getBidirectionalWidth()

Get the total bidirectional width of the interconnect

DFInterconnectComponent.getMasterWidth()

Get the total width of the interconnect component as a master

DFInterconnectComponent.getReference()

Convert from the string ID reference to a DFInterconnect

DFInterconnectComponent.getRoleWidth(role)

Get the total width of the interconnect in a particular role

Arguments
  • role (string) – The role to resolve

DFInterconnectComponent.getSlaveWidth()

Get the total width of the interconnect component as a slave

DFInterconnectComponent.hasBidirectionalRole()

Checks that the interconnect component offers a BIDIR role

DFInterconnectComponent.hasMasterRole()

Checks that the interconnect component offers a MASTER role

DFInterconnectComponent.hasRole(role)

Checks that the interconnect component offers a specified role

Arguments
  • role (string) – The role to lookup

DFInterconnectComponent.hasSlaveRole()

Checks that the interconnect component offers a SLAVE role

DFInterconnectComponent.isComplex()

Return whether or not the component is complex (whether it references another DFInterconnect).

DFInterconnectComponent.loadObject(obj, root, types)

Reload this node 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