mirror of
https://github.com/alexforencich/verilog-ethernet.git
synced 2025-01-14 06:43:18 +08:00
PTP clock period is always positive
This commit is contained in:
parent
a3f6e36777
commit
1dd349399b
@ -161,7 +161,7 @@ always @(posedge clk) begin
|
||||
end
|
||||
|
||||
// timestamp increment calculation
|
||||
{ts_inc_ns_reg, ts_inc_fns_reg} <= $signed({period_ns_reg, period_fns_reg}) +
|
||||
{ts_inc_ns_reg, ts_inc_fns_reg} <= $signed({1'b0, period_ns_reg, period_fns_reg}) +
|
||||
(adj_active_reg ? $signed({adj_ns_reg, adj_fns_reg}) : 0) +
|
||||
((DRIFT_ENABLE && drift_cnt == 0) ? $signed({drift_ns_reg, drift_fns_reg}) : 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user