diff --git a/lib/rfnoc/blocks/rfnoc_block_radio/radio_rx_core.v b/lib/rfnoc/blocks/rfnoc_block_radio/radio_rx_core.v index 9a7b4a1..72197f8 100644 --- a/lib/rfnoc/blocks/rfnoc_block_radio/radio_rx_core.v +++ b/lib/rfnoc/blocks/rfnoc_block_radio/radio_rx_core.v @@ -421,12 +421,12 @@ 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]); + time_past <= (radio_time[63:SHIFT_W] >= cmd_time[63:SHIFT_W]); end case (state) diff --git a/lib/rfnoc/blocks/rfnoc_block_radio/radio_tx_core.v b/lib/rfnoc/blocks/rfnoc_block_radio/radio_tx_core.v index 33f1d7e..5771602 100644 --- a/lib/rfnoc/blocks/rfnoc_block_radio/radio_tx_core.v +++ b/lib/rfnoc/blocks/rfnoc_block_radio/radio_tx_core.v @@ -277,9 +277,9 @@ 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]); + time_past <= (radio_time[63:SHIFT_W] > s_axis_ttimestamp[63:SHIFT_W]); end if (NSPC > 1) begin