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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [o8_ltc2355_2p.vhd] - Diff between revs 220 and 223

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

Rev 220 Rev 223
Line 48... Line 48...
);
);
port(
port(
  Clock                      : in  std_logic; -- 96MHz MAX for proper operation
  Clock                      : in  std_logic; -- 96MHz MAX for proper operation
  Reset                      : in  std_logic;
  Reset                      : in  std_logic;
  uSec_Tick                  : in  std_logic;
  uSec_Tick                  : in  std_logic;
  -- Client IF
  --
  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;
  Interrupt                  : out std_logic;
  Interrupt                  : out std_logic;
  -- ADC IF
  -- ADC IF
  ADC_SCLK                   : out std_logic;
  ADC_SCLK                   : out std_logic;
  ADC_CONV                   : out std_logic;
  ADC_CONV                   : out std_logic;
Line 68... Line 65...
architecture behave of o8_ltc2355_2p is
architecture behave of o8_ltc2355_2p is
 
 
  constant Divide_SCLK_by_2  : boolean := (Sys_Freq > 96000000.0);
  constant Divide_SCLK_by_2  : boolean := (Sys_Freq > 96000000.0);
 
 
  constant User_Addr         : std_logic_vector(15 downto 3) := Address(15 downto 3);
  constant User_Addr         : std_logic_vector(15 downto 3) := Address(15 downto 3);
  alias  Comp_Addr           is Bus_Address(15 downto 3);
  alias  Comp_Addr           is Open8_Bus.Address(15 downto 3);
  alias  Reg_Sel             is Bus_Address(2 downto 0);
  alias  Reg_Sel             is Open8_Bus.Address(2 downto 0);
  signal Reg_Sel_q           : std_logic_vector(2 downto 0);
  signal Reg_Sel_q           : std_logic_vector(2 downto 0);
  signal Wr_Data_q           : DATA_TYPE;
  signal Wr_Data_q           : DATA_TYPE;
  signal Addr_Match          : std_logic;
  signal Addr_Match          : std_logic;
  signal Wr_En               : std_logic;
  signal Wr_En               : std_logic;
  signal Rd_En               : std_logic;
  signal Rd_En               : std_logic;
Line 111... Line 108...
      Rd_Data                <= OPEN8_NULLBUS;
      Rd_Data                <= OPEN8_NULLBUS;
      User_Trig              <= '0';
      User_Trig              <= '0';
      Timer_Int              <= x"00";
      Timer_Int              <= x"00";
    elsif( rising_edge( Clock ) )then
    elsif( rising_edge( Clock ) )then
      Reg_Sel_q              <= Reg_Sel;
      Reg_Sel_q              <= Reg_Sel;
      Wr_Data_q              <= Wr_Data;
      Wr_Data_q              <= Open8_Bus.Wr_Data;
      Wr_En                  <= Wr_Enable and Addr_Match;
      Wr_En                  <= Addr_Match and Open8_Bus.Wr_En;
      User_Trig              <= '0';
      User_Trig              <= '0';
      if( Wr_En = '1' )then
      if( Wr_En = '1' )then
        if( Reg_Sel_q = "110" )then
        if( Reg_Sel_q = "110" )then
          Timer_Int          <= Wr_Data_q;
          Timer_Int          <= Wr_Data_q;
        end if;
        end if;
        if( Reg_Sel_q = "111" )then
        if( Reg_Sel_q = "111" )then
          User_Trig          <= '1';
          User_Trig          <= '1';
        end if;
        end if;
      end if;
      end if;
 
 
      Rd_En                  <= Rd_Enable and Addr_Match;
      Rd_En                  <= Addr_Match and Open8_Bus.Rd_En;
      Rd_Data                <= OPEN8_NULLBUS;
      Rd_Data                <= OPEN8_NULLBUS;
 
 
      if( Rd_En = '1' )then
      if( Rd_En = '1' )then
        case( Reg_Sel_q )is
        case( Reg_Sel_q )is
          -- Channel 1, Full resolution, lower byte
          -- Channel 1, Full resolution, lower byte

powered by: WebSVN 2.1.0

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