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

Subversion Repositories gpib_controller

[/] [gpib_controller/] [trunk/] [vhdl/] [src/] [gpib/] [SecAddrSaver.vhd] - Diff between revs 3 and 13

Only display areas with differences | Details | Blame | View Log

Rev 3 Rev 13
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
 
--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: SecAddrSaver
-- Entity: SecAddrSaver
-- 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 SecAddrSaver is
entity SecAddrSaver is
        port (
        port (
                reset : in std_logic;
                reset : in std_logic;
                ------------------- gpib ----------------------
                ------------------- gpib ----------------------
                TADS : in std_logic;
                TADS : in std_logic;
                TPAS : in std_logic;
                TPAS : in std_logic;
                LADS : in std_logic;
                LADS : in std_logic;
                LPAS : in std_logic;
                LPAS : in std_logic;
                MSA_Dec : in std_logic;
                MSA_Dec : in std_logic;
                DI : in std_logic_vector(4 downto 0);
                DI : in std_logic_vector(4 downto 0);
                currentSecAddr : out std_logic_vector(4 downto 0)
                currentSecAddr : out std_logic_vector(4 downto 0)
        );
        );
end SecAddrSaver;
end SecAddrSaver;
 
 
architecture arch of SecAddrSaver is
architecture arch of SecAddrSaver is
 
 
        signal goToSecAddressed : std_logic;
        signal goToSecAddressed : std_logic;
 
 
begin
begin
 
 
        goToSecAddressed <= MSA_Dec and ((TADS and TPAS) or (LADS and LPAS));
        goToSecAddressed <= MSA_Dec and ((TADS and TPAS) or (LADS and LPAS));
 
 
        -- save secondary address
        -- save secondary address
        process (reset, goToSecAddressed) begin
        process (reset, goToSecAddressed) begin
                if(reset = '1') then
                if(reset = '1') then
                        currentSecAddr <= (others => '0');
                        currentSecAddr <= (others => '0');
                elsif rising_edge(goToSecAddressed) then
                elsif rising_edge(goToSecAddressed) then
                        currentSecAddr <= DI(4 downto 0);
                        currentSecAddr <= DI(4 downto 0);
                end if;
                end if;
        end process;
        end process;
 
 
end arch;
end arch;
 
 
 
 

powered by: WebSVN 2.1.0

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