Final Flashcards

study of final

1
Q

R Type datapath

A
  1. PC counter increments by 4
  2. instruction goes to read register 1 & 2, read data 1 & 2 is fed into ALU
  3. instruction goes to write register, ALU result goes to write data without going through data memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Load datapath

A
  1. PC counter increments by 4
  2. instruction foes to read register 1 and sign extender, read data 1 and sign extender output goes to ALU, ALU result foes to address of data memory
  3. instruction goes to write register, read data from data memory goes to write data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Store datapath

A
  1. PC counter increments by 4
  2. Instruction goes to read register 1, [4 0] read register 2, and sign extender, read data 1 and sign extender output goes to ALU
  3. ALU result goes to address and read data 2 goes to write data in data memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Brach datapath

A
  1. PC counter becomes the alu result of the top right ALU
  2. instruction goes to register 2 [4 0] and read data 2 goes to ALU
  3. PC counter goes to top right ALU, instruction goes to sign extender, sign extender output goes to shift left 2 which is fed into top right ALU, ALU zero is fed into AND gate which sets MUX to 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

LDUR instruction control bits

A

ALUOp: 00
Instruction operation: load register
Opcode field: xxxxxxxxxxx
Desired ALU action: add
ALU control input: 0010

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

STUR instruction control bits

A

ALUOp: 00
Instruction operation: store register
Opcode field: xxxxxxxxxxx
Desired ALU action: add
ALU control input: 0010

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

CBZ instruction control bits

A

ALUOp: 01
Instruction operation: compare and branch on zero
Opcode field: xxxxxxxxxxx
Desired ALU action: pass input b
ALU control input: 0111

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

R-Type instuction control bits ADD

A

ALUOp: 10
Instruction operation: ADD
Opcode field: 10001011000
Desired ALU action: add
ALU control input: 0010

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

R-Type instuction control bits SUB

A

ALUOp: 10
Instruction operation: SUB
Opcode field: 11001011000
Desired ALU action: subtract
ALU control input: 0110

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

R-Type instuction control bits AND

A

ALUOp: 10
Instruction operation: AND
Opcode field: 10001010000
Desired ALU action: and
ALU control input: 0000

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

R-Type instuction control bits ORR

A

ALUOp: 10
Instruction operation: ORR
Opcode field: 10101010000
Desired ALU action: or
ALU control input: 0001

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

ideal pipelined clock cycle =

A

unpipelined clock cycle / # of stages

actual pipelined clock cycle is limited to being as low as the longest individual operation

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

instruction fetch

A

the instruction is read from memory using the address in the PC and then is placed in the IF/ID pipeline register. Stage occurs before instruction is identified

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

instruction decode and register read

A

instruction in the IF/ID pipeline register supplies the register numbers for reading two registers and extends the sign of the 16-bit immediate. These three 32-bit values are all stored in the ID/EX pipelining register

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

execute and effective address calculation

A

the effective address is placed in the EX/MEM pipeline register

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

memory

A

the data is written to memory

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

Write back

A

data is written back to write data in ID

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

full pipeline progression

A

IM (instruction memory/fetch)
Reg (instruction decode and register read)
ALU (execute and effective address calculation)
DM (data memory)
Reg (write back)

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

data hazard

A

when an instruction calls for a register in a clock cycle before it has been assigned its value from the previous instruction

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

forwarding

A

when a data hazard can be avoided by “pushing forward” the value of a register from a step before its actually assigned but after its calculated

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

stalling/bubbling

A

when you have to stall before an instruction is run by running “no op” instructions that push back the assigning of a register until it is given its value by the previous instruction. Should be avoided when possible

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

relative performance vs pipeline depth

A

relative performance increases from 1 to 2 to 4 to 8 but then decreases from 8 to 16

23
Q

Memory hierarchy from fastest/smallest/priciest to slowest/biggest/cheapest

A

CPU => Cache (SRAM) => Main Memory (DRAM) => Disk

24
Q

direct mapped set associativity

A

a block can go in exactly one place in the upper level (1-way)

25
Q

set associative set associativity

A

each block can be placed in a fixed number of locations (n-way)

26
Q

fully associative set associativity

A

a block can be placed anywhere in the upper level (m-way) if m is the total number of blocks

27
Q

hit

A

data is present in cache

28
Q

miss

A

data is not present in the cache and must be fetched

29
Q

hit rate

A

the fraction of memory accesses that produce a hit in the cache (hit ratio)

30
Q

miss rate

A

(1 - hit rate) the fraction of the memory accesses that produce a miss in the cache

31
Q

miss penalty

A

time needed to bring data into the cache after a miss

32
Q

hit time

A

time needed to access data in the cache

33
Q

How many index bits are
there if you have a fully
set associative cache?

A

no bits!!!!!!!!

34
Q

cache size will be for

A

total volume

35
Q

compulsory misses

A

cache misses caused by the first access to a block that has never been in a cache. also called cold-start misses

36
Q

capacity misses

A

cache misses caused when the cache cannot contain all the blocks needed during execution of a program. Occur when blocks are replaced an then later retrieved

37
Q

conflict misses

A

cache misses that occur in set-associative or direct-mapped caches when multiple blocks compete for the same set. conflict misses are those misses in a direct-mapped or set associative cache that are eliminated in a fully associative cache of the same size. also called collision misses

38
Q

bits needed for set associative cache

A

(2 ^ n) * [1 + (64 - n - 2) + 32] bits

39
Q

bits needed for fully associative cache

A

(2 ^ n) * [1 + (64 - n - m - 2) + (2 ^ m) * 32] bits

40
Q

random replacement policy

A

candidate blocks are selected randomly

41
Q

LRU replacement policy

A

the block replaced is the one that has been unused for the longest time

42
Q

validity bit

A

yes (1) if valid, which just means there is content in the cache. set to no (0) on machine startup

43
Q

SRAM semiconductor memory specs

A

typical access time: 0.5 - 2.5 ns
price per GiB: $500 - $1000

44
Q

DRAM semiconductor memory specs

A

typical access time: 50 - 70 ns
price: $10 - $20

45
Q

Flash semiconductor memory specs

A

typical access time: 5,000 - 50,000 ns
price per GiB: $0.75 - $1.00

46
Q

Magnetic disk

A

typical access time: 5,000,000 ns - 20,000,000 ns
price per GiB: $0.05 - $0.10

47
Q

Page size

A

4kByte - 16kByte

48
Q

Page table

A
  • resides in memory
  • indexed with the page numbers from the virtual address
  • contains the corresponding physical page numbers
49
Q

Page Fault

A

The page does not reside in main memory, there is a very high cost for a page fault. basically a miss for virtual memory

Write through is not allowed (use write back)
LRU is adopted
Fully associative is used

50
Q

meaning of valid bit in page table

A

if on, it means that the page table supplies the physical page number (its in the physical memory)
if off, it means that the page currently resides only on disk at a specific address (its in the disk storage)

51
Q

physical address

A

an address in main memory

52
Q

virtual address

A

an address that corresponds to a location in virtual space and is translated by address mapping to a physical address when memory is accessed

53
Q

address translation

A

also called address mapping, this process is by which a virtual address is mapped to an address used to access memory