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 + 2 with a Bool register that is set each time rg_pc is updated or a request is made to imem32.
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.
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 + 2
with 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