cpu之stall_ctr

来源:互联网 发布:jmeter响应数据乱码 编辑:程序博客网 时间:2024/06/05 01:53
module stall_ctr(input wire rst,input wire clk,input wire stall_id,input wire stall_branch,//分支暂停output reg[1:0] stall_branch_t,output reg stall_id_t);/*always @(negedge clk) beginif (stall_branch_t!=2'b00) beginstall_branch_t<= stall_branch_t -2'h1;endend*/always @(rst,clk,stall_id,stall_branch) begin//*********if (rst==1'b1) beginstall_id_t <= 1'b0;stall_branch_t <= 2'b00;end else beginstall_id_t <= stall_id;if (stall_branch==1'b1&&stall_branch_t == 2'b00) beginstall_branch_t <= 2'b11;endif (stall_branch_t!=2'b00&&clk==1'b0) begin      stall_branch_t<= stall_branch_t -2'h1;  endendendendmodule

原创粉丝点击