Skip to content

Commit

Permalink
Prevent stale data frim being used to sync leaf clock
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Forencich <[email protected]>
  • Loading branch information
alexforencich committed Dec 2, 2023
1 parent f0c47db commit dd97924
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rtl/ptp_td_leaf.v
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,10 @@ always @* begin
// extract data
if (dst_td_tvalid_reg) begin
if (TS_TOD_EN) begin
if (dst_td_tid_reg[3:0] == 4'd1) begin
// prevent stale data from being used in time sync
dst_tod_shadow_valid_next = 1'b0;
end
if (dst_td_tid_reg == {4'd0, 4'd1}) begin
dst_tod_ns_shadow_next[15:0] = dst_td_tdata_reg;
dst_tod_shadow_valid_next = 1'b0;
Expand Down

0 comments on commit dd97924

Please sign in to comment.