Add m extension control and hazard - #261
Conversation
DanielTaoHuang123
left a comment
There was a problem hiding this comment.
connect is_div and is_mul to the feature flags; everything else seems OK
DanielTaoHuang123
left a comment
There was a problem hiding this comment.
pretty good overall; fix the two commented lines and resolve conflict and I think it will be good to merge
| UTOSS_RISCV_CONFIG ?= RV32I | ||
| UTOSS_RISCV_ENABLE_MUL ?= $(if $(findstring M,$(UTOSS_RISCV_CONFIG)),1,0) | ||
| UTOSS_RISCV_ENABLE_DIV ?= $(if $(findstring M,$(UTOSS_RISCV_CONFIG)),1,0) | ||
| UTOSS_RISCV_ENABLE_M := $(if $(filter 1,$(UTOSS_RISCV_ENABLE_MUL) $(UTOSS_RISCV_ENABLE_DIV)),1,0) |
There was a problem hiding this comment.
probably want to change this logic from OR to AND, since when running RV32M riscof test both mul and div are tested; if only one of them is enabled the other reports error
a05fa74 to
22fc75f
Compare
|
I fixed the two comments and rebased but we probably need to wait for the decoder and mul/div unit to be done before merging. |
84019a1 to
a756124
Compare
a756124 to
983317c
Compare
🔧 DE1-SoC Synthesis Report Summary Diff
Comparing synthesis results from main branch vs. this PR |
Close #245
Updated hazard unit to allow for DIV
Updated execute to select the MUL or DIV module instead of the ALU when needed
Added mul and div instructions to the interface between decode and execute
Note that I didn't actually use div_cancel since it wasn't in the diagram in the planning doc. Also, it seems unnececssary after thinking about it a little? Since a branch instruction should never be in ex at the same time as a div.
I also assumed that the modules would look like the diagrams, and I might've accidentally done some of the integration work as well since I didn't really know how to separate it