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

Subversion Repositories modular_oscilloscope

[/] [modular_oscilloscope/] [trunk/] [hdl/] [ctrl/] [memory_writer.vhd] - Diff between revs 33 and 37

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

Rev 33 Rev 37
Line 1... Line 1...
-------------------------------------------------------------------------------------------------100
-------------------------------------------------------------------------------------------------100
--| Modular Oscilloscope
--| Modular Oscilloscope
--| UNSL - Argentine
--| UNSL - Argentine
--|
--|
--| File: memory_writer.vhd
--| File: ctrl_memory_writer.vhd
--| Version: 0.1
--| Version: 0.1
--| Tested in: Actel A3PE1500
--| Tested in: Actel A3PE1500
--|-------------------------------------------------------------------------------------------------
--|-------------------------------------------------------------------------------------------------
--| Description:
--| Description:
--|   CONTROL - Memory writer
--|   CONTROL - Memory writer
Line 34... Line 34...
 
 
 
 
 
 
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
entity memory_writer is
entity ctrl_memory_writer is
  generic(
  generic(
    MEM_ADD_WIDTH: integer :=  14
    MEM_ADD_WIDTH: integer :=  14
  );
  );
  port(
  port(
    ------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------
Line 65... Line 65...
    RST_I: in std_logic;
    RST_I: in std_logic;
    CLK_I: in std_logic;
    CLK_I: in std_logic;
 
 
    ------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------
    -- Internal
    -- Internal
    -- reset counter(memory address) to 0
    -- reset memory address to 0
    reset_I:            in std_logic;
    reset_I:            in std_logic;
    -- read in clk edge from the actual address ('0' means pause, '1' means continue)
    -- read in clk edge from the actual address ('0' means pause, '1' means continue)
    enable_I:           in std_logic;
    enable_I:           in std_logic;
    -- buffer starts and ends here 
 
    -- when the buffer arrives here, address is changed to 0  (buffer size)
 
    final_address_I:    in std_logic_vector (MEM_ADD_WIDTH - 1 downto 0);
    final_address_I:    in std_logic_vector (MEM_ADD_WIDTH - 1 downto 0);
    -- address wich is being writed by control
 
    -- stop_address:     in std_logic_vector (MEM_ADD_WIDTH - 1 downto 0);
 
    -- it is set when communication ends and remains until next restart or actual address change
    -- it is set when communication ends and remains until next restart or actual address change
    finished_O:         out std_logic;
    finished_O:         out std_logic;
    -- When counter finishes, restart
    -- when counter finishes, restart
    continuous_I:       in  std_logic;
    continuous_I:       in  std_logic;
 
 
 
 
  );
  );
end entity memory_writer;
end entity ctrl_memory_writer;
 
 
 
 
 
 
 
 
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
architecture ARCH11 of output_manager is
architecture ARCH11 of ctrl_output_manager is
 
 
  type DataStatusType is (
  type DataStatusType is (
          INIT,
          INIT,
          WORKING
          WORKING
          );
          );
Line 108... Line 100...
  signal address_counter: std_logic_vector(MEM_ADD_WIDTH - 1  downto 0);
  signal address_counter: std_logic_vector(MEM_ADD_WIDTH - 1  downto 0);
  signal s_finished, s_STB_adc, s_STB_mem: std_logic; -- previous to outputs
  signal s_finished, s_STB_adc, s_STB_mem: std_logic; -- previous to outputs
 
 
begin
begin
  --------------------------------------------------------------------------------------------------
  --------------------------------------------------------------------------------------------------
  -- Instantiations
  -- Instances
  U_COUNTER0: generic_counter
  U_COUNTER0: generic_counter
  generic map(
  generic map(
    OUTPUT_WIDTH => MEM_ADD_WIDTH -- Output width for counter.
    OUTPUT_WIDTH => MEM_ADD_WIDTH -- Output width for counter.
  )
  )
  port map(
  port map(
Line 151... Line 143...
 
 
  -- Lock interface when working
  -- Lock interface when working
  P_cyc_signals: process (clk_I, enable_count, ACK_I_adc, ACK_I_mem)
  P_cyc_signals: process (clk_I, enable_count, ACK_I_adc, ACK_I_mem)
  begin
  begin
    if CLK_I'event and CLK_I = '1' then
    if CLK_I'event and CLK_I = '1' then
      if enable_I /= '1' or reset_I = '1' then
      if enable_I = '0' or reset_I = '1' then
        CYC_O_adc <= '0';   CYC_O_mem <= '0';
        CYC_O_adc <= '0';   CYC_O_mem <= '0';
      else
      else
        CYC_O_adc <= '1';  CYC_O_mem <= '1';
        CYC_O_adc <= '1';  CYC_O_mem <= '1';
      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.