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 9

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 Andrewski
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    17:07:00 10/22/2011 
6
-- Design Name: 
7
-- Module Name:    gpibCableEmulator - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
use IEEE.STD_LOGIC_ARITH.ALL;
23
use IEEE.STD_LOGIC_UNSIGNED.ALL;
24
 
25
---- Uncomment the following library declaration if instantiating
26
---- any Xilinx primitives in this code.
27
--library UNISIM;
28
--use UNISIM.VComponents.all;
29
 
30
entity gpibCableEmulator is port (
31
        -- interface signals
32
        DIO_1 : in std_logic_vector (7 downto 0);
33
        output_valid_1 : in std_logic;
34
        DIO_2 : in std_logic_vector (7 downto 0);
35
        output_valid_2 : in std_logic;
36
        DIO : out std_logic_vector (7 downto 0);
37
        -- attention
38
        ATN_1 : in std_logic;
39
        ATN_2 : in std_logic;
40
        ATN : out std_logic;
41
        -- data valid
42
        DAV_1 : in std_logic;
43
        DAV_2 : in std_logic;
44
        DAV : out std_logic;
45
        -- not ready for data
46
        NRFD_1 : in std_logic;
47
        NRFD_2 : in std_logic;
48
        NRFD : out std_logic;
49
        -- no data accepted
50
        NDAC_1 : in std_logic;
51
        NDAC_2 : in std_logic;
52
        NDAC : out std_logic;
53
        -- end or identify
54
        EOI_1 : in std_logic;
55
        EOI_2 : in std_logic;
56
        EOI : out std_logic;
57
        -- service request
58
        SRQ_1 : in std_logic;
59
        SRQ_2 : in std_logic;
60
        SRQ : out std_logic;
61
        -- interface clear
62
        IFC_1 : in std_logic;
63
        IFC_2 : in std_logic;
64
        IFC : out std_logic;
65
        -- remote enable
66
        REN_1 : in std_logic;
67
        REN_2 : in std_logic;
68
        REN : out std_logic
69
);
70
end gpibCableEmulator;
71
 
72
architecture Behavioral of gpibCableEmulator is
73
 
74
        signal DIO_1_mid, DIO_2_mid : std_logic_vector (7 downto 0);
75
 
76
begin
77
 
78
        with output_valid_1 select DIO_1_mid <=
79
                DIO_1 when '1',
80
                "00000000" when others;
81
 
82
        with output_valid_2 select DIO_2_mid <=
83
                DIO_2 when '1',
84
                "00000000" when others;
85
 
86
        DIO <= not (not DIO_1_mid and not DIO_2_mid);
87
 
88
        ATN <= not(not ATN_1 and not ATN_2);
89
        DAV <= not(not DAV_1 and not DAV_2);
90
        NRFD <= not(not NRFD_1 and not NRFD_2);
91
        NDAC <= not(not NDAC_1 and not NDAC_2);
92
        EOI <= not(not EOI_1 and not EOI_2);
93
        SRQ <= not(not SRQ_1 and not SRQ_2);
94
        IFC <= not(not IFC_1 and not IFC_2);
95
        REN <= not(not REN_1 and not REN_2);
96
 
97
end Behavioral;
98
 

powered by: WebSVN 2.1.0

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