When we are in the established state, then any time TX is trying to send (i.e. we see tvalid from the SAF), then txctrl should start generating the packet.
So we can get data from RAM to the the network processor, but we really need the length of the packet. We can either get this from the DMA, or from the SAF. I would rather get it from the SAF because then we can reuse the same SAF for the RX side when we do not know the length of the packet.
hmm not really, what it does is that it keeps a copy of the old write pointer, and if the frame is bad it will put the write pointer back to where it was, thus deleting that bad packet.
We could add something in the end where it commit the write to write the length to another fifo, then we could store it alongside?
Or, as practice, we can try making our own FIFO from scratch.
We have that FIFO wrapper but maybe it is good practice.