فهرست منبع

refactor(mrdimm): retain measured smaller aligned snapshot selection

codex 3 ماه پیش
والد
کامیت
a8fc20f13a
2فایلهای تغییر یافته به همراه3 افزوده شده و 10 حذف شده
  1. 2 0
      docs/audits/mrdimm-shared-core-review.md
  2. 1 10
      src/telemetry/mrdimm_snapshot_mux.v

+ 2 - 0
docs/audits/mrdimm-shared-core-review.md

@@ -113,3 +113,5 @@ storage capacity but does not establish a device fit.
 An attempted validity-masked limit-history RAM retained all parallel read
 ports in the netlist and increased LUT without reducing registers. That
 production change was removed; its reset/stale-history regression remains.
+An explicit one-hot snapshot word decoder also increased TD area (77 LUT
+cells in that comparison); the bounded aligned part-select was restored.

+ 1 - 10
src/telemetry/mrdimm_snapshot_mux.v

@@ -41,15 +41,6 @@ module mrdimm_snapshot_mux #(
     wire [9:0] axis_relative=index-`MR_SNAPSHOT_AXIS_OFFSET;
     localparam integer AXIS_WORD_ADDR_WIDTH=$clog2(AXIS_COUNT*`MR_AXIS_RECORD_BYTES/2);
     wire [AXIS_WORD_ADDR_WIDTH-1:0] axis_word_index=axis_relative>>1;
-    reg [15:0] selected_axis_word;
-    integer axis_word;
-    always @* begin
-        selected_axis_word=0;
-        // Decode once per word and share that enable across all16 bits.
-        // This avoids independent deep bit-select trees in the TD mapper.
-        for(axis_word=0;axis_word<AXIS_COUNT*`MR_AXIS_RECORD_BYTES/2;axis_word=axis_word+1)
-            selected_axis_word=selected_axis_word | (axis_data[axis_word*16+:16] & {16{axis_word_index==axis_word}});
-    end
     wire copying_axes=index>=`MR_SNAPSHOT_AXIS_OFFSET;
     assign bmc_rd_index=in_bmc ? bmc_relative[5:1] : 5'd0;
     assign ct_rd_index=in_ct ? ct_relative[5:1] : 5'd0;
@@ -60,7 +51,7 @@ module mrdimm_snapshot_mux #(
     // AXIS_OFFSET and every record are even; select only aligned words.
     // Keeping this separate from the header-byte mux avoids duplicate wide
     // byte/word selectors and makes the legal address width explicit to TD.
-    wire [15:0] memory_write_data=copying_axes ? selected_axis_word : {copy_data,header_low_byte};
+    wire [15:0] memory_write_data=copying_axes ? axis_data[{axis_word_index,4'b0000} +:16] : {copy_data,header_low_byte};
     ef2_bram_dp #(.DATA_WIDTH(16),.ADDR_WIDTH(SNAPSHOT_ADDR_WIDTH),.DATA_DEPTH(SNAPSHOT_LENGTH/2)) u_snapshot_memory (
         .clk(clk),.a_en(memory_write),.a_we(memory_write),
         .a_addr(index[SNAPSHOT_ADDR_WIDTH:1]),.a_wdata(memory_write_data),.a_rdata(),