Put back fatsscc

This commit is contained in:
Zane Kaminski 2024-10-16 05:59:54 -04:00
parent dcd0e301c8
commit 29b1436bad

View File

@ -85,6 +85,18 @@ module CNT(
else if (QS!=0 && TimerTick) QS <= QS-1; else if (QS!=0 && TimerTick) QS <= QS-1;
end end
reg [1:0] QFS;
always @(posedge CLK) begin
if (!nRESin) QFS <= 0;
else if (BACT && IACK1CS) QFS <= 2;
else if (BACT && IACK0CS) QFS <= 0;
else if (BACT && VIACS) QFS <= 0;
else if (BACT && IWMCS) QFS <= 0;
else if (BACT && SCCCS) QFS <= 2;
else if (SndCSWRr) QFS <= 0;
else if (QFS!=0 && TimerTick) QFS <= QFS-1;
end
reg ClockGateEN; reg ClockGateEN;
always @(posedge CLK) begin always @(posedge CLK) begin
if (!nRESin) ClockGateEN <= 0; if (!nRESin) ClockGateEN <= 0;
@ -98,7 +110,7 @@ module CNT(
end end
/* QoS enable control */ /* QoS enable control */
always @(posedge CLK) if (!BACT) QoSEN <= QS!=0; always @(posedge CLK) if (!BACT) QoSEN <= QS!=0 && QFS==0;
/* MC68k clock gating during QoS */ /* MC68k clock gating during QoS */
always @(negedge CLK, negedge nAS) begin always @(negedge CLK, negedge nAS) begin