当前位置:网站首页>PC register

PC register

2022-07-05 05:33:00 Li Junfeng

PC Register is used to store the address of the instruction .
stay CPU Startup time , It will be initialized , That is, set the current address to 0 .
Used 32 Types are D_FFEC Of D Trigger to implement a 32 Bit general register , The change of the value of the register can only occur on the rising edge of the clock cycle , And input the enable signal En, Clear signal Clrn, Clock signal Clk.

  	module PC_REG(D, Clk, Clrn, Q);  
  	    input [31:0] D;  
  	    input Clk, Clrn;  
  	    output [31:0] Q;  
  	    wire [31:0] Qn;  
  	    D_FFEC32 d_ffec(D, Clk, 1, Clrn, Q, Qn);  
  	endmodule  

among D_FFEC32 by 32 Bit register , It has an enabling end .

  	module D_FFEC32(  
  	    D,  
  	    Clk,  
  	    En,  
  	    Clrn,  
  	    Q,  
  	    Qn  
  	);  
  	    input wire[31:0] D;  
  	    input Clk , En , Clrn;  
  	    output wire[31:0] Q;  
  	    output wire[31:0]Qn;  
  	  
  	    D_FFEC d0 (D[0] , Clk , En , Clrn , Q[0] , Qn[0]);  
  	    D_FFEC d1 (D[1] , Clk , En , Clrn , Q[1] , Qn[1]);  
  	  ……  
  	D_FFEC d31 (D[31] , Clk , En , Clrn , Q[31] , Qn[31]);  
  	endmodule  

原网站

版权声明
本文为[Li Junfeng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050527288260.html