分享到plurk 分享到twitter 分享到facebook

版本 7a0d33b753731e263ce8a8831b115ee3b799d131

arch/schedule-old

Changes from beginning to 7a0d33b753731e263ce8a8831b115ee3b799d131

---
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/)
- Policy
    * Follow the classes: [CS 61C at UC Berkeley](https://cs61c.org/), [CS152/252: Computer Architecture](https://inst.eecs.berkeley.edu/~cs152/sp19/)
- Course grading
    * Quiz (20%), Homework (40%), Final Project (40%)

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)