Skip to content

Commit f313711

Browse files
committed
co
- isa - cpu
1 parent 70f4efe commit f313711

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

content/Computer Organisation/Instruction Set Architecture (ISA)/Instruction Set Architecture (ISA).md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tags:
77
- computer_organisation
88
- bash
99
Creation Date: 2023-10-04T17:30:24+08:00
10-
Last Date: 2024-05-29T17:08:53+08:00
10+
Last Date: 2024-05-31T16:54:55+08:00
1111
References:
1212
---
1313
## Abstract
@@ -22,7 +22,7 @@ References:
2222
>[!important]
2323
> There are two types of ISA, [[#RISC]] and [[#CISC]]. Both don't decide the performance of [[CPU]]. [[CPU Cache]] and [[Branch Prediction]] are two main factors that determine the CPU performance.
2424
>
25-
> "**What limit's computer performance is predictability**" - [Jim Keller](https://www.youtube.com/watch?v=yTMRGERZrQE)
25+
> "**What limits computer performance is predictability**" - [Jim Keller](https://www.youtube.com/watch?v=yTMRGERZrQE)
2626
2727
## RISC
2828
---
@@ -39,7 +39,7 @@ References:
3939

4040

4141
>[!attention] Tedious
42-
> More complicated tasks require programmers to use more instructions to achieve. However, with modern [[Language Processors#Compiler]], programmers code in high-level languages like C, this isn't an issue anymore.
42+
> More complicated tasks require programmers to use more instructions to achieve. However, with modern [[Language Processors#Compiler]], programmers code in high-level languages like C, this **isn't an issue anymore**.
4343
4444
>[!success] Power-Efficient
4545
> Needs fewer [[Transistors (晶体管)]] to perform simple task.
@@ -69,17 +69,16 @@ References:
6969
![[isa.svg|500]]
7070

7171
- Stands for **Complex Instruction Set Computer**
72-
- [[Instruction]] in CSIC is like **pieces built with unique lego pieces** that can be used to get [[CPU]] to carry out **multiple operation** to **complete a particular task**. Unlike [[#CISC]] which only provides **unique lego pieces** that can be used to get CPU to carry out one operation. Thus, RISC has fewer possible Instruction
72+
- [[Instruction]] in CSIC is like **pieces built with unique lego pieces** that can be used to get [[CPU]] to carry out **multiple operation** in **one single instruction** to **complete a particular task**. Unlike [[#RISC]] which only provides **unique lego pieces** that can be used to get CPU to carry out one operation at a time. Thus, RISC has fewer possible Instruction
7373

7474
>[!success] Takes less resources to build applications
7575
> First, the programmers can code faster with **complex instructions**, because each instruction is able to do **multiple things**, you can think of it as a small function. Second, since one instruction is able to do multiple things, **less instructions are needed**, thus less usage on the [[Main Memory]].
7676
>
7777
> **However**, thanks to [[Language Processors#Compiler]], programmers seldom code in complex instructions anymore. And with modern [[Main Memory]], the space saved with CISC isn't significant anymore.
7878
7979

80-
8180
>[!attention] More complex decoder
82-
> [[Instruction#Variable-length Instruction]]. For [x86](https://en.wikipedia.org/wiki/X86_instruction_listings), the length of instructions range from **1-15 bytes**. So the decoder needs extra logic to determine if it is processing a new instruction.
81+
> [[Instruction#Variable-length Instruction]]. For [x86](https://en.wikipedia.org/wiki/X86_instruction_listings), the length of instructions range from **1-15 bytes**. So the decoder needs extra logic to determine if it is processing a new instruction. However, we can make use of [micro-op](https://miro.medium.com/v2/1*titoeiXLVZ-jBgaktnxJ2w.png) to handle this.
8382
8483
>[!attention] Requires more transistors
8584
> The **design** of [[CPU]] needs to be **complex** to achieve complex computation with fewer Instruction, so less [[Transistors (晶体管)]] can be used improve overall computing performance. Thus, more **power-hungry**, and **more wasted power** when **performing simple instruction**.
@@ -138,3 +137,4 @@ References:
138137
---
139138
- [Instruction Set Architectures](https://youtu.be/1KTW32xSs_k)
140139
- [ARM vs x86: 冷飯重炒的假議題 | RISC vs CISC分析 - YouTube](https://www.youtube.com/watch?v=iibDpt5f3T4)
140+
- [What the Heck is a Micro-Operation? | by Erik Engheim | Medium](https://erik-engheim.medium.com/what-the-heck-is-a-micro-operation-e991f76209e)

content/Computer Organisation/Processor/CPU.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Author Profile:
66
tags:
77
- computer_organisation
88
Creation Date: 2023-11-19T16:36:00
9-
Last Date: 2024-05-30T20:12:55+08:00
9+
Last Date: 2024-05-31T16:03:37+08:00
1010
References:
1111
---
1212
## Abstract
@@ -21,22 +21,23 @@ References:
2121
>[!tip] Understand the Intel/AMD CPU naming
2222
> This [video](https://youtu.be/EVMLQV9tH6A?si=lqBgxcYwvPYD5BUx) explains the naming mechanism of Intel/AMD CPU pretty well.
2323
24-
## CPU Core
25-
---
24+
### CPU Core
2625
- One single unit of [[CPU]] that executes [[Instruction]] independently from other **CPU cores**
2726

28-
## 32-bit CPU
29-
---
27+
### 32-bit CPU
3028
- [[Register#Register Width]] that are **32** [[Computer Data Representation#Bit]] each
3129
- Because 32bits, so maximum addressable [[Main Memory]] is 4GB. The [[Register]] can't hold a [[Memory Address]] that is greater than 4GB
3230
- The [[Computer Data Representation#Word]] size is usually **4** [[Computer Data Representation#Byte]]
3331

34-
## 64-bit CPU
35-
---
32+
### 64-bit CPU
3633
- [[Register#Register Width]] that are **64** [[Computer Data Representation#Bit]] each
3734
- Doesn't have the [[Main Memory]] 4GB limitation in [[#32-bit CPU]]
3835
- The [[Computer Data Representation#Word]] size is usually **8** [[Computer Data Representation#Byte]]
3936

37+
### CPU Scratch Area
38+
- A small amount of high-speed memory that is used to store temporary data in the [[CPU]]. [[Register]] and [[CPU Cache]] are considered as CPU Scratch Area
39+
40+
4041
## Hyperthreading
4142
---
4243

@@ -55,12 +56,6 @@ References:
5556

5657

5758

58-
## CPU Scratch Area
59-
---
60-
- A small amount of high-speed memory that is used to store temporary data
61-
62-
63-
6459
## References
6560
---
6661
- [What is Hyperthreading? - YouTube](https://www.youtube.com/watch?v=mSZpDF-zUoI)

0 commit comments

Comments
 (0)