Comments (1)
From the designer:
Part 1: “I see that when num_valids[3:0] ≤ 4'h2, you just shift the GHR left without retaining the MSBs”
This is only true for small BHTs that don’t have more bits in the GHR. The code shows this in the conditional:
assign merged_ghr[`RV_BHT_GHR_RANGE] = ( ({`RV_BHT_GHR_SIZE{num_valids[3:0] >= 4'h4}} & {`RV_BHT_GHR_PAD, final_h }) | // 000H
({`RV_BHT_GHR_SIZE{num_valids[3:0] == 4'h3}} & {`RV_BHT_GHR_PAD2, final_h}) | // P00H
`ifdef RV_BHT_GHR_SIZE_2
({`RV_BHT_GHR_SIZE{num_valids[3:0] == 4'h2}} & { 1'b0, final_h}) | // PP0H
`else
({`RV_BHT_GHR_SIZE{num_valids[3:0] == 4'h2}} & {fghr[`RV_BHT_GHR_SIZE-3:0], 1'b0, final_h}) | // PP0H
`endif
({`RV_BHT_GHR_SIZE{num_valids[3:0] == 4'h1}} & {fghr[`RV_BHT_GHR_SIZE-2:0], final_h}) | // PPPH
({`RV_BHT_GHR_SIZE{num_valids[3:0] == 4'h0}} & {fghr[`RV_BHT_GHR_RANGE]}) ); // PPPP
Also, for num_valids < 2, we clearly have the fghr upper bits.
Part 2: “But when num_valids[3:0] ≥ 4'h3, you choose to retain the MSBs of GHR, rather than just to shift it left like before”
This is better for our benchmarks and comes down to the accuracy of the predictor when there are many valid branches in the fetch group. If you would prefer to do a full shift, you can modify the RV_BHT_GHR_PAD(2) defines.
(The likelihood of predicting 3 or more branches correctly is low (.85^3), so we preserve the upper bits. In practice it doesn’t really matter since we copy the EXU true GHR when we mispredict.)
Hope this helps.
from cores-veer-eh1.
Related Issues (20)
- fpga_optimize cannot be set to 0 in swerv_config HOT 1
- openocd timeout occurs when trying to load elf file using command 'load_image'. HOT 7
- Try running multi thread program on swerv EH1 core HOT 2
- CoreMark test score HOT 2
- Unable to replicate performance improvement achieved by using different target values HOT 1
- Usage scenarios of different DFFs
- Fusesoc's sim target is deprecated HOT 10
- Question about pipeline FF enable signals
- facing issues when C code size goes beyond 8KB HOT 1
- Coremark for new extension
- Repo renaming HOT 2
- Blocking Loads/DMA disable
- OpenOCD download to ICCM/DCCM failed. HOT 1
- The new feature of verilator stops building procession HOT 2
- coremark/dhrystone testing can't get 4.9 CM/MHz with rtl simulation or in FPGA
- Not generate waveform when using vcs to test Hello World. HOT 2
- Instruction after pmpaddr0 csr write was not executed HOT 7
- Has the maintenance of this repository been stopped?
- slip in dec_decode_ctrl
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cores-veer-eh1.