jesd204_rx: Reset frame alignment monitor event generator

If the link is not enabled no event should be generated.
main
Laszlo Nagy 2020-09-25 07:12:34 +01:00 committed by Laszlo Nagy
parent 0ecf4254ec
commit 7c523fbf02
1 changed files with 9 additions and 4 deletions

View File

@ -399,12 +399,17 @@ for (i = 0; i < NUM_LANES; i = i + 1) begin: gen_lane
if(ENABLE_FRAME_ALIGN_CHECK) begin : gen_frame_align_err_thresh if(ENABLE_FRAME_ALIGN_CHECK) begin : gen_frame_align_err_thresh
always @(posedge clk) begin always @(posedge clk) begin
if (status_lane_frame_align_err_cnt[8*i+7:8*i] >= cfg_frame_align_err_threshold) begin if (reset) begin
frame_align_err_thresh_met[i] <= cgs_ready[i];
event_frame_alignment_error_per_lane[i] <= ~frame_align_err_thresh_met[i];
end else begin
frame_align_err_thresh_met[i] <= 1'b0; frame_align_err_thresh_met[i] <= 1'b0;
event_frame_alignment_error_per_lane[i] <= 1'b0; event_frame_alignment_error_per_lane[i] <= 1'b0;
end else begin
if (status_lane_frame_align_err_cnt[8*i+7:8*i] >= cfg_frame_align_err_threshold) begin
frame_align_err_thresh_met[i] <= cgs_ready[i];
event_frame_alignment_error_per_lane[i] <= ~frame_align_err_thresh_met[i];
end else begin
frame_align_err_thresh_met[i] <= 1'b0;
event_frame_alignment_error_per_lane[i] <= 1'b0;
end
end end
end end
end end