Reply To: SpaceWire VC
Thanks for the info! I am planning on making one VC that encapsulates both tx and rx, but takes two transaction interfaces so that you can send and receive independently. Similar to how you mentioned in your first paragraph.
Due to how much the tx and rx need to talk to each other with regards to flow control and intialization, I am thinking of setting up the SpaceWire VC to use the rx and tx fifo that comes with the protocol to interface with the transaction records.
For example, a send command would write the data into the tx fifo, which would then alert the VC that data is ready to be transmitted. The VC would then initalize the link (if not yet initialized) and interleave the data in the tx fifo with the flow control tokens and time codes as necessary. If the tx fifo is empty and the link is connected, then it would simply send null characters until either the link is disconnected or there is data in the tx fifo.
A get command would poll the rx fifo to see if the SpaceWire has received data. The VC internals would take care of managing the flow control tokens being sent out. The SpaceWire VC would continue to receive data until it has run out of flow control tokens and would only allow more data to be read in as you pull it out the other end of the fifo using the get commands (essentially replenishing the flow control token count).
You don’t necessarily have to comment on this, unless you see an obvious error! I am mostly thinking aloud.