Quick Jump Menu
Info Ask a Question
Advanced Search Search the Knowledgebase
Try to evaluate your needs in memory buffering
Reference Number: AA-00522 Created: 2011-08-08 14:49

<Previous question: Do you need extra output lines (GPO / digital pattern generator) ?


What is the 'memory buffer' of a SPI Adapter?

The memory buffer of a SPI Adapter is the memory that is embedded onto the SPI Adapter hardware to temporarily store the data generated on its output ports and the data sampled from its inputs.
It can also be used to temporarily store commands and controls that must be synchronized with the IN/OUT data of the SPI Adapter.

Such buffer is often organized as FIFO, as accessing a serial port requires organized sequences of accesses.

Why is the SPI Adapter 'memory buffer' important?

Data generated with the SPI Adapter starts from the control PC, flow through the connection between the SPI Adapter and the PC (typically, a USB connection), is processed by the SPI Adapter and ultimately appears on its output pins encapsulated in the chosen serial protocol.

Data flow goes the other way round if data is sampled from the SPI Adapter inputs: ultimately, it flow on the connection with the PC until it is stored in the PC memory, where the user can visualize and analyze it.

With full-duplex protocols, the 2 above processes run in parallel.

SPI Adapter buffering

- At the serial interface, the data rate is defined and 'real time': if a SCLK frequency of - say 50 MHz - is defined, one data sample MUST be generated / sampled each 20 nanosecond.
- On the other side, data flow between the PC and the SPI Host Adapter (in our example, through the USB connection) is essentially software - defined, from a non-real-time OS.
In other words, the data won't transit on the USB connection at a constant rate: the USB connection is managed by the PC processor and depends on the 'OS life time', its interrupts, and so on.

Without memory buffer in the SPI Host Adapter, it is impossible to guarantee that the PC will be able to supply the serial data at a sufficient rate.
In such a case,  the SPI Host Adapter will not be able to process large transfer and will have to add a latency between the serial accesses on the serial interface.

Similarly, if the sampling rate at the serial interface is high enough to create a bottleneck at the USB connection, the SPI Adapter operations will suffer from regular 'overflows', during which the device will not be able to sample data.

Don't all SPI Adapters have a memory buffer?

This must be carefully checked when selecting a device. Some SPI Adapters on the market mention theoretical maximum performances, just mentioning the maximum speed on the serial interface, and explaining that actual performance really depend on the PC speed. With such adapters, you might be able to run single-byte accesses (like standard SPI specifies). However, larger accesses (hundreds of bytes) will not be possible, and you'll have to manage a kind of 'rearm latency' of hundreds of microseconds - if not milliseconds - between the accesses.

What about Byte Paradigm's SPI Host Adapters?

SPI Xpress logohas got a total memory of 16 kB, split into 1/2 down and 1/2 up.
SPI Storm

has got a total memory of 32 MB, split into 1/3 down for the serial port, 1/3 up for the serial port and 1/3 for the side GPO port.



<Previous question: Do you need extra output lines (GPO / digital pattern generator) ?