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 50... |
Line 50... |
end entity reorder;
|
end entity reorder;
|
|
|
|
|
architecture rtl of reorder is
|
architecture rtl of reorder is
|
|
|
-- used to store one reversed output of an traceback unit
|
-- used to store one reversed output of a traceback unit
|
signal buffer_sreg : unsigned(MAX_WINDOW_LENGTH - 1 downto 0);
|
signal buffer_sreg : unsigned(MAX_WINDOW_LENGTH - 1 downto 0);
|
signal buffer_cnt : unsigned(BW_MAX_WINDOW_LENGTH - 1 downto 0);
|
signal buffer_cnt : unsigned(BW_MAX_WINDOW_LENGTH - 1 downto 0);
|
signal buffer_end : integer range ENCODER_MEMORY_DEPTH downto 0;
|
signal buffer_end : integer range ENCODER_MEMORY_DEPTH downto 0;
|
signal send_output, last_window : boolean;
|
signal send_output, last_window : boolean;
|
|
|
Line 64... |
Line 64... |
|
|
s_axis_input_tready <= s_axis_input_tready_int;
|
s_axis_input_tready <= s_axis_input_tready_int;
|
s_axis_input_tready_int <= '1' when not(send_output) else
|
s_axis_input_tready_int <= '1' when not(send_output) else
|
'0';
|
'0';
|
|
|
m_axis_output_tvalid <= '1' when send_output and m_axis_output_tready= '1' else
|
-- m_axis_output_tvalid <= '1' when send_output and m_axis_output_tready= '1' else
|
|
m_axis_output_tvalid <= '1' when send_output else
|
'0';
|
'0';
|
m_axis_output_tdata <= buffer_sreg(0);
|
m_axis_output_tdata <= buffer_sreg(0);
|
|
|
m_axis_output_tlast <= '1' when buffer_cnt = ENCODER_MEMORY_DEPTH and last_window else
|
m_axis_output_tlast <= '1' when buffer_cnt = ENCODER_MEMORY_DEPTH and last_window else
|
'0';
|
'0';
|
|
|
-- Reorder the global path given from an tracebackunit with the help of an shift register.
|
-- Reorder the global path given from an traceback unit with the help of a shift register.
|
pr_reorder : process(clk) is
|
pr_reorder : process(clk) is
|
begin
|
begin
|
if rising_edge(clk) then
|
if rising_edge(clk) then
|
if rst = '1' then
|
if rst = '1' then
|
buffer_sreg <= (others => '0');
|
buffer_sreg <= (others => '0');
|