I don't fully understand how to modify the datapaths/control signals to account for instructions. I have to make the single-cycle datapath able to do the instructions:
jr
lui
addi
bne

I've been starting at this thing for an hour or so and haven't made much progress. With the jr instruction, I realize that the rs register contains the jump address. From there I don't really have any idea on where to start. Once I see a couple of these instructions I can probably figure out the rest.

I've attached a picture of the datapath that needs the modding.

Edit: For lui, I've realized I will need to shift left 16 after the sign extend, to get the bits in the upper 16. This is basicaly my only progress.

Look at the "branch" bit coming out of the control bubble, and how that affects the MUX in the top right corner of the diagram.

if we want to branch to instructution whose address comes first and then comes the instruction which is in pc... how branch will be done??? will it right shift..???

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.