-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
872 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Introduction to Mathematical Logic (CS104) | ||
|
||
The course introduces the necessary concepts of mathematical logic in computer science. | ||
|
||
## About | ||
|
||
- **Instructor:** `Mingxin He (何明昕)` | ||
- **Semester:** `2023 Spring` | ||
- **Textbook:** `Introduction To Logic, 14th edition, Copi&Cohen` | ||
|
||
## Content | ||
|
||
- [Slides](./Slides): Lecture slides | ||
- [Assignment](./Assignment): Handwritten assignments with full problems and reference solutions | ||
- [Text](./Text): Reading materials | ||
|
||
| Chapter | Content | Note | | ||
| -------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | | ||
| Introduction | Overview<br>Inference Rules<br>Syntax Parsing | Lots of rules to remember :( | | ||
| Natural Deduction | Derivations and proofs<br>Semantics and Truth Table | Know how to prove the sequent | | ||
| Formal Proof | Rules and Proofs<br>Equivalence<br>Normal Forms<br>SAT<br>Resolutions with Completeness | Lots of concepts :( | | ||
| First Order Logic | Rules & Formal Proof in FOL<br>Substitution<br>CNF<br>Terms and Unification<br>Resolution | Qualifiers matter | | ||
| Program Verification | Assignment & Array<br>Condition<br>Loop<br>Correctness | Hard to write a program<br>Even harder to prove its correctness | | ||
|
||
## Exam | ||
|
||
The test problems are similar to the assignments. It's allowed to bring a hand-written cheatsheet in A4 size. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Introduction to Programming in Java (CS109) | ||
SUSTech `CS109` is a course of programming in `Java`, intended for the freshmen undergraduate. | ||
|
||
!!! warning | ||
Any use of my code is allowed, while COPING and SUBMITTING to the OJ is highly prohibited. DON'T ruin yourself. | ||
|
||
## About | ||
The folder contains two semsester's materials. In the first semsester, I was a student of the course, and in the second semsester, I was a student assistant. The course is taught by two professors, and the course content is largely the same. | ||
|
||
!!! note | ||
**Instructor:** `Zhuozhao Li (李卓钊)` | ||
|
||
**Semester:** `2022 Fall` | ||
|
||
We have a lab(LAB) every week and professor only requires us to submit one exercise(E) | ||
|
||
!!! note | ||
**Instructor:** `Fengwei Zhang (张锋巍)` | ||
|
||
**Semester:** `2023 Spring` | ||
|
||
I served as student assistant at the Spring of 2023. Assignment 4 and 5 will be filled up if u raise an issue.( | ||
|
||
## Content | ||
|
||
This folder collects my code for the assignment and practice in laboratory, and also contains my humble thoughts of the problem, which I post on github to share with you. If you've solved the problem, welcome to check my method. And if you have trouble solving the problem, my code may provide you with some hints. | ||
|
||
- 2022_Fall | ||
* [Solutions](./2022_Fall/Solutions): Codes and notes for the assignments (5 in total) | ||
* [Lab](./2022_Fall/Lab): Practices in lab | ||
- 2023_Spring | ||
* [Assignment](./2023_Spring/Assignment): Reference codes | ||
* [Lab Material](./2023_Spring/Lab_Material): Slides that I use in lab | ||
* [Project](https://github.com/chanbengz/SUSTech_CS109_Project/): Project requirements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Discrete Math (CS201) | ||
|
||
The course introduces the necessary mathematics knowledge for computer science. The scope spreads widely and therefore, it might not dive in too much. Don't let the flood of concepts and proofs scare you. The best way to learn discrete math is to read the slides carefully and know the steps to solve the homework by heart. | ||
|
||
## About | ||
|
||
- **Instructor:** `Shan CHEN (陈杉)` | ||
- **Semester:** `2023 Fall` | ||
- **Textbook:** `Discrete Mathematics and Its Applications` | ||
|
||
## Content | ||
|
||
- [Slides](./Slides): Lecture slides | ||
- [Assignment](./Assignment): Theoretical practice written in $\LaTeX$ | ||
- [submit](Assignment/submit): PDF documents for submission | ||
|
||
- [Project](Project/): Semester project research about cryptography security | ||
|
||
| Chapter | Content | Note | | ||
| ------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | ||
| Logic and Proofs | Propositional Logic<br>Predicate Logic<br>Proof and Logic Equivalence | Most Abstract Part<br>Follow the Logic | | ||
| Sets and Functions | Sets and Cardinality<br>Function<br>Sequence and Summation<br>Countability of Sets | Proof Matters | | ||
| Complexity of Algorithms | Growth<br>Complexity<br>P, NP, NPC and NP Hard | Concepts and Analysis of Algorithm | | ||
| Number Theory and Cryptography | Divisibility and Modular<br>Prime and (extended) GCD<br>Congruence and Invert<br>Chinese Remainder Theorem<br>Euler's Theorem<br>Fermat's Little Theorem<br>RSA and DH Key Exchange | Hardest Part<br>Computing and Proofs of the Theorem | | ||
| Induction and Recursion | Mathematical Induction<br>Recurrences<br>Master Theorem<br>Divide and Conquer | Proof by Induction<br>Expand Recusive Expression | | ||
| Counting | Basic Rules<br>Binomial Coefficients and Identities<br>Inclusion and Exclusion<br>Linear Recurrence Equation<br>Generating Functions | Calculation Matters | | ||
| Relation | Properties<br>Closure<br>$n$-ary Relation<br>Ordering and Comparability | Proof Matters | | ||
| Graph and Trees | Basic Concepts and Properties<br>Representation and Isomorphism<br>Connectivity<br>Euler and Hamilton Paths<br>Planar<br>Coloring<br>Shortest Path<br>Trees and MST | The most useful part<br>Similar to the content of DSAA (CS 203) | | ||
|
||
## Project | ||
|
||
|
||
|
||
## Exam | ||
|
||
Well, professor Chen won't leak any exam questions, however, the exam comes mostly from the homework and the slides. If you'd like to do some exam questions, refer to [wLUOw's repo](https://github.com/wLUOw/SUSTech_Math_Course_Materials/tree/master/CS201%20%E7%A6%BB%E6%95%A3%E6%95%B0%E5%AD%A6/6-%E8%80%83%E8%AF%95%E8%AF%95%E9%A2%98) | ||
|
||
## Build | ||
|
||
If you want to make some changes to my answer and compile it on your own, change to the directory of this course and execute the command | ||
|
||
```bash | ||
make | ||
make clean | ||
``` | ||
|
||
Then you can view it in the [submit](Assignment/submit) folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Computer Organization (CS202) | ||
|
||
## About | ||
|
||
- **Instructor:** `Yuhui BAI (白雨卉)` | ||
- **TA:** `Qing WANG (王晴)` | ||
- **Semester:** `2024 Spring` | ||
- **Textbook:** `Computer Organization and Design: The Hardware/Software Interface` | ||
|
||
## Content | ||
|
||
- [Assignment](./Assignment): homework | ||
- [Programming](./Assignment/Programming): lab assignment written in Verilog | ||
- [Theory](./Assignment/Theory): theory assignment written in Typst. ~~Well, LaTeX is deprecated~~ | ||
- [Lab](./Lab): lab practice | ||
- [Slides](./Slides): slides for lectures | ||
- [Project](./Project): project, build a CPU from scratch | ||
- [Text](./Text): textbook and RISC-V reference | ||
|
||
| Lecture | Topic | Note | | ||
| ------- | ----- | ---- | | ||
| [lec1](./Slides/CompOrg_24S_Lec1_Introduction.pdf) | Syllabus and Overview | Intro to the principles of computer processor | | ||
| [lec2](./Slides/CompOrg_24S_Lec2_RISC-V_Intro.pdf) | ISA, RISC-V and Intro to Assembly | RISC-V is an ISA (Instruction Set Architecture)<br>Programming in RISC-V Assembly Code | | ||
| [lec3](./Slides/CompOrg_24S_Lec3_RISC-V_Procedure.pdf) | Control Flow and Stack | Direct and Conditional Branch<br>Calling Convention in RISC-V | | ||
| [lec4](./Slides/CompOrg_24S_Lec4_RISC-V_Format.pdf) | Binary Format | Structure of RISC-V Machine Code | | ||
| [lec5](./Slides/CompOrg_24S_Lec5_Performance.pdf) | Performance Measurement | Calculation of Processor's Performance: CPI and SPEC | | ||
| [lec6](./Slides/CompOrg_24S_Lec6_Arithmetic.pdf) | Execution of Integers | Add, Substraction, Multiplication and Division | | ||
| [lec7](./Slides/CompOrg_24S_Lec7_FP_Arithmetic.pdf) | Float Point Number (Decimal) Arithmetic | Standard for Float and Double<br>Add/Sub, Mul/Div of FP<br>Matrix Operation, SIMD | | ||
| [lec8](./Slides/CompOrg_24S_Lec8_Processor.pdf) | Single-Cycle Processor Design | Elements in CPU<br>Data Path<br>Clocking Methodology | | ||
| [lec9](./Slides/CompOrg_24S_Lec9_Pipeline.pdf) | Pipelined CPU Design | Stage Register<br>Hazards and Solution | | ||
| [lec10](./Slides/CompOrg_24S_Lec10_ILP.pdf) | Instruction-Level Parallelism | Statical Multi-issue Design<br>Loop Unrolling<br>Hazards | | ||
| [lec11](./Slides/CompOrg_24S_Lec11_Memory.pdf) | Intro to Cache | Functions and Strategies of Direc-Mapped Cache | | ||
| [lec12](./Slides/CompOrg_24S_Lec12_Memory2.pdf) | Cache Cont'd | N-way Set Associative Cache<br>Full Associative Cache<br>Efficiency Measurement<br>Multi-Level Cache | | ||
| [lec13](./Slides/CompOrg_24S_Lec13_Memory3.pdf) | Virtual Memory | Page Table<br>Address Translation<br>Replacement & TLB | | ||
| [lec14](./Slides/CompOrg_24S_Lec14_ParallelProcess.pdf) | Multi-Core Concepts | Calculation of Multi-Core Speedup<br>Multithreading<br>Intro to GPU | | ||
|
||
Summary: Processor, Memory, Parallel. Design and Data Path, every detail matters. | ||
|
||
## Project | ||
|
||
The project topic remains the (possibly) forever, to build a CPU from scratch. Though the codes are available online, it's strongly recommended to write your own without referring to any existing code. General steps are as follows: | ||
1. Understanding the design of single-cycle CPU from the textbook but I won't suggest referring it due to the flaws in that design. | ||
2. Based on your understanding, draw the figure of your CPU from scratch, which means to redesign the datapath within your mind without referring the textbook, on paper or using any software like [draw.io](https://draw.io). | ||
3. Pay attention to the scalability of your design, i.e., how to extend the ISA esaily in your design. And you will know why textbook is wrong. | ||
4. Try implemeting the full version of RV32I, or it'll be hard to extend the ISA in the future since it requires to modify the design heavily. | ||
5. On the basis of well-functioning, try to optimize the design, like pipelining, hazard handling, cache, branch prediction, etc. | ||
|
||
Have fun with your CPU design! | ||
|
Oops, something went wrong.