Line 117... |
Line 117... |
signal count, next_count : std_logic_vector(7 downto 0);
|
signal count, next_count : std_logic_vector(7 downto 0);
|
|
|
--seņal para escribir el loopback en la fifo de entrada de feedback
|
--seņal para escribir el loopback en la fifo de entrada de feedback
|
signal wr_fifofeed : std_logic;
|
signal wr_fifofeed : std_logic;
|
|
|
type state_type is (wait_start, process_data, dump_feed);
|
type state_type is (rst_fifos,wait_start, process_data, dump_feed);
|
signal state, next_state : state_type;
|
signal state, next_state : state_type;
|
signal reg_busy : std_logic;
|
signal reg_busy : std_logic;
|
signal reset_fifos : std_logic;
|
signal reset_fifos : std_logic;
|
signal count_feedback, next_count_feedback : std_logic_vector(15 downto 0);
|
signal count_feedback, next_count_feedback : std_logic_vector(15 downto 0);
|
|
|
Line 307... |
Line 307... |
end loop;
|
end loop;
|
|
|
case state is
|
case state is
|
--Esperamos a que tengamos un input y vamos cargando las b's
|
--Esperamos a que tengamos un input y vamos cargando las b's
|
when wait_start =>
|
when wait_start =>
|
reset_fifos <= '1';
|
--reset_fifos <= '1';
|
if(valid_in = '1') then
|
if(valid_in = '1') then
|
reset_fifos <= '0';
|
reset_fifos <= '0';
|
--next_b_reg(0) <= b;
|
--next_b_reg(0) <= b;
|
next_state <= process_data;
|
next_state <= process_data;
|
--wr_en <= '1';
|
--wr_en <= '1';
|
Line 357... |
Line 357... |
end if;
|
end if;
|
if(count_feedback = x"22") then
|
if(count_feedback = x"22") then
|
read_fifo_feedback <= '0';
|
read_fifo_feedback <= '0';
|
next_state <= process_data;
|
next_state <= process_data;
|
end if;
|
end if;
|
|
when rst_fifos =>
|
|
next_state <= wait_start;
|
|
reset_fifos <= '1';
|
end case;
|
end case;
|
|
|
end process;
|
end process;
|
end Behavioral;
|
end Behavioral;
|
|
|