3240 |
povik |
1 |
---------------------------------------------------------------------------------- |
|
|
2 |
-- Company: |
|
|
3 |
-- Engineer: |
|
|
4 |
-- |
|
|
5 |
-- Create Date: 19:30:17 01/21/2011 |
|
|
6 |
-- Design Name: |
|
|
7 |
-- Module Name: jtagkey - 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 |
|
|
|
23 |
-- Uncomment the following library declaration if using |
|
|
24 |
-- arithmetic functions with Signed or Unsigned values |
|
|
25 |
--use IEEE.NUMERIC_STD.ALL; |
|
|
26 |
|
|
|
27 |
-- Uncomment the following library declaration if instantiating |
|
|
28 |
-- any Xilinx primitives in this code. |
|
|
29 |
--library UNISIM; |
|
|
30 |
--use UNISIM.VComponents.all; |
|
|
31 |
|
|
|
32 |
entity jtagkey is |
|
|
33 |
Port ( FT_JTAG_OE : in STD_LOGIC; |
|
|
34 |
FT_TDO : out STD_LOGIC; |
|
|
35 |
FT_TDI : in STD_LOGIC; |
|
|
36 |
FT_TCK : in STD_LOGIC; |
|
|
37 |
FT_RTCK : in STD_LOGIC; |
|
|
38 |
FT_TMS : in STD_LOGIC; |
|
|
39 |
FT_DBGRQ : in STD_LOGIC; |
|
|
40 |
FT_DBGACK : out STD_LOGIC; |
|
|
41 |
FT_nSRST_OE : in STD_LOGIC; |
|
|
42 |
FT_nSRST_IN : out STD_LOGIC; |
|
|
43 |
FT_nSRST_OUT : in STD_LOGIC; |
|
|
44 |
FT_nTRST_OE : in STD_LOGIC; |
|
|
45 |
FT_nTRST_OUT : in STD_LOGIC; |
|
|
46 |
RTCK : out STD_LOGIC; |
|
|
47 |
TDO : in STD_LOGIC; |
|
|
48 |
TCK : out STD_LOGIC; |
|
|
49 |
TDI : out STD_LOGIC; |
|
|
50 |
TMS : out STD_LOGIC; |
|
|
51 |
nSRST : inout STD_LOGIC; |
|
|
52 |
nTRST : inout STD_LOGIC; |
|
|
53 |
DBGACK : in STD_LOGIC; |
|
|
54 |
DBGRQ : out STD_LOGIC; |
|
|
55 |
FT_TARGET_PRESENT : out STD_LOGIC; |
|
|
56 |
TARGET_PRESENT : in STD_LOGIC |
|
|
57 |
); |
|
|
58 |
end jtagkey; |
|
|
59 |
|
|
|
60 |
architecture Behavioral of jtagkey is |
|
|
61 |
|
|
|
62 |
begin |
|
|
63 |
-- buffer controlled by FT_JTAG_OE |
|
|
64 |
TDI <= FT_TDI when FT_JTAG_OE = '0' else 'Z'; |
|
|
65 |
TMS <= FT_TMS when FT_JTAG_OE = '0' else 'Z'; |
|
|
66 |
TCK <= FT_TCK when FT_JTAG_OE = '0' else 'Z'; |
|
|
67 |
RTCK <= FT_RTCK when FT_JTAG_OE = '0' else 'Z'; |
|
|
68 |
DBGRQ <= FT_DBGRQ when FT_JTAG_OE = '0' else 'Z'; |
|
|
69 |
|
|
|
70 |
-- srst |
|
|
71 |
FT_nSRST_IN <= nSRST; |
|
|
72 |
nSRST <= FT_nSRST_OUT when FT_nSRST_OE = '0' else 'Z'; |
|
|
73 |
|
|
|
74 |
-- trst |
|
|
75 |
nTRST <= FT_nTRST_OUT when FT_nTRST_OE = '0' else 'Z'; |
|
|
76 |
|
|
|
77 |
-- inputs |
|
|
78 |
FT_TDO <= TDO; |
|
|
79 |
FT_DBGACK <= DBGACK; |
|
|
80 |
FT_TARGET_PRESENT <= TARGET_PRESENT; |
|
|
81 |
|
|
|
82 |
end Behavioral; |
|
|
83 |
|