Control Unit 控制部件

Control Unit 控制部件

在控制部件中,通过对指令编码的 op 、func 字段进行逻辑运算,来输出对应的控制信号。此模块仍然采用了门级实现,门级实现的代码虽然较为繁琐冗长,但是其更有利于我们理解电路内部的逻辑。

  	module CONUNIT(Z, Op, Func, Regrt, Se, Reg2reg, Pcsrc, Wmem, Aluc, Aluqb, Wreg);  
  	    input Z;  
  	    input [5:0] Op, Func;  
  	    output Regrt, Se, Wreg, Aluqb, Wmem, Reg2reg;  
  	    output [1:0] Pcsrc, Aluc;  
  	      
  	    wire R_type, I_add, I_sub, I_and, I_or, I_addi, I_andi, I_ori, I_lw, I_sw, I_beq, I_bne, I_J;  
  	  
  	    wire [5:0] Op_n,Func_n;  
  	    not (Op_n[0],Op[0]);  
  	    not (Op_n[1],Op[1]);  
  	    not (Op_n[2],Op[2]);  
  	    not (Op_n[3],Op[3]);  
  	    not (Op_n[4],Op[4]);  
  	    not (Op_n[5],Op[5]);  
  	      
  	    not (Func_n[0],Func[0]);  
  	    not (Func_n[1],Func[1]);  
 	    not (Func_n[2],Func[2]);  
  	    not (Func_n[3],Func[3]);  
  	    not (Func_n[4],Func[4]);  
  	    not (Func_n[5],Func[5]);  
  	      
  	    and (R_type, Op_
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值