fpga: Add ability to get time from Radio block

Added registers to read back radio time.  Bumped minor compat.

Signed-off-by: michael-west <michael.west@ettus.com>


Original-commit: 43ab4c8b43d8407fc9f345ca4b13634f03ad4a43
This commit is contained in:
michael-west
2021-11-17 08:56:39 -06:00
committed by Wade Fife
parent 2589fd21c7
commit c4cd0a129d
3 changed files with 26 additions and 2 deletions
@@ -430,12 +430,15 @@ module rfnoc_block_radio #(
//---------------------------------------------------------------------------
localparam [15:0] compat_major = 16'd0;
localparam [15:0] compat_minor = 16'd0;
localparam [15:0] compat_minor = 16'd1;
reg [31:0] radio_time_hi;
always @(posedge radio_clk) begin
if (radio_rst) begin
ctrlport_shared_resp_ack <= 0;
ctrlport_shared_resp_data <= 0;
radio_time_hi <= 32'h0;
end else begin
// Default assignments
ctrlport_shared_resp_ack <= 0;
@@ -448,6 +451,15 @@ module rfnoc_block_radio #(
ctrlport_shared_resp_ack <= 1;
ctrlport_shared_resp_data <= { compat_major, compat_minor };
end
REG_TIME_LO: begin
ctrlport_shared_resp_ack <= 1;
ctrlport_shared_resp_data <= radio_time[31:0];
radio_time_hi <= radio_time[63:32];
end
REG_TIME_HI: begin
ctrlport_shared_resp_ack <= 1;
ctrlport_shared_resp_data <= radio_time_hi;
end
endcase
end
end