Snapshot: fog implementation + fidelity tooling baseline (pre bilinear-clamp fix)
Per-vertex GS fog end-to-end (gs_stub emit incl. persp_emit5, gs_prim_list_feeder XYZ2->XYZF2 on PRIM.FGE, gs_make_sh3_scheduler_fixture.py F/FGE packing), new fog TBs, fidelity attribution tooling. Functional baseline before removing the dead bilinear lerp8 clamps (Codex: 161-node comb loop -> -0.042ns setup fail). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -121,24 +121,28 @@ module gs_lpddr_wr_arb (
|
||||
// so AW sets it first, but tracking either makes this a GENERAL AXI write arbiter that never
|
||||
// abandons a transaction regardless of AW/W ordering (Codex audit note).
|
||||
reg aw_done; // a write beat/addr accepted for the active grant -> never abort past here
|
||||
// Ch368 -- arm EMIF BREADY from the final W handshake, rather than feeding it through the
|
||||
// live grant/client-ready mux. All current writers enter their B-wait state on that same
|
||||
// handshake (or hold BREADY high), so this preserves the AW->W->B contract while cutting
|
||||
// the grant/bready -> EMIF response-FIFO timing cone.
|
||||
reg bready_q;
|
||||
reg [21:0] watchdog; // pre-commit only; ~6.7 ms @ 310 MHz dead-bus backstop
|
||||
wire wd_expired = watchdog[21];
|
||||
wire sel_bready = (grant==3'd1)?s0_bready:(grant==3'd2)?s1_bready:
|
||||
(grant==3'd3)?s2_bready:(grant==3'd4)?s3_bready:1'b1;
|
||||
|
||||
always_ff @(posedge clk or negedge rst_n) begin
|
||||
if (!rst_n) begin
|
||||
grant <= 3'd0; aw_done <= 1'b0; watchdog <= '0;
|
||||
grant <= 3'd0; aw_done <= 1'b0; bready_q <= 1'b0; watchdog <= '0;
|
||||
end else if (grant == 3'd0) begin
|
||||
aw_done <= 1'b0; watchdog <= '0;
|
||||
aw_done <= 1'b0; bready_q <= 1'b0; watchdog <= '0;
|
||||
if (s0_awvalid) grant <= 3'd1; // FB writer (highest)
|
||||
else if (s2_awvalid) grant <= 3'd3; // Z spill (render-flush)
|
||||
else if (s1_awvalid) grant <= 3'd2; // color spill (render-flush)
|
||||
else if (s3_awvalid) grant <= 3'd4; // HPS write-probe (debug, lowest)
|
||||
end else begin
|
||||
if ((m_awvalid && m_awready) || (m_wvalid && m_wready)) aw_done <= 1'b1; // AW or W accepted -> COMMITTED
|
||||
if (m_bvalid && sel_bready) begin
|
||||
grant <= 3'd0; aw_done <= 1'b0; watchdog <= '0; // B delivered -> release
|
||||
if (m_wvalid && m_wready && m_wlast) bready_q <= 1'b1;
|
||||
if (m_bvalid && bready_q) begin
|
||||
grant <= 3'd0; aw_done <= 1'b0; bready_q <= 1'b0; watchdog <= '0; // B delivered -> release
|
||||
end else if (!aw_done) begin // still waiting for AW (nothing owed)
|
||||
if (wd_expired) begin grant <= 3'd0; aw_done <= 1'b0; watchdog <= '0; end
|
||||
else watchdog <= watchdog + 22'd1;
|
||||
@@ -169,11 +173,12 @@ module gs_lpddr_wr_arb (
|
||||
assign s2_wready = (grant==3'd3)?m_wready:1'b0;
|
||||
assign s3_wready = (grant==3'd4)?m_wready:1'b0;
|
||||
|
||||
// B demux (idle: bready=1 drains any stale/late response)
|
||||
// B demux. bready_q arms exactly after the selected final W handshake, one cycle before
|
||||
// the earliest response the existing writers can consume. It is held through B acceptance.
|
||||
assign s0_bresp = m_bresp; assign s1_bresp = m_bresp; assign s2_bresp = m_bresp; assign s3_bresp = m_bresp;
|
||||
assign s0_bvalid = (grant==3'd1)?m_bvalid:1'b0;
|
||||
assign s1_bvalid = (grant==3'd2)?m_bvalid:1'b0;
|
||||
assign s2_bvalid = (grant==3'd3)?m_bvalid:1'b0;
|
||||
assign s3_bvalid = (grant==3'd4)?m_bvalid:1'b0;
|
||||
assign m_bready = (grant==3'd1)?s0_bready:(grant==3'd2)?s1_bready:(grant==3'd3)?s2_bready:(grant==3'd4)?s3_bready:1'b1;
|
||||
assign m_bready = bready_q;
|
||||
endmodule
|
||||
|
||||
Reference in New Issue
Block a user