Data loss on port inputs or channel usage

New to XMOS and XCore? Get started here.
Posts: 1
Joined: Thu Oct 18, 2018 8:46 am

Data loss on port inputs or channel usage

Postby tdh10 » Thu Oct 18, 2018 8:49 am

I have two threads A and B with unidirectional data transfer A->B over a streaming channel.
Thread A is sampling a 32 bit buffered 4 bit port and sending the data to thread B.
Thread B receives the data, unzips after receiving every second word, checks for Start/End flags and stores data into an array if needed.
Another Thread C zips bytes and outputs data on a 4 bit port, feeding Thread A over a loopback.

On doing some testing, I realized that some of the values I sent have gone missing. On about 3 MHz clock frequency everything works well. Increasing the frequency will lead to data being lost (~50% loss at 10MHz).
With help of a logic analyzier I can confirm that Thread C is sending out data as intended, up to about 20MHz clock frequency.
User avatar
XCore Legend
Posts: 1325
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Wed Oct 24, 2018 1:23 pm

Hi. Could you please attempt the following appnote:

AN10129 Using zip/unzip to implement streaming interfaces on multibit ports ... rc1%29.pdf

and run on the simulator as-is and then alter the clock base to 25 Mhz which is reported in the source code to be "too fast". This comment could be due to the clock not framing properly for audio format. Curious to know if the simulation works @ 12.5 Mhz (should be ok) and what are the results if @ 25 Mhz?

Then consider to use the simulator for your project. Please post your results.

Who is online

Users browsing this forum: No registered users and 95 guests