jesd204: Check lane error count in register map testbench

Assign a unique value to each lane's error count register and verify that
the correct value is returned for the right lane.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
main
Lars-Peter Clausen 2018-07-19 16:48:54 +02:00 committed by Lars-Peter Clausen
parent b2ed915fbc
commit d5a1aa81e8
1 changed files with 10 additions and 1 deletions

View File

@ -70,6 +70,8 @@ module axi_jesd204_rx_tb;
wire [1:0] s_axi_rresp;
wire [31:0] s_axi_rdata;
wire [NUM_LANES*32-1:0] core_status_err_statistics_cnt;
task write_reg;
input [31:0] addr;
input [31:0] value;
@ -167,6 +169,11 @@ module axi_jesd204_rx_tb;
set_reset_reg_value('hc4, 'h1); /* Core state */
// set_reset_reg_value('hc8, 'h28000); /* clock monitor */
set_reset_reg_value('h210, 'h3); /* OCTETS_PER_MULTIFRAME */
/* Lane error statistics */
for (i = 0; i < NUM_LANES; i = i + 1) begin
set_reset_reg_value('h308 + i*'h20, core_status_err_statistics_cnt[32*i+:32]);
end
end
endtask
@ -227,6 +234,8 @@ module axi_jesd204_rx_tb;
l2,core_ilas_config_addr,2'h1,
l2,core_ilas_config_addr,2'h0
};
assign core_status_err_statistics_cnt[32*l+:32] = {28'hffaa550,l2};
end
endgenerate
@ -349,7 +358,7 @@ module axi_jesd204_rx_tb;
.core_event_sysref_alignment_error(1'b0),
.core_event_sysref_edge(1'b0),
.core_status_err_statistics_cnt(),
.core_status_err_statistics_cnt(core_status_err_statistics_cnt),
.core_ctrl_err_statistics_mask(),
.core_ctrl_err_statistics_reset(),