Optimise some adders in CPU_Fetch_C #29
Open
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 pull request has two commits to reduce the number of adders in CPU_Fetch_C and reduce the area footprint of the design.
There is one change that replaces addr_of_b32 with imem32.pc when they are equal - I would expect either the Bluespec compiler to see this optimisation or the synthesis tool to optimise it away but it looks like neither of these things happen and the design ends up using an extra adder for no reason.
The other change replaces the check for
imem32.pc == rg_pc + 2with a Bool register that is set each time rg_pc is updated or a request is made toimem32.There are comments in the code that explain my reasoning for this.
I'm not sure if these comments should remain in the final design or not.
Let me know what you think.
Thanks,
Ivan