Monday, January 18, 2016

Modifying SAC Interface to use larger USB payload


I devised a way to minimize the scope of changes as I switch my basic USB transactional protocol from a 2 word based swap to a 12 word protocol (to give me 10 to 11 words of data payload). Many FSMs are interlocked together but originally based around the concept that word one is the command and device number while word two is the data. Thus, machines wait until the transaction gets to the point where data should be latched or output data should be set up to write over the link.

My idea was to add in the additional 10 words both incoming and outgoing, but make the FSMs which are synced with this wait for the last word to come in before they take action. They won't know that there are ten other words that arrived, they will only look at the first two words just as they did yesterday. If I can get this change working properly, with a corresponding set of changes to the Python code on the other side of the link, then I can take additional steps to exploit the larger packet.

In addition to the neutral change (hopefully) that allows existing functions to work believing that transactions are still two words each way, I built out the data to optimize both device polling and status polling, making use of the twelve word block to send all relevant data in a single transaction. What will be more complex is the logic to pack multiple words of cycle steal data transfer in one transaction, so that should wait until this first set of changes is debugged.

I went ahead and made the cycle steal changes too, This required logic changes in the Python code which in many places is structured around a one word at a time transfer. I need to pack up data 12 words at a time, while flushing incomplete blocks when necessary.

No comments:

Post a Comment