-
Notifications
You must be signed in to change notification settings - Fork 10
Branch if equals implementation #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/fetch.sv
Outdated
| IDLE: pc_cur = pc_cur; | ||
| INCREMENT_PC: pc_cur = pc_cur + 32'h4; | ||
| JUMP_PC: pc_cur = pc_cur + saved_imm_reg; | ||
| default: pc_cur = 32'hxxxxxxxx; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note sure what our protocol is on handing there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should look into adding SVLint to our pipeline here -- https://github.com/dalance/svlint. I think it also has direct test editor support. I would really like us to have checks for exhaustive case statements especially as the codebase grows.
TheDeepestSpace
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've rewritten fetch module into an FSM since i think it better fits into the pipelined system as opposed to the initial implementation that was tageting single-cycle processor.
looks like i mixed up the meanings of pc_src in fetch_tb bench
320a62e to
4c55a7a
Compare
This PR contains the implementation of
beqinstruction. It is built off of the unconditional branching setup in #20 .This is a significant PR since it starts to integrate together our main modules:
InstructionDecode,ControlFSM,fetch, andALU.This is the first attempt at integration and only wires up the signals necessary for
beq.This is a pretty large PR, so I would not be opposed to breaking it up into smaller chunks, especially since there have been quite a bit of peripheral changes.
Notable changes aside from the integration in
top.v:ALUOpsignal as per the bookPCUpdateis set toTRUEunconditionallyPCSrcsignal to pick the next PC valueImmExtfrom Instruction Decode for consumption by the Fetch modulebeqcan be performed in one cycle