Implement preamble check + strip
Closed this issue · 2 comments
Feature description
This component takes a PacketStream and checks if it contains the preamble and start frame delimiter and strips it. If it doesn't contain it the abort
signal should be assert on the packet. It's allowed to only validate the start frame delimiter and just assume the preamble is oke if that is easier to implement
Expected behaviour
If preamble and start frame delimiter is detected it removes it and passes through the stream. If not it asserts abort.
Expected steps
- Implement
- Test case valid preamble packet
- Test case invalid preamble
Additional Context
See https://en.wikipedia.org/wiki/Ethernet_frame for more information on the preamble.
Moving this to blocked, as we want to re-implement this using the generic depacketizer (see #25 ). Also I think it is okay if we do not assert abort in case the preamble doesn't match but instead just silently drop the packet, because the preamble is at the very beginning of the packet. No components after the preamble checker will have started processing the packet yet, so asserting abort seems meaningless to me.
Agreed! We probably only want to check if the SFD matches and not the entire preamble for efficiency.