Using zip/unzip to implement streaming interfaces on multibit ports

Using zip/unzip to implement streaming interfaces on multibit ports

This application note shows how to implement a streaming interface like I2S using a buffered 4-bit port. Streaming interfaces are usually implemented using a buffered 1-bit port for best performance. The ability to use 4-bit ports to stream multiple independent 1-bit signals provides added flexibility when all the 1-bit ports are utilized.

xCORE-200 devices feature zip and unzip instructions, which facilitate the efficient use of multibit ports as multiple single bit ports.

This examples shows how to send and receive four 1-bit streams of data. However, instead of using four 1-bit ports, a single 4-bit port will be used, treating each pin of the port as if it were a 1-bit port.

The new zip and unzip instructions of xCORE-200 provide enough performance to enable four I2S interfaces at 192 kHz sampling rate over 4-bit ports.

Required tools and libraries

  • xTIMEcomposer Tools - Version 14.1.0

Required hardware

This application note is designed to run on any XMOS multicore microcontroller or the XMOS simulator.

Prerequisites

None