Line 39... |
Line 39... |
OPB_toutSup : out std_logic;
|
OPB_toutSup : out std_logic;
|
OPB_errAck : out std_logic;
|
OPB_errAck : out std_logic;
|
|
|
-- Quantizer RAM
|
-- Quantizer RAM
|
qdata : out std_logic_vector(7 downto 0);
|
qdata : out std_logic_vector(7 downto 0);
|
qaddr : out std_logic_vector(5 downto 0);
|
qaddr : out std_logic_vector(6 downto 0);
|
qwren : out std_logic;
|
qwren : out std_logic;
|
|
|
-- CTRL
|
-- CTRL
|
jpeg_ready : in std_logic;
|
jpeg_ready : in std_logic;
|
jpeg_busy : in std_logic;
|
jpeg_busy : in std_logic;
|
Line 73... |
Line 73... |
constant C_IMAGE_SIZE_REG : std_logic_vector(31 downto 0) := X"0000_0004";
|
constant C_IMAGE_SIZE_REG : std_logic_vector(31 downto 0) := X"0000_0004";
|
constant C_IMAGE_RAM_ACCESS_REG : std_logic_vector(31 downto 0) := X"0000_0008";
|
constant C_IMAGE_RAM_ACCESS_REG : std_logic_vector(31 downto 0) := X"0000_0008";
|
constant C_ENC_STS_REG : std_logic_vector(31 downto 0) := X"0000_000C";
|
constant C_ENC_STS_REG : std_logic_vector(31 downto 0) := X"0000_000C";
|
constant C_COD_DATA_ADDR_REG : std_logic_vector(31 downto 0) := X"0000_0010";
|
constant C_COD_DATA_ADDR_REG : std_logic_vector(31 downto 0) := X"0000_0010";
|
constant C_ENC_LENGTH_REG : std_logic_vector(31 downto 0) := X"0000_0014";
|
constant C_ENC_LENGTH_REG : std_logic_vector(31 downto 0) := X"0000_0014";
|
constant C_QUANTIZER_RAM : std_logic_vector(31 downto 0) :=
|
constant C_QUANTIZER_RAM_LUM : std_logic_vector(31 downto 0) :=
|
X"0000_01" & "------00";
|
X"0000_01" & "------00";
|
|
constant C_QUANTIZER_RAM_CHR : std_logic_vector(31 downto 0) :=
|
|
X"0000_02" & "------00";
|
constant C_IMAGE_RAM : std_logic_vector(31 downto 0) :=
|
constant C_IMAGE_RAM : std_logic_vector(31 downto 0) :=
|
X"001" & "------------------00";
|
X"001" & "------------------00";
|
|
|
constant C_IMAGE_RAM_BASE : unsigned(31 downto 0) := X"0010_0000";
|
constant C_IMAGE_RAM_BASE : unsigned(31 downto 0) := X"0010_0000";
|
|
|
Line 89... |
Line 91... |
signal cod_data_addr_reg : std_logic_vector(31 downto 0);
|
signal cod_data_addr_reg : std_logic_vector(31 downto 0);
|
signal enc_length_reg : std_logic_vector(31 downto 0);
|
signal enc_length_reg : std_logic_vector(31 downto 0);
|
|
|
signal rd_dval : std_logic;
|
signal rd_dval : std_logic;
|
signal data_read : std_logic_vector(31 downto 0);
|
signal data_read : std_logic_vector(31 downto 0);
|
signal quantizer_ram_q : std_logic_vector(31 downto 0);
|
|
signal image_ram_q : std_logic_vector(31 downto 0);
|
|
signal write_done : std_logic;
|
signal write_done : std_logic;
|
signal OPB_select_d : std_logic;
|
signal OPB_select_d : std_logic;
|
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- Architecture: begin
|
-- Architecture: begin
|
Line 103... |
Line 103... |
|
|
OPB_retry <= '0';
|
OPB_retry <= '0';
|
OPB_toutSup <= '0';
|
OPB_toutSup <= '0';
|
OPB_errAck <= '0';
|
OPB_errAck <= '0';
|
|
|
-- temporary!!
|
|
quantizer_ram_q <= (others => '0');
|
|
image_ram_q <= (others => '0');
|
|
|
|
img_size_x <= image_size_reg(31 downto 16);
|
img_size_x <= image_size_reg(31 downto 16);
|
img_size_y <= image_size_reg(15 downto 0);
|
img_size_y <= image_size_reg(15 downto 0);
|
|
|
outram_base_addr <= cod_data_addr_reg(outram_base_addr'range);
|
outram_base_addr <= cod_data_addr_reg(outram_base_addr'range);
|
|
|
Line 227... |
Line 223... |
|
|
when others =>
|
when others =>
|
null;
|
null;
|
end case;
|
end case;
|
|
|
if std_match(OPB_ABus, C_QUANTIZER_RAM) then
|
if std_match(OPB_ABus, C_QUANTIZER_RAM_LUM) then
|
qdata <= OPB_DBus_in(qdata'range);
|
qdata <= OPB_DBus_in(qdata'range);
|
qaddr <= OPB_ABus(qaddr'high+2 downto 2);
|
qaddr <= '0' & OPB_ABus(qaddr'high+2-1 downto 2);
|
qwren <= '1';
|
qwren <= '1';
|
write_done <= '1';
|
write_done <= '1';
|
end if;
|
end if;
|
|
|
|
if std_match(OPB_ABus, C_QUANTIZER_RAM_CHR) then
|
|
qdata <= OPB_DBus_in(qdata'range);
|
|
qaddr <= '1' & OPB_ABus(qaddr'high+2-1 downto 2);
|
|
qwren <= '1';
|
|
write_done <= '1';
|
|
end if;
|
|
|
end if;
|
end if;
|
end if;
|
end if;
|
|
|
-- special handling of status reg
|
-- special handling of status reg
|
if jpeg_ready = '1' then
|
if jpeg_ready = '1' then
|