⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 8_5.htm

📁 浙江大学计算机学院计算机组成教材《计算机组成与设计》(潘学增)的课堂教学课件。
💻 HTM
📖 第 1 页 / 共 2 页
字号:
  <p><b><font color="#333333" size="4">1、中断类型</font></b></p>          
  <blockquote>          
<p><font color="#333333" size="4"><b>1)中断源种类:内中断、指令错、溢出、除数为0;</b></font></p>                   
  </blockquote>         
</blockquote>         
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                
外中断、I/O设备请求、输入输出。</b></font></p>                          
<blockquote>               
  <blockquote>               
<p><font color="#333333" size="4"><b>2)中断源建立</b></font></p>                         
    <blockquote>              
<p><font color="#333333" size="4"><b>每个设备接口电路中</b></font></p>                         
    </blockquote>              
  </blockquote>              
</blockquote>              
<p><b><font size="4" color="#333333"><img border="0" src="_derived/IO设备与存储器、CPU及操作系统的接口.htm_txt_v.gif" width="593" height="361"></font></b></p>    
<p><b><font color="#333333" size="4">2、 中断源的检测</font></b></p>                      
<blockquote>               
<p><font color="#333333" size="4"><b>1)异常中断(内中断):非法指令码,MIPS在状态1检测;</b></font></p>                     
</blockquote>              
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                
算术溢出overflow,MIPS在状态检测;&nbsp;</b></font></p>                      
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          
INT(PC机)在指令译码时检测。</b></font></p>                    
<blockquote>             
<p><font color="#333333" size="4"><b>2)外中断:a、有外设中断请求&nbsp;                       
INT;</b></font></p>                      
</blockquote>                
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           
b、CPU允许中断触发器&nbsp; IEN=1;</b></font></p>                    
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           
c、一条指令执行完;</b></font></p>                    
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           
d、无DMA求。</b></font></p>                    
<p><font color="#333333"><b>&nbsp;&nbsp; <img border="0" src="_derived/IO设备与存储器、CPU及操作系统的接口.htm_txt_y.gif" width="586" height="290"></b></font></p>     
<p><font color="#333333"><b> </b></font></p>
<p><b><font color="#333333" size="4">3、中断响应</font></b></p>
<p><font color="#333333" size="4"><b>ZD状态=1,进入中断响应,硬件做两件事:</b></font></p>
<blockquote>
<p><font color="#333333" size="4"><b>1)将断点保留:&nbsp; a、进栈;b、保留到专用寄存器(MIPS)=&gt;EPC。</b></font></p>          
  <blockquote>          
<p><font color="#333333" size="4"><b>断点二种类型:a、下一个指令地址;b、本条指令地址,如MIPS。</b></font></p>         
  </blockquote>         
<p><font color="#333333" size="4"><b>2)找到中断服务程序入口地址=&gt;EPC。</b></font></p>         
  <blockquote>         
    <blockquote>         
<p><font color="#333333" size="4"><b>识别中断源--一个排队问题:软件排队;</b></font></p>         
    </blockquote>         
  </blockquote>         
</blockquote>         
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           
硬件排队:串行排优</b></font></p>                   
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           
仲裁排优</b></font></p>                  
<p><b><font color="#333333" size="4">4、中断服务</font></b></p>                  
<blockquote>              
<p><font color="#333333" size="4"><b>执行中断服务程序:</b></font></p>               
</blockquote>             
<p><font color="#333333" size="4"><b><img border="0" src="_derived/IO设备与存储器、CPU及操作系统的接口.htm_txt_z.gif" width="445" height="708"></b></font></p>    
<p> </p>    
<p> </p>    
<p> </p>    
<p><b><font color="#333333" size="4">5、中断控制</font></b></p>    
<blockquote>    
<p><font color="#333333" size="4"><b>程序员可以控制:1)IEN置0,置1;</b></font></p>    
</blockquote>    
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                
2)对接口设屏蔽触发器。</b></font></p>               
<p><b><font color="#333333"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     
<a href="#一"></a></font></font>     
<font size="4">     
<a href="#一"><font color="#66CCFF">返回页首</font></a></font></b></p>            
<p> </p>            
<p><font color="#333333" size="4"><b><a name="五、DMA传送">五、DMA传送</a>&nbsp;&nbsp;</b></font></p>           
           
<p><font color="#333333" size="4"><b><img border="0" src="_derived/1.htm_txt_0.gif.gif" width="568" height="301"></b></font></p>   
   
<p><b><font color="#333333" size="4">1、DMA概念&nbsp;&nbsp;</font></b></p>   
   
<blockquote>   
   
<p><b><font color="#333333" size="4">成批传送,DMA执行过程中,CPU让出总线给DMA</font></b></p>   
   
</blockquote>        
        
<p><b><font color="#333333" size="4">2、DMA结构,接口中地址寄存器;数据缓冲寄存器;计数器控制交换长度;中断控制电路;DMA请求信号;DMA响应信号</font></b></p>   
   
<p><b><font color="#333333" size="4">3、DMA工作原理,三步:</font></b></p>   
   
<blockquote>   
   
  <blockquote>   
   
<p><font color="#333333" size="4"><b>&nbsp;1)           
以模块工作方式:初始化时,CPU主模板提供DMA存储器地址,交换长度,指定连接DMA接口的设备的操作&nbsp;</b></font></p>               
               
  </blockquote>               
</blockquote>               
               
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                 
传送数据的存储器地址;</b></font></p>                
                
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                 
传送数据的字节数;</b></font></p>                
                
<p><font color="#333333" size="4"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                 
对指定的设备操作</b></font></p>                
                
<blockquote>                
  <blockquote>                
                
<p><font color="#333333" size="4"><b>&nbsp;2)                 
DMA启动设备工作,请求总线,传送数据</b></font></p>                
                
<p><font color="#333333" size="4"><b>&nbsp;3)完成DMA传送,提出中断CPU的请求</b></font></p>              
              
  </blockquote>              
</blockquote>              
              
<p><font color="#333333" size="4"><b><img border="0" src="_derived/1.htm_txt_1.gif" width="779" height="598"></b></font></p>    
    
<p><b><font color="#333333"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     
<a href="#一"></a></font></font>     
<font size="4">     
<a href="#一"><font color="#66CCFF">返回页首</font></a></font></b></p>       
       
<p> </p>       
       
<p><b><font color="#333333"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font><font size="4"><a href="8_4.htm"><i><font color="#0099FF">上一节</font></i></a><font color="#333333">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</font><a href="index.htm"><i><font color="#0099FF">首页</font></i></a></font></b></p>       
       
</body>       
       
</html>       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -