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

64-cycle Division in DefaultConfig? #1114

Closed
seldridge opened this issue Nov 17, 2017 · 2 comments
Closed

64-cycle Division in DefaultConfig? #1114

seldridge opened this issue Nov 17, 2017 · 2 comments

Comments

@seldridge
Copy link
Member

seldridge commented Nov 17, 2017

I was doing some benchmarking of different instructions and I was noticing that integer division takes a lot longer than integer multiplication (or floating point multiplication) when using DefaultConfig.

Unless I'm mistakenly understanding the configuration (or am missing where a parameter gets overriden), I think that the default divUnroll value of 1 is going to cause default builds of Rocket Chip to have a 64-cycle divider, i.e., this counter has to count to 64.

Is this intentional, should the default config's divUnroll be changed to 8 (like mulUnroll), or am I mistaken in what's going on?

@terpstra
Copy link
Contributor

You understood it correctly. Bumping divUnroll too high will negatively impact your frequency. Div is a slow instruction on all micro-architectures; it's just especially slow on rocket.

@seldridge
Copy link
Member Author

Thanks @terpstra.

Current value of divUnroll is correctly set at 1. If a user wants something else, then that should be defined in their own configuration (and potentially impacting achievable frequency).

As all of this is intended, I'll close this.

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

No branches or pull requests

2 participants