jesd204_rx: Reset lane error statistics when link is disabled

When the link is explicitly disabled through the control interface reset
the error statistics counter.

There is usually little benefit to preserving until after the link has been
disabled. If software is interested in the values it can read them before
disabling the link. Having them reset makes the behavior consistent with
all other internal state of the jesd204 RX peripheral, which is reset when
the link is disabled.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
main
Lars-Peter Clausen 2018-07-13 15:43:34 +02:00 committed by Lars-Peter Clausen
parent e79992f9c5
commit d3b548de65
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ endgenerate
end end
always @(posedge clk) begin always @(posedge clk) begin
if (ctrl_err_statistics_reset == 1'b1) begin if (reset == 1'b1 || ctrl_err_statistics_reset == 1'b1) begin
status_err_statistics_cnt <= 32'h0; status_err_statistics_cnt <= 32'h0;
end else if (status_err_statistics_cnt[31:5] != 27'h7ffffff) begin end else if (status_err_statistics_cnt[31:5] != 27'h7ffffff) begin
status_err_statistics_cnt <= status_err_statistics_cnt + phy_notintable_cnt + phy_disperr_cnt + phy_unexpectedk_cnt; status_err_statistics_cnt <= status_err_statistics_cnt + phy_notintable_cnt + phy_disperr_cnt + phy_unexpectedk_cnt;