复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36module pc_reg( input wire clk, input wire rst, input wire stall_id, input wire jump, input wire[1:0] stall_branch_t, input wire[31:0] pc1, input wire[31:0] pc2,//专门为跳转指令设置的 output reg[31:0] pc ); always @(posedge clk) begin if (rst==1'b1) begin pc=32'h0; end else begin if (jump!=1'b1) begin if (stall_id==1'b0) begin if (stall_branch_t==2'b10) begin pc <= pc1-32'h4; end else begin pc<=pc1; end end else begin pc <= pc1-32'h4; end end else begin pc <= pc2; end end end endmodule
最后
以上就是坚强书包最近收集整理的关于cpu之pc_reg的全部内容,更多相关cpu之pc_reg内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复