Line 1... |
Line 1... |
--!
|
--!
|
--! Copyright (C) 2011 - 2012 Creonic GmbH
|
--! Copyright (C) 2011 - 2014 Creonic GmbH
|
--!
|
--!
|
--! This file is part of the Creonic Viterbi Decoder, which is distributed
|
--! This file is part of the Creonic Viterbi Decoder, which is distributed
|
--! under the terms of the GNU General Public License version 2.
|
--! under the terms of the GNU General Public License version 2.
|
--!
|
--!
|
--! @file
|
--! @file
|
Line 87... |
Line 87... |
if rising_edge(clk) then
|
if rising_edge(clk) then
|
if rst = '1' then
|
if rst = '1' then
|
m_axis_outdec_tvalid_int <= '0';
|
m_axis_outdec_tvalid_int <= '0';
|
m_axis_outdec_tdata <= '0';
|
m_axis_outdec_tdata <= '0';
|
m_axis_outdec_tlast <= '0';
|
m_axis_outdec_tlast <= '0';
|
|
m_axis_outprob_tvalid <= '0';
|
s_axis_inprev_tready <= '0';
|
s_axis_inprev_tready <= '0';
|
s_axis_inbranch_tlast_d <= '0';
|
s_axis_inbranch_tlast_d <= '0';
|
m_axis_outprob_tdata <= std_logic_vector(INITIALIZE_VALUE);
|
m_axis_outprob_tdata <= std_logic_vector(INITIALIZE_VALUE);
|
else
|
else
|
-- If this is the last value, prepare for processing of next incoming value.
|
-- If this is the last value, prepare for processing of next incoming value.
|
if s_axis_inbranch_tlast_d = '1' then
|
if s_axis_inbranch_tlast_d = '1' then
|
m_axis_outprob_tdata <= std_logic_vector(INITIALIZE_VALUE);
|
m_axis_outprob_tdata <= std_logic_vector(INITIALIZE_VALUE);
|
s_axis_inbranch_tlast_d <= '0';
|
s_axis_inbranch_tlast_d <= '0';
|
m_axis_outdec_tvalid_int <= '0';
|
m_axis_outdec_tvalid_int <= '0';
|
end if;
|
end if;
|
|
if m_axis_outdec_tvalid_int = '1' and m_axis_outdec_tready = '1' then
|
|
m_axis_outdec_tvalid_int <= '0';
|
|
end if;
|
|
|
-- Process only if we receive valid data.
|
-- Process only if we receive valid data.
|
if s_axis_inbranch_tvalid = '1' and s_axis_inbranch_tready_int = '1' then
|
if s_axis_inbranch_tvalid = '1' and s_axis_inbranch_tready_int = '1' then
|
s_axis_inbranch_tlast_d <= s_axis_inbranch_tlast;
|
s_axis_inbranch_tlast_d <= s_axis_inbranch_tlast;
|
|
|
Line 117... |
Line 121... |
m_axis_outprob_tdata <= std_logic_vector(v_high);
|
m_axis_outprob_tdata <= std_logic_vector(v_high);
|
else
|
else
|
m_axis_outdec_tdata <= '0';
|
m_axis_outdec_tdata <= '0';
|
m_axis_outprob_tdata <= std_logic_vector(v_low);
|
m_axis_outprob_tdata <= std_logic_vector(v_low);
|
end if;
|
end if;
|
m_axis_outdec_tvalid_int <= s_axis_inbranch_tvalid;
|
m_axis_outdec_tvalid_int <= '1';
|
end if;
|
end if;
|
|
|
m_axis_outdec_tlast <= s_axis_inbranch_tlast;
|
m_axis_outdec_tlast <= s_axis_inbranch_tlast;
|
end if;
|
end if;
|
end if;
|
end if;
|