Wiki

This version (09 Oct 2023 14:31) was approved by Gireesha Nirvanaiah.

Click here to return to the A2B SSPLUS User Guide homepage

Drawing A2B schematics

The following steps describe the procedure to draw an A2B schematic in SigmaStudioPlus.

  1. Launch SigmaStudioPlus application.
  2. Create a new project from File menu.
  3. Drag and drop “AD24xx EVAL” standard platform or Custom Platform from Tree ToolBox, under “A2B” to “System” canvas.
  4. Drag an A2B-USBi or A2B-Aardvark Communication Adaptors, depending on the Host I2C adapter used to connect to the transceiver, and wire it to AD24xx block.
  5. Double click to the platform to get the list of components available for A2B platform. This will list “Generic Devices”, “Transceiver”, “Memory” and “Processor” for custom platform whereas standard platform it is read-only. USBi to main and peripheral interfaces can be changed by clicking in on the interface type shown below.

    Figure: Changing the interface
  6. Drag icons from Tree Toolbox into canvas and connect the blocks to make an A2B schematic as shown in the below Figure.
    Select the variant by clicking on the drop-down present within custom platform.

    Figure: Selection of variant

    Figure : A2B Schematic tab
  7. Define and configure streams by right clicking the node and select the settings. User can also access the stream configuration from the Project window. For configuration details, refer slot configuration.

    Figure : A2B Stream configuration
    Note: Before Adding/updating the stream configuration, project has to be Link-Compiled.
  8. Enter the properties for each A2B node by right clicking and selecting the “Open AD24xx-node Settings”. This will open a window as shown in the below Figure.

    Figure : Device properties window
  9. Transceiver properties are grouped under different Tabs. Switch to the required Tab and configure as necessary. Configuration of Upstream and Downstream slots may vary depending on the Transceiver type selected. Refer slot configuration for more details.
  10. Provide the silicon revision of the A2B Transceiver in the ‘ID’ tab of General View as shown in the below Figure. Optionally, a custom node identifier can be assigned to a Node by selecting the “Custom Node Identifier” checkbox. Refer Custom Node ID based Configuration for more details.

    Figure : Specifying silicon revison
  11. The daisy chain for AD243x only network can go up to 16 sub-nodes and an overall distance of up to 80m. For AD2437, it is 300m. AD242x daisy chain is limited to 10 sub-nodes and 40m overall distance. (Note : The current release of A2B software stack supports up to discovery of 17 A2B nodes (AD243x only) in a network. A forthcoming Response Cycle formula update is required before going to production with systems beyond 11 nodes (up to 17) and/or more than 40m total cable length. Discovery of systems with more than 40m of cable length may not succeed without the response cycle formula update. Please contact ADI for production values of RESP_CYCLES for discovery of 17 nodes)
  12. Enter properties for each peripheral node used in the schematic. A peripheral device can be programmed during discovery by providing an XML file having the required configuration information.
  13. Once properties for all nodes are entered, check the correctness of the schematic by clicking on the ‘Link’ icon in SigmaStudioPlus. Make sure that the drawn schematic has no errors.
  14. The schematic is now ready for download.

Slot Configuration

With sub-node-to-sub-node communication possible with AD242x/3x parts, the way upstream and downstream slots are computed in the A2B schematic varies depending on the A2B transceiver type used. This section describes the slot configuration for AD242x & AD243x types.

AD242x

In A242x, with the ability for a sub-node to directly receive/transmit data from/to other sub-nodes without having to move the data all the way up to the main, the Rx and Tx channels configured for the peripherals does not directly translate to the Upstream and Downstream slots.

One can configure slots for AD242x sub-nodes using

  • Stream based network design scheme where the slots are calculated automatically based on network wide stream configuration.
  • ‘Slot Config’ tab of window one can manually configure slots for AD242x sub-nodes. The fields are elaborated in the following section.

Upstream

Slots Received at Port B: Number of slots received at Port B. Calculated as Maximum of ‘UPMaskmax ‘ and ‘Passed up slots from Port B’.

Slots Passed Up from Port B: Number of received slots to be passed up from Port B.

Slots Contributed: Number of slots being contributed to upstream.

Receive Offset: Number of slots which are skipped before transmission.

Slots Transmitted at Port A: Number of slots transmitted at Port A. This is the sum of ‘Slots Passed Up from Port B’ + ‘Slots Contributed’.

Downstream

Slots received at Port A: Number of slots received at Port A. Calculated as Maximum of ‘DNMaskmax’ and ‘Passed down slots from Port A’.

Slots Passed Down from Port A: Number of received slots to be passed down from Port A

Slots Contributed: Number of slots being contributed to downstream.

Slots Consumed: Number of slots being consumed from downstream when the masks are not used.

Receive Offset: Number of slots which are skipped before transmission.

Slots Transmitted at Port B: This is the sum of ‘Passed down slots from Port A’’ + ‘Slots Contributed’.

Broadcast Downstream Slots: This is active only when the Select slots to consume is disabled.

Figure: Slot Config – Sub-node Properties Window

AD243x

Like AD242x, AD243x can be either configured via ‘stream configuration’ or manual slot configuration in General/Register view. Additionally, stream-based auto-slot calculation is extended to SPI Data tunnels along with audio streams.

Stream based Network Design

Alternative to the approach of configuring slots in an A2B network using General View/Register view tabs, one could use the Stream based network design approach wherein SigmaStudioPlus does all required A2B slots register settings.

This feature enables auto configuration of A2B slots based on the network wide stream specification. It also facilitates mechanism to store, communicate and import of network wide stream information.

Network wide Stream Configuration

Open Stream configuration window by right clicking Target processor.

Stream Definition

This window allows the user to define streams along with properties like sampling rate, number of channels per stream etc. Separate option is provided to edit a selected stream properties. User may remove as well as re-order a selected stream using the respective options.

User shall provide a unique name and ID for each stream.

Figure: Stream Definition Window

Stream Assignment

All the defined streams are available for assignment. For each stream, user needs to select the source and destination. Each stream can have a single source and one or more destination. The option “Auto Slot Calculate” ensures that slot configuration registers are programmed according to the assignment during schematic Link/download. Optionally, user may trigger slot calculation based on the current assignment by using the button “Calculate Now”.

Figure: Stream Assignment

The ‘Auto Slot Calculate’ option uses sub-node to sub-node communication. Hence, it is enabled only when all the nodes support sub-node to sub-node communication
Download button dynamically writes the current stream assignment to the network without the need of rediscovery

Data Tunnel Configuration

Like audio, Data tunnels can be defined with the properties like name, tunnel down slots & tunnel up slots. Further, data tunnel can be configured by selecting the participating nodes. Configuration window ensures that user cannot create overlapping data tunnels. ‘Auto Slot Calculate’ option ensures that the data tunnel offsets are calculated implicitly while adhering to the constraints.

‘Strict Bound’ option ensures that data tunnel slots are not passed beyond the first & last node of the tunnel. However, disabling the ‘Strict Bound’ allows data tunnel offset constraints to be relaxed and can potentially accommodate wider set of use cases.

Figure: Data Tunnel Configuration

Node specific Stream Information

The ‘Stream View’ tab of ‘Device Properties’ window as shown in the below Figure, captures the node level information based on the stream assignment. User can view all the streams associated with the current node. Usage of the streams, direction and corresponding bus slots are captured in the in this view. Note that ‘Stream View’ will be populated only when “Auto Slot Calculate” option is enabled during Stream Assignment. ‘Stream View’ also captures the bandwidth used by the current node.

Stream configuration window and ‘Stream View’ can be viewed concurrently. One can use the “Apply” button of stream configuration window to trigger slot calculation. The latest changes with respect to the current node shall be viewed by clicking the “Refresh” button of device properties (as shown in below Figure).

Figure: Stream View

Custom Node ID based Configuration

A Custom Node Identifier allows A2B software stack to determine, at run-time, whether the nodes are physically connected in the expected order so that right configuration is applied to the node. This enables system integrators to uniquely identify and authenticate a Node in an A2B network.

User can set unique ID for a node in an attached I2C enabled Memory device such as an EEPROM attached or by setting unique combination of A2B Transceiver GPIO pin(s) and levels (low/high) or even store in an attached processor memory. The Custom ID information (as set in the hardware) shall be provided in SigmaStudioPlus so that it is used for A2B node validation during discovery process.

Custom Node Identifier can be set from the Node’s ‘Device Properties→General View→ID’ tab.

I2C Device

Use the ‘I2C Device’ option as shown in the below Figure when the Custom ID for the node is stored in a Memory device attached to it.

Specify the Custom ID (either as an ASCII string or as a Hexadecimal number) – Max 50 characters, device address, address width and the memory location in the device where the ID is stored.

Figure: Custom Node ID using I2C

It is possible to write Custom Node ID into an I2C enabled memory device from SigmaStudioPlus using the ‘peripheral properties’ window as shown in Figure 24. The data in the XML file represents comma separated ASCII values of Custom Node ID.

GPIO Pins

Use ‘GPIO Pins’ option as shown in Figure 24 when A2B Transceiver GPIO pins are used for Custom Node Identification. Specify transceiver GPIO Pins and their level (high/low) to be matched on the actual hardware during A2B discovery process. A GPIO pin not used for Node Identification shall be set to ‘IGNORE’.

As most GPIO pins are multiplexed with other functionality, user shall select pin(s) that are free for Node ID. Note that a GPIO pin will assume a multiplexed functionality only after the A2B Transceiver is discovered and configured. So, with additional on-board circuitry (pull-up/pull-downs) one should be able to use A2B GPIO pins (including multiplexed GPIO) for Custom Node ID. If multiple nodes in a network use GPIO pins for Identification, then each node shall have unique GPIO pin/level settings.

Figure: Custom Node ID using GPIO pins

Mailbox

Use ‘Mailbox’ option as shown in the below Figure when Custom Node Identifier for the sub-node is to be requested from a connected processor.

Figure: Custom Node ID using A2B mailbox

When a schematic is downloaded with this option set, SigmaStudioPlus sends Custom Node Identifier request message to the sub-node over A2B Mailbox, using A2B Stack’s Communication channel module. The sub-node processor, running the Communication channel instance, is expected to handle the request message and respond with its Custom ID as set in SigmaStudioPlus before the ‘TimeOut’ period. The ‘TimeOut’ field specifies the time in milliseconds before which the sub-node must respond with its custom Node ID. If the sub-node fails to respond after ‘number of Retries’ or responds with an invalid ID, then SigmaStudioPlus aborts discovery and a discovery fail message is provided to the user. For more details on communication channel to be run on sub-node and application integration details to refer in 19.10.x release.

Operability within the A2B Stack

During A2B discovery process, the Software stack will read the Custom Identifier value from the remote memory device via I2C at the specified address or will read levels on the specified GPIO lines and validate it against the assigned value. In case of mailbox authentication, the Software stack will request for the ID via the communication channel over A2B mailbox. The sub-node controller is expected to the run the communication channel and the sub-node application is required to handle the request message and respond with the custom node ID as set in SigmaStudioPlus. In all cases if there is a match then the node will be successfully configured otherwise the discovery will be aborted. Additionally, user may register a call back after custom node authentication check, where authentication status can be overridden.

Note that a node may not have a Custom ID set, in which case the stack discovery and initialization process will not perform any Custom ID authentication and hence simply applies the configuration available for that node position

Auto Configuration

In the Auto configuration scheme, a host processor can automatically configure a A2B sub-node and its peripherals or a complete A2B network without prior knowledge of the topology. Typically, a non-volatile memory device like EEPROM is used to store the configuration information. Following sections describe the Auto configuration options in detail.

Auto Configuration of Network

A complete A2B network can be configured using the information stored in a memory device that is directly connected to the Host processor via I2C. Such memory device shall use device address 0x50 (7-bit) and accessible directly to the Host processor over I2C. Upon boot, the host processor can read this information to automatically configure the complete A2B network i.e., main and sub-node A2B Transceivers, network and sub-node peripheral devices without any prior knowledge of the network.

Storing Network Configuration

In SigmaStudioPlus, one can store the network configuration information into a memory device by saving the Schematic into an EEPROM connected to ECU. This can be done by right clicking the master node. It also can be access from the project window.

Figure: Saving Schematic to EEPROM

Also, there is a provision to export the information into an XML/ Dat file as shown in Figure:A2B Network Stream Information Schematic for EEPROM/DAT File. These files can be input to custom EEPROM programming utilities, specifically .dat file can be converted to hex/.s37 format for ease of flashing.

Figure: Schematic Dump as XML

Loading Network Configuration

To specify A2B stack running on the Target processor can load the network wide configuration from EEPROM ensure to define the macro ‘A2B_FEATURE_EEPROM_OR_FILE_PROCESSING ’ and ‘A2B_BCF_FROM_SOC_EEPROM’ and undefined ‘ADI_SIGMASTUDIO_BCF’ in .\Target\examples\demo\a2b-xx\a2bstack-pal\platform\a2b\features.h.

Alternatively, network wide configuration can be sourced to target software from .dat file via the local file system. Refer adi_a2b_busconfig.dat section for more details. (.dat file from EEPROM window and adi_a2b_busconfig.dat file is essentially same)

The Stream information of A2B network is exported to binary file/EEPROM if ‘Include Stream info to dat file’ checkbox is enabled. Stream Information of A2B network is stored in the EEPROM/binary file as shown below.

Figure: A2B Network Stream Information Schematic for EEPROM/DAT File

In EEPROM/Binary file 6th byte (EEPROM Byte Address is 0x05) indicates that the Stream information is exported if the value is 0x01. Addresses mentioned in the Stream Information figure are just for representation and they are not the actual address. Stream information address would be defined by the value at 0x18 (MSB) and 0x19 (LSB) in EEPROM/Binary (DAT) File.

For optimized discovery flow, configure the A2B stack to program the peripherals in multiple jobs instead of serial peripheral processing. This can be done by setting the macro ‘A2B_CONSECUTIVE_PERIPHERAL_CFGBLOCKS’ to a non-zero value in case of EEPROM usage.

resources/tools-software/a2bv2/a2bssplususerguide/drawinga2bschematics.txt · Last modified: 09 Oct 2023 14:26 by Gireesha Nirvanaiah