Skip to Main Content Skip to Search
Product Documentation

C6455 SRIO Receive - Configure generated code to receive serial RapidI/O packets

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C6000/ C6455 EVM

Description

SRIO receive blocks add the ability to receive SRIO packets to the processor that is running the embedded code. Each receive block has two output ports—theStat port that is permanent and the optional Ptr port, that report the status of the block and output a pointer to data.

Writing data between DSPs is more efficient than writing because SRIO write can handle up to 4kB per write request without stalling the processor while SRIO read only handles up to 256 bytes per read request. Thus, the time needed to transfer data by reading from the remote device can be much longer than that required for writing from the remote device. Use the doorbell interrupt options to signal remote devices and to coordinate the data transfer between processors.

The Stat port reports SRIO operating status as shown in the following table.

Value at Stat PortDescription
1SRIO request is done (success)
0SRIO request is pending
-1SRIO request failed
-2SRIO request was not sent because the SRIO request queue is full

To see the SRIO blocks in use, refer to the Interprocessor Communications via Serial Rapid I/O (SRIO) demo in the online help system demos for Embedded Coder software.

Dialog Box

The block dialog box provides parameters on two panes:

Main Pane

Remote device ID (16-bit hex)

Enter the ID of the remote device in 16-bit hexadecimal format to configure the remote ID field in the generated code. When you configure SRIO Receive blocks for this communication link, the remote device ID in this field must match the local device ID for the SRIO Config block in the transmitting model.

Accept doorbell interrupt from remote device

Enables the doorbell interrupt operation for the block. The block always waits until it receives a doorbell interrupt before it reads from the remote device. Selecting this option enables the Doorbell interrupt ID parameter so you can set the interrupt ID.

Doorbell interrupt ID

Sets the interrupt ID for the doorbell to determine which SRIO Receive block should be awakened based on the incoming interrupt value. Select a value from the list. If your model contains more than one SRIO receive block, each receive block must use a different ID. IDs range from 0 to 15 with a default value of 0. SRIO Receive and SRIO Transmit blocks are paired together by this ID. Create and SRIO Transmit block with this ID to send the doorbell interrupt.

Read from remote device

Selecting this option tells the block to perform a burst read from the remote device at the address in Remote address. If you clear this option, you must select Accept doorbell interrupt from remote device.

Remote address (32-bit hex aligned to an 8-byte boundary

This address specifies where the data is being read from the remote device. The address you enter here should match the local address of the corresponding SRIO Transmit block.

This address should align to an 8-byte boundary in memory.

Show output port for local address pointer

When you select this parameter, the output port Ptr returns the pointer that you specify in Local address (32-bit hex aligned to an 8 byte boundary). Clearing this option removes the Ptr port from the block.

Local address (32-bit hex aligned to an 8 byte boundary

This address specifies the destination for the data to transfer. This address should match the remote address of the corresponding SRIO Transmit block. You will need it if the SRIO Transmit block performs burst-write operations.

Enable blocking mode

SRIO receive blocks can operate in either blocking or nonblocking modes.

  • Selecting this option puts the block in blocking mode and the block waits for a doorbell interrupt to come or timeout to occur before passing program control to downstream blocks or performing any read operations.

    • Clearing Enable blocking mode directs the block to poll the doorbell interrupt status register to determine whether the SRIO Transmit block sent a doorbell packet.

    • Sending the packet indicates that the transmitting block completed a data transfer to this block.

  • Clearing this option to put the block in nonblocking mode enables the Sample time option. In nonblocking mode, Simulink software uses the sample time to determine the polling period the block uses for polling the interrupt status register.

Enable blocking mode is not available when you clear Enable doorbell. Clearing Accept doorbell interrupt form remote device also disables this option because blocking mode refers to the doorbell interrupt process.

Sample time

Determines the polling period, in seconds, for the block in nonblocking mode. Enter the time period to wait between polls. To enable this option, clear Enable blocking mode and select Accept doorbell interrupt from remote device.

Timeout value

In blocking mode, this value determines how long the block waits for a doorbell interrupt before it sets the Stat output port to Timeout status. Enter a time in seconds (The value defaults to inf to block until the block receives a doorbell interrupt). The default time-out value is 1 second. Clearing either Enable blocking mode or Accept doorbell interrupt from remote device disables this option.

Data Properties Pane

Output data size

Use this to specify the amount of data in bytes to transfer. Enter either a scalar to define a vector of elements or a two-element array. For example, enter 256 to specify a vector of 256 elements. To specify a two-dimensional array of 512 elements, enter [256 2]. The block uses this value to determine the size of the Ptr port. If you select the Frame-based option, you must enter the vector, or scalar value, as an array. Thus the 256-element vector example entry becomes [256 1].

Output data type

Specify the data type used for the output. With this information, the block calculates the size of the data transfer in bytes using this value and the Output data size value.

Frame-based

When you select this option, the block treats the data as frame-based rather than sample-based. If you select Frame-based, you must enter your output data size as a two-element array. For example, to specify a vector that contains 256 elements, enter [256 1].

References

For more information about SRIO, refer to TMS320TCI648x Serial RapidIO User's Guide, Literature Number: SPRUE13. Texas Instruments Incorporated.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS