AMC13
Firmwares for the different applications of the AMC13 uTCA board made at Boston University
Main Page
Design Unit List
Files
File List
All
Classes
Files
Variables
src
common
IPBUS
ipbus2
ipbus_core
hdl
transactor.vhd
1
-- Top level
for
the ipbus transactor module
2
--
3
-- Handles the decoding
of
ipbus packets
and
the transactions
4
--
on
the
bus
itself,
5
--
6
-- This
is
the
new
version
for
ipbus
2
.
0
7
--
8
-- Dave Newbold, October
2012
9
10
library
ieee
;
11
use
ieee.std_logic_1164.
all
;
12
use
ieee.numeric_std.
all
;
13
14
library
work
;
15
use
work.
ipbus
.
all
;
16
use
work.
ipbus_trans_decl
.
all
;
17
18
entity
transactor
is
19
port
(
20
clk
:
in
std_logic
;
-- IPbus clock
21
rst
:
in
std_logic
;
-- Sync reset
22
ipb_out
:
out
ipb_wbus
;
-- IPbus
bus
signals
23
ipb_in
:
in
ipb_rbus
;
24
ipb_req
:
out
std_logic
;
--
Bus
arbitrator signals
25
ipb_grant
:
in
std_logic
;
26
trans_in
:
in
ipbus_trans_in
;
-- Interface
to
packet buffers
27
trans_out
:
out
ipbus_trans_out
;
28
cfg_vector_in
:
in
std_logic_vector
(
127
downto
0
)
;
29
cfg_vector_out
:
out
std_logic_vector
(
127
downto
0
)
;
30
pkt_rx
:
out
std_logic
;
-- 'Activity LED' lines (need stretching externally)
31
pkt_tx
:
out
std_logic
32
)
;
33
34
end
transactor
;
35
36
architecture
rtl
of
transactor
is
37
38
signal
rx_data
,
tx_data
:
std_logic_vector
(
31
downto
0
)
;
39
signal
rx_ready
,
rx_next
,
tx_we
,
tx_hdr
,
tx_err
:
std_logic
;
40
signal
cfg_we
:
std_logic
;
41
signal
cfg_addr
:
std_logic_vector
(
1
downto
0
)
;
42
signal
cfg_din
,
cfg_dout
:
std_logic_vector
(
31
downto
0
)
;
43
44
begin
45
46
iface:
entity
work.
transactor_if
47
port
map
(
48
clk => clk,
49
rst => rst,
50
trans_in => trans_in,
51
trans_out => trans_out,
52
ipb_req => ipb_req,
53
ipb_grant => ipb_grant,
54
rx_ready => rx_ready,
55
rx_next => rx_next,
56
rx_data => rx_data,
57
tx_data => tx_data,
58
tx_we => tx_we,
59
tx_hdr => tx_hdr,
60
tx_err => tx_err,
61
pkt_rx => pkt_rx,
62
pkt_tx => pkt_tx
63
)
;
64
65
sm:
entity
work.
transactor_sm
66
port
map
(
67
clk => clk,
68
rst => rst,
69
rx_data => rx_data,
70
rx_ready => rx_ready,
71
rx_next => rx_next,
72
tx_data => tx_data,
73
tx_we => tx_we,
74
tx_hdr => tx_hdr,
75
tx_err => tx_err,
76
ipb_out => ipb_out,
77
ipb_in => ipb_in,
78
cfg_we => cfg_we,
79
cfg_addr => cfg_addr,
80
cfg_din => cfg_dout,
81
cfg_dout => cfg_din
82
)
;
83
84
cfg:
entity
work.
transactor_cfg
85
port
map
(
86
clk => clk,
87
rst => rst,
88
we => cfg_we ,
89
addr => cfg_addr,
90
din => cfg_din ,
91
dout => cfg_dout,
92
vec_in => cfg_vector_in,
93
vec_out => cfg_vector_out
94
)
;
95
96
end
rtl
;
Generated on Sun Mar 6 2016 12:24:20 for AMC13 by
1.8.1