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

Subversion Repositories gpib_controller

[/] [gpib_controller/] [trunk/] [vhdl/] [test/] [gpibCableEmulator.vhd] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 Andrewski
--------------------------------------------------------------------------------
2
--This file is part of fpga_gpib_controller.
3
--
4
-- Fpga_gpib_controller is free software: you can redistribute it and/or modify
5
-- it under the terms of the GNU General Public License as published by
6
-- the Free Software Foundation, either version 3 of the License, or
7
-- (at your option) any later version.
8
--
9
-- Fpga_gpib_controller is distributed in the hope that it will be useful,
10
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-- GNU General Public License for more details.
13
 
14
-- You should have received a copy of the GNU General Public License
15
-- along with Fpga_gpib_controller.  If not, see <http://www.gnu.org/licenses/>.
16 3 Andrewski
----------------------------------------------------------------------------------
17 13 Andrewski
-- Author: Andrzej Paluch
18 3 Andrewski
-- 
19
-- Create Date:    17:07:00 10/22/2011 
20
-- Design Name: 
21
-- Module Name:    gpibCableEmulator - Behavioral 
22
-- Project Name: 
23
-- Target Devices: 
24
-- Tool versions: 
25
-- Description: 
26
--
27
-- Dependencies: 
28
--
29
-- Revision: 
30
-- Revision 0.01 - File Created
31
-- Additional Comments: 
32
--
33
----------------------------------------------------------------------------------
34
library IEEE;
35
use IEEE.STD_LOGIC_1164.ALL;
36
use IEEE.STD_LOGIC_ARITH.ALL;
37
use IEEE.STD_LOGIC_UNSIGNED.ALL;
38
 
39
---- Uncomment the following library declaration if instantiating
40
---- any Xilinx primitives in this code.
41
--library UNISIM;
42
--use UNISIM.VComponents.all;
43
 
44
entity gpibCableEmulator is port (
45
        -- interface signals
46
        DIO_1 : in std_logic_vector (7 downto 0);
47
        output_valid_1 : in std_logic;
48
        DIO_2 : in std_logic_vector (7 downto 0);
49
        output_valid_2 : in std_logic;
50
        DIO : out std_logic_vector (7 downto 0);
51
        -- attention
52
        ATN_1 : in std_logic;
53
        ATN_2 : in std_logic;
54
        ATN : out std_logic;
55
        -- data valid
56
        DAV_1 : in std_logic;
57
        DAV_2 : in std_logic;
58
        DAV : out std_logic;
59
        -- not ready for data
60
        NRFD_1 : in std_logic;
61
        NRFD_2 : in std_logic;
62
        NRFD : out std_logic;
63
        -- no data accepted
64
        NDAC_1 : in std_logic;
65
        NDAC_2 : in std_logic;
66
        NDAC : out std_logic;
67
        -- end or identify
68
        EOI_1 : in std_logic;
69
        EOI_2 : in std_logic;
70
        EOI : out std_logic;
71
        -- service request
72
        SRQ_1 : in std_logic;
73
        SRQ_2 : in std_logic;
74
        SRQ : out std_logic;
75
        -- interface clear
76
        IFC_1 : in std_logic;
77
        IFC_2 : in std_logic;
78
        IFC : out std_logic;
79
        -- remote enable
80
        REN_1 : in std_logic;
81
        REN_2 : in std_logic;
82
        REN : out std_logic
83
);
84
end gpibCableEmulator;
85
 
86
architecture Behavioral of gpibCableEmulator is
87
 
88
        signal DIO_1_mid, DIO_2_mid : std_logic_vector (7 downto 0);
89
 
90
begin
91
 
92
        with output_valid_1 select DIO_1_mid <=
93
                DIO_1 when '1',
94
                "00000000" when others;
95
 
96
        with output_valid_2 select DIO_2_mid <=
97
                DIO_2 when '1',
98
                "00000000" when others;
99
 
100
        DIO <= not (not DIO_1_mid and not DIO_2_mid);
101
 
102
        ATN <= not(not ATN_1 and not ATN_2);
103
        DAV <= not(not DAV_1 and not DAV_2);
104
        NRFD <= not(not NRFD_1 and not NRFD_2);
105
        NDAC <= not(not NDAC_1 and not NDAC_2);
106
        EOI <= not(not EOI_1 and not EOI_2);
107
        SRQ <= not(not SRQ_1 and not SRQ_2);
108
        IFC <= not(not IFC_1 and not IFC_2);
109
        REN <= not(not REN_1 and not REN_2);
110
 
111
end Behavioral;
112
 

powered by: WebSVN 2.1.0

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