-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path指令系统.html
20 lines (19 loc) · 9.58 KB
/
指令系统.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html>
<head>
<title>指令系统</title>
<basefont face="微软雅黑" size="2" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="exporter-version" content="Evernote Windows/307425 (zh-CN, DDL); Windows/10.0.0 (Win64);"/>
<style>
body, td {
font-family: 微软雅黑;
font-size: 10pt;
}
</style>
</head>
<body>
<a name="686"/>
<h1>指令系统</h1>
<div>
<span><div>一、<span style="color: rgb(227, 0, 0);">CISC与RISC</span></div><div>CISC:复杂指令集系统,进一步增强原有指令的功能。导致机器指令系统越来越复杂</div><div>RISC:精简指令集计算 基本思想:减少指令总数和简化指令功能 降低复杂度 使指令能单周期执行。</div><div>RISC关键技术: (1)重叠寄存器窗口技术 (2)优化编译器技术 (3)超流水线及超标量技术(4)硬布线逻辑与微程序在微程序技术中相结合。</div><div><img src="指令系统_files/Image.png" type="image/png" data-filename="Image.png"/></div><div><br/></div><div>二、指令流水处理</div><div><br/></div><div><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; cursor: pointer; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px;">对指令流水线性能的度量主要有吞吐率,加速比和效率等指标。</span></div><div style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-size: 16px; text-align: justify; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; outline: 0px; font-size: 12pt; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; cursor: pointer; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px; font-weight: bold;">吞吐率是指单位时间内流水线所完成的任务数或输出结果的数量</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px;">,</span></div><div><span style="box-sizing: border-box; outline: 0px; font-size: 12pt; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; cursor: pointer; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: bold; line-height: 26px;">最太吞吐率则是流水线在达到稳定状态后所得到的吞吐率</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(79, 79, 79); font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px;">,</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px;">它</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: bold; line-height: 26px;">取决于</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px;">流水线中</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: bold; line-height: 26px;">最慢一段所需的时间,</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px;">所以该段成为流水线的瓶颈。流水线的加速比定义为等功能的非流水线执行时间与流水线执行时间之比,加速比与吞吐率成正比,</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: bold; line-height: 26px;">如果流水线断流,实际吞吐率将会明显下降,则加速比也会明显下降</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px;">。 流水线的效率是指流水线的设备利用率,从时空图上看效率就是n个任务所占的时空区与m个段总的时空区之比。</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: bold; line-height: 26px;">因此要使加速比和效率最大化应该流水线各级采用相同的运行时间</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; line-height: 26px;">。另外,</span><span style="box-sizing: border-box; outline: 0px; font-size: 16px; word-break: break-all; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: "PingFang SC", "Microsoft YaHei", SimHei, Arial, SimSun; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: bold; line-height: 26px;">流水线釆用异步控制并不会给流水线性能带来改善,反而会增加控制电路的复杂性。</span></div><div><br/></div><div>流水时间计算:</div><div>理论公式:</div><div><img src="指令系统_files/Image [1].png" type="image/png" data-filename="Image.png"/></div><div>实践公式: (k+n-1)*t k表示流水线周期数 在题中 取指 分析 执行 共3个周期 </div><div>3*2+99*2 </div><div>吞吐率:</div><div><img src="指令系统_files/Image [2].png" type="image/png" data-filename="Image.png"/></div><div>加速比:</div><div><img src="指令系统_files/Image [3].png" type="image/png" data-filename="Image.png"/></div><div><br/></div></span>
</div></body></html>