diff --git a/hdl/combpm_protocol_electron.vhd b/hdl/combpm_protocol_electron.vhd index aab0390dc13062c9499ef23c324c671d859251cd..3376a49b8d4a5bb6a7634bf463f7e68249bd5b84 100644 --- a/hdl/combpm_protocol_electron.vhd +++ b/hdl/combpm_protocol_electron.vhd @@ -26,6 +26,7 @@ entity combpm_protocol_electron is -- Status and control interface soft_reset : in std_logic; -- Reset all counters. + seq_offset : in signed(7 downto 0); -- Sequence numbering offset frame_seq_cnt : out std_logic_vector(15 downto 0); -- Number of frame in last sequence. frame_valid_cnt : out std_logic_vector(31 downto 0); -- Count of valid frames. frame_invalid_cnt : out std_logic_vector(31 downto 0); -- Count of invalid frames. @@ -292,7 +293,7 @@ begin m_axis_tdata_posy <= packet_ypos; m_axis_tdata_bpmid <= "000000" & packet_bpmid; m_axis_tuser_mcts <= mc_time; - m_axis_tdata_faseq <= packet_timestamp; + m_axis_tdata_faseq <= std_logic_vector(signed(packet_timestamp)+seq_offset); -- AXIS TVALID m_axis_tvalid <= not soft_reset; diff --git a/hdl/top_combpm_electron.vhd b/hdl/top_combpm_electron.vhd index f24bfaa527c92b84a0a5e54e9999a6e03999b7d8..78fc3b948917d18cfa026d9598495dbd5b7ff4ab 100644 --- a/hdl/top_combpm_electron.vhd +++ b/hdl/top_combpm_electron.vhd @@ -271,6 +271,7 @@ begin mc_time => mc_time, soft_reset => addrmap_r.RESET.SOFTRESET.data(0), + seq_offset => signed(addrmap_r.SEQ_OFFSET.data), frame_seq_cnt => frame_seq_cnt, frame_valid_cnt => frame_valid_cnt, frame_invalid_cnt => frame_invalid_cnt, diff --git a/rdl/combpm.rdl b/rdl/combpm.rdl index 7910ddaa10933633e8a61cab007405cba752798e..f4ab94ff8f011a399a9b430b64e4e87a585ba0fa 100644 --- a/rdl/combpm.rdl +++ b/rdl/combpm.rdl @@ -104,4 +104,10 @@ addrmap combpm { mementries = 2**`C_W_ADDR_TABLE; } FILTERTABLE; + reg { + desc="Sequence numbering offset"; + desyrdl_data_type="int8"; + field {sw = rw; hw = r;} data[8]=0; + } SEQ_OFFSET; + };