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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [o8_vector_rx.vhd] - Diff between revs 240 and 244

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

Rev 240 Rev 244
Line 75... Line 75...
  constant User_Addr         : std_logic_vector(15 downto 2) :=
  constant User_Addr         : std_logic_vector(15 downto 2) :=
                                Address(15 downto 2);
                                Address(15 downto 2);
  alias  Comp_Addr           is Open8_Bus.Address(15 downto 2);
  alias  Comp_Addr           is Open8_Bus.Address(15 downto 2);
  signal Addr_Match          : std_logic := '0';
  signal Addr_Match          : std_logic := '0';
 
 
  alias  Reg_Addr            is Open8_Bus.Address(1 downto 0);
  alias  Reg_Sel_d           is Open8_Bus.Address(1 downto 0);
  signal Reg_Sel             : std_logic_vector(1 downto 0) := "00";
  signal Reg_Sel_q           : std_logic_vector(1 downto 0) := "00";
  signal Rd_En               : std_logic := '0';
  signal Rd_En_d             : std_logic := '0';
 
  signal Rd_En_q             : std_logic := '0';
 
 
  constant BAUD_RATE_DIV     : integer := integer(Clock_Frequency / Bit_Rate);
  constant BAUD_RATE_DIV     : integer := integer(Clock_Frequency / Bit_Rate);
 
 
  -- Period of each bit in sub-clocks (subtract one to account for zero)
  -- Period of each bit in sub-clocks (subtract one to account for zero)
  constant Full_Per_i        : integer := BAUD_RATE_DIV - 1;
  constant Full_Per_i        : integer := BAUD_RATE_DIV - 1;
Line 111... Line 112...
  signal Rx_Valid            : std_logic;
  signal Rx_Valid            : std_logic;
 
 
begin
begin
 
 
  Addr_Match                 <= '1' when Comp_Addr = User_Addr else '0';
  Addr_Match                 <= '1' when Comp_Addr = User_Addr else '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';
      Reg_Sel_q         <= (others => '0');
      Reg_Sel           <= (others => '0');
      Rd_En_q           <= '0';
      Rd_Data           <= OPEN8_NULLBUS;
      Rd_Data           <= OPEN8_NULLBUS;
    elsif( rising_edge( Clock ) )then
    elsif( rising_edge( Clock ) )then
 
      Reg_Sel_q         <= Reg_Sel_d;
 
 
      Rd_Data           <= OPEN8_NULLBUS;
      Rd_Data           <= OPEN8_NULLBUS;
      Rd_En             <= Addr_Match and Open8_Bus.Rd_En;
      Rd_En_q           <= Rd_En_d;
      Reg_Sel           <= Reg_Addr;
      if( Rd_En_q = '1'  )then
      if( Rd_En = '1'  )then
        case( Reg_Sel_q )is
        case( Reg_Sel )is
 
          when "00" =>
          when "00" =>
            Rd_Data     <= Vector_Cmd;
            Rd_Data     <= Vector_Cmd;
          when "01" =>
          when "01" =>
            Rd_Data     <= Vector_Arg_LB;
            Rd_Data     <= Vector_Arg_LB;
          when "10" =>
          when "10" =>

powered by: WebSVN 2.1.0

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