TXT Buffer prioritization
It might be more beneficial to create a priority between two buffers instead of comparing the timestamp values between the two frames! This will additionally save some logic.
The aim of this task is following:
- Create buffer priority in the user registers for each TXT Buffer. All the priority values will be in 1 register to be updated at the same time.
- TX Arbitrator will always pick a frame from higher priority buffer (assuming it is allowed for transmission and it is not empty). This can be decoded combinationally at one clock cycle and it should consume small amount of logic (small lengths of priority registers).
- If the core is free, the actual selected buffer will be stored (the same as message source in the actual implementation of TX Arbitrator), and kept until the transmission will finish.
- The core will propagate the frame to be transmitted from highest priority buffer once its timestamp value is higher than then timestamp of that actual frame.
Problems: A) What should we do once we have the same priorities set on the buffers?? Possible solution: Use fixed order. E.g. First buffer has higher prority, Second will have the second highest, etc.
B) What to do about a situation when lower timestamp frame (should be transmitted sooner) will be present in the buffer with lower priority? Thus the frame with lower timestamp will be actually transmitted LATER because of the priority! Should we leave this to responsible user/driver designer? Or should we implement some kind of circuit which will detect these conditions and signal them? I assume no, I assume that the buffer priority should be the primary way how ot decide between the buffers and the timestamp only secondary!