fpga: rfnoc: radio: move arithmetic away from timestamp for timing

Original-commit: 7a3fc743375f065c38f9d6aa3fff43d67cc6b0e0
This commit is contained in:
Max Köhler
2025-02-10 16:47:54 -06:00
committed by Wade Fife
parent 0f431ebdd5
commit be25e4da1b
2 changed files with 6 additions and 6 deletions
@@ -421,10 +421,10 @@ module radio_rx_core #(
if (radio_rx_stb) begin
// Register time comparisons so they don't become the critical path.
// Add two to compensate for the pipeline delays of this comparison and
// its propagation through the state machine. This ensures that the
// Subtract two to compensate for the pipeline delays of this comparison
// and its propagation through the state machine. This ensures that the
// timestamp in the packet matches the requested timestamp.
time_now <= (radio_time[63:SHIFT_W]+2 == cmd_time[63:SHIFT_W]);
time_now <= (radio_time[63:SHIFT_W] == cmd_time[63:SHIFT_W]-2);
time_now_p1 <= time_now;
time_past <= (radio_time[63:SHIFT_W] >= cmd_time[63:SHIFT_W]);
end
@@ -277,7 +277,7 @@ module radio_tx_core #(
if (radio_tx_stb) begin
// Register time comparisons so they don't become the critical path
time_now_m1 <= (radio_time[63:SHIFT_W]+1 == s_axis_ttimestamp[63:SHIFT_W]);
time_now_m1 <= (radio_time[63:SHIFT_W] == s_axis_ttimestamp[63:SHIFT_W]-1);
time_now <= time_now_m1;
time_past <= (radio_time[63:SHIFT_W] > s_axis_ttimestamp[63:SHIFT_W]);
end