|
@@ -297,6 +297,15 @@ module prod2u_mrdimm_uart_e2e_tb;
|
|
|
repeat (2000) @(posedge clk);
|
|
repeat (2000) @(posedge clk);
|
|
|
if (data_len_seen !== 16'd50) $fatal(1, "ALL_STATUS length %0d", data_len_seen);
|
|
if (data_len_seen !== 16'd50) $fatal(1, "ALL_STATUS length %0d", data_len_seen);
|
|
|
if (response_checks!==6) $fatal(1,"incomplete serialized responses: %0d",response_checks);
|
|
if (response_checks!==6) $fatal(1,"incomplete serialized responses: %0d",response_checks);
|
|
|
|
|
+ // Abort the running X seek, then read its stable event through 80/83.
|
|
|
|
|
+ send_byte(8'hA5);send_byte(8'h5A);send_byte(8'h04);send_byte(8'h08);send_byte(0);
|
|
|
|
|
+ send_byte(1);send_byte(1);repeat(6) send_byte(0);send_byte(8'hB1);send_byte(8'h30);
|
|
|
|
|
+ repeat(1000) @(posedge clk);
|
|
|
|
|
+ if(u_motor.g_axis[0].u_axis.active || acks!=6) $fatal(1,"control abort transaction");
|
|
|
|
|
+ send_byte(8'hA5);send_byte(8'h5A);send_byte(8'h08);send_byte(1);send_byte(0);
|
|
|
|
|
+ send_byte(8);send_byte(8'h3B);send_byte(8'hB7);
|
|
|
|
|
+ repeat(2000) @(posedge clk);
|
|
|
|
|
+ if(response_checks!=9 || acks!=7) $fatal(1,"EVENT_READ did not complete ACK plus DATA");
|
|
|
$display("prod2u_mrdimm_uart_e2e_tb PASS");
|
|
$display("prod2u_mrdimm_uart_e2e_tb PASS");
|
|
|
$finish;
|
|
$finish;
|
|
|
end
|
|
end
|
|
@@ -328,12 +337,15 @@ module prod2u_mrdimm_uart_e2e_tb;
|
|
|
if(crc_check !== {response_bytes[response_count-1],response_bytes[response_count-2]})
|
|
if(crc_check !== {response_bytes[response_count-1],response_bytes[response_count-2]})
|
|
|
$fatal(1,"response CRC mismatch");
|
|
$fatal(1,"response CRC mismatch");
|
|
|
if(response_bytes[2]==8'h80) begin
|
|
if(response_bytes[2]==8'h80) begin
|
|
|
- if(response_bytes[5] !== ((acks<=2) ? 8'h01 : (acks==3 ? 8'h03 : (acks==4 ? 8'h05 : 8'h02))))
|
|
|
|
|
|
|
+ if(response_bytes[5] !== ((acks<=2) ? 8'h01 : (acks==3 ? 8'h03 : (acks==4 ? 8'h05 : (acks==5 ? 8'h02 : (acks==6 ? 8'h04 : 8'h08))))))
|
|
|
$fatal(1,"ACK request type corrupted: %02x",response_bytes[5]);
|
|
$fatal(1,"ACK request type corrupted: %02x",response_bytes[5]);
|
|
|
if(response_bytes[6] !== (acks==3 ? 8'd2 : 8'd0))
|
|
if(response_bytes[6] !== (acks==3 ? 8'd2 : 8'd0))
|
|
|
$fatal(1,"ACK business status corrupted: %02x",response_bytes[6]);
|
|
$fatal(1,"ACK business status corrupted: %02x",response_bytes[6]);
|
|
|
end else if(response_bytes[2]==8'h81) begin
|
|
end else if(response_bytes[2]==8'h81) begin
|
|
|
if(acks!=5) $fatal(1,"DATA preceded its ACK");
|
|
if(acks!=5) $fatal(1,"DATA preceded its ACK");
|
|
|
|
|
+ end else if(response_bytes[2]==8'h83) begin
|
|
|
|
|
+ if(acks!=7 || response_bytes[5]!=1 || response_bytes[10]!=0 || response_bytes[11]!=4)
|
|
|
|
|
+ $fatal(1,"EVENT payload count/axis/code corruption");
|
|
|
end else $fatal(1,"unexpected response type");
|
|
end else $fatal(1,"unexpected response type");
|
|
|
response_checks=response_checks+1;response_count=0;
|
|
response_checks=response_checks+1;response_count=0;
|
|
|
end
|
|
end
|