COA课件15讲稿._第1页
COA课件15讲稿._第2页
COA课件15讲稿._第3页
COA课件15讲稿._第4页
COA课件15讲稿._第5页
已阅读5页,还剩37页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、William Stallings Computer Organization and Architecture 6th Edition Chapter 16 Control Unit Operation 控制器的操作控制器的操作 16.1 Micro-Operations 微操作微操作 A computer executes a program Fetch/execute cycle Each cycle has a number of steps see chapter 12 pipelining Called micro-operations OPs information flow E

2、ach step does very little Atomic(基本的或原子的基本的或原子的) operation of CPU Page 577 Constituent Elements of Program ExecutionPage 577 4 Registers Four registers are essential to instruction execution: Memory Address Register (MAR) Connected to address bus Specifies address for read or write op Memory Buffer

3、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 Page 578 Fetch Sequence (symbolic) t1: (PC) - MAR t2: (MAR) - Memory by address bus read - Memory b

4、y control bus t3: Memory - MBR by data bus t4: (MBR) - IR (PC) +1 - PC (Maybe happen in t2,t3 and t4) AB CB DB Rules for Clock Cycle Grouping Proper sequence must be followed MAR - (PC) must precede MBR - Memory Conflicts must be avoided Must not read (R1)+(X) -R1 add the contents of location X to R

5、egister 1 , result in R1 Page 581 Execute Cycle (ADD) ADD R1,X; (R1)+(X) - R1 t1: Ad(MBR) - MAR t2: (MAR) - Memory read -Memory t3: Memory- MBR t4: (R1) + (MBR) -R1 Note no overlap of micro-operations Execute Cycle (ISZ) ISZ X increment and skip if zero if (X)+1)=0, Skip(小跳小跳 ) t1: Ad(MBR)-MAR t2: (

6、MAR)-Memory read-Memory t3:Memory-MBR t4:(MBR) + 1 - MBR t5: if (MBR) = 0 then (PC) +1 - PC (MBR) -Memory 回存回存 (MAR) -Memory write -Memory Execute Cycle (BSA) BSA X - Branch and save address Address of instruction following BSA is saved in X Execution continues from X+1 Page 582 BSA X BSA X - Branch

7、 and save address Address of instruction following BSA is saved in X Execution continues from X+1 Memory n X n+1 X+1 Procedure X BSA X Ad(return) 返回地址返回地址 Execute Cycle (BSA) BSA X ; t1: Ad(MBR) -MAR - X t2: (PC) -MBR t3: (MAR)- Memory -保护返回地址到保护返回地址到 X 地址中地址中 (MBR) -Memory write -Memory t4: (MAR)+1

8、 -PC - X+1 Problems Add R, X; (X)+(R)-R direct addressing Add A,(X); (X)+(R)-R indirect addressing CALL X; call X function, save return address on the top of stack Return; from top of stack return to PC Topic Write down all Micro operations about the following instructions (1) ADD X,R ; (2) RETURN;

9、(the return address is in the stack) Pentium Interrupt Processing (see page 447) Interrupt vector table(IVT) 中断向量表中断向量表 (chapter 12) Identifying Interrupting Module :Daisy Chain or Hardware poll菊花链菊花链(硬件轮询硬件轮询, 向量向量) (chapter 7) Interrupt Acknowledge sent down a chain Module responsible places vecto

10、r on bus CPU uses vector to identify handler routine The addresses of All ISRs Each interrupt type assigned a number Index into interrupt vector table 256 32-bit interrupt vectors Interrupts:Nonmaskable (NMI) 不可屏蔽中断不可屏蔽中断 Maskable (INTR) 可屏蔽中断可屏蔽中断 Interrupt Cycle (see page 448) Must do (simplified ): 1.Acknowledgement to interrupt request device to get device number 2.Save (PSW ”+”“或” ) C5=PQT2+ PQT2 + PQT2 (LDA+ADD+AND+) + PQ PQ -Fetch cycle PQ -Indirect

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论