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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [o8_gpin.vhd] - Diff between revs 224 and 244

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

Rev 224 Rev 244
Line 58... Line 58...
  alias Reset                is Open8_Bus.Reset;
  alias Reset                is Open8_Bus.Reset;
 
 
  constant User_Addr         : std_logic_vector(15 downto 0) := Address;
  constant User_Addr         : std_logic_vector(15 downto 0) := Address;
  alias  Comp_Addr           is Open8_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 Rd_En               : std_logic;
 
 
  signal Rd_En_d             : std_logic := '0';
 
  signal Rd_En_q             : std_logic := '0';
 
 
  signal GPIN_q1             : DATA_TYPE;
  signal GPIN_q1             : DATA_TYPE;
  signal GPIN_q2             : DATA_TYPE;
  signal GPIN_q2             : DATA_TYPE;
  signal User_In             : DATA_TYPE;
  signal User_In             : DATA_TYPE;
 
 
begin
begin
 
 
  Addr_Match                 <= Open8_Bus.Rd_En when Comp_Addr = User_Addr else
  Addr_Match                 <= '1' when Comp_Addr = User_Addr else '0';
                                '0';
  Rd_En_d                    <= Addr_Match and Open8_Bus.Rd_En;
 
 
  io_reg: process( Clock, Reset )
  io_reg: process( Clock, Reset )
  begin
  begin
    if( Reset = Reset_Level )then
    if( Reset = Reset_Level )then
      Rd_En                  <= '0';
      Rd_En_q                <= '0';
      Rd_Data                <= OPEN8_NULLBUS;
      Rd_Data                <= OPEN8_NULLBUS;
      GPIN_q1                <= x"00";
      GPIN_q1                <= x"00";
      GPIN_q2                <= x"00";
      GPIN_q2                <= x"00";
      User_In                <= x"00";
      User_In                <= x"00";
    elsif( rising_edge( Clock ) )then
    elsif( rising_edge( Clock ) )then
      GPIN_q1                <= GPIN;
      GPIN_q1                <= GPIN;
      GPIN_q2                <= GPIN_q1;
      GPIN_q2                <= GPIN_q1;
      User_In                <= GPIN_q2;
      User_In                <= GPIN_q2;
 
 
      Rd_Data                <= OPEN8_NULLBUS;
      Rd_Data                <= OPEN8_NULLBUS;
      Rd_En                  <= Addr_Match;
      Rd_En_q                <= Rd_En_d;
      if( Rd_En = '1' )then
      if( Rd_En_q = '1' )then
        Rd_Data              <= User_In;
        Rd_Data              <= User_In;
      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.