Block
Mask
Description
The OpFcn SPI Recv extracts data received by an SPI link.
At each calculation step, the block extracts data from the reception FIFO and places them on its output. The user selects the data size in bits.
If the reception FIFO received more data than the block can produce(determined by the width of the data output), the extraneous data is removed from the FIFO to prevent accumulation.
Parameters
ControllerName | Each functionality block such as the OpFcnSPIRecv block must refer to an SPI controller block that will manage the data transfer with the bitstream generated with SPI. The binding betweenOpFcn and OpCtrl blocks is performed via the use of the Controller name that each OpCtrl block uniquely defines. This binding is checked during the initialization phase of the model. If no OpCtrl block is found that defines the same Controller Name as this OpFcnSPIRecv block, the OpFcnSPIRecv block is simply disabled and returns0s. |
---|---|
Function Number | Currently unused. |
Data size | Specifies the size in bits of the received data. Must be an integer ranging from 1 to 32. |
Maximum message count | Specifies the maximum number of messages to extract from the SPI reception FIFO at each calculation step. This value will determine the width of the Rx Data output. |
Inputs
This block has no inputs.
Outputs
Rx FIFO level | Produces the FIFO level before extraction of data by the current instance of the block. |
---|---|
Rx Count | Number of data units produced on the data outport. Possible values range from 0 to Maximum message count. |
Rx Data | Data extracted from the board. The width of this output is determined by the Maximum data count parameter. Each signal corresponds a value to Data size bits converted back into a floating point numerical value. |
Status | A non zero value is produced if an error occurred.The most likely errors are FIFO overruns (can be monitored with the Rx FIFO level output). When such an error occurs, FIFO content is cleared. |
Characteristics and Limitations
This block has no special characteristics.
Direct Feedthrough | No |
---|---|
Discrete sample time | Yes |
XHP support | Yes |
Work offline | No |