grantslape / CS3339-MIPS32

5 stage, pipelined MIPS32 processor in myHDL and Verilog
GNU General Public License v3.0
4 stars 0 forks source link

Byte Addressing vs. Word Addressing #39

Closed grantslape closed 6 years ago

grantslape commented 6 years ago

Typically in the MIPS architecture instruction memory and data memory come from the same general main memory. For the purposes of this pipeline however, the instruction memory and data memory buffers are separate.

This creates an issue with how we access instructions. We increment the PC by 4 each cycle in the pc_adder, but the next sequential instruction differs in address by 1.

I believe the fix here will be to take actual_index = incoming_instruction_address % 4 inside the instruction memory itself, since that module is what differs from the typical architecture.

This will involve updates to the following:

TitansMM commented 6 years ago

I made some changes to all four files that I think resolved the problem.

grantslape commented 6 years ago

I agree, Isaac and I solved this problem in #43

grantslape commented 6 years ago

Realized we had another issue that is resolved by #47