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

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [rle/] [RLE_TOP.VHD] - Diff between revs 34 and 36

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

Rev 34 Rev 36
Line 79... Line 79...
 
 
  signal dbuf_data      : std_logic_vector(19 downto 0);
  signal dbuf_data      : std_logic_vector(19 downto 0);
  signal dbuf_q         : std_logic_vector(19 downto 0);
  signal dbuf_q         : std_logic_vector(19 downto 0);
  signal dbuf_we        : std_logic;
  signal dbuf_we        : std_logic;
 
 
  signal rd_cnt         : unsigned(5 downto 0);
 
  signal rd_en_d        : std_logic_vector(5 downto 0);
 
  signal rd_en          : std_logic;
 
 
 
  signal rle_runlength  : std_logic_vector(3 downto 0);
  signal rle_runlength  : std_logic_vector(3 downto 0);
  signal rle_size       : std_logic_vector(3 downto 0);
  signal rle_size       : std_logic_vector(3 downto 0);
  signal rle_amplitude  : std_logic_vector(11 downto 0);
  signal rle_amplitude  : std_logic_vector(11 downto 0);
  signal rle_dovalid    : std_logic;
  signal rle_dovalid    : std_logic;
  signal rle_di         : std_logic_vector(11 downto 0);
  signal rle_di         : std_logic_vector(11 downto 0);
Line 100... Line 96...
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Architecture: begin
-- Architecture: begin
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
begin
begin
 
 
  qua_rd_addr   <= std_logic_vector(rd_cnt);
 
  huf_runlength <= dbuf_q(19 downto 16);
  huf_runlength <= dbuf_q(19 downto 16);
  huf_size      <= dbuf_q(15 downto 12);
  huf_size      <= dbuf_q(15 downto 12);
  huf_amplitude <= dbuf_q(11 downto 0);
  huf_amplitude <= dbuf_q(11 downto 0);
  qua_buf_sel   <= qua_buf_sel_s;
  qua_buf_sel   <= qua_buf_sel_s;
 
 
Line 120... Line 115...
  port map
  port map
    (
    (
      rst        => RST,
      rst        => RST,
      clk        => CLK,
      clk        => CLK,
      di         => rle_di,
      di         => rle_di,
      divalid    => rle_divalid,
 
      start_pb   => start_pb,
      start_pb   => start_pb,
      sof        => sof,
      sof        => sof,
      rle_sm_settings => rle_sm_settings,
      rle_sm_settings => rle_sm_settings,
 
 
      runlength  => rle_runlength,
      runlength  => rle_runlength,
      size       => rle_size,
      size       => rle_size,
      amplitude  => rle_amplitude,
      amplitude  => rle_amplitude,
      dovalid    => rle_dovalid
      dovalid    => rle_dovalid,
 
      rd_addr    => qua_rd_addr
    );
    );
 
 
  rle_di      <= qua_data;
  rle_di      <= qua_data;
  rle_divalid <= rd_en_d(0);
 
 
 
  -------------------------------------------------------------------
  -------------------------------------------------------------------
  -- Double Fifo
  -- Double Fifo
  -------------------------------------------------------------------
  -------------------------------------------------------------------
  U_RleDoubleFifo : entity work.RleDoubleFifo
  U_RleDoubleFifo : entity work.RleDoubleFifo
Line 155... Line 149...
    );
    );
  dbuf_data  <= rle_runlength & rle_size & rle_amplitude;
  dbuf_data  <= rle_runlength & rle_size & rle_amplitude;
  dbuf_we    <= rle_dovalid;
  dbuf_we    <= rle_dovalid;
 
 
 
 
  -------------------------------------------------------------------
 
  -- Counter1
 
  -------------------------------------------------------------------
 
  p_counter1 : process(CLK, RST)
 
  begin
 
    if RST = '1' then
 
      rd_en        <= '0';
 
      rd_en_d      <= (others => '0');
 
      rd_cnt       <= (others => '0');
 
    elsif CLK'event and CLK = '1' then
 
      rd_en_d <= rd_en_d(rd_en_d'length-2 downto 0) & rd_en;
 
 
 
      if start_pb = '1' then
 
        rd_cnt <= (others => '0');
 
        rd_en <= '1';
 
      end if;
 
 
 
      if rd_en = '1' then
 
        if rd_cnt = 64-1 then
 
          rd_cnt <= (others => '0');
 
          rd_en  <= '0';
 
        else
 
          rd_cnt <= rd_cnt + 1;
 
        end if;
 
      end if;
 
 
 
    end if;
 
  end process;
 
 
 
  -------------------------------------------------------------------
  -------------------------------------------------------------------
  -- ready_pb
  -- ready_pb
  -------------------------------------------------------------------
  -------------------------------------------------------------------
  p_ready_pb : process(CLK, RST)
  p_ready_pb : process(CLK, RST)

powered by: WebSVN 2.1.0

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