Skip to content
Snippets Groups Projects
Commit 83533b44 authored by BRONES Romain's avatar BRONES Romain
Browse files

feat: Add frame number in header

parent c0bed582
No related branches found
No related tags found
No related merge requests found
......@@ -244,7 +244,7 @@ begin
header_tdata(103 downto 96) <= mac_length(15 downto 8);
header_tdata(111 downto 104) <= mac_length(7 downto 0);
header_tdata(119 downto 112) <= G_PROTOCOL_ID;
header_tdata(127 downto 120) <= (others => '0');
header_tdata(127 downto 120) <= pkt_reg_tuser(7 downto 0);
header_tdata(191 downto 128) <= timeref;
sup_arb_res_s1 <= not header_tready;
......
......@@ -83,6 +83,7 @@ architecture rtl of ccn_unpack is
signal header_mac_len : std_logic_vector(15 downto 0);
signal header_pkt_id : std_logic_vector(7 downto 0);
signal header_pkt_mcts : std_logic_vector(63 downto 0);
signal header_framenum : std_logic_vector(7 downto 0);
-- Status and stats
signal frame_cnt : unsigned(31 downto 0);
......@@ -134,7 +135,7 @@ begin
);
m_axis_tvalid <= wconv_out_tvalid;
m_axis_tlast <= wconv_out_tvalid;
m_axis_tuser <= std_logic_vector(frame_cnt(m_axis_tuser'range));
m_axis_tuser <= std_logic_vector(header_framenum(m_axis_tuser'range));
wconv_in_tvalid <= (not fsm_dump) and fifo_tvalid;
......@@ -221,6 +222,7 @@ begin
header_mac_len <= (others => '0');
header_pkt_id <= (others => '0');
frame_cnt <= (others => '0');
header_framenum <= (others => '0');
err_pid <= '0';
err_mac_dst <= '0';
err_mac_src <= '0';
......@@ -248,7 +250,8 @@ begin
header_mac_src(7 downto 0) <= fifo_tdata(31 downto 24);
header_mac_len(15 downto 8) <= fifo_tdata(39 downto 32);
header_mac_len(7 downto 0) <= fifo_tdata(47 downto 40);
header_pkt_id(7 downto 0) <= fifo_tdata(55 downto 48);
header_pkt_id <= fifo_tdata(55 downto 48);
header_framenum <= fifo_tdata(63 downto 56);
end if;
if fsm_state = G_THREE then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment