From 5e1357b2a3d8e771d337461d08bd86a0a75b95f4 Mon Sep 17 00:00:00 2001 From: relyt871 <104436315+relyt871@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:46:54 +0800 Subject: [PATCH 1/2] W8D1 notes --- W8D1/Arch W8D1 Notes - jtl.md | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 W8D1/Arch W8D1 Notes - jtl.md diff --git a/W8D1/Arch W8D1 Notes - jtl.md b/W8D1/Arch W8D1 Notes - jtl.md new file mode 100644 index 0000000..eb1c454 --- /dev/null +++ b/W8D1/Arch W8D1 Notes - jtl.md @@ -0,0 +1,49 @@ +# Arch W8D1 Notes + +## Cache Summary + +non-blocking cache + +hit under N miss (outstanding $\neq$ out-of-order) + +- use MSHR(miss status handling register) + +## Virtual Memory + +Virtual address mechanism: + +processor send virutal address $a$ + +translate to physical address $a'$ + +- success: visit main memory +- fail: fault / exception $\to$ search in virtual memory $\to$ send to main memory $\to$ retry translation + + + +Translation unit + +- section (large fixed size) +- segment (arbitrary size, complicated for programmer and compiler) + - fragment + - internal (allocated but not used) + - external (fragments that cannot be allocated) +- page (trade off) + - small fixed size + - reduce internal fragments + + + +Page + +virtual address = virtual page + offset + +physical address = physical page + offset + +vp $\to$ pp: page table(in physical memory, not accessible itself) + + + +Virtual addressing cache + +query cache (use va) before translation \ No newline at end of file From 293411a46ae10a9afded84df5830906ea33c21e2 Mon Sep 17 00:00:00 2001 From: relyt871 <104436315+relyt871@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:47:31 +0800 Subject: [PATCH 2/2] W11D2 notes --- W11D2/Arch W11D2 Notes - jtl.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 W11D2/Arch W11D2 Notes - jtl.md diff --git a/W11D2/Arch W11D2 Notes - jtl.md b/W11D2/Arch W11D2 Notes - jtl.md new file mode 100644 index 0000000..0d16264 --- /dev/null +++ b/W11D2/Arch W11D2 Notes - jtl.md @@ -0,0 +1,32 @@ +# Arch W11D2 Notes + +## Branch Prediction + +#### 2-bit dynamic prediction + +change prediction only if misprediction twice + +#### Correlation Branches + +different branch instruction may hash to same 2-bit predictor + +solution: four predictors for each hash value, use the behavior of previous 2 branches to determine which to choose. + +#### Tournament Predictor + +a 2-bit counter to choose among + +- global predictor + - 4k entries, indexed by history of last 12 branches +- local predictor + - 1024 10-bit entries: last 10 outcomes of the entry + +#### BHT & BTB + +branch history table : help to make prediction + +branch target buffer : jump to predicted position quickly + +#### Special Case + +JALR hard to predict address \ No newline at end of file