RX Buffer timestamp options
On RX CAN Frame the timestamp is taken at the time when the frame was succesfully transmitted (tran_valid signal). To allow possible usage for TT_CAN, we should extend the implementation with option to capture the timestamp on begining of the RX frame.
How to do it? Add configuration bit which will select the time when to capture the timestamp. At the start of the transmission additional register will capture the timestamp (do we need whole timestamp ??) No... What part do we need???
Lets. assume CAN baudrates of 10 kbits in both nominal and data (crazy I know). We assume highest possible clock frequency e.g. 1 GHz (even more crazy, but we need to assume some kind of worst-case analysis... ) This gives us 100 000 clock cycles per bit time. If we assume the longest CAN frame to be (1+11+2+18+3+4+512+21+3)1.2 bits, we approx. 670 bits. If the timestamp would be updated each clock cycle this gives us about 6710^6 ticks per frame. Thus we need to store mostly 26 bits out of 64.
The question is now what about the retransmission. Should the stored timestamp be captured again during retransmission ?? I assume no...
Then in the RX Buffer we would store 26 bits from the timestamp captured at SOF (be carefull about sof_skip stuff!!) the remaining bits will be stored directly from timestamp input.
Is this kind of implementation appropriate??