FPGA: Add time changed pulse to timekeeper
The time changed signal was removed and is needed to synchronized the frontend. This restores the signal. Signed-off-by: michael-west <michael.west@ettus.com> Original-commit: 27aad17956a063f72f192dde97cbff675b46fada
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
// tb_timestamp : 64-bit global timestamp synchronous to tb_clk
|
||||
// tb_timestamp_last_pps : 64-bit timestamp of the last PPS edge
|
||||
// tb_period_ns_q32 : Time Period of time-base in nanoseconds
|
||||
// tb_changed : Pulse indicating the time-base has changed
|
||||
//
|
||||
|
||||
module timekeeper #(
|
||||
@@ -63,7 +64,8 @@ module timekeeper #(
|
||||
input wire pps,
|
||||
output reg [63:0] tb_timestamp,
|
||||
output reg [63:0] tb_timestamp_last_pps,
|
||||
output reg [63:0] tb_period_ns_q32
|
||||
output reg [63:0] tb_period_ns_q32,
|
||||
output reg tb_changed
|
||||
);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -267,11 +269,14 @@ module timekeeper #(
|
||||
if (tb_rst) begin
|
||||
tb_timestamp <= 0;
|
||||
time_event_armed <= 0;
|
||||
tb_changed <= 0;
|
||||
end else begin
|
||||
tb_changed <= 0;
|
||||
if (time_event) begin
|
||||
// Load the timing info configured prior to the event
|
||||
time_event_armed <= 0;
|
||||
tb_timestamp <= time_at_next_event;
|
||||
tb_changed <= 1;
|
||||
end else if (sample_rx_stb) begin
|
||||
// Update time for each sample word received
|
||||
tb_timestamp <= tb_timestamp + increment;
|
||||
|
||||
Reference in New Issue
Block a user