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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [o8_status_led.vhd] - Diff between revs 217 and 223

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

Rev 217 Rev 223
Line 56... Line 56...
);
);
port(
port(
  Clock                      : in  std_logic;
  Clock                      : in  std_logic;
  Reset                      : in  std_logic;
  Reset                      : in  std_logic;
  --
  --
  Bus_Address                : in  ADDRESS_TYPE;
  Open8_Bus                  : in  OPEN8_BUS_TYPE;
  Wr_Enable                  : in  std_logic;
 
  Wr_Data                    : in  DATA_TYPE;
 
  Rd_Enable                  : in  std_logic;
 
  Rd_Data                    : out DATA_TYPE;
  Rd_Data                    : out DATA_TYPE;
  --
  --
  LED_Out                    : out std_logic
  LED_Out                    : out std_logic
);
);
end entity;
end entity;
 
 
architecture behave of o8_status_led is
architecture behave of o8_status_led is
 
 
  constant User_Addr         : std_logic_vector(15 downto 0)
  constant User_Addr         : std_logic_vector(15 downto 0)
                               := Address(15 downto 0);
                               := Address(15 downto 0);
  alias  Comp_Addr           is Bus_Address(15 downto 0);
  alias  Comp_Addr           is Open8_Bus.Address(15 downto 0);
  signal Addr_Match          : std_logic;
  signal Addr_Match          : std_logic;
  signal Wr_En               : std_logic;
  signal Wr_En               : std_logic;
  signal Wr_Data_q           : std_logic_vector(2 downto 0);
  signal Wr_Data_q           : std_logic_vector(2 downto 0);
  signal LED_Mode            : std_logic_vector(2 downto 0);
  signal LED_Mode            : std_logic_vector(2 downto 0);
  signal Rd_En               : std_logic;
  signal Rd_En               : std_logic;
Line 103... Line 100...
      Wr_Data_q              <= (others => '0');
      Wr_Data_q              <= (others => '0');
      LED_Mode               <= (others => '0');
      LED_Mode               <= (others => '0');
      Rd_En                  <= '0';
      Rd_En                  <= '0';
      Rd_Data                <= OPEN8_NULLBUS;
      Rd_Data                <= OPEN8_NULLBUS;
    elsif( rising_edge( Clock ) )then
    elsif( rising_edge( Clock ) )then
      Wr_En                  <= Addr_Match and Wr_Enable;
      Wr_En                  <= Addr_Match and Open8_Bus.Wr_En;
      Wr_Data_q              <= Wr_Data(2 downto 0);
      Wr_Data_q              <= Open8_Bus.Wr_Data(2 downto 0);
      if( Wr_En = '1' )then
      if( Wr_En = '1' )then
        LED_Mode             <= Wr_Data_q;
        LED_Mode             <= Wr_Data_q;
      end if;
      end if;
 
 
      Rd_Data                <= OPEN8_NULLBUS;
      Rd_Data                <= OPEN8_NULLBUS;
      Rd_En                  <= Addr_Match and Rd_Enable;
      Rd_En                  <= Addr_Match and Open8_Bus.Rd_En;
      if( Rd_En = '1' )then
      if( Rd_En = '1' )then
        Rd_Data              <= "00000" & LED_Mode;
        Rd_Data              <= "00000" & LED_Mode;
      end if;
      end if;
 
 
    end if;
    end if;

powered by: WebSVN 2.1.0

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