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

Subversion Repositories modular_oscilloscope

[/] [modular_oscilloscope/] [trunk/] [hdl/] [ctrl/] [address_allocation.vhd] - Diff between revs 54 and 56

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

Rev 54 Rev 56
Line 12... Line 12...
--|   
--|   
--|   
--|   
--|-------------------------------------------------------------------------------------------------
--|-------------------------------------------------------------------------------------------------
--| File history:
--| File history:
--|   0.1   | jul-2009 | First testing
--|   0.1   | jul-2009 | First testing
 
--|   0.2   | aug-2009 | New status flag
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
--| Copyright © 2009, Facundo Aguilera.
--| Copyright © 2009, Facundo Aguilera.
--|
--|
--| This VHDL design file is an open design; you can redistribute it and/or
--| This VHDL design file is an open design; you can redistribute it and/or
--| modify it and/or implement it after contacting the author.
--| modify it and/or implement it after contacting the author.
Line 49... Line 50...
--                          TrOff07|TrOff06|TrOff00|TrOff00|TrOff00|TrOff00|TrOff00|TrOff00]  
--                          TrOff07|TrOff06|TrOff00|TrOff00|TrOff00|TrOff00|TrOff00|TrOff00]  
--
--
-- 05   ADCConf     RW     [       |       |       |       |   ADCS|ADSleep| ADPSEn| ADPS08|
-- 05   ADCConf     RW     [       |       |       |       |   ADCS|ADSleep| ADPSEn| ADPS08|
--                           ADPS07| ADPS06| ADPS05| ADPS04| ADPS03| ADPS02| ADPS01| ADPS00]  
--                           ADPS07| ADPS06| ADPS05| ADPS04| ADPS03| ADPS02| ADPS01| ADPS00]  
--
--
-- 08   Data_O      R      [ErrFlag|RunFlag|       |       |       |  DCh00|  Dat09|  Dat08|
-- 08   Data_O      R      [StatF01|StatF00|       |       |       |  DCh00|  Dat09|  Dat08|
--                            Dat07|  Dat06|  Dat05|  Dat04|  Dat03|  Dat02|  Dat01|  Dat00] 
--                            Dat07|  Dat06|  Dat05|  Dat04|  Dat03|  Dat02|  Dat01|  Dat00] 
-- 
-- 
-- 09   Error_O     R      [       |       |       |       |       |       |       |       |
-- 09   Error_O     R      [       |       |       |       |       |       |       |       |
--                                 |       |       |       |       | ErrN02| ErrN01| ErrN00] 
--                                 |       |       |       |       | ErrN02| ErrN01| ErrN00] 
--      
--      
-- 
-- 
-- 
-- 
-- Description
-- Description
--
-- StatF01|StatF00|
 
--   00     Stoped
 
--   01     Running, odd buffer
 
--   11     Running, pair buffer
 
--   10     Stoped, with error
--==================================================================================================
--==================================================================================================
 
 
 
 
 
 
library ieee;
library ieee;
Line 119... Line 124...
 
 
    adc_conf_O:       out std_logic_vector(15 downto 0);
    adc_conf_O:       out std_logic_vector(15 downto 0);
 
 
    error_number_I:   in std_logic_vector (2 downto 0);
    error_number_I:   in std_logic_vector (2 downto 0);
    --data_channel_I:   in std_logic; 
    --data_channel_I:   in std_logic; 
    running_I:        in std_logic;
    status_I:        in std_logic_vector(1 downto 0);
    error_flag_I:     in std_logic;
 
 
 
    write_in_adc_O:     out std_logic;
    write_in_adc_O:     out std_logic;
    stop_O:           out std_logic
    stop_O:           out std_logic
    -- Stop the current conversion when reading
    -- Stop the current conversion when reading
        );
        );
Line 179... Line 183...
  o_selector(5) <= adc_conf_R;
  o_selector(5) <= adc_conf_R;
  o_selector(6) <= (others => '0');
  o_selector(6) <= (others => '0');
  o_selector(7) <= (others => '0');
  o_selector(7) <= (others => '0');
 
 
 
 
  o_selector(8) <= error_flag_I & running_I & (13 downto 11 => '0') & data_channel & data;
  o_selector(8) <= status_I & (13 downto 11 => '0') & data_channel & data;
  o_selector(9) <= (15 downto 3 => '0') & error_number_I;
  o_selector(9) <= (15 downto 3 => '0') & error_number_I;
 
 
  DAT_O_port <= o_selector(conv_integer(ADR_I_port));
  DAT_O_port <= o_selector(conv_integer(ADR_I_port));
 
 
 
 
  --------------------------------------------------------------------------------------------------
  --------------------------------------------------------------------------------------------------
  -- Read asignments
  -- Read asignments
  -- if reading registers, do ack, else use internal ack
  -- if reading registers, do ack, else use internal ack
  ACK_O_port <= (CYC_I_port and STB_I_port) and
  ACK_O_port <= (CYC_I_port and STB_I_port) and
                ((not(ADR_I_port(3)) or ACK_I_int or not(running_I)));
                ((not(ADR_I_port(3)) or ACK_I_int or not(status_I(0))));
 
 
 
 
  --------------------------------------------------------------------------------------------------
  --------------------------------------------------------------------------------------------------
  -- Internal wishbone allocation
  -- Internal wishbone allocation
  STB_O_int <= STB_I_port and ADR_I_port(3);
  STB_O_int <= STB_I_port and ADR_I_port(3);

powered by: WebSVN 2.1.0

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