troy99xx
Newbie level 6
If the interface is sending FFs after the sync pattern until it actually has the message data, then the sync pattern will show up again. So now while you've already detected the sync pattern and have been "guaranteed that the next data msg detected is the first byte of that of the data packet" you've also just received another sync pattern which seems to have shot that guarantee you mentioned all to shreds. Sounds like either you're not describing the protocol correctly, or it is a protocol that needs some more thought put into it.
You're right, the protocol is to send the sync after so many data packets. Otherwise, if no data packets, 0xFFFF_FFFF is sent.
- - - Updated - - -
Kevin, I think you are over analyzing this. I get the impression the 0xFFFF_FFFF is the sync pattern being searched for, once found the input logic starts looking for the start of data which starts at the first byte (32-bit aligned) that is not 0xFF. I'm assuming there is either some header or a constant length that is used for the packet payload that is sent. The input logic will therefore work similarly to the synchronization of a Ethernet link where it synchronizes to the preamble but doesn't care if the payload has the preamble sequence embedded in it.
The sync is 0x7FFF_FFFF (bit 31 should be zero)
Once the data packet is detected, the numbers of bytes to follow is known for that source (type) .
My difficulty is basically that the sync pattern or data packets are not aligned to the 32-bit data bus where the start of either one can start on any bit position of the parallel bus (and it can divided between the previous and present word).