mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-22 05:07:21 -04:00
Fix branch prediction for compressed instruction with unaligned addresses (#756)
Signed-off-by: Gianmarco Ottavi <gianmarco@openhwgroup.org> Co-authored-by: Gianmarco Ottavi <gianmarco@openhwgroup.org>
This commit is contained in:
parent
56165adc82
commit
010eed815b
1 changed files with 2 additions and 2 deletions
|
@ -123,8 +123,8 @@ module frontend import ariane_pkg::*; #(
|
|||
// select the right branch prediction result
|
||||
// in case we are serving an unaligned instruction in instr[0] we need to take
|
||||
// the prediction we saved from the previous fetch
|
||||
assign bht_prediction_shifted[0] = (serving_unaligned) ? bht_q : bht_prediction[0];
|
||||
assign btb_prediction_shifted[0] = (serving_unaligned) ? btb_q : btb_prediction[0];
|
||||
assign bht_prediction_shifted[0] = (serving_unaligned) ? bht_q : bht_prediction[addr[0][1]];
|
||||
assign btb_prediction_shifted[0] = (serving_unaligned) ? btb_q : btb_prediction[addr[0][1]];
|
||||
// for all other predictions we can use the generated address to index
|
||||
// into the branch prediction data structures
|
||||
for (genvar i = 1; i < INSTR_PER_FETCH; i++) begin : gen_prediction_address
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue