Improve IPv4 checksum verification/generation#14
Draft
Conversation
Co-authored-by: Jasmijn Bookelmann <bookelmannjasmijn@gmail.com> Co-authored-by: Cato van Ojen <Baublesaurus@users.noreply.github.com> Co-authored-by: MatthijsMu <93450301+MatthijsMu@users.noreply.github.com> Co-authored-by: Jasper Laumen <96011116+JLaumen@users.noreply.github.com> Co-authored-by: Mart Koster <30956441+Akribes@users.noreply.github.com> Co-authored-by: Bryan Rinders <bryan__ajax@hotmail.com> Co-authored-by: Daan Weessies <daan.weessies@gmail.com> Co-authored-by: Rowan Goemans <goemansrowan@gmail.com>
It was only used to be able to test the ARP stack in hardware when we did not have IP yet.
Major documentation was missing for the ICMP module. Especially the fact that the checksum adjustment breaks for very specific (unlikely to happen in practice) input packets.
Mostly includes improvements in packet generation, and reuse of models and generators. Aside from that, most test files have also been formatted with fourmolu.
Now also recognizes packets of which some of the preamble is missing. The SFD is still required to be byte-aligned.
Also removed some superfluous constraints and made the timer of the ARP manager less granular. This caused the manual test to fail, because its domain is too slow. The manual test was not any better than a hardware test anyway, so I removed it. Once support for ReqResp tests arrives from clash-protocols, we can add a proper test.
See the discussion in #8 (comment) for more details. Co-authored-by: Rowan Goemans <goemansrowan@gmail.com>
19af672 to
fe1f4e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This draft PR improves IPv4 checksum verification and generation by pipelining it.
Doing this for
dataWidth4 was not very difficult. But doing it for genericdataWidthturned out to be way more complex than initially thought (thanks, IPv4). Therefore, I wanted to separate this issue from #8 to avoid cluttering things and blocking the main PR.TODO:
pipelinedFoldtoClash.Prelude.Signal.Delayed: Generalize delayedFold to arbitrary vectors clash-compiler#2804