Skip to content

Commit f1e6018

Browse files
committed
upload 0807 log of CPU
1 parent eb7bacc commit f1e6018

File tree

194 files changed

+8281
-995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+8281
-995
lines changed

content/posts/0907.md

Lines changed: 185 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,188 @@
11
+++
22
date = '2025-09-07T23:32:48+08:00'
3-
draft = true
4-
title = '0907'
3+
draft = false
4+
title = '0907学习日志'
5+
6+
categories="log"
7+
8+
tags=["计算机组成原理","CPU","指令执行过程","CPU的数据通路","硬布线","微程序","中断和异常"]
9+
510
+++
11+
12+
## 计算机组成原理-中央处理器
13+
14+
### CPU的功能和基本结构
15+
16+
1. CPU的功能
17+
1. 指令控制:取指令、分析指令和执行指令
18+
2. 操作控制
19+
3. 时间控制
20+
4. 数据加工
21+
5. 中断处理
22+
2. CPU的基本结构
23+
1. 运算器
24+
* ALU
25+
* 暂存寄存器
26+
* 累加寄存器ACC
27+
* 通用寄存器GPRs
28+
* 程序状态字寄存器PSW
29+
* 移位寄存器
30+
* 计数器
31+
2. 控制器
32+
* PC
33+
* 指令寄存器IR
34+
* 指令译码器ID
35+
* 存储器地址寄存器MAR
36+
* 存储器数据寄存器MDR
37+
* 时序电路
38+
* 微操作信号发生器
39+
3. CPU的寄存器
40+
1. 运算器的寄存器
41+
1. 通用寄存器组GPRs
42+
2. 累加从寄存器ACC
43+
3. 移位寄存器SR
44+
4. 暂存寄存器
45+
5. 程序状态字寄存器PSW
46+
2. 控制器中的寄存器
47+
1. 程序计数器PC
48+
2. 指令寄存器IR
49+
3. 存储器地址寄存器MAR
50+
4. 存储器数据寄存器MDR
51+
52+
53+
54+
### 指令执行过程
55+
56+
1. 指令周期
57+
58+
1. 定长的机器周期
59+
60+
| 取值周期 | 间址周期(取有效地址) | 执行周期(执行指令) |
61+
| -------- | ---------------------- | -------------------- |
62+
63+
2. 不定长的机器周期
64+
65+
| 取值周期 | 执行周期 |
66+
| -------- | -------- |
67+
68+
2. 指令周期的数据流
69+
70+
1. 取值周期
71+
1. PC - MAR - 地址总线 - 存储器
72+
2. CU 发出读命令 - 控制总线 - 存储器
73+
3. 主存 - 数据总线 - MDR - IR
74+
4. CU 发出控制信号 - PC内容加1
75+
2. 间址周期
76+
1. Ad(IR)或MDR - MAR - 地址总线 - 存储器
77+
2. CU发出读命令 - 控制总线 - 存储器
78+
3. 主存 - 数据总线 - MDR (EA)
79+
80+
3. 执行周期
81+
82+
取操作数,根据IR中的指令字的操作码通过ALU操作产生执行结果。
83+
84+
4. 中断周期
85+
86+
1. CU 控制将SP-1(stack pointer),SP - MAR - 地址总线-存储器
87+
2. CU 发出写命令 - 控制总线 - 存储器
88+
3. PC - MDR - 数据总线 - 主存 (程序断电存入存储器)
89+
4. CU (中断服务程序的入口地址)- PC
90+
91+
3. 指令执行方案
92+
93+
1. 单周期处理器
94+
95+
所有指令相同执行时间
96+
97+
2. 多周期处理器
98+
99+
3. 流水线处理器
100+
101+
102+
103+
### 数据通路的功能和基本结构
104+
105+
1. 数据通路的功能
106+
2. 数据通路的组成
107+
1. 组合逻辑元件(操作元件)
108+
2. 时序逻辑元件
109+
3. 数据通路的基本结构
110+
1. CPU内部单总线方式
111+
2. CPU内部多总线方式
112+
3. 专用数据通路方式
113+
114+
### 控制器的功能和工作原理
115+
116+
1. 控制器的结构和功能
117+
118+
2. 硬布线控制器
119+
120+
3. 微程序控制器
121+
122+
1. 微程序控制的基本概念
123+
124+
1. 微命令与微操作
125+
2. 微指令与微周期
126+
3. 主存储器与控制存储器
127+
4. 程序与微程序
128+
129+
2. 微程序控制器的组成和工作过程
130+
131+
1. 微程序控制器的组成和工作过程
132+
2. 微程序控制器的工作过程
133+
3. 微程序和机器指令
134+
135+
3. 微指令的编码方式
136+
137+
1. 直接编码(直接控制)方式
138+
2. 字段直接编码方式
139+
3. 字段间接编码方式
140+
141+
4. 微指令的地址形成方式
142+
143+
1. 微指令的后继地址字段(下地址字段)
144+
2. 根据机器指令的操作码形成。
145+
3. 增量计数器法
146+
4. 根据各种标志决定下一条微指令分支转移的地址
147+
5. 友硬件直接产生微程序入口地址。
148+
149+
5. 微指令的格式
150+
151+
1. 水平型微指令
152+
153+
| A1 | A2 | ... | An-1 | An | 判断测试字段 | 后继地址字段 |
154+
| ---- | ---- | -------- | ---- | ---- | ------------ | ------------ |
155+
| | | 操作控制 | | | 顺序控制 | |
156+
157+
2. 垂直型微指令
158+
159+
| $\mu$OP | Rd | Rs |
160+
| :------: | :------: | :----: |
161+
| 微操作码 | 目的地址 | 源地址 |
162+
163+
6. 硬布线和微程序控制器的特点
164+
165+
1. 硬布线控制器的特点
166+
2. 微程序控制器的特点
167+
168+
169+
170+
### 异常和中断机制
171+
172+
1. 异常和中断的基本概念
173+
1. 异常:由CPU内部产生的意外事件。a.k.a内中断
174+
2. 中断:由来自CPU外部的设备向CPU发出的中断请求。a.k.a外中断。
175+
2. 异常和中断的分类
176+
1. 异常的分类
177+
1. 故障Fault
178+
2. 自陷Trap
179+
3. 终止Abort
180+
2. 中断的分类
181+
1. 可屏蔽中断
182+
2. 不可屏蔽中断
183+
3. 异常和中断响应过程
184+
1. 关中断
185+
2. 保存断点和程序状态
186+
3. 识别异常和中断并转到相应的处理程序
187+
1. 软件识别方式:CPU设置一个异常状态寄存器
188+
2. 硬件识别a.k.a向量中断

public/categories/diary/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h2 class="widget-title section-title">Archives</h2>
280280
<a href="/npee_learning_log.github.io/page/archives/#2025-09">
281281

282282
<span class="year">2025-09</span>
283-
<span class="count">6</span>
283+
<span class="count">7</span>
284284

285285
</a>
286286
</div>
@@ -333,7 +333,7 @@ <h2 class="widget-title section-title">Tags</h2>
333333
数据结构
334334
</a>
335335

336-
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="font_size_8">
336+
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="font_size_9">
337337
计算机组成原理
338338
</a>
339339

public/categories/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h2 class="widget-title section-title">Archives</h2>
280280
<a href="/npee_learning_log.github.io/page/archives/#2025-09">
281281

282282
<span class="year">2025-09</span>
283-
<span class="count">6</span>
283+
<span class="count">7</span>
284284

285285
</a>
286286
</div>
@@ -333,7 +333,7 @@ <h2 class="widget-title section-title">Tags</h2>
333333
数据结构
334334
</a>
335335

336-
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="font_size_8">
336+
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="font_size_9">
337337
计算机组成原理
338338
</a>
339339

@@ -392,7 +392,7 @@ <h1 class="section-term">Categories</h1>
392392
<div class="article-details">
393393
<h2 class="article-title">Log</h2>
394394
<footer class="article-time">
395-
<time datetime='2025-09-07T23:32:42&#43;08:00'>Sep 07, 2025</time>
395+
<time datetime='2025-09-07T23:32:48&#43;08:00'>Sep 07, 2025</time>
396396
</footer>
397397
</div>
398398
</a>

public/categories/index.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<description>Recent content in Categories on shyの考研日志</description>
77
<generator>Hugo -- gohugo.io</generator>
88
<language>zh-cn</language>
9-
<lastBuildDate>Sun, 07 Sep 2025 23:32:42 +0800</lastBuildDate><atom:link href="https://auroraemiya.github.io/npee_learning_log.github.io/categories/index.xml" rel="self" type="application/rss+xml" /><item>
9+
<lastBuildDate>Sun, 07 Sep 2025 23:32:48 +0800</lastBuildDate><atom:link href="https://auroraemiya.github.io/npee_learning_log.github.io/categories/index.xml" rel="self" type="application/rss+xml" /><item>
1010
<title>Log</title>
1111
<link>https://auroraemiya.github.io/npee_learning_log.github.io/categories/log/</link>
12-
<pubDate>Sun, 07 Sep 2025 23:32:42 +0800</pubDate>
12+
<pubDate>Sun, 07 Sep 2025 23:32:48 +0800</pubDate>
1313

1414
<guid>https://auroraemiya.github.io/npee_learning_log.github.io/categories/log/</guid>
1515
<description></description>

public/categories/interests/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h2 class="widget-title section-title">Archives</h2>
280280
<a href="/npee_learning_log.github.io/page/archives/#2025-09">
281281

282282
<span class="year">2025-09</span>
283-
<span class="count">6</span>
283+
<span class="count">7</span>
284284

285285
</a>
286286
</div>
@@ -333,7 +333,7 @@ <h2 class="widget-title section-title">Tags</h2>
333333
数据结构
334334
</a>
335335

336-
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="font_size_8">
336+
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="font_size_9">
337337
计算机组成原理
338338
</a>
339339

public/categories/log/index.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h2 class="widget-title section-title">Archives</h2>
280280
<a href="/npee_learning_log.github.io/page/archives/#2025-09">
281281

282282
<span class="year">2025-09</span>
283-
<span class="count">6</span>
283+
<span class="count">7</span>
284284

285285
</a>
286286
</div>
@@ -333,7 +333,7 @@ <h2 class="widget-title section-title">Tags</h2>
333333
数据结构
334334
</a>
335335

336-
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="font_size_8">
336+
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="font_size_9">
337337
计算机组成原理
338338
</a>
339339

@@ -378,7 +378,7 @@ <h3 class="section-title">
378378

379379
<div class="section-card">
380380
<div class="section-details">
381-
<h3 class="section-count">32 pages</h3>
381+
<h3 class="section-count">33 pages</h3>
382382
<h1 class="section-term">Log</h1>
383383

384384
</div>
@@ -387,6 +387,17 @@ <h1 class="section-term">Log</h1>
387387

388388
<section class="article-list--compact">
389389

390+
<article>
391+
<a href="/npee_learning_log.github.io/posts/0907/">
392+
<div class="article-details">
393+
<h2 class="article-title">0907学习日志</h2>
394+
<footer class="article-time">
395+
<time datetime='2025-09-07T23:32:48&#43;08:00'>Sep 07, 2025</time>
396+
</footer>
397+
</div>
398+
</a>
399+
</article>
400+
390401
<article>
391402
<a href="/npee_learning_log.github.io/posts/0906/">
392403
<div class="article-details">
@@ -486,17 +497,6 @@ <h2 class="article-title">0817学习日志</h2>
486497
</a>
487498
</article>
488499

489-
<article>
490-
<a href="/npee_learning_log.github.io/posts/0816/">
491-
<div class="article-details">
492-
<h2 class="article-title">0816学习日志</h2>
493-
<footer class="article-time">
494-
<time datetime='2025-08-16T23:48:21&#43;08:00'>Aug 16, 2025</time>
495-
</footer>
496-
</div>
497-
</a>
498-
</article>
499-
500500
</section>
501501
<nav class='pagination'>
502502

0 commit comments

Comments
 (0)