【大学课件】计算机系统结构Computer Architecture.ppt
《【大学课件】计算机系统结构Computer Architecture.ppt》由会员分享,可在线阅读,更多相关《【大学课件】计算机系统结构Computer Architecture.ppt(62页珍藏版)》请在三一办公上搜索。
1、计算机系统结构Computer Architecture,http:/,2,The Main Contents课程主要内容,Chapter 12 CPU Structure and Function CPU结构和功能Chapter 13 Reduced Instruction Set Computers 精简指令集计算机 Chapter 14 Instruction-Level Parallelism&Superscalar Processors 指令集并行性和超标量处理器Chapter 18 Parallel Processing 并行处理,William Stallings Compute
2、r Organization and Architecture7th Edition,Chapter 13Reduced Instruction Set Computers,http:/,4,Topics,Major Advances in Computers 计算机的主要改进Instruction Execution Characteristics 指令执行的特点Use of Large Register File 使用大的寄存器Compiler-Based Register Optimization 基于编译器的寄存器优化Reduced Instruction Set Architectu
3、re 精简指令集体系结构RISC Pipelining RISC流水线RISC vs.CISC Controversy RISC和CISC 的比较,5,Major Advances in Computers(1),The family concept 系列概念IBM System/360 1964DEC PDP-8Separates architecture from implementation 将体系结构和它的实现分开Microporgrammed control unit 微程序控制器Idea by Wilkes 1951Produced by IBM S/360 1964Cache m
4、emory Cache存储器IBM S/360 model 85 1969,6,Major Advances in Computers(2),Solid State RAM 固态存储器(See memory notes)Microprocessors 微处理器Intel 4004 1971Pipelining 流水线Introduces parallelism into fetch execute cycleMultiple processors 多处理器,7,The Next Step-RISC,RISC-Reduced Instruction Set Computer RISC精简指令集计
5、算机Key featuresLarge number of general purpose registers,or use of compiler technology to optimize register use 大量通用寄存器,使用编译技术优化寄存器的使用Limited and simple instruction set 一个有限简单的指令集Emphasis on optimising the instruction pipeline 强调指令流水的优化,8,Comparison of processors,9,Driving force for CISC(1),CISC-Comp
6、lex Instruction Set Computer CISC复杂指令集计算机Why CISC?Software costs far exceed hardware costs 软件成本高于硬件成本Increasingly complex high level languages 越来越复杂的高级语言Semantic gap:Difference between operations provided in HLLs and those provided in computer architecture 语义间隙问题:HLLs提供的操作和计算机体系结构提供的操作不同,10,Driving
7、force for CISC(2),to close the gapLeads to:Large instruction sets 指令集非常大More addressing modes 更多的寻址方式Hardware implementations of HLL statementse.g.CASE(switch)on VAXHLL描述的硬件的实现,11,Intention of CISC 复杂指令集体系结构的目的,Ease compiler writing 使编译器的编写更容易Improve execution efficiency 提高执行效率Complex operations in
8、microcode 因为复杂操作能以微代码实现Support more complex HLLs 提供更复杂的HLL支持A totally different approach:Simpler architecture 简化体系结构,12,精简指令计算机RISC设计思路的提出,A number of studies have been done to determine the characteristics and patterns of execution of machine instructions generated from HLL programs已经进行的很多研究,目的是确定高
9、级语言程序生成的机器指令执行的特征和模式The results of these studies inspired some researchers to look for a different approach 促使设计人员寻找一种与复杂指令系统截然不同的方法A totally different approach:Simpler architecture 简化体系结构,13,Execution Characteristics执行特征,Developments of RISCs were based on the study of instruction execution charact
10、eristics RISC的开发是基于指令的执行特性Operations performed 完成的操作determine functions to be performed and interaction with memory 决定了CPU所要完成的功能及其与存储器的相互作用Operands used(types and frequencies)使用的操作数及其类型和频率determine memory organization and addressing modes 决定了存储器如何组织存储它们和访问它们用的寻址方式Execution sequencing 执行顺序determines
11、 the control and pipeline organization 决定了控制和流水线的组织结构,14,Execution Characteristics执行特征,Dynamic measurements&Static measurements 动态测量和静态测量Dynamic measurements are measured during the execution of the program.程序的执行中进行的动态测量。Static measurements merely perform these counts on the source text of a program
12、.静态测量只是在源程序文本上进行统计,这不能给出很有用的性能信息。,15,Relative Dynamic Frequency,Dynamic Machine InstructionMemory Reference Occurrence(Weighted)(Weighted)PascalCPascalCPascalCAssign453813131415Loop5342323326Call151231334445If29431121713GoTo-3-Other613121,16,Operations操作,Assignment statements predominate赋值语句占统治地位Mov
13、ement of data is of high importance 数据的移动重要性 Preponderance of Conditional statements(IF,LOOP)条件语句占优势地位Sequence control is important 指令集的顺序控制,17,Operations操作,Procedure call-return is very time consuming 程序的调用花费大量时间Some HLL instruction lead to many machine code operations 一些HLL指令导致执行大量机器代码,18,Operands
14、,Mainly local scalar variables 主要是局部标量变量Optimisation should concentrate on accessing local variables 优化也应该集中在局部变量的访问 PascalCAverageInteger constant162320Scalar variable585355Array/structure262425,19,Procedure Calls过程调用,Very time consuming 过程调用是编译后的HLL程序中最耗时的操作To implement efficiently,two aspects are
15、 significant:Depends on number of parameters passed 依赖于传递的参数的数量Depends on level of nesting 依赖于嵌套深度Most programs do not do a lot of calls followed by lots of returns 程序一般不作大量的调用之后跟着大量的返回Most variables are local 大部分变量是局部的,20,Implications结论,Making instruction set architecture close to HLL 使指令集与HLL相近 no
16、t most effective 不是最有效的 Best support is given by optimising most used and most time consuming features 通过优化最经常使用的和最花费时间的,是最好的方案。,21,Implications,Generalizing from the work of a number of researchers,three elements emerge that,by and large,characterize RISC architectures.Large number of registers 大量寄
17、存器Operand referencing optimization+locality of references memory references reduced 减少存储器访问Careful design of pipelines 精心设计流水线Conditional branch and procedure call 条件分支和过程调用Simplified(reduced)instruction set 精简指令集,22,Use of Large Register File,From the analysisLarge number of assignment statementsMo
18、st accesses to local scalars 主要访问本地标量 Heavy reliance on register storage 依赖于寄存器存储 Minimizing memory access 最小化内存访问,23,Approaches,Software solution to maximize register usage软件方法Require compiler to allocate registers to those most used variables in a given time 依赖于编译器,把寄存器分配给那些一定时间内使用最多的变量Requires so
19、phisticated program analysis 需要复杂的程序分析Hardware solution硬件方法Have more registers 大量寄存器Thus more variables will be in registers 寄存器中存放大量变量,24,Registers for Local Variables,Store local scalar variables in registers 在寄存器中存放本地标量变量 Reduces memory access 减少存储器访问Some problemsEvery procedure(function)call cha
20、nges locality 每一次过程调用都会改变局部性On every call,local variables must be saved to memory 每次调用变量必须被存储到存储器Parameters must be passed 必须传递参数On return,results must be returned and variables from calling programs must be restored 必须返回结果并且恢复调用程序的变量,25,Register Windows,Solution:Register windows Organization of reg
21、isters to realize the goal 为了实现解决前述问题的目标,而对寄存器采用的组织结构From the analysisOnly few parameters and local variables 少量参数和本地变量Limited range of depth of call 有限的调用深度Use multiple small sets of registers 使用多个小的寄存器组Calls switch to a different set of registers 过程调用时自动地切换来使用不同的寄存器组Returns switch back to a previo
22、usly used set of registers 返回时切换回以前使用的寄存器组,26,Overlapping Register Windows,Three areas within a register set 窗口分为3个域:Parameter registers 参数寄存器域Local registers 局部寄存器域Temporary registers 临时寄存器域,27,Register Windows cont.,Temporary registers from one set overlap parameter registers from the next 临时寄存器用于
23、当前过程与下一级过程(被当前过程调用的过程)交换参数和结果Temporary registers at one level are physically the same as the parameter registers at the next lower level.当前层的临时寄存器域和下一层的参数寄存器域物理上是同一个域。This allows parameter passing without moving data 这种重叠准许不用实际移动数据就能传递参数,28,Circular Buffer diagram,The actual organization of the regi
24、ster file is as a circular buffer of overlapping windows.寄存器集的实际组织结构是一个由重叠窗口组成的环形缓冲器。,29,Operation of Circular Buffer,When a call is made,a current window pointer(CWP)is moved to show the currently active register window 当一个调用发生时,当前窗口指针移动到当前活动寄存器窗口If all windows are in use,an interrupt is generated
25、and the oldest window(the one furthest back in the call nesting)is saved to memory(only.in and.loc need to be saved)当所有窗口都在使用就会产生中断,最老的窗口会保存到内存(只保存参数、局部窗口的数据)A saved window pointer indicates where the next saved windows should restore to 保存窗口指针表明下一个保存窗口应该恢复的地方,30,Operation of Circular Buffer(2),Stud
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 大学课件 【大学课件】计算机系统结构Computer Architecture 大学 课件 计算机系统 结构 Computer
![提示](https://www.31ppt.com/images/bang_tan.gif)
链接地址:https://www.31ppt.com/p-5041726.html