|
@@ -1,6 +1,6 @@
|
|
|
`timescale 1ns/1ps
|
|
`timescale 1ns/1ps
|
|
|
|
|
|
|
|
-// RECONSTRUCTED Scheme A1 sequential shared DDA (not exact byte-archive).
|
|
|
|
|
|
|
+// RECONSTRUCTED Scheme A1 sequential shared DDA (pending-queue + drain parity).
|
|
|
// Provenance: recovered from agent transcript 7c830c69 (Round-2 A1 implementation)
|
|
// Provenance: recovered from agent transcript 7c830c69 (Round-2 A1 implementation)
|
|
|
// matching yosys-a1-dda.stat signals (state/service_pending/f_fire/f_next).
|
|
// matching yosys-a1-dda.stat signals (state/service_pending/f_fire/f_next).
|
|
|
// Label: reconstructed — must pass same functional tests as A2 before fair TD.
|
|
// Label: reconstructed — must pass same functional tests as A2 before fair TD.
|
|
@@ -90,11 +90,12 @@ module door_shared_dda_scheduler #(
|
|
|
end else begin
|
|
end else begin
|
|
|
toggle_pulse <= 3'b000;
|
|
toggle_pulse <= 3'b000;
|
|
|
|
|
|
|
|
|
|
+ // Always latch the request. Short SERVICE_CLKS TBs (e.g. 4) would
|
|
|
|
|
+ // otherwise drop pulses while the 3-cycle X→Y→Z walk is busy.
|
|
|
if (service_ce) begin
|
|
if (service_ce) begin
|
|
|
if (busy)
|
|
if (busy)
|
|
|
overrun_r <= 1'b1;
|
|
overrun_r <= 1'b1;
|
|
|
- else
|
|
|
|
|
- service_pending <= 1'b1;
|
|
|
|
|
|
|
+ service_pending <= 1'b1;
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
case (state)
|
|
case (state)
|
|
@@ -131,8 +132,14 @@ module door_shared_dda_scheduler #(
|
|
|
toggle_pulse[2] <= f_fire(phase2, rate2, thr, active[2], allow_toggle[2]);
|
|
toggle_pulse[2] <= f_fire(phase2, rate2, thr, active[2], allow_toggle[2]);
|
|
|
phase2 <= f_next(phase2, rate2, thr, active[2]);
|
|
phase2 <= f_next(phase2, rate2, thr, active[2]);
|
|
|
end
|
|
end
|
|
|
- busy <= 1'b0;
|
|
|
|
|
- state <= ST_IDLE;
|
|
|
|
|
|
|
+ if (service_pending) begin
|
|
|
|
|
+ service_pending <= 1'b0;
|
|
|
|
|
+ busy <= 1'b1;
|
|
|
|
|
+ state <= ST_X;
|
|
|
|
|
+ end else begin
|
|
|
|
|
+ busy <= 1'b0;
|
|
|
|
|
+ state <= ST_IDLE;
|
|
|
|
|
+ end
|
|
|
end
|
|
end
|
|
|
endcase
|
|
endcase
|
|
|
end
|
|
end
|