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

📄 5.htm

📁 浙江大学计算机学院计算机组成教材《计算机组成与设计》(潘学增)的课堂教学课件。
💻 HTM
📖 第 1 页 / 共 4 页
字号:
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="12%"><b><font color="#000000" size="4">&nbsp;010</font></b></td>        
  </tr>        
  <tr>        
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="12%"><b><font color="#000000" size="4">&nbsp;110</font></b></td>        
  </tr>        
  <tr>        
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="12%"><b><font color="#000000" size="4">&nbsp;010</font></b></td>        
  </tr>        
  <tr>        
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="12%"><b><font color="#000000" size="4">&nbsp;110</font></b></td>        
  </tr>        
  <tr>        
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="12%"><b><font color="#000000" size="4">&nbsp;000</font></b></td>        
  </tr>        
  <tr>        
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x&nbsp;</font> </b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="12%"><b><font color="#000000" size="4">&nbsp;001</font></b></td>        
  </tr>        
  <tr>        
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; x</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 1</font></b></td>             
    <td width="11%"><b><font color="#000000" size="4">&nbsp; 0</font></b></td>             
    <td width="12%"><b><font color="#000000" size="4">&nbsp;111</font></b></td>        
  </tr>        
</table>        
        
        
        
<p><font color="#000000" size="4">用卡诺图化简得:</font></p>       
       
<p><font color="#000000" size="4">Operation2=F1*ALUOp1+ALUOp0</font></p>       
       
<p><font color="#000000" size="4">Operation1=^F2+^ALUOp1</font></p>       
       
<p><font color="#000000" size="4">Operation0=(F3+F0)*ALUOp0</font></p>       
       
<p><font color="#000000" size="4"><img border="0" src="Image/5-2.gif" width="490" height="331"> </font></p>   
   
<p><b><font color="#000000" size="4">三.设计主控制单元:产生CPU中所有数据通路控制信号</font></b></p>   
   
<p><font color="#000000" size="4">&nbsp;&nbsp; <b>从上例知:ALU控制输入op0,op1,op2是由指令操作码字段和功能码字段经</b></font></p>             
             
<p><b><font color="#000000" size="4">组合设计实现,那么主控制单元的设计也完全类同:</font></b></p>           
           
<p><b><font color="#000000" size="4">我们先来看看R型,I型和Branch指令的格式</font></b></p>           
           
<p><b><font color="#000000" size="4">R 型</font></b></p>             
             
             
             
<table border="1" width="100%" bordercolordark="#CC9966" bordercolorlight="#FFCC66">             
  <tr>             
    <td width="14%"><b><font color="#000000" size="4">&nbsp;Field</font></b></td>        
    <td width="14%"><b><font color="#000000" size="4">&nbsp;0</font></b></td>        
    <td width="14%"><b><font color="#000000" size="4">&nbsp; rs</font></b></td>             
    <td width="14%"><b><font color="#000000" size="4">&nbsp; rt</font></b></td>             
    <td width="14%"><b><font color="#000000" size="4">&nbsp; rd</font></b></td>             
    <td width="15%"><b><font color="#000000" size="4">&nbsp; shamt</font></b></td>             
    <td width="15%"><b><font color="#000000" size="4">&nbsp;func</font></b></td>        
  </tr>        
  <tr>        
    <td width="14%"><b><font color="#000000" size="4">Bit position</font></b></td>          
    <td width="14%"><b><font color="#000000" size="4">&nbsp;31-26</font></b></td>        
    <td width="14%"><b><font color="#000000" size="4">&nbsp;25-21</font></b></td>        
    <td width="14%"><b><font color="#000000" size="4">&nbsp;20-16</font></b></td>        
    <td width="14%"><b><font color="#000000" size="4">&nbsp;15-11</font></b></td>        
    <td width="15%"><b><font color="#000000" size="4">&nbsp;10-6</font></b></td>        
    <td width="15%"><b><font color="#000000" size="4">&nbsp;5-0</font></b></td>        
  </tr>        
</table>        
        
        
        
<p><b><font color="#000000" size="4">I型</font></b></p>        
        
        
        
<table border="1" width="100%" height="32" bordercolordark="#CC9966" bordercolorlight="#FFCC66">        
  <tr>        
    <td width="14%" height="1"><b><font color="#000000" size="4">&nbsp;Field</font></b></td>        
    <td width="14%" height="1"><b><font color="#000000" size="4">&nbsp;35or43</font></b></td>        
    <td width="14%" height="1"><b><font color="#000000" size="4">&nbsp; rs</font></b></td>             
    <td width="14%" height="1"><b><font color="#000000" size="4">&nbsp;&nbsp; rt</font></b></td>             
    <td width="44%" height="1"><b><font color="#000000" size="4">&nbsp;&nbsp;&nbsp; address</font></b></td>             
  </tr>             
  <tr>             
    <td width="14%" height="32"><b><font color="#000000" size="4">Bit position</font></b></td>          
    <td width="14%" height="32"><b><font color="#000000" size="4">&nbsp;31-26</font></b></td>        
    <td width="14%" height="32"><b><font color="#000000" size="4">&nbsp;25-21</font> </b></td>        
    <td width="14%" height="32"><b><font color="#000000" size="4">&nbsp;20-16</font></b></td>        
    <td width="44%" height="32"><font color="#000000" size="4">&nbsp;&nbsp;&nbsp;&nbsp; <b>15-0</b></font></td>             
  </tr>             
</table>             
             
         
         
<p><b><font color="#000000" size="4">Branch指令</font></b></p>        
        
        
        
<table border="1" width="100%" height="32" bordercolordark="#CC9966" bordercolorlight="#FFCC66">        
  <tr>        
    <td width="14%" height="1"><b><font color="#000000" size="4">&nbsp;Field</font></b></td>        
    <td width="14%" height="1"><b><font color="#000000" size="4">&nbsp;&nbsp; 4</font></b></td>             
    <td width="14%" height="1"><b><font color="#000000" size="4">&nbsp; rs</font></b></td>             
    <td width="14%" height="1"><b><font color="#000000" size="4">&nbsp;&nbsp; rt</font></b></td>             
    <td width="44%" height="1"><b><font color="#000000" size="4">&nbsp;&nbsp;&nbsp; address</font></b></td>             
  </tr>             
  <tr>             
    <td width="14%" height="32"><b><font color="#000000" size="4">Bit position</font></b></td>          
    <td width="14%" height="32"><b><font color="#000000" size="4">&nbsp;31-26</font></b></td>        
    <td width="14%" height="32"><b><font color="#000000" size="4">&nbsp;25-21</font> </b></td>        
    <td width="14%" height="32"><b><font color="#000000" size="4">&nbsp;20-16</font></b></td>        
    <td width="44%" height="32"><font color="#000000" size="4">&nbsp;&nbsp;&nbsp;&nbsp; <b>15-0</b></font></td>             
  </tr>             
</table>             
             
         
         
<p><b><font color="#000000" size="4">我们知道:</font></b></p>        
        
<p><b><font color="#000000" size="4">1.数据地址控制:由指令的地址字段决定</font></b></p>        
        
<p><b><font color="#000000" size="4">2.运算和操作控制:由opcode和function两者决定</font></b></p>        
        
<p><b><font color="#000000" size="4">对照上述指令格式,</font></b></p>        
        
<p><b><font color="#000000" size="4">1.控制数据流字段地址:</font></b></p>        
        
<p><b><font color="#000000" size="4">1)第二源寄存器的地址(rs):Instruction[25-21]</font></b></p>        
        
<p><b><font color="#000000" size="4">2)第三源寄存器的地址(rt):Instruction[20-16]</font></b></p>        
        
<p><b><font color="#000000" size="4">3)目的寄存器的地址:A) I型指令Instruction[20-16]</font></b></p>             
             
<p><b><font color="#000000" size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              
B) R型指令&nbsp;(rd):Instruction[15-11]</font></b></p>             
             
<p><b><font color="#000000" size="4">4)I型指令的地址偏移:&nbsp;Instruction[15-0]:要与rs相加,构成存储器的直接</font></b></p>           
           
<p><b><font color="#000000" 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;              
地址</font></b></p>             
             
<p><b><font color="#000000" size="4">2.操作码字段:</font></b></p>           
           
<p><font color="#000000" size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>opcode:Instruction[31-26],即op[5-0]</b></font></p>             
             
<p><font color="#000000" size="4">&nbsp;&nbsp; <b>&nbsp;&nbsp;&nbsp;&nbsp; Funct: Instruction[5-0]</b></font></p>             
             
<p><font color="#000000" size="4">&nbsp;&nbsp; <b>以上两者决定了操作流和运算控制以及ALU的有关操作</b></font></p>             
             
<p><b><font color="#000000" size="4">下面我们来看看数据操作的控制信号:</font></b></p>           
           
           
           
<table border="1" width="100%" bordercolordark="#CC9966" bordercolorlight="#FFCC66">           
  <tr>           
    <td width="33%" align="center"><b><font color="#000000" size="4">&nbsp;&nbsp; Signal name</font></b></td>             
    <td width="33%" align="center"><b><font color="#000000" size="4">&nbsp; Effect when&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              
    deasserted</font></b></td>             
    <td width="34%" align="center"><b><font color="#000000" size="4">&nbsp; Effect when asserted</font></b></td>             
  </tr>             
  <tr>             
    <td width="33%" align="center"><b><font color="#000000" size="4">&nbsp;&nbsp; MemRead</font></b></td>             
    <td width="33%" align="center"><b><font color="#000000" size="4">None</font></b></td>       
    <td width="34%" align="center"><b><font color="#000000" size="4">Data memory contents at the read address          
      are put on read data output</font></b></td>         
  </tr>         
  <tr>         
    <td width="33%" align="center"><b><font color="#000000" size="4">&nbsp;&nbsp; MemWrite</font></b></td>            
    <td width="33%" align="center"><b><font color="#000000" size="4">None</font></b></td>       
    <td width="34%" align="center"><b><font color="#000000" size="4">Data memory contents at address giver by          
      write address is replaced by value on Write data input</font></b></td>         
  </tr>         
  <tr>         
    <td width="33%" align="center"><b><font color="#000000" size="4">&nbsp;&nbsp; ALUSrc</font></b></td>             
    <td width="33%" align="center"><b><font color="#000000" size="4">The second ALU operand comes from the             
      second register file output </font></b></td>
    <td width="34%" align="center"><b><font color="#000000" size="4">The second ALU operand is the             
      sign-extended lower 16-bits of the instruction</font></b></td>            
  </tr>            
  <tr>            
    <td width="33%" align="center"><b><font color="#000000" size="4">&nbsp;&nbsp; RegDst</font></b></td>             
    <td width="33%" align="center"><b><font color="#000000" size="4"> The register destination number for the             
      Write register comes from the rt field</font></b></td>            
    <td width="34%" align="center"><b><font color="#000000" size="4">The register destination number for the          
      Write register comes from the rd field</font></b></td>         
  </tr>         
  <tr>         
    <td width="33%" align="center"><b><font color="#000000" size="4">&nbsp;&nbsp; RegWrite</font></b></td>             

⌨️ 快捷键说明

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