From 29b1436bad4de182ff3c222f88e89c23d9e6bdae Mon Sep 17 00:00:00 2001 From: Zane Kaminski Date: Wed, 16 Oct 2024 05:59:54 -0400 Subject: [PATCH] Put back fatsscc --- cpld/CNT.v | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cpld/CNT.v b/cpld/CNT.v index c84d2ed..f654c0a 100644 --- a/cpld/CNT.v +++ b/cpld/CNT.v @@ -85,6 +85,18 @@ module CNT( else if (QS!=0 && TimerTick) QS <= QS-1; 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; always @(posedge CLK) begin if (!nRESin) ClockGateEN <= 0; @@ -98,7 +110,7 @@ module CNT( end /* 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 */ always @(negedge CLK, negedge nAS) begin