Files
neulacpu/lacpu/rtl/mycpu/pip_ctrl.v

61 lines
1.5 KiB
Verilog
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
`define StallBus 6
module pip_ctrl(
input reset,
input except_en,
//input stallreq_fs_for_cache,
//input stallreq_es_for_cache,
input stallreq_ds,
input stallreq_es,
input stallreq_axi,
input stallreq_cache,
output reg flush,
output reg [`StallBus-1:0] stall
);
//stall[0] --?
//stall[1] --?
//stall[2] --id
//stall[3]
//stall[4]
//stall[5]
always @ (*) begin
if (reset) begin
flush = 0;
stall = `StallBus'b000000;
end
else if (stallreq_axi) begin
flush = 0;
stall = `StallBus'b111111;
end
else if (except_en) begin
flush = 1;
stall = `StallBus'b0;
end
else if (stallreq_es) begin
flush = 0;
stall = `StallBus'b111111;
end
//id段å<C2B5>生æšå<E2809A>œï¼Œæ­¤æ—¶idå<64>Šä¹å‰<C3A5>æšå<E2809A>?
else if (stallreq_ds) begin
flush = 0;
stall = `StallBus'b000111;
end
// else if(stallreq_fs_for_cache) begin
// flush = 0;
// stall = `StallBus'b000011;
// end
// else if(stallreq_es_for_cache) begin
// flush = 0;
// stall = `StallBus'b011111;
// end
// else if(stallreq_cache) begin
// flush = 0;
// stall = `StallBus'b111111;
// end
else begin
flush = 0;
stall = `StallBus'b000000;
end
end
endmodule