laforest / Octavo

Verilog FPGA Parts Library. Old Octavo soft-CPU project.

Home Page:http://fpgacpu.ca/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

D write operand may cross over A/B boundaries due to programmed offsets

laforest opened this issue · comments

When accessing an indirect memory location in A (for example), the same address is sent to B, via the Address Splitter, which has the same indirect memory locations but with different configuration. The indirect offset is added to the D operand before being sent to the A/B memories. Thus, an indirect access on DA will also happen on DB, and it's possible the DA address gets added an offset that places it in the DB address space, which will then be accepted by the B memory, in error.

Also, this accidental DB indirect access could post-increment the offset, corrupting its state.

Actions:

  • check that roll-over is correct: if DA+offset > last DA address, is the resulting address sent to A still inside the DA adress space.
  • move address DA/DB decoding from Data Memory back to Address Module to avoid accidental post-increments, and caclculate signal to disable DA/DB writes before applying the offset.
  • Do all this after #60 is resolved, so we can trigger the bug and test the bugfix.