OpenCores
URL https://opencores.org/ocsvn/mkjpeg/mkjpeg/trunk

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [BufFifo/] [BUF_FIFO.vhd] - Diff between revs 40 and 49

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 40 Rev 49
Line 51... Line 51...
        img_size_y         : in  std_logic_vector(15 downto 0);
        img_size_y         : in  std_logic_vector(15 downto 0);
        sof                : in  std_logic;
        sof                : in  std_logic;
 
 
        -- HOST DATA
        -- HOST DATA
        iram_wren          : in  std_logic;
        iram_wren          : in  std_logic;
        iram_wdata         : in  std_logic_vector(23 downto 0);
        iram_wdata         : in  std_logic_vector(C_PIXEL_BITS-1 downto 0);
        fifo_almost_full   : out std_logic;
        fifo_almost_full   : out std_logic;
 
 
        -- FDCT
        -- FDCT
        fdct_block_cnt     : in  std_logic_vector(12 downto 0);
        fdct_block_cnt     : in  std_logic_vector(12 downto 0);
        fdct_fifo_rd       : in  std_logic;
        fdct_fifo_rd       : in  std_logic;
Line 71... Line 71...
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
architecture RTL of BUF_FIFO is
architecture RTL of BUF_FIFO is
 
 
  constant C_NUM_SUBF      : integer := C_MAX_LINE_WIDTH/8;
  constant C_NUM_SUBF      : integer := C_MAX_LINE_WIDTH/8;
  constant C_PIXEL_BITS    : integer := 24;
 
  constant C_SUBF_ADDRW    : integer := 7-C_MEMORY_OPTIMIZED;
  constant C_SUBF_ADDRW    : integer := 7-C_MEMORY_OPTIMIZED;
  --constant C_LOG2_NUM_SUBF : integer := integer(log2(real(C_NUM_SUBF))); 
  --constant C_LOG2_NUM_SUBF : integer := integer(log2(real(C_NUM_SUBF))); 
 
 
  type T_DATA_ARR is array (0 to C_NUM_SUBF-1) of std_logic_vector(23 downto 0);
  type T_DATA_ARR is array (0 to C_NUM_SUBF-1) of std_logic_vector(23 downto 0);
  type T_CNT_ARR  is array (0 to C_NUM_SUBF-1) of
  type T_CNT_ARR  is array (0 to C_NUM_SUBF-1) of
Line 84... Line 84...
  type T_FIFO_RAMADDR     is array (0 to C_NUM_SUBF-1) of
  type T_FIFO_RAMADDR     is array (0 to C_NUM_SUBF-1) of
                            STD_LOGIC_VECTOR(C_SUBF_ADDRW-1 downto 0);
                            STD_LOGIC_VECTOR(C_SUBF_ADDRW-1 downto 0);
 
 
  signal fifo_rd          : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_rd          : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_wr          : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_wr          : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_data        : std_logic_vector(23 downto 0);
  signal fifo_data        : std_logic_vector(C_PIXEL_BITS-1 downto 0);
  signal fifo_data_d1     : std_logic_vector(23 downto 0);
  signal fifo_data_d1     : std_logic_vector(C_PIXEL_BITS-1 downto 0);
  signal fifo_full        : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_full        : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_empty       : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_empty       : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_half_full   : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_half_full   : std_logic_vector(C_NUM_SUBF-1 downto 0);
  signal fifo_count       : T_CNT_ARR;
  signal fifo_count       : T_CNT_ARR;
 
 
Line 318... Line 318...
      fdct_fifo_empty   <= fifo_empty(to_integer(idx_reg));
      fdct_fifo_empty   <= fifo_empty(to_integer(idx_reg));
      fdct_fifo_hf_full <= fifo_half_full(to_integer(idx_reg));
      fdct_fifo_hf_full <= fifo_half_full(to_integer(idx_reg));
    end if;
    end if;
  end process;
  end process;
 
 
  fdct_fifo_q  <= ramq;
  fdct_fifo_q  <= (ramq(15 downto 11) & "000" &
 
                  ramq(10 downto 5) & "00" &
 
                  ramq(4 downto 0) & "000") when C_PIXEL_BITS = 16 else ramq;
 
 
  -------------------------------------------------------------------
  -------------------------------------------------------------------
  -- Mux3
  -- Mux3
  -------------------------------------------------------------------
  -------------------------------------------------------------------
  p_mux3 : process(CLK, RST)
  p_mux3 : process(CLK, RST)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.