-
Notifications
You must be signed in to change notification settings - Fork 0
/
EppSyncMux.vhd
55 lines (46 loc) · 1.57 KB
/
EppSyncMux.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--------------------------------------------------------------------------------
-- Company: Digilent RO
-- Engineer: Attila Kovacs
--
-- Create Date: 11:22:20 08/28/06
-- Design Name: Nexys 2 Test
-- Module Name: EppSyncMux - Behavioral
-- Project Name:
-- Target Device: XC3S500E
-- Tool versions: Xilinx ISE 9.2
-- Description: 2:1 mux with three state outputs (8 bit vectors).
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity EppSyncMux is
Port (
UsbMode : in std_logic;
UsbDir : in std_logic;
UsbRD : out std_logic;
UsbDB : inout std_logic_vector(7 downto 0);
EppWr : in std_logic;
EppWait : in std_logic;
BlockRamRd : in std_logic;
EppDBIn : in std_logic_vector(7 downto 0);
BlockRamIn : in std_logic_vector(7 downto 0));
end EppSyncMux;
architecture Behavioral of EppSyncMux is
begin
UsbRd <= EppWait when UsbMode = '1' else
BlockRamRd;
UsbDB <= (others => 'Z') when (UsbMode = '0' and UsbDir = '0') or
-- Sync mode and USB out (to FPGA)
(UsbMode = '1' and EppWr = '0') else
-- Epp mode and Epp write
EppDBIn when UsbMode = '1' else -- Epp mode (read)
BlockRamIn; -- Sync mode (USB in - from FPGA)
end Behavioral;