-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtransactor.vhd
96 lines (85 loc) · 2.16 KB
/
transactor.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
-- Top level for the ipbus transactor module
--
-- Handles the decoding of ipbus packets and the transactions
-- on the bus itself,
--
-- This is the new version for ipbus 2.0
--
-- Dave Newbold, October 2012
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library work;
use work.ipbus.all;
use work.ipbus_trans_decl.all;
entity transactor is
port(
clk: in std_logic; -- IPbus clock
rst: in std_logic; -- Sync reset
ipb_out: out ipb_wbus; -- IPbus bus signals
ipb_in: in ipb_rbus;
ipb_req: out std_logic; -- Bus arbitrator signals
ipb_grant: in std_logic;
trans_in: in ipbus_trans_in; -- Interface to packet buffers
trans_out: out ipbus_trans_out;
cfg_vector_in: in std_logic_vector(127 downto 0);
cfg_vector_out: out std_logic_vector(127 downto 0);
pkt_rx: out std_logic; -- 'Activity LED' lines (need stretching externally)
pkt_tx: out std_logic
);
end transactor;
architecture rtl of transactor is
signal rx_data, tx_data: std_logic_vector(31 downto 0);
signal rx_ready, rx_next, tx_we, tx_hdr, tx_err: std_logic;
signal cfg_we: std_logic;
signal cfg_addr: std_logic_vector(1 downto 0);
signal cfg_din, cfg_dout: std_logic_vector(31 downto 0);
begin
iface: entity work.transactor_if
port map(
clk => clk,
rst => rst,
trans_in => trans_in,
trans_out => trans_out,
ipb_req => ipb_req,
ipb_grant => ipb_grant,
rx_ready => rx_ready,
rx_next => rx_next,
rx_data => rx_data,
tx_data => tx_data,
tx_we => tx_we,
tx_hdr => tx_hdr,
tx_err => tx_err,
pkt_rx => pkt_rx,
pkt_tx => pkt_tx
);
sm: entity work.transactor_sm
port map(
clk => clk,
rst => rst,
rx_data => rx_data,
rx_ready => rx_ready,
rx_next => rx_next,
tx_data => tx_data,
tx_we => tx_we,
tx_hdr => tx_hdr,
tx_err => tx_err,
ipb_out => ipb_out,
ipb_in => ipb_in,
cfg_we => cfg_we,
cfg_addr => cfg_addr,
cfg_din => cfg_dout,
cfg_dout => cfg_din
);
cfg: entity work.transactor_cfg
port map(
clk => clk,
rst => rst,
we => cfg_we,
addr => cfg_addr,
din => cfg_din,
dout => cfg_dout,
vec_in => cfg_vector_in,
vec_out => cfg_vector_out
);
end rtl;