Просмотр исходного кода

Retain the lower-LUT registered ACK payload

codex 3 месяцев назад
Родитель
Сommit
d2138bd966
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      src/transport/mrdimm_host_command.v

+ 4 - 3
src/transport/mrdimm_host_command.v

@@ -129,9 +129,7 @@ module mrdimm_host_command #(
     // STATUS : snapshot mux byte window (status_byte_data at tx_payload_addr)
     // STATUS : snapshot mux byte window (status_byte_data at tx_payload_addr)
     // EVENT  : byte 0 = record_count, then 16-byte records oldest first
     // EVENT  : byte 0 = record_count, then 16-byte records oldest first
     reg [15:0] ev_freeze_count;
     reg [15:0] ev_freeze_count;
-    // start_ack sets these fields before TX starts, and the command context
-    // holds them through the final response stop bit. No extra copy is needed.
-    wire [127:0] ack_word={96'd0,ack_detail,ack_status,ack_request};
+    reg [127:0] ack_word;
     reg status_valid;           // DATA phase carries ALL_STATUS
     reg status_valid;           // DATA phase carries ALL_STATUS
     reg event_valid;            // DATA phase carries EVENT_DATA
     reg event_valid;            // DATA phase carries EVENT_DATA
     reg tx_start_or_running;
     reg tx_start_or_running;
@@ -151,10 +149,13 @@ module mrdimm_host_command #(
 
 
     always @(posedge clk or negedge rst_n) begin
     always @(posedge clk or negedge rst_n) begin
         if (!rst_n) begin
         if (!rst_n) begin
+            ack_word <= 128'd0;
             tx_start_or_running <= 1'b0;
             tx_start_or_running <= 1'b0;
         end else begin
         end else begin
             if (tx_start) tx_start_or_running <= 1'b1;
             if (tx_start) tx_start_or_running <= 1'b1;
             else if (tx_done) tx_start_or_running <= 1'b0;
             else if (tx_done) tx_start_or_running <= 1'b0;
+            if (tx_start && tx_frame_type == RSP_ACK)
+                ack_word <= {96'd0,ack_detail,ack_status,ack_request};
         end
         end
     end
     end
     // Snapshot/event RAM already has one read cycle; adding a register here
     // Snapshot/event RAM already has one read cycle; adding a register here