From 2a5c9c0971c13e59fa604d9a073751a176781248 Mon Sep 17 00:00:00 2001 From: Emilio Perez Date: Fri, 28 Jun 2024 15:28:23 +0100 Subject: [PATCH] capture ts_start on rising enable if gate is active --- modules/pcap/hdl/pcap_frame.vhd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/pcap/hdl/pcap_frame.vhd b/modules/pcap/hdl/pcap_frame.vhd index 88d65a808..bb56a5201 100644 --- a/modules/pcap/hdl/pcap_frame.vhd +++ b/modules/pcap/hdl/pcap_frame.vhd @@ -155,8 +155,10 @@ process(clk_i) begin -- Capture the timestamp at the start of a capture frame if (enable_i = '0') then ts_start_enable <= '0'; + ts_start <= (others => '0'); + ts_start_dly <= (others => '0'); -- trig the timestamp this is the start of a frame - elsif (ts_start_enable = '0' and gate_rise = '1') then + elsif (ts_start_enable = '0' and gate_i = '1') then ts_start_enable <= '1'; ts_start <= std_logic_vector(timestamp); -- Capture the timestamp this is the start of a frame