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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [o8_ram_1k.vhd] - Diff between revs 174 and 191

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

Rev 174 Rev 191
Line 54... Line 54...
  constant User_Addr    : std_logic_vector(15 downto 10)
  constant User_Addr    : std_logic_vector(15 downto 10)
                          := Address(15 downto 10);
                          := Address(15 downto 10);
  alias Comp_Addr       is Bus_Address(15 downto 10);
  alias Comp_Addr       is Bus_Address(15 downto 10);
  alias RAM_Addr        is Bus_Address(9 downto 0);
  alias RAM_Addr        is Bus_Address(9 downto 0);
 
 
  signal Addr_Match     : std_logic;
  signal Addr_Match     : std_logic := '0';
  signal Wr_En          : std_logic;
  signal Wr_En          : std_logic := '0';
  signal Rd_En          : std_logic;
  signal Rd_En          : std_logic := '0';
  signal Rd_Data_i      : DATA_TYPE;
  signal Rd_Data_i      : DATA_TYPE := OPEN8_NULLBUS;
 
 
begin
begin
 
 
  -- This decode needs to happen immediately, to give the RAM a chance to
  -- This decode needs to happen immediately, to give the RAM a chance to
  --  do the lookup before we have to set Rd_Data
  --  do the lookup before we have to set Rd_Data
Line 80... Line 80...
 
 
  RAM_proc: process( Reset, Clock )
  RAM_proc: process( Reset, Clock )
  begin
  begin
    if( Reset = Reset_Level )then
    if( Reset = Reset_Level )then
      Rd_En             <= '0';
      Rd_En             <= '0';
      Rd_Data           <= (others => '0');
      Rd_Data           <= OPEN8_NULLBUS;
    elsif( rising_edge(Clock) )then
    elsif( rising_edge(Clock) )then
      Rd_En             <= Addr_Match and Rd_Enable;
      Rd_En             <= Addr_Match and Rd_Enable;
      Rd_Data           <= (others => '0');
      Rd_Data           <= OPEN8_NULLBUS;
      if( Rd_En = '1' )then
      if( Rd_En = '1' )then
        Rd_Data         <= Rd_Data_i;
        Rd_Data         <= Rd_Data_i;
      end if;
      end if;
    end if;
    end if;
  end process;
  end process;

powered by: WebSVN 2.1.0

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