版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1/45,William Stallings Computer Organization and Architecture7th Edition,Chapter 16 Control Unit Operation,2/50,Key Terms,Control bus Control path Control signal Control unit Hardwired implementation Microoperations Control unit operation,3/50,Micro-Operations,A computer executes a program Fetch/exe
2、cute cycle Each cycle has a number of steps see pipelining Called micro-operations Each step does very little Atomic operation of CPU,4/50,Constituent Elements of Program Execution,5/50,Fetch - 4 Registers,Memory Address Register (MAR) Connected to address bus Specifies address for read or write op
3、Memory Buffer Register (MBR) Connected to data bus Holds data to write or last data read Program Counter (PC) Holds address of next instruction to be fetched Instruction Register (IR) Holds last instruction fetched,6/50,Fetch Sequence,Address of next instruction is in PC Address (MAR) is placed on a
4、ddress bus Control unit issues READ command Result (data from memory) appears on data bus Data from data bus copied into MBR PC incremented by 1 (in parallel with data fetch from memory) Data (instruction) moved from MBR to IR MBR is now free for further data fetches,7/50,Data Flow (Fetch Diagram),8
5、/50,Fetch Sequence (symbolic),t1:MAR - (PC) t2:MBR - (memory) PC - (PC) +1 t3:IR - (MBR) (tx = time unit/clock cycle) or t1:MAR - (PC) t2:MBR - (memory) t3:PC - (PC) +1 IR - (MBR),9/50,Rules for Clock Cycle Grouping,Proper sequence must be followed MAR - (PC) must precede MBR - (memory) Conflicts mu
6、st be avoided Must not read & write same register at same time MBR - (memory) & IR - (MBR) must not be in same cycle Also: PC - (PC) +1 involves addition Use ALU May need additional micro-operations,10/50,Data Flow (Indirect Diagram),11/50,Indirect Cycle,MAR - (IRaddress) - address field of IR MBR -
7、 (memory) IRaddress - (MBRaddress) MBR contains an address IR is now in same state as if direct addressing had been used (What does this say about IR size?),12/50,Data Flow (Indirect Diagram),13/50,Data Flow (Interrupt Diagram),(2),(3),(1),(4),(5),14/50,Interrupt Cycle,t1:MBR -(PC) t2:MAR - save-add
8、ress PC - routine-address t3:memory - (MBR) This is a minimum May be additional micro-ops to get addresses N.B. saving context is done by interrupt handler routine, not micro-ops,15/50,Execute Cycle (ADD),Different for each instruction e.g. ADD R1,X - add the contents of location X to Register 1 , r
9、esult in R1 t1:MAR - (IRaddress) t2:MBR - (memory) t3:R1 - R1 + (MBR) Note no overlap of micro-operations,16/50,Execute Cycle (ISZ),ISZ X - increment and skip if zero t1:MAR - (IRaddress) t2:MBR - (memory) t3:MBR - (MBR) + 1 t4:memory - (MBR) if (MBR) = 0 then PC - (PC) + 1 Notes: if is a single mic
10、ro-operation Micro-operations done during t4,17/50,Execute Cycle (BSA),BSA X - Branch and save address Address of instruction following BSA is saved in X Execution continues from X+1 t1:MAR - (IRaddress) MBR - (PC) t2:PC - (IRaddress) memory - (MBR) t3:PC - (PC) + 1,18/50,Instruction Cycle,Each phas
11、e decomposed into sequence of elementary micro-operations E.g. fetch, indirect, and interrupt cycles Execute cycle One sequence of micro-operations for each opcode Need to tie sequences together Assume new 2-bit register Instruction cycle code (ICC) designates which part of cycle processor is in 00:
12、 Fetch 01: Indirect 10: Execute 11: Interrupt,19/50,Flowchart for Instruction Cycle,20/50,Functional Requirements,Define basic elements of processor Describe micro-operations processor performs Determine functions control unit must perform,21/50,Basic Elements of Processor,ALU Registers Internal dat
13、a pahs External data paths Control Unit,22/50,Types of Micro-operation,Transfer data between registers Transfer data from register to external Transfer data from external to register Perform arithmetic or logical ops,23/50,Functions of Control Unit,Sequencing Causing the CPU to step through a series
14、 of micro-operations Execution Causing the performance of each micro-op This is done using Control Signals,24/50,Control Signals,Clock One micro-instruction (or set of parallel micro-instructions) per clock cycle Instruction register Op-code for current instruction Determines which micro-instruction
15、s are performed Flags State of CPU Results of previous operations From control bus Interrupts Acknowledgements,25/50,Model of Control Unit,26/50,Control Signals - output,Within CPU Cause data movement Activate specific functions Via control bus To memory To I/O modules,27/50,Example Control Signal S
16、equence - Fetch,MAR - (PC) Control unit activates signal to open gates between PC and MAR MBR - (memory) Open gates between MAR and address bus Memory read control signal Open gates between data bus and MBR,28/50,Data Paths and Control Signals,29/50,Internal Organization,Usually a single internal bu
17、s Gates control movement of data onto and off the bus Control signals control data transfer to and from external systems bus Temporary registers needed for proper operation of ALU,30/50,Data Paths and Control Signals,Execute Cycle (ADD) Execute Cycle (ISZ) Execute Cycle (BSA),31/50,Internal Organiza
18、tion,Usually a single internal bus Gates control movement of data onto and off the bus Control signals control data transfer to and from external systems bus Temporary registers needed for proper operation of ALU t1:MAR(IR(address) t2:MBRMemory t3:Y(MBR) t4:Z(AC)+(Y) t5:AC(Z),32/50,CPU with Internal
19、 Bus,c1,c2,c10,c7,c8,c9,c11,c3,c4,c5,c6,33/50,Intel 8085 CPU Block Diagram,34/50,Intel 8085 Pin Configuration,35/50,Intel 8085 OUT InstructionTiming Diagram,36/50,Hardwired Implementation (1),Control unit inputs Flags and control bus Each bit means something Instruction register Op-code causes diffe
20、rent control signals for each different instruction Unique logic for each op-code Decoder takes encoded input and produces single output n binary inputs and 2n outputs,37/50,Hardwired Implementation (2),Clock Repetitive sequence of pulses Useful for measuring duration of micro-ops Must be long enoug
21、h to allow signal propagation Different control signals at different times within instruction cycle Need a counter with different control signals for t1, t2 etc.,38/50,Control Unit with Decoded Inputs,PQ=00 Fetch Cycle PQ=01 Indirect Cycle PQ=10 Execute Cycle PQ=11 Interrupt Cycle,39/50,Control Unit
22、 with Decoded Inputs,40/50,Problems With Hard Wired Designs,Complex sequencing & micro-operation logic Difficult to design and test Inflexible design Difficult to add new instructions,41/50,Required Reading,Stallings chapter 16,42/50,计算机结构与逻辑设计 黄正瑾编著,第七章 控制单元 7.1 计算机中的寄存器及其控制信号 7.2 指令的执行过程 7.3 控制电路的
23、硬件结构 7.4 其他类型指令的执行过程 7.5 微程序控制方式 7.6 全硬件数字系统控制器的设计,43/50,P291 7.5 微程序控制方式,每条指令的执行过程可以认为是按照一定的“微程序”进行的,这个“微程序”可以用硬件实现,也可以用软件实现。 所谓微程序控制,就是将执行指令的微程序用一条条二进制代码编写的微指令组成,成为真正意义上的程序,并用此程序来控制指令的执行。,44/50,图 7.9 微程序控制系统框图,IAR: 微指令地址寄存器 (uPC) OP: 刚才存在操作码寄存器中的数据,45/50,图7.10所示是某个计算机微程序控制器中的ROM,它的每条指令的解释与表7.4相同。现在以此ROM为例,说明微程序系统中指令的执行情况。 设起始时微指令地址寄存器IAR中的数据为0,计算机运行后从ROM中取的第一条微指令是0号微指令,其代码为0000 0000 0000 0010 0000 0010 00,它所
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026上海中医药大学附属曙光医院安徽医院(合肥市)劳务派遣(医务部综合服务岗)招聘1人笔试模拟试题及答案详解
- 2026年福建技师学院石狮校区秋季兼职教师应聘意向摸底考试参考题库及答案详解
- 2026浙江衢州龙游白鸽建设投资有限公司及其子公司招聘合同制员工8人考试参考题库及答案详解
- 2026年烟台海阳市教育系统公开招聘教师(5人)笔试模拟试题及答案详解
- 2026江苏吕四港集团有限公司招聘考试模拟试题及答案详解
- 2026湖北华中师范大学体育学院科研、教学、管理助理(非事业编、非全日制、合同聘用制)岗位招聘3人笔试备考题库及答案详解
- 2026财达证券股份有限公司江西分公司(筹)负责人招聘1人考试模拟试题及答案详解
- 2026中国传媒大学校医院招聘2人考试模拟试题及答案详解
- 2026第二季度重庆巫溪县事业单位遴选95人考试参考题库及答案详解
- 2026届云南省红河州弥勒市中小学重点达标名校中考一模物理试题含解析
- 2026贵州毕节纳雍县人民医院助理全科医生培训(西医)招聘笔试参考题库及答案解析
- 浙江省金华市永康市2024-2025学年七年级第二学期期末学业水平监测英语试卷(解析版)
- 山西汽车运输公司招聘考试题
- 2026年西藏高考文科综合试题含解析及答案
- 上海民办兰生某中学七年级下册数学期末试卷综合测试卷(含答案)
- 2026初中地理会考必考4张图
- 学堂在线 思想道德与法治 章节测试答案
- 空调维保应急预案
- 房屋建筑工程竣工验收技术资料统一用表(2025版)
- 2025 六年级地理上册东南亚地区的海上交通要道课件
- 2026年内蒙古聚英人力资源服务有限责任公司定向招聘劳务派遣人员的备考题库附答案详解
评论
0/150
提交评论