Lecture 08 - NEED TO FINISH Flashcards

1
Q

Is MIPS a RISC or CISC ISA?

A

MIPS is a RISC iSA.

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

How many general purpose registers does MIPS 1 have?

A

32.

These are labeled r0-r31

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

How many floating point registers does MIPS 1 have?

A

32

Each are 32 bit.

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

How does MIPS 1 achieve double precision with floating point operations?

A

By using two single precision registers (one even and one odd).

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

Can MIPS do operations on memory without first storing the values in registers?

A

No.

MIPS is a load-store architecture. We can only use memory to load registers from memory and store registers to memory.

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

How many arguments do the following MIPS operations take?

add, sub, and, or

A

3.

Even floating point addition/subtraction have three arguments.

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

How many instruction formats does MIPS have?

What are they?

A

3:
R-type
I-type
J-type

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

What does an R-type MIPS instruction act on?

A

Registers

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

What is a J-type MIPS instruction used for?

A

Jumps

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

GO BACK THROUGH THE LAST SLIDE ON MIPS - IMMEDIATE AND INDEX MODE

A

GO DO IT NOW

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

What are the five stages of the MIPS fetch-execute cycle?

A
IF - Instruction Fetch
ID - Instruction Decode
EX - Execute (Do arithmetic etc.)
MEM - Access memory if needed
WB - Write back data to registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How many stages is the MIPS pipeline?

A

MIPS has a 5-stage pipeline

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

Why can the fetch-execute cycle not be done in parallel for a single instruction?

A

Because each stage depends on the output of the last one.

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

Give three types of hazards that can cause a pipeline stall

A
  • Structural Hazards
  • Control Hazards
  • Data Hazards
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a structural hazard?

A

When two tasks can’t be completed because they both depend on the same hardware.

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

What is a data hazard?

A

When the input of one instruction depends on the output of another one.

17
Q

What is a control hazard?

A

When a conditional branch changes which instructions should be executed.

18
Q

Duplicating execution units is a possible solution to which type of pipelining hazard?

A

Structural Hazards.

19
Q

Regarding Data Hazards and Pipelining, what is ‘Forwarding’?

A

When the ID hardware sets up a direct connection between ALU outputs and inputs so that the next instruction uses the correct value at the same time that it is written to the destination register.

20
Q

In regards to Pipelining, why would Forwarding be preferred to Stalling?

A

Stalling wastes clock cycles idling, which means that instructions take longer, whereas forwarding does not extend the time it takes any instruction to go through the pipeline.