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

fast_divide.vhdl: Optimize division #759

Merged
merged 2 commits into from Apr 30, 2024

Conversation

MJoergen
Copy link
Contributor

The average latency is reduced from 13 clock cycles to 8 clock cycles.

The reduction is achieved by performing the initial normalization in one clock cycle, rather than in five clock cycles. Furthermore, one additional clock cycle at end of calculation is removed (state "preoutput").

Michael Finn Jørgensen and others added 2 commits December 21, 2023 09:59
Benchamrking shows that average latency per division is reduced from 13
clock cycles to 8 clock cycles.
This may be a bug in Vivado. At least, the previous version worked fine
with the GHDL simulator.

I'm guessing Vivado has a problem with the "variable length" assignment.
The fix introduced here ensures that all 32 bits are assigned always.
@MJoergen
Copy link
Contributor Author

Interestingly, the utilization report says that the number of registers is reduced (from 241 to 180), but the number of LUTs is increased (from 648 to 670). Not a huge difference.

@lydon42 lydon42 merged commit 688585a into MEGA65:development Apr 30, 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.

None yet

2 participants