diff --git a/content/datapath/load-store.md b/content/datapath/load-store.md index 8947590..3a61d07 100644 --- a/content/datapath/load-store.md +++ b/content/datapath/load-store.md @@ -31,22 +31,14 @@ title: "Supporting Loads and Stores" ## Building a Processor with DMEM access -Recall that [load](#sec-load-word) instructions are [I-Type](#sec-rv-load) because they read a register, have an immediate, and write to a register a 32-bit value read from memory. - -To support `lw`, we use a similar datapath to `addi` but instead compute an address with which to access DMEM. - -* RegFile: We **read** _one_ register `rs1` and write one register `rd`. The value to write is a **word** read from memory. -* PC: We **read** from and **write** to PC. The value to write is `pc + 4`. -* DMEM: We **read** the memory word at address `R[rs1] + imm`. - -Loads (and stores) participate in the `MEM` phase of [the five step process](#sec-five-steps). We therefore introduce additional logic connecting DMEM to the ALU and the RegFile, as shown in @fig-lw-new-blocks. +Loads and stores participate in the `MEM` phase of [the five step process](#sec-five-steps). We therefore introduce additional logic connecting DMEM to the ALU and the RegFile. @fig-lw-new-blocks describes DMEM access for load instructions. ::::{figure} images/lw-new-blocks.png :label: fig-lw-new-blocks :width: 100% :alt: "Load datapath additions: DMEM connected to the ALU-computed address and a writeback mux selecting between ALU result and memory data." -DMEM: Connect and use a mux before `WB` (Write Back) phase. +For the `MEM` phase of a load instruction, conect DMEM to the ALU and use a mux before `WB` (Write Back) phase. :::: **DMEM**: To read the memory at an address, we use the ALU to compute the address as `alu = R[rs1] + imm`. This readily reuses the circuitry for arithmetic and logical I-Type instructions. @@ -65,6 +57,17 @@ DMEM: Connect and use a mux before `WB` (Write Back) phase. The `lw` datapath. Use the menu bar to trace through the animation or download a copy of the PDF/PPTX file. :::: --> +(sec-datapath-load)= +## Tracing the Load Datapath + +Recall that [load](#sec-load-word) instructions are [I-Type](#sec-rv-load) because they read a register, have an immediate, and write to a register a 32-bit value read from memory. + +For `lw`, we use a similar datapath to `addi`, but we use the ALU to compute an address to pass into DMEM. State updates: + +* RegFile: We **read** _one_ register `rs1` and write one register `rd`. The value to write is a **word** (again, `lw`) that is read from memory. +* PC: We **read** from and **write** to PC. The value to write is `pc + 4`. +* DMEM: We **read** the memory word at address `R[rs1] + imm`. + ::::{figure} :label: anim-datapath-lw :alt: "Embedded slides tracing address calculation, memory read, and register write-back on the single-cycle datapath for a load-word instruction." @@ -105,15 +108,6 @@ We **do not** need to add additional blocks for stores, but we will need to: * Upgrade the Immediate Generator to support immediates in S-Type instructions; we encourage you to read [that section](#sec-datapath-immgen) afterwards. * Wire `R[rs2]` to `wdata` (DMEM input signal). - - ::::{figure} :label: anim-datapath-sw :alt: "Embedded slides tracing address calculation and memory write on the single-cycle datapath for a store-word instruction." diff --git a/content/parallel-tlp/cache-coherency.md b/content/parallel-tlp/cache-coherency.md index c1dad35..1b8ced8 100644 --- a/content/parallel-tlp/cache-coherency.md +++ b/content/parallel-tlp/cache-coherency.md @@ -1,13 +1,12 @@ --- -title: "Cache Coherency" -subtitle: Coming soon. Thanks for your patience! +title: "Cache Coherence" --- (sec-cache-coherency)= ## Learning Outcomes - +* Illustrate a shared memory multiprocessor architecture with caches. +* Define cache coherence misses. ::::{note} 🎥 Lecture Video :class: dropdown @@ -39,52 +38,119 @@ subtitle: Coming soon. Thanks for your patience! :::: - \ No newline at end of file +[^snoopy]: Sometimes you will see snooping protocols called Snoopy Protocols and snooping buses called Snoopy Buses, like the [Peanuts](https://en.wikipedia.org/wiki/Peanuts) character. [source](https://people.eecs.berkeley.edu/~pattrsn/252F96/Lecture18.pdf) \ No newline at end of file diff --git a/content/parallel-tlp/images/cache-coherence-1.png b/content/parallel-tlp/images/cache-coherence-1.png new file mode 100644 index 0000000..6378ac8 Binary files /dev/null and b/content/parallel-tlp/images/cache-coherence-1.png differ diff --git a/content/parallel-tlp/images/cache-coherence-2.png b/content/parallel-tlp/images/cache-coherence-2.png new file mode 100644 index 0000000..442ae78 Binary files /dev/null and b/content/parallel-tlp/images/cache-coherence-2.png differ diff --git a/content/parallel-tlp/images/cache-incoherence-read-write.png b/content/parallel-tlp/images/cache-incoherence-read-write.png deleted file mode 100644 index 246d7db..0000000 Binary files a/content/parallel-tlp/images/cache-incoherence-read-write.png and /dev/null differ diff --git a/content/parallel-tlp/images/cache-incoherence-result.png b/content/parallel-tlp/images/cache-incoherence-result.png deleted file mode 100644 index 79fd752..0000000 Binary files a/content/parallel-tlp/images/cache-incoherence-result.png and /dev/null differ diff --git a/content/parallel-tlp/images/multiprocessor-cache.png b/content/parallel-tlp/images/multiprocessor-cache.png deleted file mode 100644 index 2396965..0000000 Binary files a/content/parallel-tlp/images/multiprocessor-cache.png and /dev/null differ diff --git a/content/parallel-tlp/images/smp.png b/content/parallel-tlp/images/smp.png index c5b156b..2396965 100644 Binary files a/content/parallel-tlp/images/smp.png and b/content/parallel-tlp/images/smp.png differ diff --git a/content/parallel-tlp/index.md b/content/parallel-tlp/index.md index e205261..d8b4f3b 100644 --- a/content/parallel-tlp/index.md +++ b/content/parallel-tlp/index.md @@ -2,6 +2,7 @@ title: "MIMD Architectures" --- +(sec-mimd)= ## Learning Outcomes * Identify the key components of a multicore processor: cores that execute streams of instructions independently but share memory.