Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac/crc.py: optimize CRC validation #157

Closed
wants to merge 1 commit into from

Conversation

rowanG077
Copy link
Contributor

@rowanG077 rowanG077 commented Mar 21, 2024

This is a WIP!! Do not merge yet. I need to validate it first.

The idea here is that we can pre-calculate different residues for a zero padded stream. We can just throw the full width into the full width engine, while making sure we set invalid bytes to 0 and then compare with the appropriate check value. This saves us from having to instantiate multiple crc engines on the receive path, which is nice since they are relatively expensive.

I did not do hardware tests yet. I will post resource usage differences later once I have validated it works

@rowanG077 rowanG077 changed the title mac/crc.py: Implement optimized CRC checker mac/crc.py: optimize CRC validation Mar 21, 2024
@rowanG077
Copy link
Contributor Author

rowanG077 commented Mar 27, 2024

By default this is not actually more efficient on yosys. This is due to YosysHQ/yosys#4293 closing because if it does not provide the benefit by default it might as well not be done.

@rowanG077 rowanG077 closed this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant