版本 c62dc07f01c21a049b15e4b6eb2859355d97bd18
Computer Architecture
- Instructor: Jim Huang (黃敬群)
<jserv.tw@gmail.com>
- Facebook Group: https://www.facebook.com/groups/system.software2023/
- Policy
- Follow the classes: CS 61C at UC Berkeley, CS152/252: Computer Architecture
- Course grading
- Quiz (30%), Homework (30%), Final/Term Project (40%)
- Schedule is tentative and subject to change!
Computer Architecture (Fall 2023)
- Week 1 (Sep 5): Introduction
- Course Introduction
- David Patterson: A New Golden Age for Computer Architecture: History, Challenges and Opportunities / video
- David Patterson: From Mainframe CPUs to Neural-Network TPUs and Open RISC-V / video
- Great Ideas in Computer Architecture, Intro / video
- Number Representation / video
- Floating Point / video
- C Memory Management / video
- Week 2 (Sep 12): Quiz + RISC-V / online via YouTube
- 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: C programming, bit-wise operations, number representation, floating-point / Solutions
- RISC-V Instructions
- Announcement
- Week 3 (Sep 19): RISC-V
- Announcement:
- Quiz2 is scheduled on Sep 26
- 2022 Quiz2: RISC-V assembly and C programming / solution
- 2021 Quiz2: RISC-V assembly and C programming / solution
- Homework 1 is out.
- Code Review for Homework 1 on Oct 3
- Quiz2 is scheduled on Sep 26
- Apple A17 Pro
- 19 billion transistors compared to 16 billion on the A16. further reading
- graphics benchmark
- ARM1 (1985) vs. Apple M1 Max (2021)
- Apple Announces M1 Pro & M1 Max: Giant New Arm SoCs with All-Out Performance
- RISC-V Summit China 2023 / slides
- Intro to Assembly Language and RISC-V / video
- RISC-V Data Transfer / video
- RISC-V Decision Making
- Functions Calls with RISC-V / video
- Lab0: Web-based Emulators
- Lab1: RV32I Assembly
- Assignment: Homework1: RISC-V Assembly and Instruction Pipeline (Due: Oct 10, 2023)
- Announcement:
- Week 4 (Sep 26): Quiz + RISC-V
- Errata
- 2023 Quiz1: Additional
x += (x >> 32)
statement in Problem A
- 2023 Quiz1: Additional
- Quiz2: RISC-V assembly and C programming / solution
- Fixed-point Arithmetic
- NASA, Microchip, SiFive Announces Partnership for RISC-V Spaceflight Computing Platform
- ST, CAES team on octacore RISC-V space chip with selectable cores
- Calling Convention for RISC-V / video
- CALL = Compiling, Assembling, Linking, and Loading / video
- Errata
- Week 5 (Oct 3): Code Review + RISC-V Instruction Format + GNU Toolchain
- Announcement
- Homework2: RISC-V Toolchain is out.
- Code Review on Homework1: RISC-V Assembly and Instruction Pipeline
- Lab2: RISC-V RV32I[MACF] emulator with ELF support
- Assignment: Homework2: RISC-V Toolchain (Due: Oct 31)
- RISC-V Instruction Formats Part I / Part II / video
- Announcement
- Week 6 (Oct 10): National Day | make up a lesson on Oct 12 night via YouTube
- Announcement:
- Given the consistent progress of the lecture, we will schedule a makeup lesson for 19:30 on October 12th via YouTube.
- Homework2: RISC-V Toolchain is out. (Due: Oct 31)
- RISC-V Instruction Formats Part I / Part II / video
- Further reading FPGA design for Software Engineers
- Announcement:
- 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.
- Code Review for Homework 2 is scheduled for Oct 24.
- Binary marble adding machine / video
- 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
- Synchronous Digital Systems (SDS), Boolean Algebra / video
- 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, Combinational Logic / video
- Announcement:
- Week 8 (Oct 24): Quiz + Datapath and Control
- Quiz3: RISC-V programming and instruction encoding + Digital systems / solution
- RISC-V CPU Datapath / video
- Week 9 (Oct 31): online via YouTube; Datapath and Control + Pipeline
- Announcement:
- New quiz is scheduled on Nov 14.
- Code Review for Homework 2 is scheduled on N14.
- video: Are Computers Still Getting Faster?
- video: Circuits recap
- Constructing Hardware in a Scala Embedded Language (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
- Finite impulse response (FIR)
- Learn Chisel online!
- Please run the cell blocks by either pressing SHIFT+ENTER on your keyboard
- RISC-V CPU Datapath / video
- Single-Cycle CPU Control / video
- MIT 6.191 L15: Introduction to Pipelining, L16: Processor Pipelining
- Announcement:
- Week 10 (Nov 7): Pipelined Processors
- Announcement:
- Homework3 is out.
- Next week, we will continue reviewing all the assignments.
- Quiz4 is scheduled next week.
- rv32emu development
- 0 to ASIC
- L16: Processor Pipelining, L17: Implementing Pipelining, L18: Implementing Pipelined Processors / note
- RISC-V 5-Stage Pipeline / Hazards / video
- Lab3: Construct a single-cycle CPU with Chisel
- Assignment: Homework3: Single-cycle CPU in Chisel (Due: Dec 1, 2023)
- Announcement:
- Week 11 (Nov 14): Quiz + Homework Review
- Quiz4: RISC-V programming + datapath + control + pipelined processor / solution
- Homework1, Homework2
- Complex Pipelines, Out-of-Order Issue, Register Renaming
- 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
- 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) 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 / video
- Multi-level Caches, Cache Questions / video
- Lab4: Cache
- Recall: The golden age of ever-changing computer architecture
- Announcement
- Week13 (Nov 28): online via YouTube: Virtual Memory + Operating System
- Announcement:
- Term projects will be listed on Dec 5. Term projects of 2022
- Virtual Memory / UCB: Virtual Memory / video
- Operating Systems / video
- RISC-V Vector extension
- Announcement:
- Week14 (Dec 5): Quiz + Synchronization
- Announcement:
- Check the listing of final/term projects and fill in your names.
- Quiz5: pipelined processor + cache + virtual memory / solution
- Apple Silicon Guide
- Debunking CISC vs RISC code density
- Operating Systems / video
- Synchronization
- Please check your operating system textbook for such topic.
- Thread-Level Parallelism / video
- Let’s skip OpenMP part
- Multithreading Issues + Cache Coherency / video
- Announcement:
- Week15 (Dec 12): Operating System, Multithreading
- Announcement:
- Quiz6 is scheduled on Dec 19
- 2022-Quiz6: pipelined processor + cache + virtual memory / solution
- 2021-Quiz7 / solution
- 2021-Quiz6 / solution
- 2020-Quiz6 / solution
- Quiz6 is scheduled on Dec 19
- video: The Future of Operating Systems on RISC-V / transcript
- Freestanding RISC-V Programs
- Multithreaded Application Synchronization Part I
- Announcement:
- Week16 (Dec 19): Quiz + Multithreading, Synchronization, I/O
- Quiz6 / solution
- Multithreaded Application Synchronization Part II
- RISC-V AMOSWAP instruction
- Advanced topics on Synchronization - 1
- Advanced topics on Synchronization - 2
- I/O: Devices, Polling, Interrupts / video
- Traps/Interrupts/Exceptions
- Trap Handling in 5-Stage Pipeline
- Week17 (Dec 26): Modern Processors
- listing of final/term 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
- Introduction to Dynamic Branch Prediction, Advanced Branch Prediction, Tournament Predictors and Branch Prediction Accuracy
- Project: Analyze and improve srv32
- Hardware Based Speculation
- listing of final/term projects
- Week 18 (Jan 2): Modern Processors
- Quiz7 / solution
- Modern Processor Architecture
- Introduction to Dynamic Branch Prediction, Advanced Branch Prediction, Tournament Predictors and Branch Prediction Accuracy
- Project: Analyze and improve srv32
- Hardware Based Speculation
- Case study: VRoom - very high end RISC-V implementation, cloud server class, out of order, super scalar, speculative, up to 8 IPC
- RISC vs. CISC by John Mashey, one of the founders of the Standard Performance Evaluation Corporation (SPEC) benchmarking group.