2506 Midterm Review Flashcards

(57 cards)

1
Q

format for R-type instruction

A

op rs rt rd shamt funct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

format for I-type load/store instruction

A

op rs rt 16-bit imm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

format for J-type branch instruction

A

op 26-bit imm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

rt register

A

2nd source register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

rs register

A

1st source register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

rd register

A

destination register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

load command specifies destination

A

first

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

store command specifies destination

A

last

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

beq

A

branch on equal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

bne

A

branch on not equal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

instructions that take 2 registers

A

addi
lw
beq

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

instructions that take only an immediate

A

j

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

instructions that take 3 registers

A

add, or

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how long are MIPS instructions

A

32 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

shamt

A

shift amount

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

for an I-type instruction, where is content written?

A

in $rt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

how is the appropriate address calculated from an I-type instruction?

A

the contents of $rs is fetched to the ALU and added to the immediate field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

how many bits is an opcode?

A

6 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what does a memory unit do?

A

store instructions and data values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what does a register do?

A

store instructions and data values within the processor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

what does an ALU do?

A

implement basic operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

what do multiplexors do?

A

allow selection among different choices for operands and data values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

what does a control unit do?

A

decode instructions and manage other elements during execution

24
Q

what does a sign extension unit do?

A

widen values from 16 to 32 bits

25
what does a shift unit do?
perform multiplication by a power of 2
26
What inputs does a memory unit take?
a 32 bit address that will be accessed | a 32 bit data value to be written to that address (when memwrite is on)
27
What is the output of a memory unit
32 bit value that was read from the given address
28
what are the 2 controls within a memory unit?
MemWrite MemRead Both contain a single bit and indicate whether or not the address should be written to or read from
29
where are registers organized in the MIPS architecture?
a register file
30
what are the register file inputs?
two 5 bit numbers specifying the two registers to be read from one 5 bit register number to be written to 32 bit data value to be written into the target register
31
what are the register file outputs?
two 32 bit data values that were read from the read registers
32
what is the control component of the register file?
RegWrite | 1 bit indicating whether the write register should be written to
33
what is the ALU input?
two 32 bit operands
34
what are the ALU outputs?
one 32 bit result computed | one 1 bit signal indicating whether the result was zero
35
what is the ALU control?
a multi bit signal selecting which of the supported operations the ALU will perform on the operands
36
what is the ALU control?
a multi bit signal selecting which of the supported operations the ALU will perform on the operands
37
Control unit input?
6 bit opcode
38
Control unit output?
currently unknown number of 1 bit signals to other elements
39
Control unit output?
currently unknown number of 1 bit signals to other elements
40
Why do we need 16-32 bit sign extenders?
hardware adders require their operands to be the same width so the immediate operand needs to be larger than 16 bits
41
Why do we need shifters?
We need to shift left 2 because when executing beq, the offset used to calculate the target address has to be multiplied by 4, equivalent to a left shift of 2
42
what does ALU do for each type of instruction?
R - report result of operation I - report address to be read from/written to J - report comparison of registers and branch target address
43
how is the address set for the next instruction fetch?
PC + 4 (for R/I type) OR branch target OR jump target
44
what does PC do?
store address of next instruction to be fetched, sends it to the interface for the instruction
45
Why does PC get incremented by 4?
to move on to the next instruction
46
where in the memory is rs?
25:21
47
where in the memory is rt?
20:16
48
where in the memory is rd?
15:11
49
where in the memory is op?
31:26
50
where in the memory is funct?
15:0
51
what does control do for R-format instructions?
tell ALU control to use the funct bits and sets RegWrite to 1
52
what does ALU control do for R-format instructions?
sets ALU to the correct operation
53
what does control do for load instructions?
tell ALU control to add operands and sets RegWrite to 1
54
Why do multiplexors exist in the MIPS architecture?
They prevent conflicts with the write location and the data sent to the ALU
55
RegDst
selects the write register number (rd for load or rt for R) dont care for store
56
ALUSrc
selects operand for ALU (either register 2's value for R type or extended immediate for load/store)
57
MemtoReg
selects write data for register file (either computed result from ALU for R or data read from address for load)