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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [soc/] [basic_tester_example/] [1.0/] [vhd/] [basic_tester_hibi_example.structural.vhd] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
-- ***************************************************
2
-- File: basic_tester_hibi_example.structural.vhd
3
-- Creation date: 03.02.2012
4
-- Creation time: 11:21:33
5
-- Description: 
6
-- Created by: ege
7
-- This file was generated with Kactus2 vhdl generator.
8
-- ***************************************************
9
library IEEE;
10
library work;
11
library hibi;
12
use work.all;
13
use hibi.all;
14
use IEEE.std_logic_1164.all;
15
 
16
entity basic_tester_hibi_example is
17
 
18
end basic_tester_hibi_example;
19
 
20
 
21
architecture structural of basic_tester_hibi_example is
22
 
23
        signal basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1AV_TO_IP : std_logic;
24
        signal basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1COMM_TO_IP : std_logic_vector(4 downto 0);
25
        signal basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1DATA_TO_IP : std_logic_vector(31 downto 0);
26
        signal basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1EMPTY_TO_IP : std_logic;
27
        signal basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1ONE_D_TO_IP : std_logic;
28
        signal basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1RE_FROM_IP : std_logic;
29
        signal clk_gen_1_Generated_clk_to_basic_tester_tx_1_clockCLK : std_logic;
30
        signal rst_gen_1_Generated_reset_to_basic_tester_tx_1_resetRESETn : std_logic;
31
        signal basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2AV_FROM_IP : std_logic;
32
        signal basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2COMM_FROM_IP : std_logic_vector(4 downto 0);
33
        signal basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2DATA_FROM_IP : std_logic_vector(31 downto 0);
34
        signal basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2FULL_TO_IP : std_logic;
35
        signal basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2ONE_P_TO_IP : std_logic;
36
        signal basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2WE_FROM_IP : std_logic;
37
 
38
        -- Simple unit for receiving test data. There are separate units for transmitting (tx) and receiving (rx). This one can check the data coming from a IP  (e.g. via HIBI). The other unit can send the commands to the tested IP.
39
        -- 
40
        -- This IP-XACT component is fixed to 32-bit data and 5-bit command.
41
        -- 
42
        -- Works only in simulation because configuration is done with ASCII file.
43
        component basic_tester_rx
44
                generic (
45
                        comm_width_g : integer := 5;
46
                        conf_file_g : string := "test_rx.txt"; -- File that contains 
47
                        data_width_g : integer := 32
48
 
49
                );
50
                port (
51
 
52
                        -- Interface: clock
53
                        clk : in std_logic;
54
 
55
                        -- Interface: hibi_port
56
                        -- Tester sends data via this port. Regular and hi-prior data muxed. Addr and data muxed also.
57
                        agent_av_in : in std_logic;
58
                        agent_comm_in : in std_logic_vector(4 downto 0);
59
                        agent_data_in : in std_logic_vector(31 downto 0);
60
                        agent_empty_in : in std_logic;
61
                        agent_one_d_in : in std_logic;
62
                        agent_re_out : out std_logic;
63
 
64
                        -- These ports are not in any interface
65
                        -- done_out : out std_logic;
66
 
67
                        -- Interface: reset
68
                        rst_n : in std_logic -- Active low
69
 
70
                );
71
        end component;
72
 
73
        -- Simple unit for sending test data. There are separate units for transmitting (tx) and receiving (rx). This one sends commands to the tested IP (e.g. via HIBI). The other unit can then check the returned data. 
74
        -- 
75
        -- This IP-XACT component is fixed to 32-bit data and 5-bit command.
76
        -- 
77
        -- Works only in simulation because configuration is done with ASCII file.
78
        component basic_tester_tx
79
                generic (
80
                        comm_width_g : integer := 5;
81
                        conf_file_g : string := "test_tx.txt"; -- File that contains 
82
                        data_width_g : integer := 32
83
 
84
                );
85
                port (
86
 
87
                        -- Interface: clock
88
                        clk : in std_logic;
89
 
90
                        -- Interface: hibi_port
91
                        -- Tester sends data via this port. Regular and hi-prior data muxed. Addr and data muxed also.
92
                        agent_full_in : in std_logic;
93
                        agent_one_p_in : in std_logic;
94
                        agent_av_out : out std_logic;
95
                        agent_comm_out : out std_logic_vector(4 downto 0);
96
                        agent_data_out : out std_logic_vector(31 downto 0);
97
                        agent_we_out : out std_logic;
98
 
99
                        -- These ports are not in any interface
100
                        -- done_out : out std_logic;
101
 
102
                        -- Interface: reset
103
                        rst_n : in std_logic -- Active low
104
 
105
                );
106
        end component;
107
 
108
        -- Shared bust for IP blocks
109
        component hibi_segment_small
110
                port (
111
 
112
                        -- Interface: clk_in
113
                        clk_in : in std_logic;
114
 
115
                        -- Interface: ddr2_ctrl_p
116
                        agent_addr_in_17 : in std_logic_vector(31 downto 0);
117
                        agent_comm_in_17 : in std_logic_vector(4 downto 0);
118
                        agent_data_in_17 : in std_logic_vector(31 downto 0);
119
                        agent_msg_addr_in_17 : in std_logic_vector(31 downto 0);
120
                        agent_msg_comm_in_17 : in std_logic_vector(4 downto 0);
121
                        agent_msg_data_in_17 : in std_logic_vector(31 downto 0);
122
                        agent_msg_re_in_17 : in std_logic;
123
                        agent_msg_we_in_17 : in std_logic;
124
                        agent_re_in_17 : in std_logic;
125
                        agent_we_in_17 : in std_logic;
126
                        -- agent_addr_out_17 : out std_logic_vector(31 downto 0);
127
                        -- agent_comm_out_17 : out std_logic_vector(4 downto 0);
128
                        -- agent_data_out_17 : out std_logic_vector(31 downto 0);
129
                        -- agent_empty_out_17 : out std_logic;
130
                        -- agent_full_out_17 : out std_logic;
131
                        -- agent_msg_addr_out_17 : out std_logic_vector(31 downto 0);
132
                        -- agent_msg_comm_out_17 : out std_logic_vector(4 downto 0);
133
                        -- agent_msg_data_out_17 : out std_logic_vector(31 downto 0);
134
                        -- agent_msg_empty_out_17 : out std_logic;
135
                        -- agent_msg_full_out_17 : out std_logic;
136
                        -- agent_msg_one_p_out_17 : out std_logic;
137
                        -- agent_one_p_out_17 : out std_logic;
138
 
139
                        -- Interface: hibi_p1
140
                        agent_av_in_1 : in std_logic;
141
                        agent_comm_in_1 : in std_logic_vector(4 downto 0);
142
                        agent_data_in_1 : in std_logic_vector(31 downto 0);
143
                        agent_re_in_1 : in std_logic;
144
                        agent_we_in_1 : in std_logic;
145
                        agent_av_out_1 : out std_logic;
146
                        agent_comm_out_1 : out std_logic_vector(4 downto 0);
147
                        agent_data_out_1 : out std_logic_vector(31 downto 0);
148
                        agent_empty_out_1 : out std_logic;
149
                        -- agent_full_out_1 : out std_logic;
150
                        agent_one_d_out_1 : out std_logic;
151
                        -- agent_one_p_out_1 : out std_logic;
152
 
153
                        -- Interface: hibi_p2
154
                        agent_av_in_2 : in std_logic;
155
                        agent_comm_in_2 : in std_logic_vector(4 downto 0);
156
                        agent_data_in_2 : in std_logic_vector(31 downto 0);
157
                        agent_re_in_2 : in std_logic;
158
                        agent_we_in_2 : in std_logic;
159
                        -- agent_av_out_2 : out std_logic;
160
                        -- agent_comm_out_2 : out std_logic_vector(4 downto 0);
161
                        -- agent_data_out_2 : out std_logic_vector(31 downto 0);
162
                        -- agent_empty_out_2 : out std_logic;
163
                        agent_full_out_2 : out std_logic;
164
                        -- agent_one_d_out_2 : out std_logic;
165
                        agent_one_p_out_2 : out std_logic;
166
 
167
                        -- Interface: hibi_p3
168
                        agent_av_in_3 : in std_logic;
169
                        agent_comm_in_3 : in std_logic_vector(4 downto 0);
170
                        agent_data_in_3 : in std_logic_vector(31 downto 0);
171
                        agent_re_in_3 : in std_logic;
172
                        agent_we_in_3 : in std_logic;
173
                        -- agent_av_out_3 : out std_logic;
174
                        -- agent_comm_out_3 : out std_logic_vector(4 downto 0);
175
                        -- agent_data_out_3 : out std_logic_vector(31 downto 0);
176
                        -- agent_empty_out_3 : out std_logic;
177
                        -- agent_full_out_3 : out std_logic;
178
                        -- agent_one_d_out_3 : out std_logic;
179
                        -- agent_one_p_out_3 : out std_logic;
180
 
181
                        -- These ports are not in any interface
182
                        -- agent_av_in_4 : in std_logic;
183
                        -- agent_av_in_5 : in std_logic;
184
                        -- agent_av_in_6 : in std_logic;
185
                        -- agent_av_in_7 : in std_logic;
186
                        -- agent_av_in_8 : in std_logic;
187
                        -- agent_comm_in_4 : in std_logic_vector(4 downto 0);
188
                        -- agent_comm_in_5 : in std_logic_vector(4 downto 0);
189
                        -- agent_comm_in_6 : in std_logic_vector(4 downto 0);
190
                        -- agent_comm_in_7 : in std_logic_vector(4 downto 0);
191
                        -- agent_comm_in_8 : in std_logic_vector(4 downto 0);
192
                        -- agent_data_in_4 : in std_logic_vector(31 downto 0);
193
                        -- agent_data_in_5 : in std_logic_vector(31 downto 0);
194
                        -- agent_data_in_6 : in std_logic_vector(31 downto 0);
195
                        -- agent_data_in_7 : in std_logic_vector(31 downto 0);
196
                        -- agent_data_in_8 : in std_logic_vector(31 downto 0);
197
                        -- agent_re_in_4 : in std_logic;
198
                        -- agent_re_in_5 : in std_logic;
199
                        -- agent_re_in_6 : in std_logic;
200
                        -- agent_re_in_7 : in std_logic;
201
                        -- agent_re_in_8 : in std_logic;
202
                        -- agent_we_in_4 : in std_logic;
203
                        -- agent_we_in_5 : in std_logic;
204
                        -- agent_we_in_6 : in std_logic;
205
                        -- agent_we_in_7 : in std_logic;
206
                        -- agent_we_in_8 : in std_logic;
207
                        -- agent_av_out_4 : out std_logic;
208
                        -- agent_av_out_5 : out std_logic;
209
                        -- agent_av_out_6 : out std_logic;
210
                        -- agent_av_out_7 : out std_logic;
211
                        -- agent_av_out_8 : out std_logic;
212
                        -- agent_comm_out_4 : out std_logic_vector(4 downto 0);
213
                        -- agent_comm_out_5 : out std_logic_vector(4 downto 0);
214
                        -- agent_comm_out_6 : out std_logic_vector(4 downto 0);
215
                        -- agent_comm_out_7 : out std_logic_vector(4 downto 0);
216
                        -- agent_comm_out_8 : out std_logic_vector(4 downto 0);
217
                        -- agent_data_out_4 : out std_logic_vector(31 downto 0);
218
                        -- agent_data_out_5 : out std_logic_vector(31 downto 0);
219
                        -- agent_data_out_6 : out std_logic_vector(31 downto 0);
220
                        -- agent_data_out_7 : out std_logic_vector(31 downto 0);
221
                        -- agent_data_out_8 : out std_logic_vector(31 downto 0);
222
                        -- agent_empty_out_4 : out std_logic;
223
                        -- agent_empty_out_5 : out std_logic;
224
                        -- agent_empty_out_6 : out std_logic;
225
                        -- agent_empty_out_7 : out std_logic;
226
                        -- agent_empty_out_8 : out std_logic;
227
                        -- agent_full_out_4 : out std_logic;
228
                        -- agent_full_out_5 : out std_logic;
229
                        -- agent_full_out_6 : out std_logic;
230
                        -- agent_full_out_7 : out std_logic;
231
                        -- agent_full_out_8 : out std_logic;
232
                        -- agent_one_d_out_4 : out std_logic;
233
                        -- agent_one_d_out_5 : out std_logic;
234
                        -- agent_one_d_out_6 : out std_logic;
235
                        -- agent_one_d_out_7 : out std_logic;
236
                        -- agent_one_d_out_8 : out std_logic;
237
                        -- agent_one_p_out_4 : out std_logic;
238
                        -- agent_one_p_out_5 : out std_logic;
239
                        -- agent_one_p_out_6 : out std_logic;
240
                        -- agent_one_p_out_7 : out std_logic;
241
                        -- agent_one_p_out_8 : out std_logic;
242
 
243
                        -- Interface: rst_n
244
                        rst_n_in : in std_logic
245
 
246
                );
247
        end component;
248
 
249
        component clk_gen
250
                generic (
251
                        hi_period_ns_g : integer := 1;
252
                        lo_period_ns_g : integer := 1
253
 
254
                );
255
                port (
256
 
257
                        -- Interface: Generated_clk
258
                        clk_out : out std_logic
259
 
260
                );
261
        end component;
262
 
263
        component rst_gen
264
                generic (
265
                        active_period_ns_g : integer := 100
266
 
267
                );
268
                port (
269
 
270
                        -- Interface: Generated_reset
271
                        rst_out : out std_logic
272
 
273
                );
274
        end component;
275
 
276
        -- You can write vhdl code after this tag and it is saved through the generator.
277
        -- ##KACTUS2_BLACK_BOX_DECLARATIONS_BEGIN##
278
        -- ##KACTUS2_BLACK_BOX_DECLARATIONS_END##
279
        -- Stop writing your code after this tag.
280
 
281
 
282
begin
283
 
284
        -- You can write vhdl code after this tag and it is saved through the generator.
285
        -- ##KACTUS2_BLACK_BOX_ASSIGNMENTS_BEGIN##
286
        -- ##KACTUS2_BLACK_BOX_ASSIGNMENTS_END##
287
        -- Stop writing your code after this tag.
288
 
289
        basic_tester_rx_1 : basic_tester_rx
290
                generic map (
291
                        conf_file_g => "test_rx.txt"
292
                )
293
                port map (
294
                        agent_av_in => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1AV_TO_IP,
295
                        agent_comm_in(4 downto 0) => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1COMM_TO_IP(4 downto 0),
296
                        agent_data_in(31 downto 0) => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1DATA_TO_IP(31 downto 0),
297
                        agent_empty_in => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1EMPTY_TO_IP,
298
                        agent_one_d_in => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1ONE_D_TO_IP,
299
                        agent_re_out => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1RE_FROM_IP,
300
                        clk => clk_gen_1_Generated_clk_to_basic_tester_tx_1_clockCLK,
301
                        rst_n => rst_gen_1_Generated_reset_to_basic_tester_tx_1_resetRESETn
302
                );
303
 
304
        basic_tester_tx_1 : basic_tester_tx
305
                generic map (
306
                        conf_file_g => "test_tx.txt"
307
                )
308
                port map (
309
                        agent_av_out => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2AV_FROM_IP,
310
                        agent_comm_out(4 downto 0) => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2COMM_FROM_IP(4 downto 0),
311
                        agent_data_out(31 downto 0) => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2DATA_FROM_IP(31 downto 0),
312
                        agent_full_in => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2FULL_TO_IP,
313
                        agent_one_p_in => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2ONE_P_TO_IP,
314
                        agent_we_out => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2WE_FROM_IP,
315
                        clk => clk_gen_1_Generated_clk_to_basic_tester_tx_1_clockCLK,
316
                        rst_n => rst_gen_1_Generated_reset_to_basic_tester_tx_1_resetRESETn
317
                );
318
 
319
        clk_gen_1 : clk_gen
320
                generic map (
321
                        hi_period_ns_g => 5,
322
                        lo_period_ns_g => 3
323
                )
324
                port map (
325
                        clk_out => clk_gen_1_Generated_clk_to_basic_tester_tx_1_clockCLK
326
                );
327
 
328
        hibi_segment_small_1 : hibi_segment_small
329
                port map (
330
                        agent_addr_in_17 => (others => '0'),
331
                        agent_av_in_1 => '0',
332
                        agent_av_in_2 => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2AV_FROM_IP,
333
                        agent_av_in_3 => '0',
334
                        agent_av_out_1 => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1AV_TO_IP,
335
                        agent_comm_in_1 => (others => '0'),
336
                        agent_comm_in_17 => (others => '0'),
337
                        agent_comm_in_2(4 downto 0) => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2COMM_FROM_IP(4 downto 0),
338
                        agent_comm_in_3 => (others => '0'),
339
                        agent_comm_out_1(4 downto 0) => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1COMM_TO_IP(4 downto 0),
340
                        agent_data_in_1 => (others => '0'),
341
                        agent_data_in_17 => (others => '0'),
342
                        agent_data_in_2(31 downto 0) => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2DATA_FROM_IP(31 downto 0),
343
                        agent_data_in_3 => (others => '0'),
344
                        agent_data_out_1(31 downto 0) => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1DATA_TO_IP(31 downto 0),
345
                        agent_empty_out_1 => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1EMPTY_TO_IP,
346
                        agent_full_out_2 => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2FULL_TO_IP,
347
                        agent_msg_addr_in_17 => (others => '0'),
348
                        agent_msg_comm_in_17 => (others => '0'),
349
                        agent_msg_data_in_17 => (others => '0'),
350
                        agent_msg_re_in_17 => '0',
351
                        agent_msg_we_in_17 => '0',
352
                        agent_one_d_out_1 => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1ONE_D_TO_IP,
353
                        agent_one_p_out_2 => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2ONE_P_TO_IP,
354
                        agent_re_in_1 => basic_tester_rx_1_hibi_port_to_hibi_segment_small_1_hibi_p1RE_FROM_IP,
355
                        agent_re_in_17 => '0',
356
                        agent_re_in_2 => '0',
357
                        agent_re_in_3 => '0',
358
                        agent_we_in_1 => '0',
359
                        agent_we_in_17 => '0',
360
                        agent_we_in_2 => basic_tester_tx_1_hibi_port_to_hibi_segment_small_1_hibi_p2WE_FROM_IP,
361
                        agent_we_in_3 => '0',
362
                        clk_in => clk_gen_1_Generated_clk_to_basic_tester_tx_1_clockCLK,
363
                        rst_n_in => rst_gen_1_Generated_reset_to_basic_tester_tx_1_resetRESETn
364
                );
365
 
366
        rst_gen_1 : rst_gen
367
                port map (
368
                        rst_out => rst_gen_1_Generated_reset_to_basic_tester_tx_1_resetRESETn
369
                );
370
 
371
end structural;
372
 

powered by: WebSVN 2.1.0

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