mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-23 05:37:16 -04:00
🐛 Fix accidently taken misaligned exception
This commit is contained in:
parent
cba2c9769d
commit
6a2aa65914
2 changed files with 4 additions and 4 deletions
|
@ -36,7 +36,7 @@ module instr_realigner (
|
|||
// Registers
|
||||
// ----------
|
||||
// the last instruction was unaligned
|
||||
logic unaligned_n, unaligned_q;
|
||||
logic unaligned_n, unaligned_q;
|
||||
// save the unaligned part of the instruction to this ff
|
||||
logic [15:0] unaligned_instr_n, unaligned_instr_q;
|
||||
// the previous instruction was compressed
|
||||
|
|
|
@ -393,8 +393,8 @@ module lsu #(
|
|||
|
||||
data_misaligned = 1'b0;
|
||||
|
||||
if(lsu_valid_i) begin
|
||||
case (operator_i)
|
||||
if(lsu_ctrl.valid) begin
|
||||
case (lsu_ctrl.operator)
|
||||
// double word
|
||||
LD, SD: begin
|
||||
if (lsu_ctrl.vaddr[2:0] != 3'b000)
|
||||
|
@ -408,7 +408,7 @@ module lsu #(
|
|||
|
||||
// half word
|
||||
LH, LHU, SH: begin
|
||||
if (vaddr_i[0] != 1'b0)
|
||||
if (lsu_ctrl.vaddr[0] != 1'b0)
|
||||
data_misaligned = 1'b1;
|
||||
end
|
||||
// byte -> is always aligned
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue