CPU Design Items Flashcards

1
Q

What is logic gate

A

In MIPS, logic gates like AND, OR, and XOR are implemented using bitwise instructions (and, or, xor, nor) that directly manipulate individual bits in registers, enabling efficient hardware-level logical operations.

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

What is a register?

A

32 bits

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

Register File

A

a collection of registers in which any register can be read or written by specifying the number of the register in the file.
Input:To write a data word, we will need two inputs: one to specify the register number to be written and one to supply the data to be written into the register.
Output:the contents of whatever register numbers are on the Read register inputs.
File consists of 32 general purpose resisters each 32 bits.

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

Multuplexor

A

selects from among several inputs based on the setting of its control lines. The control lines are set based primarily on information taken from the instruction being executed.

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

What is an adder?

A

increments the PC to the address of the next instruction
To execute any instruction we start by fetching it from memory. To prepare for the next instruction, we must also increment the program counter so that it points at the next instruction, 4 bytes later.

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

What is an ALU? What inputs and outputs does a MIPS ALU have?

A

hardware that performs addition, subtraction, and usually logical operations such as AND and OR
Input A: Contents of $t1.
Input B: Contents of $t2.
ALU Control Signal: 0010 (Add operation).
Outputs:

Result: The sum of $t1 and $t2, written to $t0.
Zero Flag: 0 (non-zero result).`

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

What is datapath?

A

A datapath is the hardware subsystem within a processor responsible for carrying out all the computational operations. It connects and coordinates the flow of data between various components,

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

What is Control circuitry?

A

has the instruction as an input, used to determine how to set the control lines for the functional units and two of the multiplexors.

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

Single Cycle

A

In a single-cycle CPU, every instruction is executed in a single clock cycle. This means that all operations—fetching the instruction, decoding it, executing the operation, accessing memory, and writing back results—must be completed within one clock cycle.

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

Multi Cycle CPU

A

multi-cycle CPU, instructions are divided into multiple stages, and each stage is completed in one clock cycle. The processor reuses functional units (e.g., ALU, memory) across different stages, and each instruction may take several clock cycles to execute

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

Pipelining

A

Pipelining in a CPU is a technique where multiple instructions are overlapped during execution by dividing the instruction execution process into discrete stages. Each stage is handled by a dedicated hardware unit, and different stages of different instructions are executed simultaneously. the total execution time for multiple instructions is reduced.

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

data hazard

A

If an instruction needs data that is not yet available because a previous instruction has not completed, the pipeline might stall.

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

Data Forwarding

A

Data Forwarding (or bypassing) is a hardware technique used to resolve RAW hazards by passing the data directly from one pipeline stage to another without waiting for the instruction to complete. Only works sometimes
add $t0, $t1, $t2 # EX stage calculates $t0
sub $t3, $t0, $t4 # EX stage cannot proceed until $t0 is written. Would not work for lw.

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

Control Hazard

A

A control hazard occurs in a pipelined CPU when the processor encounters a branch instruction (e.g., beq, bne) and does not know which instruction to fetch next. This happens because the decision to branch depends on the outcome of a comparison,

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

Control Hazard occurs

A

beq $t0, $t1, label # Should we branch to “label” or continue sequentially?

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

Branch Prediction

A

is a technique used to reduce the performance penalty of control hazards by guessing the outcome of a branch instruction. If the prediction is correct, the pipeline proceeds without stalling.