DOC PREVIEW
U of I CS 232 - Single-cycle data paths

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS232 Section 5: Single-cycle datapaths1 Single-cycle datapath controlWe’ll first review single-cycle datapaths by computing the control signals for two instructions, lw (whichwas covered in lecture and should be review), and a hypothetical new instruction lwd:lw $rt, offset($rs) sets R[$rt] = Mem[R[$rs] + offset].lwd $rd, $rs, $rt sets R[$rd] = Mem[R[$rs] + R[$rt]].Convince yourself that the datapath does not need to be changed and compute the control signalsnecessary for these two instructions. Recall that bits 31–26 of an R-type instruction form the opcode,bits 25–21 form the rs register, bits 20–16 form the rt register and bits 15–11 form the rd register.inst PCSrc ALUSrc ALUOp MemWrite MemRead MemToReg RegDst RegWritelwlwdRefer to the datapath below.2 Single-cycle datapath modificationsUsing the above datapath, we’ll present an example of how to extend a datapath to support additionalinstructions. We’ll demonstrate the extensions necessary to support the jump-and-link jal instruction.Recall that jal is a J-type instruction that performs two operations:R[31] = PC + 4PC = (PC & 0xf0000000) | (target << 2) # the 26-bit target specifies bits [27:2] of new PC# $ra is register 31You are encouraged to use the datapath above to take notes on the jal modifications.1CS232 Section 5: Single-cycle datapaths1. Extend the datapath shown below to support the jr instruction. This is an R-type instruction,and the new PC value should be the value in register rs.2. Extend the datapath shown below to support load upper immediate lui. Recall that lui is anI-type instruction that performs the following operation:R[$rt] = imm << 16Assume that the ALU does not support shifts and insert a special-purpose shift unit (which isreally just wires) for this operation.2CS232 Section 5: Single-cycle


View Full Document

U of I CS 232 - Single-cycle data paths

Documents in this Course
Goal

Goal

2 pages

Exam 1

Exam 1

5 pages

Exam 1

Exam 1

6 pages

Exam 2

Exam 2

6 pages

Exam 1

Exam 1

5 pages

Load more
Download Single-cycle data paths
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Single-cycle data paths and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Single-cycle data paths 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?