Line 4... |
Line 4... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File : tb_dct_cpu.vhd
|
-- File : tb_dct_cpu.vhd
|
-- Author :
|
-- Author :
|
-- Company :
|
-- Company :
|
-- Created : 2006-05-24
|
-- Created : 2006-05-24
|
-- Last update: 2006-08-22
|
-- Last update: 2013-03-22
|
-- Platform :
|
-- Platform :
|
-- Standard : VHDL'87
|
-- Standard : VHDL'87
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- Description: CPU emulator
|
-- Description: CPU emulator
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
Line 41... |
Line 41... |
|
|
entity tb_dct_cpu is
|
entity tb_dct_cpu is
|
|
|
generic (
|
generic (
|
data_width_g : integer := 32;
|
data_width_g : integer := 32;
|
comm_width_g : integer := 3);
|
comm_width_g : integer := 5);
|
port (
|
port (
|
clk_dctqidct_fast : in std_logic;
|
clk_dctqidct_fast : in std_logic;
|
clk : in std_logic;
|
clk : in std_logic;
|
rst_n : in std_logic;
|
rst_n : in std_logic;
|
|
|
Line 122... |
Line 122... |
signal result_is_quant_r : std_logic;
|
signal result_is_quant_r : std_logic;
|
signal last_av_r : integer;
|
signal last_av_r : integer;
|
|
|
signal wait_zero_r : std_logic;
|
signal wait_zero_r : std_logic;
|
|
|
signal test_data_type : integer := 0;
|
signal test_data_type : integer := 2;
|
|
|
-- CONTROL WORD CONFIG
|
-- CONTROL WORD CONFIG
|
signal intra : std_logic := '0';
|
signal intra : std_logic := '0';
|
-- signal intra_old_r : std_logic;
|
-- signal intra_old_r : std_logic;
|
signal qp : std_logic_vector(qp_w_c-1 downto 0) := std_logic_vector(to_unsigned(qp_c, qp_w_c));
|
signal qp : std_logic_vector(qp_w_c-1 downto 0) := std_logic_vector(to_unsigned(qp_c, qp_w_c));
|
Line 198... |
Line 198... |
|
|
when send_av =>
|
when send_av =>
|
av_out <= '1';
|
av_out <= '1';
|
data_out <= std_logic_vector(to_unsigned(hibi_addr_dct_c, data_width_g));
|
data_out <= std_logic_vector(to_unsigned(hibi_addr_dct_c, data_width_g));
|
we_out <= '1';
|
we_out <= '1';
|
comm_out <= "010";
|
comm_out <= "00010";
|
send_ctrl <= send_ret_addr_q;
|
send_ctrl <= send_ret_addr_q;
|
|
|
when send_ret_addr_q =>
|
when send_ret_addr_q =>
|
if full_in = '0' then
|
if full_in = '0' then
|
av_out <= '0';
|
av_out <= '0';
|
Line 337... |
Line 337... |
|
|
if res_i_cnt_r = data_max_c-values_per_word_c then
|
if res_i_cnt_r = data_max_c-values_per_word_c then
|
res_i_cnt_r <= 0;
|
res_i_cnt_r <= 0;
|
data_r.idct <= (others => (others => '0'));
|
data_r.idct <= (others => (others => '0'));
|
assert false report "IDCT Data received!" severity note;
|
assert false report "IDCT Data received!" severity note;
|
|
--new_req_r <= '1'; -- LM to no self
|
else
|
else
|
res_i_cnt_r <= res_i_cnt_r + values_per_word_c;
|
res_i_cnt_r <= res_i_cnt_r + values_per_word_c;
|
end if;
|
end if;
|
|
|
end if;
|
end if;
|