Me too, actually. GIven the nearly-identical behaviour with both receivers, I think the OPC UART is likely fine.
I also sent the data very slowly into the loader, flushing the output each time and delaying. Same result, so it's not an inter-byte timing problem...
There is a slight chance that my CPU misses bits on an lshift, which is really ADD TOS,TOS, or OR? but very rarely? And always in the same place? Seems unlikely.
Now, I do get different bits missing when I change the UART-RX timing constants, so that is relevant. And it's seems to be the same exact locations that are affected during the load.
Code:
00178:3FFFF 0010C 3FFFF 0010C 3FFEF 0010C 3FFFF 0010C
00180:3FFFF 0010C 3FFFF 0010C 3FFFF 0010C 3FFFF 0010C
00188:3FFFF 0010C 3FFFF 0010C 33FFF 0010C 3FFFF 0010C <----33FFF ???
00190:3FFFF 0010C 3FFFF 0010C 3FFFF 0010C 3FFFF 0010C
00198:3FFFF 0010C 3FFFF 0010C 3FFFF 0010C 3FFFF 0010C
It's always at $18C, dropping 2 bits in this configuration. Moving the base of the loaded code a couple of bytes does not change the position of the error, so it is not likely to be the loader screwing up the load. I am pretty sure it gets that from the UART...
Here is another vector, with $7F0C interleaved, with a slightly different result
Code:
00180:3FFFF 07F0C 3FFFF 07F0C 3FFFF 07F0C 3FFFF 07F0C
00188:3FFFF 07F0C 3FFFF 07F0C 17FFF 07F0C 3FFFF 07F0C
00190:3FFFF 07F0C 3FFFF 07F0C 3FFFF 07F0C 3FFFF 07F0C
It does look like some kind of a shifting issue, doesn't it? Unfortunately both the UART and the CPU shift data.
Could the BRAMs be flaky? Memory is synthesized as 9 2-bit BRAMS, so it seems possible that two bits would be affected (yeah, but two different bits?). Data is from TOS, so it's registered and stable, but the address is coming out of the ALU_B combinational logic. It should settle early and not really be an issue, but it is possible that one of the BRAMs is getting a bad address on write under some conditions I cannot fathom.
I am going to try to construct a test with individual bytes from the UART instead of relying on the loader...