--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
|
--This file is part of fpga_gpib_controller.
|
|
--
|
|
-- Fpga_gpib_controller is free software: you can redistribute it and/or modify
|
|
-- it under the terms of the GNU General Public License as published by
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
|
-- (at your option) any later version.
|
|
--
|
|
-- Fpga_gpib_controller is distributed in the hope that it will be useful,
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
-- GNU General Public License for more details.
|
|
|
|
-- You should have received a copy of the GNU General Public License
|
|
-- along with Fpga_gpib_controller. If not, see <http://www.gnu.org/licenses/>.
|
|
--------------------------------------------------------------------------------
|
-- Entity: EventMem
|
-- Entity: EventMem
|
-- Date:2011-11-11
|
-- Date:2011-11-11
|
-- Author: Administrator
|
-- Author: Andrzej Paluch
|
--
|
--
|
-- Description ${cursor}
|
-- Description ${cursor}
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_unsigned.all;
|
use ieee.std_logic_unsigned.all;
|
|
|
|
|
entity EventMem is
|
entity EventMem is
|
port (
|
port (
|
reset : std_logic;
|
reset : std_logic;
|
-- event occured
|
-- event occured
|
occured : in std_logic;
|
occured : in std_logic;
|
-- event approved
|
-- event approved
|
approved : in std_logic;
|
approved : in std_logic;
|
-- output
|
-- output
|
output : out std_logic
|
output : out std_logic
|
);
|
);
|
end EventMem;
|
end EventMem;
|
|
|
architecture arch of EventMem is
|
architecture arch of EventMem is
|
|
|
begin
|
begin
|
|
|
process(reset, occured, approved) begin
|
process(reset, occured, approved) begin
|
if reset = '1' or approved = '1' then
|
if reset = '1' or approved = '1' then
|
output <= '0';
|
output <= '0';
|
elsif rising_edge(occured) then
|
elsif rising_edge(occured) then
|
output <= '1';
|
output <= '1';
|
end if;
|
end if;
|
end process;
|
end process;
|
|
|
end arch;
|
end arch;
|
|
|
|
|