OpenCores
URL https://opencores.org/ocsvn/funbase_ip_library/funbase_ip_library/trunk

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.hwp.interface/] [hibi_udp/] [1.0/] [vhd/] [hibi_udp.vhd] - Blame information for rev 171

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 160 lanttu
-- ***************************************************
2
-- File: hibi_udp.vhd
3 171 lanttu
-- Creation date: 27.03.2013
4
-- Creation time: 09:27:53
5 160 lanttu
-- Description: 
6
-- Created by: matilail
7
-- This file was generated with Kactus2 vhdl generator.
8
-- ***************************************************
9
library IEEE;
10
library udp2hibi;
11
library work;
12
use IEEE.std_logic_1164.all;
13
use udp2hibi.all;
14
use work.all;
15
 
16
entity hibi_udp is
17
 
18
        port (
19
 
20
                -- Interface: clk
21
                clk : in std_logic;
22
 
23
                -- Interface: clk_udp
24
                clk_udp : in std_logic;
25
 
26
                -- Interface: DM9000A
27
                eth_interrupt_in : in std_logic;
28
                eth_chip_sel_out : out std_logic;
29
                eth_clk_out : out std_logic;
30
                eth_cmd_out : out std_logic;
31
                eth_read_out : out std_logic;
32
                eth_reset_out : out std_logic;
33
                eth_write_out : out std_logic;
34
                eth_data_inout : inout std_logic_vector(15 downto 0);
35
 
36
                -- Interface: hibi_master
37
                hibi_av_out : out std_logic;
38
                hibi_comm_out : out std_logic_vector(4 downto 0);
39
                hibi_data_out : out std_logic_vector(31 downto 0);
40
                hibi_re_out : out std_logic;
41
                hibi_we_out : out std_logic;
42
 
43
                -- Interface: hibi_slave
44
                hibi_av_in : in std_logic;
45
                hibi_comm_in : in std_logic_vector(4 downto 0);
46
                hibi_data_in : in std_logic_vector(31 downto 0);
47
                hibi_empty_in : in std_logic;
48
                hibi_full_in : in std_logic;
49
 
50
                -- Interface: rst_n
51
                rst_n : in std_logic
52
        );
53
 
54
end hibi_udp;
55
 
56
 
57
architecture structural of hibi_udp is
58
 
59
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxdest_port_out : std_logic_vector(15 downto 0);
60
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxlink_up_out : std_logic;
61
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxnew_rx_out : std_logic;
62
        signal udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txnew_tx_in : std_logic;
63
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_data_out : std_logic_vector(15 downto 0);
64
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_data_valid_out : std_logic;
65
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_erroneous_out : std_logic;
66
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_len_out : std_logic_vector(10 downto 0);
67
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_re_in : std_logic;
68
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxsource_addr_out : std_logic_vector(31 downto 0);
69
        signal udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txsource_port_in : std_logic_vector(15 downto 0);
70
        signal udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxsource_port_out : std_logic_vector(15 downto 0);
71
        signal udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtarget_addr_in : std_logic_vector(31 downto 0);
72
        signal udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtarget_port_in : std_logic_vector(15 downto 0);
73
        signal udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_data_in : std_logic_vector(15 downto 0);
74
        signal udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_data_valid_in : std_logic;
75
        signal udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_len_in : std_logic_vector(10 downto 0);
76
        signal udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_re_out : std_logic;
77
 
78
        -- - Interface between a UDP/IP block and the HIBI bus.
79
        -- - Capable of handling one transmission and one incoming packet at a time
80
        -- - UDP2HIBI uses HIBI addresses to separate transfers from different agents
81
        -- - So all agents must use different addresses when sending to UDP2HIBI
82
        -- 
83
        component udp2hibi
84
                generic (
85
                        ack_fifo_depth_g : integer := 4;
86
                        frequency_g : integer := 50000000;
87
                        hibi_addr_width_g : integer := 32;
88
                        hibi_comm_width_g : integer := 5;
89
                        hibi_data_width_g : integer := 32;
90
                        hibi_tx_fifo_depth_g : integer := 10;
91
                        receiver_table_size_g : integer := 4;
92
                        rx_multiclk_fifo_depth_g : integer := 10;
93
                        tx_multiclk_fifo_depth_g : integer := 10
94
 
95
                );
96
                port (
97
 
98
                        -- Interface: clk
99
                        -- clock input
100
                        clk : in std_logic;
101
 
102
                        -- Interface: clk_udp
103
                        -- clock udp input (25MHz)
104
                        clk_udp : in std_logic;
105
 
106
                        -- Interface: hibi_master
107
                        -- HIBI master interface
108
                        hibi_av_out : out std_logic;
109
                        hibi_comm_out : out std_logic_vector(4 downto 0);
110
                        hibi_data_out : out std_logic_vector(31 downto 0);
111
                        hibi_re_out : out std_logic;
112
                        hibi_we_out : out std_logic;
113
 
114
                        -- Interface: hibi_slave
115
                        -- HIBI slave interface
116
                        hibi_av_in : in std_logic;
117
                        hibi_comm_in : in std_logic_vector(4 downto 0);
118
                        hibi_data_in : in std_logic_vector(31 downto 0);
119
                        hibi_empty_in : in std_logic;
120
                        hibi_full_in : in std_logic;
121
 
122
                        -- Interface: rst_n
123
                        -- active low reset
124
                        rst_n : in std_logic;
125
 
126
                        -- Interface: udp_ip_rx
127
                        -- udp_ip_rx
128
                        dest_port_in : in std_logic_vector(15 downto 0);
129
                        eth_link_up_in : in std_logic;
130
                        new_rx_in : in std_logic;
131
                        rx_data_in : in std_logic_vector(15 downto 0);
132
                        rx_data_valid_in : in std_logic;
133
                        rx_erroneous_in : in std_logic;
134
                        rx_len_in : in std_logic_vector(10 downto 0);
135
                        source_ip_in : in std_logic_vector(31 downto 0);
136
                        source_port_in : in std_logic_vector(15 downto 0);
137
                        rx_re_out : out std_logic;
138
 
139
                        -- Interface: udp_ip_tx
140
                        -- udp_ip_tx
141
                        tx_re_in : in std_logic;
142
                        dest_ip_out : out std_logic_vector(31 downto 0);
143
                        dest_port_out : out std_logic_vector(15 downto 0);
144
                        new_tx_out : out std_logic;
145
                        source_port_out : out std_logic_vector(15 downto 0);
146
                        tx_data_out : out std_logic_vector(15 downto 0);
147
                        tx_data_valid_out : out std_logic;
148
                        tx_len_out : out std_logic_vector(10 downto 0)
149
 
150
                );
151
        end component;
152
 
153
        -- DM9000A controller and UDP/IP.
154
        component udp_ip_dm9000a
155
                generic (
156
                        disable_arp_g : integer := 0;
157
                        disable_rx_g : integer := 0
158
 
159
                );
160
                port (
161
 
162
                        -- Interface: app_rx
163
                        -- Application receive operations
164
                        rx_re_in : in std_logic;
165
                        dest_port_out : out std_logic_vector(15 downto 0);
166
                        new_rx_out : out std_logic;
167
                        rx_data_out : out std_logic_vector(15 downto 0);
168
                        rx_data_valid_out : out std_logic;
169
                        rx_erroneous_out : out std_logic;
170
                        -- rx_error_out : out std_logic;
171
                        rx_len_out : out std_logic_vector(10 downto 0);
172
                        source_addr_out : out std_logic_vector(31 downto 0);
173
                        source_port_out : out std_logic_vector(15 downto 0);
174
 
175
                        -- Interface: app_tx
176
                        -- Application transmit operations
177
                        new_tx_in : in std_logic;
178 171 lanttu
                        -- no_arp_target_MAC_in : in std_logic_vector(47 downto 0);
179 160 lanttu
                        source_port_in : in std_logic_vector(15 downto 0);
180
                        target_addr_in : in std_logic_vector(31 downto 0);
181
                        target_port_in : in std_logic_vector(15 downto 0);
182
                        tx_data_in : in std_logic_vector(15 downto 0);
183
                        tx_data_valid_in : in std_logic;
184
                        tx_len_in : in std_logic_vector(10 downto 0);
185
                        tx_re_out : out std_logic;
186
 
187
                        -- Interface: clk
188
                        -- Clock 25 MHz in.
189
                        clk : in std_logic;
190
 
191
                        -- Interface: DM9000A
192
                        -- Connection to the DM9000A chip via IO pins.
193
                        eth_interrupt_in : in std_logic;
194
                        eth_chip_sel_out : out std_logic;
195
                        eth_clk_out : out std_logic;
196
                        eth_cmd_out : out std_logic;
197
                        eth_read_out : out std_logic;
198
                        eth_reset_out : out std_logic;
199
                        eth_write_out : out std_logic;
200
                        eth_data_inout : inout std_logic_vector(15 downto 0);
201
 
202
                        -- Interface: rst_n
203
                        -- Asynchronous reset active-low.
204
                        rst_n : in std_logic;
205
 
206
                        -- There ports are contained in many interfaces
207
                        -- fatal_error_out : out std_logic;
208
                        link_up_out : out std_logic
209
 
210
                );
211
        end component;
212
 
213
        -- You can write vhdl code after this tag and it is saved through the generator.
214
        -- ##KACTUS2_BLACK_BOX_DECLARATIONS_BEGIN##
215
        -- ##KACTUS2_BLACK_BOX_DECLARATIONS_END##
216
        -- Stop writing your code after this tag.
217
 
218
 
219
begin
220
 
221
        -- You can write vhdl code after this tag and it is saved through the generator.
222
        -- ##KACTUS2_BLACK_BOX_ASSIGNMENTS_BEGIN##
223
        -- ##KACTUS2_BLACK_BOX_ASSIGNMENTS_END##
224
        -- Stop writing your code after this tag.
225
 
226
        udp2hibi_0 : udp2hibi
227
                port map (
228
                        clk => clk,
229
                        clk_udp => clk_udp,
230
                        dest_ip_out(31 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtarget_addr_in(31 downto 0),
231
                        dest_port_in(15 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxdest_port_out(15 downto 0),
232
                        dest_port_out(15 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtarget_port_in(15 downto 0),
233
                        eth_link_up_in => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxlink_up_out,
234
                        hibi_av_in => hibi_av_in,
235
                        hibi_av_out => hibi_av_out,
236
                        hibi_comm_in(4 downto 0) => hibi_comm_in(4 downto 0),
237
                        hibi_comm_out(4 downto 0) => hibi_comm_out(4 downto 0),
238
                        hibi_data_in(31 downto 0) => hibi_data_in(31 downto 0),
239
                        hibi_data_out(31 downto 0) => hibi_data_out(31 downto 0),
240
                        hibi_empty_in => hibi_empty_in,
241
                        hibi_full_in => hibi_full_in,
242
                        hibi_re_out => hibi_re_out,
243
                        hibi_we_out => hibi_we_out,
244
                        new_rx_in => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxnew_rx_out,
245
                        new_tx_out => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txnew_tx_in,
246
                        rst_n => rst_n,
247
                        rx_data_in(15 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_data_out(15 downto 0),
248
                        rx_data_valid_in => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_data_valid_out,
249
                        rx_erroneous_in => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_erroneous_out,
250
                        rx_len_in(10 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_len_out(10 downto 0),
251
                        rx_re_out => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_re_in,
252
                        source_ip_in(31 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxsource_addr_out(31 downto 0),
253
                        source_port_in(15 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxsource_port_out(15 downto 0),
254
                        source_port_out(15 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txsource_port_in(15 downto 0),
255
                        tx_data_out(15 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_data_in(15 downto 0),
256
                        tx_data_valid_out => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_data_valid_in,
257
                        tx_len_out(10 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_len_in(10 downto 0),
258
                        tx_re_in => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_re_out
259
                );
260
 
261
        udp_ip_dm9000a_0 : udp_ip_dm9000a
262
                port map (
263 165 lanttu
                        clk => clk_udp,
264 160 lanttu
                        dest_port_out(15 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxdest_port_out(15 downto 0),
265
                        eth_chip_sel_out => eth_chip_sel_out,
266
                        eth_clk_out => eth_clk_out,
267
                        eth_cmd_out => eth_cmd_out,
268
                        eth_data_inout(15 downto 0) => eth_data_inout(15 downto 0),
269
                        eth_interrupt_in => eth_interrupt_in,
270
                        eth_read_out => eth_read_out,
271
                        eth_reset_out => eth_reset_out,
272
                        eth_write_out => eth_write_out,
273
                        link_up_out => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxlink_up_out,
274
                        new_rx_out => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxnew_rx_out,
275
                        new_tx_in => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txnew_tx_in,
276
                        rst_n => rst_n,
277
                        rx_data_out(15 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_data_out(15 downto 0),
278
                        rx_data_valid_out => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_data_valid_out,
279
                        rx_erroneous_out => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_erroneous_out,
280
                        rx_len_out(10 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_len_out(10 downto 0),
281
                        rx_re_in => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxrx_re_in,
282
                        source_addr_out(31 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxsource_addr_out(31 downto 0),
283
                        source_port_in(15 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txsource_port_in(15 downto 0),
284
                        source_port_out(15 downto 0) => udp_ip_dm9000a_0_app_rx_to_udp2hibi_0_udp_ip_rxsource_port_out(15 downto 0),
285
                        target_addr_in(31 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtarget_addr_in(31 downto 0),
286
                        target_port_in(15 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtarget_port_in(15 downto 0),
287
                        tx_data_in(15 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_data_in(15 downto 0),
288
                        tx_data_valid_in => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_data_valid_in,
289
                        tx_len_in(10 downto 0) => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_len_in(10 downto 0),
290
                        tx_re_out => udp2hibi_0_udp_ip_tx_to_udp_ip_dm9000a_0_app_txtx_re_out
291
                );
292
 
293
end structural;
294
 

powered by: WebSVN 2.1.0

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