版本 7e54848c801b436baec85ef35531367bfe1fec67
Changes from 7e54848c801b436baec85ef35531367bfe1fec67 to 07edd2de252b350c5dfcb06eb2aca4d95a4cdaef
---
title: Computer Architecture
toc: no
...
- Instructor: [Jim Huang](/User/jserv) (黃敬群) `<jserv.tw@gmail.com>`
- Facebook Group: [https://www.facebook.com/groups/system.software2019/](https://www.facebook.com/groups/system.software2019/)
- Facebook Group: [https://www.facebook.com/groups/system.software2023/](https://www.facebook.com/groups/system.software2023/)
- Policy
* Follow the classes: [CS 61C at UC Berkeley](https://cs61c.org/), [CS152/252: Computer Architecture](https://inst.eecs.berkeley.edu/~cs152/sp19/)
Computer Architecture (Fall 2023)
------------------------------------------------------
* Week 1 (Sep 5): Introduction
- **[Course Introduction](https://docs.google.com/presentation/d/1Syfz3hNJtNH1G8i_n-ThyzH7BbUZ2Rmk-GGvoe6KvwI/edit?usp=sharing)**
- [David Patterson](https://en.wikipedia.org/wiki/David_Patterson_(computer_scientist)): [A New Golden Age for Computer Architecture: History, Challenges and Opportunities](https://content.riscv.org/wp-content/uploads/2018/12/A-New-Golden-Age-for-Computer-Architecture-History-Challenges-and-Opportunities-David-Patterson-.pdf) / [video](https://youtu.be/uyc_pDBJotI)
* [Article](https://cacm.acm.org/magazines/2019/2/234352-a-new-golden-age-for-computer-architecture/fulltext), [note](https://github.com/cristiean/notes/blob/4c4ceb291ba68c55659ab0d4571385c8cccacd21/a-new-golden-age-for-computer-architecture.md)
- David Patterson: [From Mainframe CPUs to Neural-Network TPUs and Open RISC-V](https://riscv.org/wp-content/uploads/2017/05/Mon0915-RISC-V-50-Years-Computer-Arch.pdf) / [video](https://youtu.be/eH9_ygsio3I)
- [Great Ideas in Computer Architecture, Intro](https://drive.google.com/open?id=1Y4yUaw9vryZcdc4Xu0RQxHfqjVbeHJLF) / [video](https://youtu.be/u_hXH5-tbM4?t=263)
- [Number Representation](https://docs.google.com/presentation/d/16NxuCn9wjjV9_WYqkdLGhYaxbmIhkhj0/edit?usp=sharing) / [video](https://www.youtube.com/watch?v=DWmHvlFFfLI&list=PLDoI-XvXO0aqgoMQvogzmf7CKiSMSUS3M&index=4)
- [Floating Point](https://docs.google.com/presentation/d/166v96_iwGaq_RWB6Y_Wg7DBA8sZciP21R7Gf0ZDXbMQ/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apCExy6OTfkoaciJtfA8hir)
- [C Memory Management](https://docs.google.com/presentation/d/14N0cWG2SnBSqhc2cLF0_2VerB9FF8JN3/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqxW0XGUcDl5r0m_eRU30C9)
* Week 2 (Sep 12): Quiz + RISC-V / online via [YouTube](https://youtube.com/live/YAdl6owYnZU)
- Announcement
* There is an online quiz from 10:50 AM to 11:59 AM.
* The first assignment, consisting of RISC-V assembly programming, will be given next week.
- [Quiz1](https://hackmd.io/@sysprog/arch2023-quiz1): C programming, bit-wise operations, number representation, floating-point / [Solutions](https://hackmd.io/@sysprog/arch2023-quiz1-sol)
- [RISC-V Instructions](https://docs.google.com/presentation/d/1qNVK8ULddo6luq0Rrjj_bmOShhcx9hlESN36AK91n6I/edit?usp=sharing)
* Week 3 (Sep 19): RISC-V
- Announcement:
+ Quiz2 is scheduled on Sep 26
* [2022 Quiz2](https://hackmd.io/@sysprog/arch2022-quiz2): RISC-V assembly and C programming / [solution](https://hackmd.io/@sysprog/arch2022-quiz2-sol)
* [2021 Quiz2](https://hackmd.io/@sysprog/arch2021-quiz2): RISC-V assembly and C programming / [solution](https://hackmd.io/@sysprog/arch2021-quiz2-sol)
+ [Homework 1](https://hackmd.io/@sysprog/2023-arch-homework1) is out.
+ Code Review for [Homework 1](https://hackmd.io/@sysprog/2023-arch-homework1) on Oct 3
- Apple [A17 Pro](https://twitter.com/VadimYuryev/status/1702351628236718206)
* 19 billion transistors compared to 16 billion on the A16. [further reading](https://twitter.com/VadimYuryev/status/1702401409885544551)
* [graphics benchmark](https://twitter.com/VadimYuryev/status/1702505691314024646)
* [ARM1 (1985) vs. Apple M1 Max (2021)](https://twitter.com/kenshirriff/status/1450179024639049731)
* [Apple Announces M1 Pro & M1 Max: Giant New Arm SoCs with All-Out Performance](https://www.anandtech.com/show/17019/apple-announced-m1-pro-m1-max-giant-new-socs-with-allout-performance)
- [RISC-V Summit China 2023](https://riscv-summit-china.com/) / [slides](https://github.com/cnrv/RVSC2023)
- [Intro to Assembly Language and RISC-V](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec06.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqsesqf46rxjtV2mkiwJOmr)
* [RISC-V Assembly Programmer's Manual](https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md)
* [The RISC-V Instruction Set Manual: Volume I: Unprivileged ISA](https://content.riscv.org/wp-content/uploads/2019/06/riscv-spec.pdf)
- [RISC-V Data Transfer](https://docs.google.com/presentation/d/1JpRRi2eEbe-UqtvdZ_pK7CjcYJ6vk9e1/edit?usp=sharing) / [video](https://youtu.be/5hwH9ofpNzI)
- [RISC-V Decision Making](https://docs.google.com/presentation/d/1Pob0JPeMH8umHN4FYPc9ZuJ3ndsaDvuI/edit?usp=sharing)
- [Functions Calls with RISC-V](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec07.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apCzwwwJGKn2p57tnhtSIIz)
- [Lab0: Web-based Emulators](https://hackmd.io/@sysprog/SJ7ht_MuS)
- [Lab1: RV32I Assembly](https://hackmd.io/@sysprog/H1TpVYMdB)
- Assignment: [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2023-arch-homework1) (Due: Oct 10, 2023)
* Week 4 (Sep 26): Quiz + RISC-V
* Errata
* [2023 Quiz1](https://hackmd.io/@sysprog/arch2023-quiz1-sol): Additional `x += (x >> 32)` statement in Problem A
- [Quiz2](https://hackmd.io/@sysprog/arch2023-quiz2): RISC-V assembly and C programming / [solution](https://hackmd.io/@sysprog/arch2023-quiz2-sol)
- [Fixed-point Arithmetic](https://hackmd.io/@maromaSamsa/HkjefPbFs)
- [NASA, Microchip, SiFive Announces Partnership for RISC-V Spaceflight Computing Platform](https://www.hackster.io/news/nasa-microchip-sifive-announces-partnership-for-risc-v-spaceflight-computing-platform-f52c55cf14f6)
- [ST, CAES team on octacore RISC-V space chip with selectable cores](https://www.eenewseurope.com/en/st-to-make-european-octacore-risc-v-space-chip-with-selectable-cores/)
- [Calling Convention for RISC-V](https://docs.google.com/presentation/d/10-LTD_zwQO23yxRNGL1gOpYmab8rDFsv/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apCzwwwJGKn2p57tnhtSIIz)
- [CALL = Compiling, Assembling, Linking, and Loading](https://docs.google.com/presentation/d/1Kiu675d7Q0NimIvdtxkXE5kp8-jLDmIt/edit?usp=sharing&ouid=113685665535544054506&rtpof=true&sd=true) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aoprCVNj3PG1kx7DTm3Qs6q)
* Week 5 (Oct 3): Code Review + RISC-V Instruction Format + GNU Toolchain
- Announcement
* [Homework2: RISC-V Toolchain](https://hackmd.io/@sysprog/2023-arch-homework2) is out.
- Code Review on [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2023-arch-homework1)
- [Lab2: RISC-V RV32I[MACF] emulator with ELF support](https://hackmd.io/@sysprog/SJAR5XMmi)
- Assignment: [Homework2: RISC-V Toolchain](https://hackmd.io/@sysprog/2023-arch-homework2) (Due: Oct 31)
- RISC-V Instruction Formats [Part I](https://docs.google.com/presentation/d/1k5qJyfuyk3ITzOfK0cIosyNl0nh1o9UC/edit?usp=sharing) / [Part II](https://docs.google.com/presentation/d/19Zt2UpvJDerRPn2P2XkgcxkhXKIuWJ1g/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apqzuxnUN2fkwt1IGbu3km3)
* Week 6 (Oct 10): National Day | make up a lesson on Oct 12 night via [YouTube](https://youtube.com/live/l7sKCIMo9AY)
* Announcement:
- Given the consistent progress of the lecture, we will schedule a makeup lesson for 19:30 on October 12th via [YouTube](https://youtube.com/live/l7sKCIMo9AY).
- [Homework2: RISC-V Toolchain](https://hackmd.io/@sysprog/2023-arch-homework2) is out. (Due: Oct 31)
- RISC-V Instruction Formats [Part I](https://docs.google.com/presentation/d/1k5qJyfuyk3ITzOfK0cIosyNl0nh1o9UC/edit?usp=sharing) / [Part II](https://docs.google.com/presentation/d/19Zt2UpvJDerRPn2P2XkgcxkhXKIuWJ1g/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apqzuxnUN2fkwt1IGbu3km3)
* [online tool for RISC-V Instruction Encoder/Decoder](https://luplab.gitlab.io/rvcodecjs/) / [source code](https://gitlab.com/luplab/rvcodecjs)
- Further reading [FPGA design for Software Engineers](https://www.walknsqualk.com/post/014-tiny-fpga-bx/)
* Week 7 (Oct 17): Digital Systems
* Announcement:
- Quiz 3 is scheduled for Oct 24 and will cover RISC-V assembly programming, software optimizations, instruction encoding, sequential logic, and combinational logic.
- [2020-Quiz3](https://hackmd.io/@sysprog/arch2020-quiz3) / [solution](https://hackmd.io/@sysprog/arch2020-quiz3-sol)
- [2021-Quiz3](https://hackmd.io/@sysprog/arch2021-quiz3) / [solution](https://hackmd.io/@sysprog/arch2021-quiz3-sol)
- [2021-Quiz4](https://hackmd.io/@sysprog/arch2021-quiz4) / [solution](https://hackmd.io/@sysprog/arch2021-quiz4-sol)
- [2022-Quiz3](https://hackmd.io/@sysprog/arch2022-quiz3) / [solution](https://hackmd.io/@sysprog/arch2022-quiz3-sol)
- Code Review for [Homework 2](https://hackmd.io/@sysprog/2023-arch-homework2) is scheduled for Oct 24.
* [Binary marble adding machine](https://woodgears.ca/marbleadd/) / [video](https://youtu.be/GcDshWmhF4A)
- Yes, you can implement a few logic-like elements without electricity.
- Logic gates are primarily implemented using diodes or transistors acting as electronic switches, but can also be constructed using vacuum tubes, electromagnetic relays (relay logic), fluidic logic, pneumatic logic, optics, molecules, or even mechanical elements. Now, most logic gates are made from MOSFETs (metal–oxide–semiconductor field-effect transistors).
- [nand2tetris](https://www.nand2tetris.org/)
- [Synchronous Digital Systems (SDS)](https://docs.google.com/presentation/d/1WOxk6JPmCxXuGfkX1A3Ocuiy4N-fyv76/edit?usp=sharing), [Boolean Algebra](https://docs.google.com/presentation/d/10bIPEobQ-O42TV97ggTfRcDUJ7vz5YB4/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0ap04XFOxcFT2_Bflnz_RHWU)
+ sequential logic is a type of logic circuit whose output depends on the present value of its input signals and on the sequence of past inputs, the input history.
- [State](https://docs.google.com/presentation/d/1AemtUUV207IXLP7j07RFOh-NLrKLSew_/edit?usp=sharing), [Combinational Logic](https://docs.google.com/presentation/d/1h0hoIl1bc2f9fUeoEGmaUHoAtf9zL5JS/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arH8SCGZilk8Wn_2B45SOpW)
* Week 8 (Oct 24): Quiz + Datapath and Control
- [Quiz3](https://hackmd.io/@sysprog/arch2023-quiz3): RISC-V programming and instruction encoding + Digital systems / [solution](https://hackmd.io/@sysprog/arch2023-quiz3-sol)
- [RISC-V CPU Datapath](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec12.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arQ_gDRnVS4ams3sUajgfEL)
* Week 9 (Oct 31): [online via YouTube](https://youtube.com/live/WUpGwSrsz8g); Datapath and Control + Pipeline
- Announcement:
+ New quiz is scheduled on Nov 14.
+ Code Review for [Homework 2](https://hackmd.io/@sysprog/2023-arch-homework2) is scheduled on N14.
- video: [Are Computers Still Getting Faster?](https://youtu.be/IuLxX07isNg)
- video: [Circuits recap](https://youtu.be/N36wWh0DriA)
- Constructing Hardware in a Scala Embedded Language ([Chisel](https://github.com/chipsalliance/chisel)) is an open-source hardware description language (HDL) used to describe digital electronics and circuits at the register-transfer level that facilitates advanced circuit generation and design reuse for both ASIC and FPGA digital logic designs.
* [slides](https://docs.google.com/presentation/d/1gMtABxBEDFbCFXN_-dPyvycNAyFROZKwk-HMcnxfTnU/edit#slide=id.p)
* [Finite impulse response](https://en.wikipedia.org/wiki/Finite_impulse_response) (FIR)
* [Learn Chisel online!](https://mybinder.org/v2/gh/freechipsproject/chisel-bootcamp/master)
+ Please run the cell blocks by either pressing SHIFT+ENTER on your keyboard
- [RISC-V CPU Datapath](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec12.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arQ_gDRnVS4ams3sUajgfEL)
+ [slides](https://docs.google.com/presentation/d/1SbeyDTycsb97201QvzxGa4CmE9bmRDyd/edit?usp=sharing)
- [Single-Cycle CPU Control](https://drive.google.com/drive/folders/1QAqqFyQUAu8GE_FvvqGHlF_Nk5VKzleC) / [video](https://youtu.be/0WnPU46zjbA)
+ [slides](https://docs.google.com/presentation/d/1UvXegiqDEGa5IOWMnnybxK4jftMY7MOF/edit?usp=sharing)
- MIT 6.191 [L15: Introduction to Pipelining](https://youtu.be/5NQkhqZe8_8), [L16: Processor Pipelining](https://youtu.be/TMpjvAvQCWA)
* [note](https://computationstructures.org/lectures/pbeta/pbeta.html)
* Week 10 (Nov 7): Pipelined Processors
- Announcement:
+ [Homework3](https://hackmd.io/@sysprog/2023-arch-homework3) is out.
+ Next week, we will continue reviewing all the assignments.
+ Quiz4 is scheduled next week.
- [2020 Quiz4](https://hackmd.io/@sysprog/arch2020-quiz4) / [solution](https://hackmd.io/@sysprog/arch2020-quiz4-sol)
- [2021 Quiz5](https://hackmd.io/@sysprog/arch2021-quiz5) / [solution](https://hackmd.io/@sysprog/arch2021-quiz5-sol) / [annotated with Ripes](https://hackmd.io/@wIVnCcUaTouAktrkMVLEMA/rkm8OkOjF)
- [2022 Quiz4](https://hackmd.io/@sysprog/arch2022-quiz4) / [solution](https://hackmd.io/@sysprog/arch2022-quiz4-sol) / [annotated](https://hackmd.io/@0SHE18LgRsqRjsgqxIFjVA/SJxvlqOds)
- [rv32emu](https://github.com/sysprog21/rv32emu) development
* commit [c1b8db0](https://github.com/sysprog21/rv32emu/commit/c1b8db0edec677cf654d19065b09db666bbd5b4f) successfully resolved a known issue that was preventing Doom from launching.
* However, Quake renders incorrectly. ([#258](https://github.com/sysprog21/rv32emu/issues/258))
- [0 to ASIC](https://docs.google.com/presentation/d/14npvuiGxsS3C-yo2vOsbZpNKGehwTtIYRFN6k3ZVR4M/edit#slide=id.p)
- [L16: Processor Pipelining](https://youtu.be/TMpjvAvQCWA), [L17: Implementing Pipelining](https://youtu.be/Pr3-iFE-nCQ), [L18: Implementing Pipelined Processors](https://youtu.be/WdbCaCoOgVY) / [note](https://computationstructures.org/lectures/pbeta/pbeta.html)
- [RISC-V 5-Stage Pipeline / Hazards](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec14.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aq-xpoKcmd7X9w-l6KHiNMa)
- [Lab3: Construct a single-cycle CPU with Chisel](https://hackmd.io/@sysprog/r1mlr3I7p)
- Assignment: [Homework3: Single-cycle CPU in Chisel](https://hackmd.io/@sysprog/2023-arch-homework3) (Due: Dec 1, 2023)
* Week 11 (Nov 14): Quiz + Homework Review
- [Quiz4](https://hackmd.io/@sysprog/arch2023-quiz4): RISC-V programming + datapath + control + pipelined processor / [solution](https://hackmd.io/@sysprog/arch2023-quiz4-sol)
- [Homework1](https://hackmd.io/@sysprog/2023-arch-homework1), [Homework2](https://hackmd.io/@sysprog/2023-arch-homework2)
- [Complex Pipelines, Out-of-Order Issue, Register Renaming](https://inst.eecs.berkeley.edu/~cs152/sp19/lectures/L10-ComplexPipes.pdf)
* Week 12 (Nov 21): Cache
* Announcement
* The class scheduled for Nov 28 will be conducted online and will be available via YouTube.
* Quiz 5 is scheduled on Dec 5
- [2022-Quiz5](https://hackmd.io/@sysprog/arch2022-quiz5) / [solution](https://hackmd.io/@sysprog/arch2022-quiz5-sol) / [annotated](https://hackmd.io/@0SHE18LgRsqRjsgqxIFjVA/ry3j69OOo)
- [2021-Quiz6](https://hackmd.io/@sysprog/arch2021-quiz6) / [solution](https://hackmd.io/@sysprog/arch2021-quiz6-sol) / [with Ripes simulation](https://hackmd.io/@arthur-chang/SyLa2qb3Y)
- [2020-Quiz5](https://hackmd.io/@sysprog/arch2020-quiz5) / [solution](https://hackmd.io/@sysprog/arch2020-quiz5-sol)
* This semester, we will conduct 7 quizzes. Out of these, the best 4 will be selected for grading purposes.
* The instructor will submit the grades on the school's designated deadline ([Jan 17, 2024](https://www.ncku.edu.tw/p/412-1000-6149.php?Lang=zh-tw)) for grade registration. This means that students will have ample time to dedicate to the final project assigned in this course.
* [Caches: Direct-mapped, set-associative](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec16.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apRiQ2QPjzyq8APGEjnqW1w)
* [Multi-level Caches, Cache Questions](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec17.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqHsuO6U2bIpwDGqO6UAetk)
- [Lab4: Cache](https://inst.eecs.berkeley.edu/~cs61c/fa22/labs/lab07/)
+ [Requirements](https://inst.eecs.berkeley.edu/~cs61c/fa20/labs/lab08/) / [Reference work](https://hackmd.io/@Lt35rTMeTi22rWqrBgSQzg/SkXXQ_LJ8)
* Recall: [The golden age of ever-changing computer architecture](https://hackaday.com/2019/11/27/the-golden-age-of-ever-changing-computer-architecture/)
* [The next big tech war front: RISC-V](https://asiatimes.com/2023/11/the-next-big-tech-war-front-risc-v/)
* [Computing on Andromeda: Chip Company Releases 13.5M Core Supercomputer](https://www.allaboutcircuits.com/news/computing-on-andromeda-chip-company-releases-13.5m-core-supercomputer/)
* [Designing in 2023: 10 Problems to Solve w/ Jim Keller](https://youtu.be/o70yKYWgtVI) - [Tenstorrent](https://tenstorrent.com/)
8-wide Ascalon RISC-V core.
* Week13 (Nov 28): online via [YouTube](https://youtube.com/live/A8AmpS3V8cE): Virtual Memory + Operating System + Vector Extension
- Announcement:
+ Term projects will be listed on Dec 5. [Term projects of 2022](https://hackmd.io/@sysprog/arch2022-projects)
* [Virtual Memory](https://youtu.be/TsxZlXOrt8U) / UCB: [Virtual Memory](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec19.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0ar2Wia7JngBFMmwRlr4s79j)
- [Operating Systems](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec18.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arq3vh2gcLvr5isLK4CuK3B)
- [Freestanding RISC-V Programs](https://youtu.be/iml0DBo5yqo)
+ [bare metal](https://en.wikipedia.org/wiki/Bare_machine)
- RISC-V Vector extension
* [Introduction to the RISC-V Vector Extension](https://eupilot.eu/wp-content/uploads/2022/11/RISC-V-VectorExtension-1-1.pdf)
* [The RISC-V Vector ISA Tutorial](https://riscv.org/wp-content/uploads/2018/05/15.20-15.55-18.05.06.VEXT-bcn-v1.pdf)
* [RISC-V "V" Vector Extension](https://inst.eecs.berkeley.edu/~cs152/sp22/handouts/sp22/riscv-v-spec-0.10.pdf)
* Week14 (Dec 5): Quiz + Synchronization
- Announcement:
* Check the listing of [final/term projects](https://hackmd.io/@sysprog/arch2023-projects) and fill in your names.
- [Quiz5](https://hackmd.io/@sysprog/arch2023-quiz5): pipelined processor + cache + virtual memory / [solution](https://hackmd.io/@sysprog/arch2023-quiz5-sol)
* [Virtual Memory](https://youtu.be/TsxZlXOrt8U) / UCB: [Virtual Memory](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec19.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0ar2Wia7JngBFMmwRlr4s79j)
- [Apple Silicon Guide](https://github.com/mikeroyal/Apple-Silicon-Guide)
- [Debunking CISC vs RISC code density](https://www.bitsnbites.eu/cisc-vs-risc-code-density/)
- [Synchronization](https://youtu.be/r8H_af_dCF0)
+ Please check your operating system textbook for such topic.
* Week15 (Dec 12): Operating System, Multithreading
- Announcement:
* Quiz6 is scheduled on Dec 19
- [2022-Quiz6](https://hackmd.io/@sysprog/arch2022-quiz6): pipelined processor + cache + virtual memory / [solution](https://hackmd.io/@sysprog/arch2022-quiz6-sol)
- [2021-Quiz7](https://hackmd.io/@sysprog/arch2021-quiz6) / [solution](https://hackmd.io/@sysprog/arch2021-quiz7-sol)
- [2021-Quiz6](https://hackmd.io/@sysprog/arch2021-quiz6) / [solution](https://hackmd.io/@sysprog/arch2021-quiz6-sol)
- [2020-Quiz6](https://hackmd.io/@sysprog/arch2020-quiz6) / [solution](https://hackmd.io/@sysprog/arch2020-quiz6-sol)
- [Synchronization](https://youtu.be/r8H_af_dCF0)
+ Please check your operating system textbook for such topic.
- [Multithreading Issues + Cache Coherency](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec23.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqgj_8Og51XoE7iyAu5yEWZ)
+ Let's skip OpenMP part
- video: [The Future of Operating Systems on RISC-V](https://youtu.be/emnN9p4vhzk) / [transcript](https://www.infoq.com/presentations/risc-v-future/)
- [Multithreaded Application Synchronization Part I](https://youtu.be/kk8q5rwm1ZI) / [Part II](https://youtu.be/dAVZTHxC16w)
+ Taken from [CSCI 463: Computer Architecture and Systems Organization](https://faculty.cs.niu.edu/~winans/CS463/2022-fa/)
+ RISC-V AMOSWAP instruction
+ [RISC-V spec references the word 'hart' - what does 'hart' mean?](https://stackoverflow.com/questions/42676827/risc-v-spec-references-the-word-hart-what-does-hart-mean)
* Week16 (Dec 19): online via [YouTube](https://youtube.com/live/5SMKUAglraQ) | Quiz + Memory Model, Synchronization, I/O
- [Quiz6](https://hackmd.io/@sysprog/arch2023-quiz6) / [solution](https://hackmd.io/@sysprog/arch2023-quiz6-sol)
- [Memory Model](https://youtu.be/QkbWgCSAEoo) / [slides](https://riscv.org/wp-content/uploads/2018/05/14.25-15.00-RISCVMemoryModelTutorial.pdf)
- [Advanced topics on Synchronization - 1](https://inst.eecs.berkeley.edu/~cs152/sp20/lectures/L19-MCM.pdf)
- [Advanced topics on Synchronization - 2](https://inst.eecs.berkeley.edu/~cs152/sp20/lectures/L22-Synch.pdf)
- [I/O: Devices, Polling, Interrupts](https://drive.google.com/drive/folders/1NRoyYSbAyarMhmPD5LiY6YEqYpLoZx_s) / [video](https://youtu.be/0dyqcFC_q2Q?t=1247)
* Traps/Interrupts/Exceptions
* Trap Handling in 5-Stage Pipeline
* Week17 (Dec 26): Modern Processors
- Announcements
* Due to the instructor's significant involvement in a confidential project, there has been limited participation in this course. Consequently, the instructor proposes a modification to the course grading structure.
- The new breakdown will be as follows: Quiz (30%), Homework (30%), Final/Term Project (25%), and an additional "Base" component (15%). This "Base" component ensures that each student's starting score is at least 15%.
* Quiz7 is scheduled on Jan 2, 2024
- [SSE2NEON v1.7](https://github.com/DLTcollab/sse2neon/releases/tag/v1.7.0) is out.
- [rv32emu](https://github.com/sysprog21/rv32emu) introduces tier-1 JIT compiler to accelerate RISC-V simulation.
* Execute `make ENABLE_JIT=1 clean all` and then run `build/rv32emu build/smolnes.elf` to play NES games.
- [listing of final/term projects](https://hackmd.io/@sysprog/arch2023-projects)
* You must provide the materials and demonstrate to the lecturer before Jan 14, 2023.
* Summarize what you did and send email to `<jserv.tw@gmail.com>`.
- [Modern Processor Architecture](https://youtu.be/sbGtFtxqkkg)
* [Modern Microprocessors: A 90-Minute Guide!](https://www.lighterra.com/papers/modernmicroprocessors/)
- [Introduction to Dynamic Branch Prediction](https://youtu.be/PFmx2p6NA0A), [Advanced Branch Prediction](https://youtu.be/avp3bDqCXYM)
* Week 18 (Jan 2): Modern Processors
- [Quiz7](https://hackmd.io/@sysprog/arch2023-quiz7) / [solution](https://hackmd.io/@sysprog/arch2023-quiz7-sol)
- [Tournament Predictors and Branch Prediction Accuracy](https://youtu.be/-T8yDJ8vTuI)
- Project: [Analyze and improve srv32](https://hackmd.io/@peishan/HkJrtKpoY)
- [Hardware Based Speculation](https://youtu.be/mFtX28lH4O8)
* [Speculative Processor Vulnerability](https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability)
* [Spectre-BHB](https://developer.arm.com/Arm%20Security%20Center/Spectre-BHB)
- Case study: [SoomRV](https://github.com/mathis-s/SoomRV) - simple superscalar out-of-order RISC-V core. It can execute up to 4 instructions per cycle and is able to boot Linux.
- [RISC vs. CISC](https://yarchive.net/comp/risc_definition.html) by [John Mashey](https://en.wikipedia.org/wiki/John_Mashey), one of the founders of the Standard Performance Evaluation Corporation (SPEC) benchmarking group.
* [HackerNews](https://news.ycombinator.com/item?id=34196370)
Computer Architecture (Fall 2022)
------------------------------------------------------
* Week 1 (Sep 6): Introduction / Online via [YouTube](https://youtu.be/kchwRBGRIHk)
- **[Course Introduction](https://docs.google.com/presentation/d/1RVjrp1bkVqVu-L9JF1QKfXw6tmdIyIEMxuWW5M-2Zpg/edit?usp=sharing)**
- [David Patterson](https://en.wikipedia.org/wiki/David_Patterson_(computer_scientist)): [A New Golden Age for Computer Architecture: History, Challenges and Opportunities](https://content.riscv.org/wp-content/uploads/2018/12/A-New-Golden-Age-for-Computer-Architecture-History-Challenges-and-Opportunities-David-Patterson-.pdf) / [video](https://youtu.be/uyc_pDBJotI)
* [Article](https://cacm.acm.org/magazines/2019/2/234352-a-new-golden-age-for-computer-architecture/fulltext), [note](https://github.com/cristiean/notes/blob/4c4ceb291ba68c55659ab0d4571385c8cccacd21/a-new-golden-age-for-computer-architecture.md)
- David Patterson: [From Mainframe CPUs to Neural-Network TPUs and Open RISC-V](https://riscv.org/wp-content/uploads/2017/05/Mon0915-RISC-V-50-Years-Computer-Arch.pdf) / [video](https://youtu.be/eH9_ygsio3I)
- [Great Ideas in Computer Architecture, Intro](https://drive.google.com/open?id=1Y4yUaw9vryZcdc4Xu0RQxHfqjVbeHJLF) / [video](https://youtu.be/u_hXH5-tbM4?t=263)
- [Number Representation](https://docs.google.com/presentation/d/16NxuCn9wjjV9_WYqkdLGhYaxbmIhkhj0/edit?usp=sharing) / [video](https://www.youtube.com/watch?v=DWmHvlFFfLI&list=PLDoI-XvXO0aqgoMQvogzmf7CKiSMSUS3M&index=4)
- [Floating Point](https://docs.google.com/presentation/d/166v96_iwGaq_RWB6Y_Wg7DBA8sZciP21R7Gf0ZDXbMQ/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apCExy6OTfkoaciJtfA8hir)
- [C Memory Management](https://docs.google.com/presentation/d/14N0cWG2SnBSqhc2cLF0_2VerB9FF8JN3/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqxW0XGUcDl5r0m_eRU30C9)
* Week 2 (Sep 13): Quiz + RISC-V / Online via [YouTube](https://youtu.be/jsdPoMHs-4A)
- [Quiz1](https://hackmd.io/@sysprog/arch2022-quiz1): C programming, bit-wise operations, number representation, floating-point / [Solution](https://hackmd.io/@sysprog/arch2022-quiz1-sol)
- [Lab0: Web-based Emulators](https://hackmd.io/@sysprog/SJ7ht_MuS)
- [RISC-V Instructions](https://docs.google.com/presentation/d/1qNVK8ULddo6luq0Rrjj_bmOShhcx9hlESN36AK91n6I/edit?usp=sharing)
* [The RISC-V Instruction Set Manual: Volume I: Unprivileged ISA](https://content.riscv.org/wp-content/uploads/2019/06/riscv-spec.pdf)
- [Intro to Assembly Language and RISC-V](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec06.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqsesqf46rxjtV2mkiwJOmr)
* Week 3 (Sep 20): RISC-V / Online via [YouTube](https://youtu.be/cvhacDLd6QU)
- [Intro to Assembly Language and RISC-V](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec06.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqsesqf46rxjtV2mkiwJOmr)
* [RISC-V Assembly Programmer's Manual](https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md)
- [RISC-V Data Transfer](https://docs.google.com/presentation/d/1JpRRi2eEbe-UqtvdZ_pK7CjcYJ6vk9e1/edit?usp=sharing) / [video](https://youtu.be/5hwH9ofpNzI)
- [RISC-V Decision Making](https://docs.google.com/presentation/d/1Pob0JPeMH8umHN4FYPc9ZuJ3ndsaDvuI/edit?usp=sharing)
- [Functions Calls with RISC-V](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec07.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apCzwwwJGKn2p57tnhtSIIz)
- [Lab1: RV32I Simulator](https://hackmd.io/@sysprog/H1TpVYMdB)
- Assignment: [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2022-arch-homework1) (Due: Oct 10, 2022)
* Week 4 (Sep 27): RISC-V / Online via [YouTube](https://youtu.be/sDYkKuoqGbk)
- Announcement:
+ Next quiz is scheduled to Oct 4
+ Code Review for [Homework 1](https://hackmd.io/@sysprog/2022-arch-homework1) on Oct 4
- [NASA, Microchip, SiFive Announces Partnership for RISC-V Spaceflight Computing Platform](https://www.hackster.io/news/nasa-microchip-sifive-announces-partnership-for-risc-v-spaceflight-computing-platform-f52c55cf14f6)
- [ST, CAES team on octacore RISC-V space chip with selectable cores](https://www.eenewseurope.com/en/st-to-make-european-octacore-risc-v-space-chip-with-selectable-cores/)
- Apple M1 Pro/Max
+ [ARM1 (1985) vs. Apple M1 Max (2021)](https://twitter.com/kenshirriff/status/1450179024639049731)
+ [Apple Announces M1 Pro & M1 Max: Giant New Arm SoCs with All-Out Performance](https://www.anandtech.com/show/17019/apple-announced-m1-pro-m1-max-giant-new-socs-with-allout-performance) / [Apple M2](https://en.wikipedia.org/wiki/Apple_M2)
- [Calling Convention for RISC-V](https://docs.google.com/presentation/d/10-LTD_zwQO23yxRNGL1gOpYmab8rDFsv/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apCzwwwJGKn2p57tnhtSIIz)
- [CALL = Compiling, Assembling, Linking, and Loading](https://docs.google.com/presentation/d/1Kiu675d7Q0NimIvdtxkXE5kp8-jLDmIt/edit?usp=sharing&ouid=113685665535544054506&rtpof=true&sd=true) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aoprCVNj3PG1kx7DTm3Qs6q)
- [2021-Quiz2](https://hackmd.io/@sysprog/arch2021-quiz2) / [solution](https://hackmd.io/@sysprog/arch2021-quiz2-sol)
* Week 5 (Oct 4): Quiz + Code Review (Room 4201 (1F) at (old) CSIE Building)
- [Quiz2](https://hackmd.io/@sysprog/arch2022-quiz2): RISC-V assembly and C programming / [solution](https://hackmd.io/@sysprog/arch2022-quiz2-sol)
- Code Review on [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2022-arch-homework1)
* Week 6 (Oct 11): RISC-V Instruction Format + GNU Toolchain / Online via [YouTube](https://youtu.be/FVWqem0xMas)
- Next week: [digital logic](https://www.ptt.cc/bbs/Soft_Job/M.1587694288.A.3B5.html)
- Further reading [FPGA design for Software Engineers](https://www.walknsqualk.com/post/014-tiny-fpga-bx/)
- [Lab2: RISC-V RV32I[MACF] emulator with ELF support](https://hackmd.io/@sysprog/SJAR5XMmi)
- Assignment: [Homework2: RISC-V Toolchain](https://hackmd.io/@sysprog/2022-arch-homework2) (Due: Oct 31)
- RISC-V Instruction Formats [Part I](https://docs.google.com/presentation/d/1k5qJyfuyk3ITzOfK0cIosyNl0nh1o9UC/edit?usp=sharing) / [Part II](https://docs.google.com/presentation/d/19Zt2UpvJDerRPn2P2XkgcxkhXKIuWJ1g/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apqzuxnUN2fkwt1IGbu3km3)
* Week 7 (Oct 18): Digital Systems / Online via [YouTube](https://youtu.be/zqF2bE6Dw1o)
* Announcement: New quiz is scheduled on Oct 25
* [Binary marble adding machine](https://woodgears.ca/marbleadd/) / [video](https://youtu.be/GcDshWmhF4A)
- Yes, you can implement a few logic-like elements without electricity.
- Logic gates are primarily implemented using diodes or transistors acting as electronic switches, but can also be constructed using vacuum tubes, electromagnetic relays (relay logic), fluidic logic, pneumatic logic, optics, molecules, or even mechanical elements. Now, most logic gates are made from MOSFETs (metal–oxide–semiconductor field-effect transistors).
- [nand2tetris](https://www.nand2tetris.org/)
- [Synchronous Digital Systems (SDS)](https://docs.google.com/presentation/d/1WOxk6JPmCxXuGfkX1A3Ocuiy4N-fyv76/edit?usp=sharing), [Boolean Algebra](https://docs.google.com/presentation/d/10bIPEobQ-O42TV97ggTfRcDUJ7vz5YB4/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0ap04XFOxcFT2_Bflnz_RHWU)
+ sequential logic is a type of logic circuit whose output depends on the present value of its input signals and on the sequence of past inputs, the input history.
- [State](https://docs.google.com/presentation/d/1AemtUUV207IXLP7j07RFOh-NLrKLSew_/edit?usp=sharing), [Combinational Logic](https://docs.google.com/presentation/d/1h0hoIl1bc2f9fUeoEGmaUHoAtf9zL5JS/edit?usp=sharing) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arH8SCGZilk8Wn_2B45SOpW)
- [2020-Quiz3](https://hackmd.io/@sysprog/arch2020-quiz3) / [solution](https://hackmd.io/@sysprog/arch2020-quiz3-sol)
- [2021-Quiz3](https://hackmd.io/@sysprog/arch2021-quiz3) / [solution](https://hackmd.io/@sysprog/arch2021-quiz3-sol)
- [2021-Quiz4](https://hackmd.io/@sysprog/arch2021-quiz4) / [solution](https://hackmd.io/@sysprog/arch2021-quiz4-sol)
* Week 8 (Oct 25): Datapath and Control + Code Review (Room 4201 (1F) at (old) CSIE Building)
- [Quiz3](https://hackmd.io/@sysprog/arch2022-quiz3): RISC-V programming and instruction encoding + Digital systems / [solution](https://hackmd.io/@sysprog/arch2022-quiz3-sol)
- [RISC-V CPU Datapath](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec12.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arQ_gDRnVS4ams3sUajgfEL)
* Week 9 (Nov 1): Pipeline / Online via [YouTube](https://youtu.be/JbOQSCBP4TE)
- video: [Are Computers Still Getting Faster?](https://youtu.be/IuLxX07isNg)
- video: [Circuits recap](https://youtu.be/N36wWh0DriA)
- [RISC-V CPU Datapath](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec12.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arQ_gDRnVS4ams3sUajgfEL)
+ [slides](https://docs.google.com/presentation/d/1SbeyDTycsb97201QvzxGa4CmE9bmRDyd/edit?usp=sharing)
- [Single-Cycle CPU Control](https://drive.google.com/drive/folders/1QAqqFyQUAu8GE_FvvqGHlF_Nk5VKzleC) / [video](https://youtu.be/0WnPU46zjbA)
+ [slides](https://docs.google.com/presentation/d/1UvXegiqDEGa5IOWMnnybxK4jftMY7MOF/edit?usp=sharing)
- MIT 6.191 [L15: Introduction to Pipelining](https://youtu.be/5NQkhqZe8_8), [L16: Processor Pipelining](https://youtu.be/TMpjvAvQCWA)
* [note](https://computationstructures.org/lectures/pbeta/pbeta.html)
* Week 10 (Nov 8): Pipelined Processors / Online via [YouTube](https://youtu.be/vCWsFahh5kQ)
- Announcement:
+ The next quiz is planned on Nov 15.
+ Homework3 [SoftCPU](https://hackmd.io/@sysprog/2022-arch-homework3) is out.
+ Next week, we will review all the assignments.
- Recent [rv32emu](https://github.com/sysprog21/rv32emu) changes
+ More descriptions about system calls. See [docs/syscall.md](https://github.com/sysprog21/rv32emu/blob/master/docs/syscall.md)
+ Implement `clock_gettime` system call, so that you can call `gettimeofday`/`clock_gettime` in C programs.
+ Implement [user-level counters](https://github.com/riscv/riscv-isa-manual) for getting CPU cycle counts in RISC-V programs. See [tests/perfcounter](https://github.com/sysprog21/rv32emu/tree/master/tests/perfcounter) for sample usage.
+ Better experiences while [running Doom and Quake games](https://github.com/sysprog21/rv32emu/blob/master/docs/demo.md). You can resize the window and use mouse properly.
+ More test programs: jit-bf (JIT assembler for RISC-V), coro (a simple coroutine implementation for RISC-V), mandelbrot (an ASCII-based renderer for Mandelbrot Set, colorized), richards (an operating system task scheduler simulation benchmark), and chacha20 (stream cipher)
+ More comments in source files.
- [0 to ASIC](https://docs.google.com/presentation/d/14npvuiGxsS3C-yo2vOsbZpNKGehwTtIYRFN6k3ZVR4M/edit#slide=id.p)
- [L16: Processor Pipelining](https://youtu.be/TMpjvAvQCWA), [L17: Implementing Pipelining](https://youtu.be/Pr3-iFE-nCQ), [L18: Implementing Pipelined Processors](https://youtu.be/WdbCaCoOgVY) / [note](https://computationstructures.org/lectures/pbeta/pbeta.html)
- [RISC-V 5-Stage Pipeline / Hazards](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec14.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aq-xpoKcmd7X9w-l6KHiNMa)
- [Lab3: srv32 - RISCV RV32IM Soft CPU](https://hackmd.io/@sysprog/S1Udn1Xtt)
- Assignment: [Homework3: SoftCPU](https://hackmd.io/@sysprog/2022-arch-homework3) (Due: Nov 30, 2022)
- [2020 Quiz4](https://hackmd.io/@sysprog/arch2020-quiz4) / [solution](https://hackmd.io/@sysprog/arch2020-quiz4-sol)
- [2021 Quiz5](https://hackmd.io/@sysprog/arch2021-quiz5) / [solution](https://hackmd.io/@sysprog/arch2021-quiz5-sol) / [annotated with Ripes](https://hackmd.io/@wIVnCcUaTouAktrkMVLEMA/rkm8OkOjF)
* Week 11 (Nov 15): Quiz + Homework Review (Room 4201 (1F) at (old) CSIE Building)
- [Quiz4](https://hackmd.io/@sysprog/arch2022-quiz4): RISC-V programming + datapath + control + pipelined processor / [solution](https://hackmd.io/@sysprog/arch2022-quiz4-sol)
- [Homework1](https://hackmd.io/@sysprog/2022-arch-homework1), [Homework2](https://hackmd.io/@sysprog/2022-arch-homework2)
- [Complex Pipelines, Out-of-Order Issue, Register Renaming](https://inst.eecs.berkeley.edu/~cs152/sp19/lectures/L10-ComplexPipes.pdf)
* Week 12 (Nov 22): Cache + Virtual Memory / Online via [YouTube](https://youtu.be/K8B8eCpGBp0)
* Announcement
* Quiz on Nov 29 - pipeline, cache and virtual memory (partial)
* Term projects will be listed on Nov 29
* [Caches: Direct-mapped, set-associative](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec16.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apRiQ2QPjzyq8APGEjnqW1w)
* [Multi-level Caches, Cache Questions](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec17.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqHsuO6U2bIpwDGqO6UAetk)
* [The golden age of ever-changing computer architecture](https://hackaday.com/2019/11/27/the-golden-age-of-ever-changing-computer-architecture/)
* [Computing on Andromeda: Chip Company Releases 13.5M Core Supercomputer](https://www.allaboutcircuits.com/news/computing-on-andromeda-chip-company-releases-13.5m-core-supercomputer/)
* [Designing in 2023: 10 Problems to Solve w/ Jim Keller](https://youtu.be/o70yKYWgtVI) - [Tenstorrent](https://tenstorrent.com/)
8-wide Ascalon RISC-V core.
* [Virtual Memory](https://youtu.be/TsxZlXOrt8U) / UCB: [Virtual Memory](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec19.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0ar2Wia7JngBFMmwRlr4s79j)
* [2021-Qui6](https://hackmd.io/@sysprog/arch2021-quiz6) / [solution](https://hackmd.io/@sysprog/arch2021-quiz6-sol) / [with Ripes simulation](https://hackmd.io/@arthur-chang/SyLa2qb3Y)
* [2020-Quiz5](https://hackmd.io/@sysprog/arch2020-quiz5) / [solution](https://hackmd.io/@sysprog/arch2020-quiz5-sol)
* Week13 (Nov 29): Quiz + Virtual Memory + Operating System (Room 4201 (1F) at (old) CSIE Building)
- Announcement:
+ Be aware of [Term projects](https://hackmd.io/@sysprog/arch2022-projects)
- [Quiz5](https://hackmd.io/@sysprog/arch2022-quiz5): pipelined processor + cache + virtual memory / [solution](https://hackmd.io/@sysprog/arch2022-quiz5-sol)
- [Virtual Memory](https://6004.mit.edu/web/_static/fall21/resources/sp21/L18.pdf) / [video](https://youtu.be/TsxZlXOrt8U)
- [Lab4: Cache](https://cs61c.org/fa20/labs/lab08/)
+ [Reference work](https://hackmd.io/@Lt35rTMeTi22rWqrBgSQzg/SkXXQ_LJ8)
- [Operating Systems](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec18.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arq3vh2gcLvr5isLK4CuK3B)
* Week14 (Dec 6): Synchronization / Online via [YouTube](https://youtu.be/YNd5Dg2HfT8)
- Announcement:
* Quiz6 on Dec 13
* Check the listing of [final/term projects](https://hackmd.io/@sysprog/arch2022-projects) and fill in your names.
- [Apple Silicon Guide](https://github.com/mikeroyal/Apple-Silicon-Guide)
- [Debunking CISC vs RISC code density](https://www.bitsnbites.eu/cisc-vs-risc-code-density/)
- [Operating Systems](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec18.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arq3vh2gcLvr5isLK4CuK3B)
- [Synchronization](https://youtu.be/r8H_af_dCF0)
+ Please check your operating system textbook for such topic.
- [Thread-Level Parallelism](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec22.pdf) / [video](https://youtu.be/QLdN6p7-43U)
+ Let's skip OpenMP part
- [Multithreading Issues + Cache Coherency](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec23.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqgj_8Og51XoE7iyAu5yEWZ)
- [2021 Quiz7](https://hackmd.io/@sysprog/arch2021-quiz6) /[solution](https://hackmd.io/@sysprog/arch2021-quiz7-sol)
- [2021 Quiz6](https://hackmd.io/@sysprog/arch2021-quiz6) /[solution](https://hackmd.io/@sysprog/arch2021-quiz6-sol)
- [2020 Quiz6](https://hackmd.io/@sysprog/arch2020-quiz6) /[solution](https://hackmd.io/@sysprog/arch2020-quiz6-sol)
* Week15 (Dec 13): suspended
- Announcement:
* Quiz6 will be postponed to Dec 20
* Quiz7 on Dec 27
* Check [the listing of final/term projects](https://hackmd.io/@sysprog/arch2022-projects)
* Week16 (Dec 20): Multithreading, Synchronization, I/O
- [Quiz6](https://hackmd.io/@sysprog/arch2022-quiz6) / [solution](https://hackmd.io/@sysprog/arch2022-quiz6-sol)
- video: [The Future of Operating Systems on RISC-V](https://youtu.be/emnN9p4vhzk) / [transcript](https://www.infoq.com/presentations/risc-v-future/)
- [Freestanding RISC-V Programs](https://youtu.be/iml0DBo5yqo)
+ [bare metal](https://en.wikipedia.org/wiki/Bare_machine)
- [Multithreaded Application Synchronization Part I](https://youtu.be/kk8q5rwm1ZI)
+ Taken from [CSCI 463: Computer Architecture and Systems Organization](http://faculty.cs.niu.edu/~winans/CS463/2021-fa/)
+ [RISC-V spec references the word 'hart' - what does 'hart' mean?](https://stackoverflow.com/questions/42676827/risc-v-spec-references-the-word-hart-what-does-hart-mean)
- [Multithreaded Application Synchronization Part II](https://youtu.be/dAVZTHxC16w)
+ RISC-V AMOSWAP instruction
- [Advanced topics on Synchronization - 1](https://inst.eecs.berkeley.edu/~cs152/sp20/lectures/L19-MCM.pdf)
- [Advanced topics on Synchronization - 2](https://inst.eecs.berkeley.edu/~cs152/sp20/lectures/L22-Synch.pdf)
- [I/O: Devices, Polling, Interrupts](https://drive.google.com/drive/folders/1NRoyYSbAyarMhmPD5LiY6YEqYpLoZx_s) / [video](https://youtu.be/0dyqcFC_q2Q?t=1247)
* Traps/Interrupts/Exceptions
* Trap Handling in 5-Stage Pipeline
* Week17 (Dec 27): Modern Processors
- [Quiz7](https://hackmd.io/@sysprog/arch2022-quiz7) / [solution](https://hackmd.io/@sysprog/arch2022-quiz7-sol)
- [listing of final/term projects](https://hackmd.io/@sysprog/arch2022-projects)
* You must provide the materials and demonstrate to the lecturer before Jan 13, 2023.
* Summarize what you did and send email to `<jserv.tw@gmail.com>`.
- [Modern Processor Architecture](https://youtu.be/sbGtFtxqkkg)
- [Introduction to Dynamic Branch Prediction](https://youtu.be/PFmx2p6NA0A), [Advanced Branch Prediction](https://youtu.be/avp3bDqCXYM), [Tournament Predictors and Branch Prediction Accuracy](https://youtu.be/-T8yDJ8vTuI)
- Project: [Analyze and improve srv32](https://hackmd.io/@peishan/HkJrtKpoY)
- [Hardware Based Speculation](https://youtu.be/mFtX28lH4O8)
* Week 18 (Jan 2): Modern Processors / Online via [YouTube](https://youtu.be/WywOTj55mvk)
- [Modern Processor Architecture](https://youtu.be/sbGtFtxqkkg)
- [Introduction to Dynamic Branch Prediction](https://youtu.be/PFmx2p6NA0A), [Advanced Branch Prediction](https://youtu.be/avp3bDqCXYM), [Tournament Predictors and Branch Prediction Accuracy](https://youtu.be/-T8yDJ8vTuI)
- Project: [Analyze and improve srv32](https://hackmd.io/@peishan/HkJrtKpoY)
- [Hardware Based Speculation](https://youtu.be/mFtX28lH4O8)
* [Speculative Processor Vulnerability](https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability)
* [Spectre-BHB](https://developer.arm.com/Arm%20Security%20Center/Spectre-BHB)
- Case study: [VRoom](https://moonbaseotago.github.io/) - very high end RISC-V implementation, cloud server class, out of order, super scalar, speculative, up to 8 IPC
* [slides](https://moonbaseotago.github.io/talk/) / [List of ARM processors](https://en.wikipedia.org/wiki/List_of_ARM_processors)
- [RISC vs. CISC](https://yarchive.net/comp/risc_definition.html) by [John Mashey](https://en.wikipedia.org/wiki/John_Mashey), one of the founders of the Standard Performance Evaluation Corporation (SPEC) benchmarking group.
* [HackerNews](https://news.ycombinator.com/item?id=34196370)
Computer Architecture (Fall 2021)
------------------------------------------------------
* Week 1 (Sep 28): Introduction
- **[Course Introduction](https://docs.google.com/presentation/d/1Ar6638recYqDDY_XuH6BRB-X9GHpw8G-KYnERXF6Jw8/edit?usp=sharing)**
- David Patterson: [A New Golden Age for Computer Architecture: History, Challenges and Opportunities](https://content.riscv.org/wp-content/uploads/2018/12/A-New-Golden-Age-for-Computer-Architecture-History-Challenges-and-Opportunities-David-Patterson-.pdf) / [video](https://youtu.be/uyc_pDBJotI)
* [Article](https://cacm.acm.org/magazines/2019/2/234352-a-new-golden-age-for-computer-architecture/fulltext), [note](https://github.com/cristiean/notes/blob/4c4ceb291ba68c55659ab0d4571385c8cccacd21/a-new-golden-age-for-computer-architecture.md)
- David Patterson: [From Mainframe CPUs to Neural-Network TPUs and Open RISC-V](https://riscv.org/wp-content/uploads/2017/05/Mon0915-RISC-V-50-Years-Computer-Arch.pdf) / [video](https://youtu.be/eH9_ygsio3I)
- [Great Ideas in Computer Architecture, Intro](https://drive.google.com/open?id=1Y4yUaw9vryZcdc4Xu0RQxHfqjVbeHJLF) / [video](https://youtu.be/u_hXH5-tbM4?t=263)
- [Number Representation](https://drive.google.com/drive/folders/1_Zbt8KdwieLsqRdfc6aNBOa2_hEmFkxR)
- [Floating Point](https://drive.google.com/drive/folders/147xm_DhklkevG6602mH4yoGuVMw-3GQZ?usp=sharing)
- [C Memory Management](https://drive.google.com/drive/folders/1pHpHRvjEg5TdidIp_fkOrh6TvMlYl5Yj?usp=sharing) / [video](https://youtu.be/fhEE4J4QCps)
* Week 2 (Oct 5): Quiz + RISC-V
- [Quiz1](https://hackmd.io/@sysprog/arch2021-quiz1): C programming, bit-wise operations, number representation, floating-point / [Solution](https://hackmd.io/@sysprog/arch2021-quiz1-sol)
- [Lab0: Web-based Emulators](https://hackmd.io/@sysprog/SJ7ht_MuS)
- [Introduction to RISC-V Assembly language : Arithmetic](https://docs.google.com/presentation/d/1TCuhElbEfMCLvkEJGgELNBR3uQYzzNhe/edit?usp=sharing&ouid=113685665535544054506&rtpof=true&sd=true)
* [The RISC-V Instruction Set Manual: Volume I: Unprivileged ISA](https://content.riscv.org/wp-content/uploads/2019/06/riscv-spec.pdf)
- [Intro to Assembly Language and RISC-V](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec06.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqsesqf46rxjtV2mkiwJOmr)
* Week 3 (Oct 12): RISC-V
- [Intro to Assembly Language and RISC-V](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec06.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqsesqf46rxjtV2mkiwJOmr)
* [RISC-V Assembly Programmer's Manual](https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md)
- [RISC-V lw, sw, Decisions I](https://docs.google.com/presentation/d/18UZBHGbQK9c6Rf7sYtntCp5u8NRNhGF_/edit?usp=sharing&ouid=113685665535544054506&rtpof=true&sd=true) / [video](https://youtu.be/5hwH9ofpNzI)
- [RISC-V Decisions II](https://docs.google.com/presentation/d/1cUGL6P4BDPz3eDHZco9qHJXsTc76TBnG/edit?usp=sharing&ouid=113685665535544054506&rtpof=true&sd=true)
- [Lab1: RV32I Simulator](https://hackmd.io/@sysprog/H1TpVYMdB)
- Assignment: [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2021-arch-homework1) (Due: Oct 25, 2021)
* Week 4 (Oct 19): RISC-V
- Announcement:
+ Next quiz is scheduled to Oct 26
+ Code Review for [Homework 1](https://hackmd.io/@sysprog/2021-arch-homework1) on Oct 26
+ We might be in a physical classroom next week. Please check the latest announcement via email.
- Apple M1 Pro/Max
+ [ARM1 (1985) vs. Apple M1 Max (2021)](https://twitter.com/kenshirriff/status/1450179024639049731)
+ [Apple Announces M1 Pro & M1 Max: Giant New Arm SoCs with All-Out Performance](https://www.anandtech.com/show/17019/apple-announced-m1-pro-m1-max-giant-new-socs-with-allout-performance)
- [More RISC-V Functions](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec07.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apCzwwwJGKn2p57tnhtSIIz)
- [Compiler, Assembler, Linker, Loader](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec09.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aoprCVNj3PG1kx7DTm3Qs6q)
- [2020-Quiz2](https://hackmd.io/@sysprog/arch2020-quiz2)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz2-sol)
* Week 5 (Oct 26): Quiz + Code Review (Room 4201 (1F) at (old) CSIE Building)
- [Quiz2](https://hackmd.io/@sysprog/arch2021-quiz2): RISC-V assembly and C programming / [solution](https://hackmd.io/@sysprog/arch2021-quiz2-sol)
- Code Review on [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2021-arch-homework1)
* Week 6 (Nov 2): RISC-V Instruction Format + GNU Toolchain + Code Review (Room 4201 (1F) at (old) CSIE Building)
- Next week: [digital logic](https://www.ptt.cc/bbs/Soft_Job/M.1587694288.A.3B5.html)
- Code Review on [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2021-arch-homework1)
- [Lab2: RISC-V RV32I[MA] emulator with ELF support](https://hackmd.io/@sysprog/rJAufgHYS)
- Assignment: [Homework2: RISC-V Toolchain](https://hackmd.io/@sysprog/2021-arch-homework2) (Due: Nov 15)
- Further reading [FPGA design for Software Engineers](https://www.walknsqualk.com/post/014-tiny-fpga-bx/)
- [RISC-V Instruction Formats](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec08.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apqzuxnUN2fkwt1IGbu3km3)
* Week 7 (Nov 9): Digital Systems
* Announcement: New quiz on Nov 16
* Next generation of rv32emu: [sysprog21/rv32emu-next](https://github.com/sysprog21/rv32emu-next)
- [Combinational Digital Logic](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec10.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0ap04XFOxcFT2_Bflnz_RHWU)
- [Sequential Digital Logic](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec11.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arH8SCGZilk8Wn_2B45SOpW)
- [2020-Quiz3](https://hackmd.io/@sysprog/arch2020-quiz3)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz3-sol)
* Week 8 (Nov 16): Datapath and Control
- Announcement: Due to internal problems of HackMD (pictures were not shown), we would take new scoring method to eliminate the impact. Next week, we have an additional quiz dedicated to Combinational and Sequential Digital Logic.
- [Quiz3](https://hackmd.io/@sysprog/arch2021-quiz3): RISC-V programming and instruction encoding + Digital systems / [solution](https://hackmd.io/@sysprog/arch2021-quiz3-sol)
- [RISC-V CPU Datapath, Control Intro](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec12.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arQ_gDRnVS4ams3sUajgfEL)
- [Single-Cycle CPU Control](https://drive.google.com/drive/folders/1QAqqFyQUAu8GE_FvvqGHlF_Nk5VKzleC) / [video](https://youtu.be/0WnPU46zjbA)
* Week 9 (Nov 23): Pipeline
- Announcement:
+ Next quiz is scheduled to Dec 7
- [Quiz4](https://hackmd.io/@sysprog/arch2021-quiz4): Digital systems / [solution](https://hackmd.io/@sysprog/arch2021-quiz4-sol)
- video: [Are Computers Still Getting Faster?](https://youtu.be/IuLxX07isNg)
- MIT 6.004 [L15: Introduction to Pipelining](https://youtu.be/5NQkhqZe8_8), [L16: Processor Pipelining](https://youtu.be/TMpjvAvQCWA), [L17: Implementing Pipelining](https://youtu.be/Pr3-iFE-nCQ)
* slides: [Introduction to Pipelining](https://6004.mit.edu/web/_static/fall21/resources/sp21/L12.pdf)
* slides: [Pipelined Processors](https://6004.mit.edu/web/_static/fall21/resources/sp21/L19.pdf)
* [note](https://computationstructures.org/lectures/pbeta/pbeta.html)
* Week 10 (Nov 30): Pipelined Processors
- Announcement:
+ Next quiz is scheduled to Dec 7
+ Homework3: [SoftCPU](https://hackmd.io/@sysprog/2021-arch-homework3) is out.
+ Next week, we will review all the assignments.
- [0 to ASIC](https://docs.google.com/presentation/d/14npvuiGxsS3C-yo2vOsbZpNKGehwTtIYRFN6k3ZVR4M/edit#slide=id.p)
- [L16: Processor Pipelining](https://youtu.be/TMpjvAvQCWA), [L17: Implementing Pipelining](https://youtu.be/Pr3-iFE-nCQ), [L18: Implementing Pipelined Processors](https://youtu.be/WdbCaCoOgVY) / [note](https://computationstructures.org/lectures/pbeta/pbeta.html)
* slides: [Pipelined Processors](https://6004.mit.edu/web/_static/fall21/resources/sp21/L19.pdf)
* slides: [Pipelined Processors
Data and Control Hazards](https://6004.mit.edu/web/_static/fall21/resources/sp21/L20.pdf)
- [RISC-V 5-Stage Pipeline / Hazards](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec14.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aq-xpoKcmd7X9w-l6KHiNMa)
- [Complex Pipelines, Out-of-Order Issue, Register Renaming](https://inst.eecs.berkeley.edu/~cs152/sp19/lectures/L10-ComplexPipes.pdf)
- [Lab3: srv32 - RISCV RV32IM Soft CPU](https://hackmd.io/@sysprog/S1Udn1Xtt)
- Assignment: [Homework3: SoftCPU](https://hackmd.io/@sysprog/2021-arch-homework3) (Due: Dec 20, 2021)
- [2020 Quiz4](https://hackmd.io/@sysprog/arch2020-quiz4)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz4-sol)
* Week 11 (Dec 7): Quiz + Homework Review
- [Quiz5](https://hackmd.io/@sysprog/arch2021-quiz5): RISC-V programming + datapath + control + pipelined processor / [solution](https://hackmd.io/@sysprog/arch2021-quiz5-sol)
- [Homework1](https://hackmd.io/@sysprog/2021-arch-homework1), [Homework2](https://hackmd.io/@sysprog/2021-arch-homework2)
* Week 12 (Dec 14): Cache + Virtual Memory
- Announcement: Quiz on Dec 21 - pipeline, cache and virtual memory
- [Caches: Direct-mapped, set-associative](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec16.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apRiQ2QPjzyq8APGEjnqW1w)
- [Multi-level Caches, Cache Questions](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec17.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqHsuO6U2bIpwDGqO6UAetk)
- [The golden age of ever-changing computer architecture](https://hackaday.com/2019/11/27/the-golden-age-of-ever-changing-computer-architecture/)
* [Cerebras](https://cerebras.net/) announced a system which connects multiple integrated circuits (commonly called "chips") into a neural network with many connections in Aug 2021. It enables a single system to support AI models with more than 120 trillion parameters.
- [Virtual Memory](https://6004.mit.edu/web/_static/fall21/resources/sp21/L18.pdf) / [video](https://youtu.be/TsxZlXOrt8U)
* UCB: [Virtual Memory](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec19.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0ar2Wia7JngBFMmwRlr4s79j)
- [2020-Quiz5](https://hackmd.io/@sysprog/arch2020-quiz5) / [solution](https://hackmd.io/@sysprog/arch2020-quiz5-sol)
* Week13 (Dec 21): Quiz + Virtual Memory + Operating System
- Announcement:
+ Be aware of term projects.
+ Next week, we will review all the assignments.
- [Quiz6](https://hackmd.io/@sysprog/arch2021-quiz6): pipelined processor + cache + virtual memory / [solution](https://hackmd.io/@sysprog/arch2021-quiz6-sol)
- [Virtual Memory](https://6004.mit.edu/web/_static/fall21/resources/sp21/L18.pdf) / [video](https://youtu.be/TsxZlXOrt8U)
- [Lab4: Cache](https://cs61c.org/fa20/labs/lab08/)
+ [Reference work](https://hackmd.io/@Lt35rTMeTi22rWqrBgSQzg/SkXXQ_LJ8)
- [Operating Systems](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec18.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arq3vh2gcLvr5isLK4CuK3B)
- [Term projects 2020](https://hackmd.io/@sysprog/arch2020-projects)
* Week14 (Dec 28): Synchronization
- Announcement:
* Quiz on Jan 11
* Your grades will be delivered on Jan 21, 2022
* Check the listing of final/term projects
- [Term projects 2021](https://hackmd.io/@sysprog/arch2021-projects)
- [Synchronization](https://6004.mit.edu/web/_static/fall21/resources/sp21/L21.pdf) / [video](https://youtu.be/r8H_af_dCF0)
- [Thread-Level Parallelism](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec22.pdf) / [video](https://youtu.be/QLdN6p7-43U)
+ Let's skip OpenMP part
* Week15 (Jan 4): Operating System and RISC-V, cache coherence
- Announcement:
* Quiz7 on Jan 11
* Check [the listing of final/term projects](https://hackmd.io/@sysprog/arch2021-projects)
- video: [The Future of Operating Systems on RISC-V](https://youtu.be/emnN9p4vhzk) / [transcript](https://www.infoq.com/presentations/risc-v-future/)
- [Multithreading Issues, Cache Coherency](https://inst.eecs.berkeley.edu/~cs61c/su20/pdfs/lectures/lec23.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqgj_8Og51XoE7iyAu5yEWZ)
+ Let's skip OpenMP part
- [Freestanding RISC-V Programs](https://youtu.be/iml0DBo5yqo)
+ [bare metal](https://en.wikipedia.org/wiki/Bare_machine)
- [Multithreaded Application Synchronization Part I](https://youtu.be/kk8q5rwm1ZI)
+ Taken from [CSCI 463: Computer Architecture and Systems Organization](http://faculty.cs.niu.edu/~winans/CS463/2021-fa/)
+ [RISC-V spec references the word 'hart' - what does 'hart' mean?](https://stackoverflow.com/questions/42676827/risc-v-spec-references-the-word-hart-what-does-hart-mean)
- [Multithreaded Application Synchronization Part II](https://youtu.be/dAVZTHxC16w)
+ RISC-V AMOSWAP instruction
- [Advanced topics on Synchronization - 1](https://inst.eecs.berkeley.edu/~cs152/sp20/lectures/L19-MCM.pdf)
- [Advanced topics on Synchronization - 2](https://inst.eecs.berkeley.edu/~cs152/sp20/lectures/L22-Synch.pdf)
- [2020 Quiz6](https://hackmd.io/@sysprog/arch2020-quiz6)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz6-sol)
* Week16 (Jan 11): I/O
- [Quiz7](https://hackmd.io/@sysprog/arch2021-quiz7) / [solution](https://hackmd.io/@sysprog/arch2021-quiz7-sol)
- [I/O: Devices, Polling, Interrupts](https://drive.google.com/drive/folders/1NRoyYSbAyarMhmPD5LiY6YEqYpLoZx_s) / [video](https://youtu.be/0dyqcFC_q2Q?t=1247)
* Traps/Interrupts/Exceptions
* Trap Handling in 5-Stage Pipeline
* Week17 (Jan 18): Modern Processors
- [listing of final/term projects](https://hackmd.io/@sysprog/arch2021-projects)
- [Modern Processor Architecture](https://6004.mit.edu/web/_static/fall21/resources/sp21/L22.pdf) / [video](https://youtu.be/sbGtFtxqkkg)
- [Introduction to Dynamic Branch Prediction](https://youtu.be/PFmx2p6NA0A), [Advanced Branch Prediction](https://youtu.be/avp3bDqCXYM), [Tournament Predictors and Branch Prediction Accuracy](https://youtu.be/-T8yDJ8vTuI)
- Project: [Analyze and improve srv32](https://hackmd.io/@peishan/HkJrtKpoY)
- [Hardware Based Speculation](https://youtu.be/mFtX28lH4O8)
Computer Architecture (Fall 2020)
------------------------------------------------------
* Week 1
- David Patterson: [A New Golden Age for Computer Architecture: History, Challenges and Opportunities](https://content.riscv.org/wp-content/uploads/2018/12/A-New-Golden-Age-for-Computer-Architecture-History-Challenges-and-Opportunities-David-Patterson-.pdf) / [video](https://youtu.be/uyc_pDBJotI)
* [Article](https://cacm.acm.org/magazines/2019/2/234352-a-new-golden-age-for-computer-architecture/fulltext), [note](https://github.com/cristiean/notes/blob/4c4ceb291ba68c55659ab0d4571385c8cccacd21/a-new-golden-age-for-computer-architecture.md)
- David Patterson: [From Mainframe CPUs to Neural-Network TPUs and Open RISC-V](https://riscv.org/wp-content/uploads/2017/05/Mon0915-RISC-V-50-Years-Computer-Arch.pdf) / [video](https://youtu.be/eH9_ygsio3I)
- [Great Ideas in Computer Architecture, Intro](https://drive.google.com/open?id=1Y4yUaw9vryZcdc4Xu0RQxHfqjVbeHJLF) / [video](https://youtu.be/u_hXH5-tbM4?t=263)
- [Number Representation](https://drive.google.com/drive/folders/1_Zbt8KdwieLsqRdfc6aNBOa2_hEmFkxR)
- [Floating Point](https://drive.google.com/drive/folders/147xm_DhklkevG6602mH4yoGuVMw-3GQZ?usp=sharing)
- [C Memory Management](https://drive.google.com/drive/folders/1pHpHRvjEg5TdidIp_fkOrh6TvMlYl5Yj?usp=sharing) / [video](https://youtu.be/fhEE4J4QCps)
* Week 2: Quiz + RISC-V
- [Quiz1](/arch/arch2020-quiz1.pdf): C programming, bit-wise operations, number representation, floating-point / [Solution](/arch/2020-quiz1-sol.pdf)
- News: [NVIDIA to Acquire Arm for $40 Billion, Creating World’s Premier Computing Company for the Age of AI](https://nvidianews.nvidia.com/news/nvidia-to-acquire-arm-for-40-billion-creating-worlds-premier-computing-company-for-the-age-of-ai)
- [Lab0: Web-based Emulators](https://hackmd.io/@sysprog/SJ7ht_MuS)
- [Introduction to RISC-V Assembly language : Arithmetic](https://drive.google.com/drive/folders/1dtSqX4RlLlfXk2jN8J1vvior35z_5QfZ)
* [The RISC-V Instruction Set Manual: Volume I: Unprivileged ISA](https://content.riscv.org/wp-content/uploads/2019/06/riscv-spec.pdf)
- [Intro to Assembly Language and RISC-V](https://cs61c.org/su20/lectures/?file=lec06.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqsesqf46rxjtV2mkiwJOmr)
* Week 3: RISC-V
- [Intro to Assembly Language and RISC-V](https://cs61c.org/su20/lectures/?file=lec06.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqsesqf46rxjtV2mkiwJOmr)
* [RISC-V Assembly Programmer's Manual](https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md)
- [RISC-V lw, sw, Decisions I](https://drive.google.com/open?id=1sPgw8TnaLNvL71uaXLE_vNaXmNrbRHNc) / [video](https://youtu.be/5hwH9ofpNzI)
- [RISC-V Decisions II](https://drive.google.com/drive/folders/16-usv7Hk1XmIE4HP-nTzFKtkvuSlFCg8?usp=sharing)
- [Lab1: RV32I Simulator](https://hackmd.io/@sysprog/H1TpVYMdB)
- Assignment: [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2020-arch-homework1) (Due: Oct 5)
* Week 4: RISC-V
- Announcement:
+ quiz rescheduled to Oct 6
+ Code Review for Homework 1 on Oct 6
- [More RISC-V Functions](https://cs61c.org/su20/lectures/?file=lec07.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apCzwwwJGKn2p57tnhtSIIz)
- [Compiler, Assembler, Linker, Loader](https://cs61c.org/su20/lectures/?file=lec09.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aoprCVNj3PG1kx7DTm3Qs6q)
* Week 5: Quiz + Code Review
- [Quiz2](https://hackmd.io/@sysprog/arch2020-quiz2)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz2-sol)
- Code Review on [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2020-arch-homework1)
* Week 6: RISC-V and Toolchain
- [Collaborative notes](https://hackmd.io/58CYrCJhS56clW7CF9AZeg)
- Next week: [digital logic](https://www.ptt.cc/bbs/Soft_Job/M.1587694288.A.3B5.html)
- Code Review on [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/@sysprog/2020-arch-homework1)
- [Lab2: RISC-V RV32I[MA] emulator with ELF support](https://hackmd.io/@sysprog/rJAufgHYS)
- Assignment: [Homework2: RISC-V Toolchain](https://hackmd.io/@sysprog/2020-arch-homework2) (Due: Oct 26)
- Further reading [FPGA design for Software Engineers](https://www.walknsqualk.com/post/014-tiny-fpga-bx/)
- [RISC-V Instruction Formats](https://cs61c.org/su20/lectures?file=lec08.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apqzuxnUN2fkwt1IGbu3km3)
* Week 7: Digital Systems
* [nand2tetris](https://www.nand2tetris.org/) / [TED Talk](https://www.ted.com/talks/shimon_schocken_the_self_organizing_computer_course)
* Next generation of rv32emu: [sysprog21/rv32emu-next](https://github.com/sysprog21/rv32emu-next)
- [Combinational Digital Logic](https://cs61c.org/su20/lectures?file=lec10.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0ap04XFOxcFT2_Bflnz_RHWU)
- [Sequential Digital Logic](https://cs61c.org/su20/lectures?file=lec11.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arH8SCGZilk8Wn_2B45SOpW)
* Week 8: Datapath
- [Quiz3](https://hackmd.io/@sysprog/arch2020-quiz3)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz3-sol)
- [Lab3: Reindeer - RISCV RV32I[M] Soft CPU](https://hackmd.io/@sysprog/rJw2A5DqS)
- [RISC-V CPU Datapath, Control Intro](https://cs61c.org/su20/lectures/?file=lec12.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arQ_gDRnVS4ams3sUajgfEL)
- Assignment: [Homework3: SoftCPU](https://hackmd.io/@sysprog/2020-arch-homework3) (Due: Nov 16)
* Week 9: Control, Pipeline
- [Collaborative notes](https://hackmd.io/58CYrCJhS56clW7CF9AZeg)
- Announcement: quiz4 on Nov17: CPU datapath, control, pipeline
- video: [Are Computers Still Getting Faster?](https://youtu.be/IuLxX07isNg)
- [Single-Cycle CPU Control](https://drive.google.com/drive/folders/1QAqqFyQUAu8GE_FvvqGHlF_Nk5VKzleC) / [video](https://youtu.be/0WnPU46zjbA)
- MIT 6.004 [L15: Introduction to Pipelining](https://youtu.be/5NQkhqZe8_8), [L16: Processor Pipelining](https://youtu.be/TMpjvAvQCWA), [L17: Implementing Pipelining](https://youtu.be/Pr3-iFE-nCQ)
* Week 10: Pipelined Processors
- News: [XuanTie C906 based Allwinner RISC-V processor to power $12+ Linux SBC’s](https://www.cnx-software.com/2020/11/09/xuantie-c906-based-allwinner-risc-v-processor-to-power-12-linux-sbcs/)
- [0 to ASIC](https://docs.google.com/presentation/d/14npvuiGxsS3C-yo2vOsbZpNKGehwTtIYRFN6k3ZVR4M/edit#slide=id.p)
- [RISC-V: Why the ISA battles are not over yet](https://hackaday.com/2019/11/12/risc-v-why-the-isa-battles-arent-over-yet)
- [L18: Implementing Pipelined Processors](https://youtu.be/WdbCaCoOgVY)
- [RISC-V 5-Stage Pipeline / Hazards](https://cs61c.org/su20/lectures?file=lec14.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aq-xpoKcmd7X9w-l6KHiNMa)
- [Complex Pipelines, Out-of-Order Issue, Register Renaming](https://inst.eecs.berkeley.edu/~cs152/sp19/lectures/L10-ComplexPipes.pdf)
* Week 11: Quiz + Homework Review
- [Quiz4](https://hackmd.io/@sysprog/arch2020-quiz4)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz4-sol)
- [13-Year-Old, Nicholas Sharkey, Creates a RISC-V Core](https://riscv.org/blog/2020/11/13-year-old-nicholas-sharkey-creates-a-risc-v-core/)
- [ARM1 vs. Apple M1](https://twitter.com/kenshirriff/status/1327021630636212224)
* Week 12: Cache + Virtual Memory
- Announcement: Quiz on Dec 1 - pipeline, cache and virtual memory
- [Caches: Direct-mapped, set-associative](https://cs61c.org/su20/lectures?file=lec16.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0apRiQ2QPjzyq8APGEjnqW1w)
- [Multi-level Caches, Cache Questions](https://cs61c.org/su20/lectures?file=lec17.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqHsuO6U2bIpwDGqO6UAetk)
- [The golden age of ever-changing computer architecture](https://hackaday.com/2019/11/27/the-golden-age-of-ever-changing-computer-architecture/)
- [Virtual Memory](https://6004.mit.edu/web/_static/fall20/resources/lectures/L18.pdf) / [video](https://youtu.be/TsxZlXOrt8U)
* Week13: Quiz + Virtual Memory
- [Quiz5](https://hackmd.io/@sysprog/arch2020-quiz5)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz5-sol)
- [Virtual Memory](https://6004.mit.edu/web/_static/fall20/resources/lectures/L18.pdf) / [video](https://youtu.be/TsxZlXOrt8U)
- [Term projects 2019](https://hackmd.io/@wsp50317/H1Qa8hVk8)
* Implement [RISC-V Compressed Instruction Set](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-209.pdf) on [rv32emu](https://github.com/sysprog21/rv32emu)
* Implement [RISC-V Compressed Instruction Set](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-209.pdf) for [Reindeer](https://github.com/PulseRain/Reindeer), based on pull request [RV32C support](https://github.com/PulseRain/Reindeer/pull/25). must be validated on Step CYC10 FPGA board.
* Contribute to [Ripes](https://github.com/mortbopet/Ripes/issues): pick up pending issues, work on them, and finally send pull request(s).
* Prepare practical tutorials for [VSRTL](https://github.com/mortbopet/VSRTL/tree/master/docs), thus people can follow the instructions for implementing minimal RISC-V core such as [minrv32](https://github.com/arghhhh/minrv32).
* Analyze [spu32](https://github.com/maikmerten/spu32) with Yosys open synthesis suite. Explain how it works and validate it.
* Analyze [VexRiscv](https://github.com/SpinalHDL/VexRiscv). Explain how it works and validate it.
* Modify [Reindeer](https://github.com/PulseRain/Reindeer) to allow non-trial interactive games on Step CYC10 FPGA board, based on [Reindeer_Step](https://github.com/PulseRain/Reindeer_Step) and Zephyr RTOS.
- [Lab4: Cache](https://cs61c.org/fa20/labs/lab08/)
+ [Reference work](https://hackmd.io/@Lt35rTMeTi22rWqrBgSQzg/SkXXQ_LJ8)
* Week14: Synchronization
- Announcement: Quiz on Dec 22
- Assignment: [Homework4: Cache](https://hackmd.io/@sysprog/2020-arch-homework4) (Due: Dec 26)
- [Operating Systems](https://cs61c.org/su20/lectures?file=lec18.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0arq3vh2gcLvr5isLK4CuK3B)
- [Synchronization](https://6004.mit.edu/web/_static/fall20/resources/lectures/L21.pdf) / [video](https://youtu.be/r8H_af_dCF0)
- [Thread-Level Parallelism](https://drive.google.com/drive/folders/1YtT3FEpZAROeZT5gg-uKgxO5hp0N2ii-) / [video](https://youtu.be/QLdN6p7-43U)
* Week15: Operating System and RISC-V
- [Term projects 2020](https://hackmd.io/@sysprog/arch2020-projects)
* You must provide the materials and demonstrate to the lecturer before Jan 19, 2021
- video: [The Future of Operating Systems on RISC-V](https://youtu.be/emnN9p4vhzk) / [transcript](https://www.infoq.com/presentations/risc-v-future/)
- [Advanced topics on Synchronization - 1](https://inst.eecs.berkeley.edu/~cs152/sp20/lectures/L19-MCM.pdf)
- [Advanced topics on Synchronization - 2](https://inst.eecs.berkeley.edu/~cs152/sp20/lectures/L22-Synch.pdf)
* Week16: I/O, cache coherence
- [Term projects 2020](https://hackmd.io/@sysprog/arch2020-projects)
* You must provide the materials and demonstrate to the lecturer before Jan 19, 2021
- [Quiz6](https://hackmd.io/@sysprog/arch2020-quiz6)
* [solution](https://hackmd.io/@sysprog/arch2020-quiz6-sol)
- [I/O: Devices, Polling, Interrupts](https://drive.google.com/drive/folders/1NRoyYSbAyarMhmPD5LiY6YEqYpLoZx_s) / [video](https://youtu.be/0dyqcFC_q2Q?t=570)
* Traps/Interrupts/Exceptions
* Trap Handling in 5-Stage Pipeline
- [Multithreading Issues, Cache Coherency](https://cs61c.org/su20/lectures?file=lec23.pdf) / [video](https://www.youtube.com/playlist?list=PLDoI-XvXO0aqgj_8Og51XoE7iyAu5yEWZ)
- [Cache Coherence](https://6004.mit.edu/web/_static/fall20/resources/lectures/L22.pdf) / [video](https://youtu.be/vxrok3KKuGQ)
* Modern microprocessors usually have 2 to 8 cores where each core has a private cache for performance
* Modified/Shared/Invalid (MSI) Protocol, MESI: An Enhanced MSI protocol to increased performance for private read-write data
* Week17: class will be suspended
* Week18
- [Modern Processor Architecture](https://6004.mit.edu/web/_static/fall20/resources/lectures/L23.pdf) / [video](https://youtu.be/sbGtFtxqkkg)
- [Introduction to Dynamic Branch Prediction](https://youtu.be/PFmx2p6NA0A), [Advanced Branch Prediction](https://youtu.be/avp3bDqCXYM), [Tournament Predictors and Branch Prediction Accuracy](https://youtu.be/-T8yDJ8vTuI), [Hardware Based Speculation](https://youtu.be/mFtX28lH4O8)
Computer Architecture (Fall 2019)
------------------------------------------------------
* Week 1 (Sep 12)
- David Patterson: [A New Golden Age for Computer Architecture: History, Challenges and Opportunities](https://content.riscv.org/wp-content/uploads/2018/12/A-New-Golden-Age-for-Computer-Architecture-History-Challenges-and-Opportunities-David-Patterson-.pdf) / [video](https://youtu.be/uyc_pDBJotI)
* [Article](https://cacm.acm.org/magazines/2019/2/234352-a-new-golden-age-for-computer-architecture/fulltext), [note](https://cyyeh.github.io/new-golden-age-for-computer-architecture/)
* [From Mainframe CPUs to Neural-Network TPUs and Open RISC-V](https://youtu.be/eH9_ygsio3I)
- [Great Ideas in Computer Architecture, Intro](https://drive.google.com/open?id=1Y4yUaw9vryZcdc4Xu0RQxHfqjVbeHJLF) / [video](https://youtu.be/u_hXH5-tbM4)
- [Number Representation](https://drive.google.com/drive/folders/1_Zbt8KdwieLsqRdfc6aNBOa2_hEmFkxR)
* [解讀計算機編碼](https://hackmd.io/@sysprog/rylUqXLsm), [基於 C 語言標準研究與系統程式安全議題](https://hackmd.io/@sysprog/S15o_K3cQ)
- [Floating Point](https://drive.google.com/drive/folders/147xm_DhklkevG6602mH4yoGuVMw-3GQZ?usp=sharing) / [C 語言: 數值系統](https://hackmd.io/s/BkRKhQGae)
- [C Memory Management](https://drive.google.com/drive/folders/1pHpHRvjEg5TdidIp_fkOrh6TvMlYl5Yj?usp=sharing) / [video](https://youtu.be/fhEE4J4QCps)
* Week 2 (Sep 19): Quiz
- [Form of the contact information](https://forms.gle/qx8FHJgepCwNtwnA9)
* Week 3 (Sep 26): Suspension
* Week 4 (Oct 3): RISC-V
- [Lab0: Web-based Emulators](https://hackmd.io/@sysprog/SJ7ht_MuS)
- [Introduction to RISC-V Assembly language : Arithmetic](https://drive.google.com/drive/folders/1dtSqX4RlLlfXk2jN8J1vvior35z_5QfZ)
* [The RISC-V Instruction Set Manual: Volume I: Unprivileged ISA](https://content.riscv.org/wp-content/uploads/2019/06/riscv-spec.pdf), [RV32I](https://tclin914.github.io/16df19b4/), [深度剖析 RISC-V 處理器熱潮](https://www.edntaiwan.com/news/article/20181211NT31-analysis-the-wave-of-RISC-V-processor)
- [RISC-V lw, sw, Decisions I](https://drive.google.com/open?id=1sPgw8TnaLNvL71uaXLE_vNaXmNrbRHNc) / [video](https://youtu.be/5hwH9ofpNzI)
- [RISC-V Decisions II](https://drive.google.com/drive/folders/16-usv7Hk1XmIE4HP-nTzFKtkvuSlFCg8?usp=sharing)
- [RISC-V Procedure](https://drive.google.com/drive/folders/1cfEGzvxlVuSPuY-vN9YR-XlkJwfL2Ana)
- [Lab1: R32I Simulator](https://hackmd.io/@sysprog/H1TpVYMdB)
- Practice: [Floating Point + RISC-V Intro](https://cs61c.org/disc/disc3sol.pdf)
- Assignment: [Homework1: RISC-V Assembly and Instruction Pipeline](https://hackmd.io/ZHsZ-7HBTvqtH8SoDHxQoQ) (Due: Oct 16, 2019)
* Week 5 (Oct 10): Holiday
* Week 6 (Oct 17): RISC-V and Toolchain
- [Lab2: RISC-V RV32I[MA] emulator with ELF support](https://hackmd.io/@sysprog/rJAufgHYS)
- RISC-V Instruction Formats I / [video](https://youtu.be/ZQFcqLUduEY)
- [Compilation, Assembly, Linking, Loading](https://drive.google.com/drive/folders/1oJIZ_c88oJVuXPE1JqgdvyoIlRFJ20hI?usp=sharing)
+ [你所不知道的 C 語言: 編譯器和最佳化原理篇](https://hackmd.io/s/Hy72937Me), [你所不知道的 C 語言: 連結器和執行檔資訊](https://hackmd.io/s/SysiUkgUV), [你所不知道的 C 語言: 執行階段程式庫 (CRT)](https://hackmd.io/s/Hkcr5cn97)
- Assignment: [Homework2: RISC-V Toolchain](https://hackmd.io/FzhnlsLVQNybzn3QenEcgw) (Due: Oct 30, 2019)
- Further reading [FPGA design for Software Engineers](https://www.walknsqualk.com/post/014-tiny-fpga-bx/)
* Week 7 (Oct 24): RISC-V and Digital Systems
- ANN: Next week, we will have another quiz.
- [RISC-V Procedures](https://drive.google.com/drive/folders/1cfEGzvxlVuSPuY-vN9YR-XlkJwfL2Ana)
- Practice: [RISC-V Control Flow](https://cs61c.org/disc/disc4sol.pdf), [CALL, RISC-V Procedures](https://cs61c.org/disc/disc05sol.pdf)
- Practice: [CS 152 Computer Architecture and Engineering - Midterm #1](https://inst.eecs.berkeley.edu/~cs152/sp19/handouts/sp19/sp19-midterm-1-sol.pdf)
+ Problem 2: Microcoding: writing microcode for a bus-based implementation of the RISC-V machine
+ Problem 3: 5-Stage Pipelines
- [Intro to Synchronous Digital Systems](https://drive.google.com/drive/folders/1UgD80q-fC-7VU4Kxs3eX6izDGv-YStUX) / [video](https://youtu.be/w1EHBcj9NmM?t=149)
* [handout](https://cs61c.org/assets/resources/sds.pdf)
* [nand2tetris](https://www.nand2tetris.org/)
- [State](https://drive.google.com/drive/folders/191hgpogLZeeHtHD7ItfU5Er6ercTuqM5)
- [Combinational Logic](https://drive.google.com/drive/folders/12eeJc-QN72OulGnzR3Bp468n09abAbCZ)
- [Combinational Logic Blocks](https://drive.google.com/drive/folders/1qZBfSlfpKvgdO-_hMX6nszaaKWZbNyQV) / [video](https://youtu.be/RCgPysqIcWM)
- Practice: [Logic](https://cs61c.org/disc/disc06sol.pdf)
* Week 8 (Oct 31): Datapath
- [Lab3: Reindeer - RISCV RV32I[M] Soft CPU](https://hackmd.io/@sysprog/rJw2A5DqS)
- [Single-Cycle CPU Datapath I](https://drive.google.com/drive/folders/1bPhEZJhqMB66nA3vLsC_BOCXJUgyiwrD)
- [Single-Cycle CPU Datapath II](https://drive.google.com/drive/folders/1VpDK9M0zHao0w0ImfGxMFh03iWHZJqpf)
- [Single-Cycle CPU Control](https://drive.google.com/drive/folders/1QAqqFyQUAu8GE_FvvqGHlF_Nk5VKzleC) / [video](https://youtu.be/0WnPU46zjbA)
- [Quiz](https://hackmd.io/@sysprog/r1yNy2PcH)
- Assignment: [Homework3: SoftCPU](https://hackmd.io/SJs--6vcH) (Due: Nov 20, 2019)
* Week 9 (Nov 7): Pipeline
- video: [Are Computers Still Getting Faster?](https://youtu.be/IuLxX07isNg)
- MIT 6.004 [L15: Introduction to Pipelining](https://youtu.be/5NQkhqZe8_8), [L16: Processor Pipelining](https://youtu.be/TMpjvAvQCWA), [L17: Implementing Pipelining](L17: Implementing Pipelining)
* [Lectures and Recitations](https://6004.mit.edu/web/fall19/resources/lectures)
- Practice: [RISC-V Single Cycle Datapath](https://cs61c.org/disc/disc07sol.pdf)
- [IEET Questionnaire Survey](http://ieet.csie.ncku.edu.tw/)
* Week 10 (Nov 14): Pipelined Proccesors
- News: [Next Generation of On-Device Vision Models: MobileNetV3 and MobileNetEdgeTPU](https://ai.googleblog.com/2019/11/introducing-next-generation-on-device.html)
- [RISC-V: Why the ISA battles are not over yet](https://hackaday.com/2019/11/12/risc-v-why-the-isa-battles-arent-over-yet)
- [L18: Implementing Pipelined Processors](https://youtu.be/WdbCaCoOgVY)
- [Complex Pipelines, Out-of-Order Issue, Register Renaming](https://inst.eecs.berkeley.edu/~cs152/sp19/lectures/L10-ComplexPipes.pdf)
- Practice: [Pipelining](https://6004.mit.edu/web/_static/fall19/resources/lectures/L12.ws_solutions.pdf), [RISC-V Pipelining and Hazards](https://cs61c.org/disc/disc08sol.pdf)
- [Quiz](https://hackmd.io/@sysprog/SkJr779oS)
* Week 11 (Nov 21): Cache
- [Cache](https://6004.mit.edu/web/_static/fall19/resources/lectures/L16.pdf) / [video](https://youtu.be/HF-A3EegFQw)
* [Practice: Cache](https://6004.mit.edu/web/_static/fall19/resources/lectures/L16.ws_solutions.pdf)
- [Quiz](https://hackmd.io/@sysprog/Bkobj8mhB)
* Week 12 (Nov 28): Virtual Memory
- [The golden age of ever-changing computer architecture](https://hackaday.com/2019/11/27/the-golden-age-of-ever-changing-computer-architecture/)
- [Virtual Memory](https://6004.mit.edu/web/_static/fall19/resources/lectures/L18.pdf) / [video](https://youtu.be/TsxZlXOrt8U)
* [Practice: Virtual Memory](https://6004.mit.edu/web/_static/fall19/resources/lectures/L18.ws_solutions.pdf)
- [Quiz](https://hackmd.io/H1usNc33S)
* Week13 (Dec 5): [State-of-the-Art mobile computing](https://www.dictionary.com/browse/state-of-the-art) & Synchronization
- Processors in 5G era: Cortex-A77 + Cortex-A55
* Mediatek: [Bringing 5G to Everyone](https://i.mediatek.com/mediatek-5g), [聯發科技首款5G系統單晶片天璣 1000擁有高運算與連網性能](https://news.xfastest.com/interview/73109/)
* [Qualcomm Introduces the World’s Most Advanced 5G Mobile Platform](https://www.qualcomm.com/news/releases/2019/12/04/qualcomm-introduces-worlds-most-advanced-5g-mobile-platform), [高通在 Snapdragon 865 上進一步增強了拍攝和遊戲特性](https://chinese.engadget.com/2019/12/04/snapdragon-865-gigapixel-camera-5g-ai-specs-availability/)
- [The Race to Exascale at Supercomputer 2019](https://www.eetimes.com/document.asp?doc_id=1335333)
- [zh_TW translation](https://www.eettaiwan.com/news/article/20191203NT01-race-to-exascale-at-supercomputer-2019)
- Term projects (due date: Jan 5, 2020)
* [explore the workings of virtual memory, specifically the TLB and the Page Table](https://cs61c.org/labs/lab10/)
* Implement [RISC-V Compressed Instruction Set](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-209.pdf) on [rv32emu](https://github.com/sysprog21/rv32emu)
* Implement [RISC-V Compressed Instruction Set](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-209.pdf) for [Reindeer](https://github.com/PulseRain/Reindeer), based on pull request [RV32C support](https://github.com/PulseRain/Reindeer/pull/25). must be validated on Step CYC10 FPGA board.
* Contribute to [Ripes](https://github.com/mortbopet/Ripes/issues): pick up pending issues, work on them, and finally send pull request(s).
* Prepare practical tutorials for [VSRTL](https://github.com/mortbopet/VSRTL/tree/master/docs), thus people can follow the instructions for implementing minimal RISC-V core such as [minrv32](https://github.com/arghhhh/minrv32).
* Analyze [spu32](https://github.com/maikmerten/spu32) with Yosys open synthesis suite. Explain how it works and validate it.
* Analyze [VexRiscv](https://github.com/SpinalHDL/VexRiscv). Explain how it works and validate it.
* Modify [Reindeer](https://github.com/PulseRain/Reindeer) to allow non-trial interactive games on Step CYC10 FPGA board, based on [Reindeer_Step](https://github.com/PulseRain/Reindeer_Step) and Zephyr RTOS.
- [Synchronization](https://6004.mit.edu/web/_static/fall19/resources/lectures/L21.pdf) / [video](https://youtu.be/r8H_af_dCF0)
* Week14 (Dec 12): Synchronization
- [Intel’s SGX coughs up crypto keys when scientists tweak CPU voltage](https://arstechnica.com/information-technology/2019/12/scientists-pluck-crypto-keys-from-intels-sgx-by-tweaking-cpu-voltage/) / [部分英特爾CPU存在Plundervolt漏洞,駭客可透過操縱電壓來偷取敏感資料](https://www.ithome.com.tw/news/134758)
- [Attacking the ARM's TrustZone](https://blog.quarkslab.com/attacking-the-arms-trustzone.html) / video: [ARM TrustZone for dummies](https://youtu.be/ecBByjwny3s)
- [Synchronization](https://6004.mit.edu/web/_static/fall19/resources/lectures/L21.pdf) / [video](https://youtu.be/r8H_af_dCF0)
* [Advanced topics](https://inst.eecs.berkeley.edu/~cs152/sp19/lectures/L22-Synch.pdf)
- [Thread-Level Parallelism](https://drive.google.com/drive/folders/1YtT3FEpZAROeZT5gg-uKgxO5hp0N2ii-) / [video](https://youtu.be/QLdN6p7-43U)
- [Quiz](https://hackmd.io/@sysprog/S1kq5T0pH)
* Week15 (Dec 19): I/O and Cache Coherence
- Announce: Last quiz on Dec 26, Review final project on Jan 2
- [I/O: Devices, Polling, Interrupts](https://drive.google.com/drive/folders/1NRoyYSbAyarMhmPD5LiY6YEqYpLoZx_s) / [video](https://youtu.be/0dyqcFC_q2Q)
* Traps/Interrupts/Exceptions
* Trap Handling in 5-Stage Pipeline
- [Cache Coherence](https://6004.mit.edu/web/_static/fall19/resources/lectures/L22.pdf) / [video](https://youtu.be/vxrok3KKuGQ)
* Modern microprocessors usually have 2 to 8 cores where each core has a private cache for performance
* Modified/Shared/Invalid (MSI) Protocol, MESI: An Enhanced MSI protocol to increased performance for private read-write data
- [Modern Processor Architecture](https://6004.mit.edu/web/_static/fall19/resources/lectures/L23.pdf) / [video](https://youtu.be/sbGtFtxqkkg)
* Week16 (Dec 26): Review and Branch Prediction
- video: [The Future of Operating Systems on RISC-V](https://youtu.be/emnN9p4vhzk) / [transcript](https://www.infoq.com/presentations/risc-v-future/)
- [Introduction to Dynamic Branch Prediction](https://youtu.be/PFmx2p6NA0A), [Advanced Branch Prediction](https://youtu.be/avp3bDqCXYM), [Tournament Predictors and Branch Prediction Accuracy](https://youtu.be/-T8yDJ8vTuI), [Hardware Based Speculation](https://youtu.be/mFtX28lH4O8)
- [quiz](https://hackmd.io/@sysprog/Sya-GLW18)
- [Table for Term Project](https://hackmd.io/YNOELNJ_RyCMHs81uMz6xA)
* Week17 (Jan 2): Term Project Review
- [Datacenters & Cloud Computing](https://drive.google.com/drive/folders/1IOvNP6d7-Ja-QKRR6l1yYxsQbNCUBzk8)
* video: [Inside a Google data center](https://youtu.be/XZmGGAbHqa0), [Inside Facebook's Oregon data center](https://youtu.be/4A_A-CmrqpQ)
- [Term Project Table](https://hackmd.io/@wsp50317/H1Qa8hVk8)