Skip to content

Commit 9e9522c

Browse files
committed
RTL: fixed issue with memory access alignment
1 parent 9d66a9e commit 9e9522c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FemtoRV/RTL/PROCESSOR/femtorv32_quark.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ module FemtoRV32 #(
237237
// 32 bits, so we deactivate width test for mem_addr and writeBackData
238238

239239
assign mem_addr = state[WAIT_INSTR_bit] | state[FETCH_INSTR_bit] ?
240-
PC : loadstore_addr ;
240+
PC : {loadstore_addr[ADDR_WIDTH-1:2], 2'b00} ;
241241

242242
/***************************************************************************/
243243
// The value written back to the register file.

0 commit comments

Comments
 (0)