Commit caa2e084 authored by Maciej Lipinski's avatar Maciej Lipinski

wr_streamers: fixed bug that prevented timestamps from being latched

In the mode in which data is provided to wr_streamers with clk_ref_i,
the timestamps are captured with the clk_ref_i clock. The input data
then crosses domains via FIFO to clk_sys_i clock. The timestamp is
used by FSM in the clk_sys_i domain. The pulse from the timestamper
was expected to happen when the frame is already started to be
generated by the FSM, thus the latch of the tag_valid pulse
(indicating the timestamp was generated) was reseted in the IDLE
state of this FSM. This is OK when the input data and the FSM
are in the same clock domain. IF there is asynch FIFO in between,
it can happen that the timestamp is generated still in the IDLE
state of the FSM... I've changed the reset of the latch to happen
after the timestamp is embedded in the header (i.e. in the
FRAME_SEQ_ID state).
parent 03448da1
......@@ -498,7 +498,7 @@ begin -- rtl
p_latch_timestamp : process(clk_sys_i)
begin
if rising_edge(clk_sys_i) then
if rst_int_n = '0' or state = IDLE then
if rst_int_n = '0' or state = FRAME_SEQ_ID then
tag_valid_latched <= '0';
elsif tag_valid = '1' then
tag_valid_latched <= '1';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment