OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [perl_gui/] [lib/] [ip/] [NoC/] [ni_master.IP] - Blame information for rev 38

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 34 alirezamon
#######################################################################
2
##      File: ni_master.IP
3
##
4
##      Copyright (C) 2014-2016  Alireza Monemi
5
##
6 38 alirezamon
##      This file is part of ProNoC 1.8.0
7 34 alirezamon
##
8
##      WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT
9
##      MAY CAUSE UNEXPECTED BEHAIVOR.
10
################################################################################
11
 
12 38 alirezamon
$ipgen = bless( {
13
                  'description' => '',
14
                  'file_name' => '/home/alireza/mywork/mpsoc/src_peripheral/ni/ni_master.v',
15
                  'plugs' => {
16
                               'wb_master' => {
17
                                                'value' => 2,
18
                                                '1' => {
19
                                                         'name' => 'wb_receive'
20
                                                       },
21
                                                'wb_master' => {},
22 34 alirezamon
                                                '0' => {
23 38 alirezamon
                                                         'name' => 'wb_send'
24 34 alirezamon
                                                       },
25 38 alirezamon
                                                'type' => 'num'
26 34 alirezamon
                                              },
27 38 alirezamon
                               'interrupt_peripheral' => {
28
                                                           'value' => 1,
29
                                                           'interrupt_peripheral' => {},
30
                                                           'type' => 'num',
31
                                                           '0' => {
32
                                                                    'name' => 'interrupt'
33
                                                                  }
34
                                                         },
35
                               'wb_slave' => {
36
                                               'wb_slave' => {},
37 34 alirezamon
                                               'value' => 1,
38
                                               '0' => {
39 38 alirezamon
                                                        'name' => 'wb_slave',
40
                                                        'width' => 10,
41
                                                        'addr' => '0xb800_0000  0xbfff_ffff             custom devices'
42 34 alirezamon
                                                      },
43 38 alirezamon
                                               'type' => 'num'
44
                                             },
45
                               'clk' => {
46
                                          'value' => 1,
47
                                          '0' => {
48
                                                   'name' => 'clk'
49
                                                 },
50
                                          'type' => 'num',
51
                                          'clk' => {}
52
                                        },
53
                               'reset' => {
54
                                            'type' => 'num',
55
                                            '0' => {
56
                                                     'name' => 'reset'
57
                                                   },
58
                                            'reset' => {},
59
                                            'value' => 1
60
                                          }
61
                             },
62
                  'ports_order' => [
63
                                     'reset',
64
                                     'clk',
65
                                     'current_x',
66
                                     'current_y',
67
                                     'flit_out',
68
                                     'flit_out_wr',
69
                                     'credit_in',
70
                                     'flit_in',
71
                                     'flit_in_wr',
72
                                     'credit_out',
73
                                     's_dat_i',
74
                                     's_sel_i',
75
                                     's_addr_i',
76
                                     's_cti_i',
77
                                     's_stb_i',
78
                                     's_cyc_i',
79
                                     's_we_i',
80
                                     's_dat_o',
81
                                     's_ack_o',
82
                                     'm_send_sel_o',
83
                                     'm_send_addr_o',
84
                                     'm_send_cti_o',
85
                                     'm_send_stb_o',
86
                                     'm_send_cyc_o',
87
                                     'm_send_we_o',
88
                                     'm_send_dat_i',
89
                                     'm_send_ack_i',
90
                                     'm_receive_sel_o',
91
                                     'm_receive_dat_o',
92
                                     'm_receive_addr_o',
93
                                     'm_receive_cti_o',
94
                                     'm_receive_stb_o',
95
                                     'm_receive_cyc_o',
96
                                     'm_receive_we_o',
97
                                     'm_receive_ack_i',
98
                                     'irq'
99
                                   ],
100
                  'hdl_files' => [
101
                                   '/mpsoc/src_noc/arbiter.v',
102
                                   '/mpsoc/src_noc/flit_buffer.v',
103
                                   '/mpsoc/src_noc/input_ports.v',
104
                                   '/mpsoc/src_noc/main_comp.v',
105
                                   '/mpsoc/src_noc/route_mesh.v',
106
                                   '/mpsoc/src_noc/route_torus.v',
107
                                   '/mpsoc/src_noc/routing.v',
108
                                   '/mpsoc/src_peripheral/ni/ni_vc_dma.v',
109
                                   '/mpsoc/src_peripheral/ni/ni_vc_wb_slave_regs.v',
110
                                   '/mpsoc/src_peripheral/ni/ni_master.v',
111
                                   '/mpsoc/src_peripheral/ni/ni_crc32.v'
112
                                 ],
113
                  'parameters' => {
114
                                    'TOPOLOGY' => {
115
                                                    'default' => '"MESH"',
116 34 alirezamon
                                                    'redefine_param' => 1,
117
                                                    'info' => 'Parameter',
118
                                                    'global_param' => 'Parameter',
119 38 alirezamon
                                                    'type' => 'Fixed',
120
                                                    'content' => ''
121 34 alirezamon
                                                  },
122 38 alirezamon
                                    'MAX_BURST_SIZE' => {
123
                                                          'content' => '2,4,8,16,32,64,128,256,512,1024,2048',
124
                                                          'type' => 'Combo-box',
125
                                                          'info' => 'Maximum burst size in words.
126 34 alirezamon
The NI release wishbone bus  each time one burst is completed or when the VC\'s internal FIFO becomes full.  The bus will be released for one clock cycle. Then in case, there are other active VCs, another active VC will get access to the bus using round robin arbiter.  This process will be continued until all desired data is transferred. ',
127 38 alirezamon
                                                          'global_param' => 'Localparam',
128 34 alirezamon
                                                          'redefine_param' => 1,
129 38 alirezamon
                                                          'default' => '16'
130 34 alirezamon
                                                        },
131 38 alirezamon
                                    'ROUTING_HDR_WIDTH' => {
132
                                                             'content' => '',
133
                                                             'info' => 'Parameter',
134
                                                             'type' => 'Fixed',
135
                                                             'global_param' => 'Localparam',
136
                                                             'redefine_param' => 1,
137
                                                             'default' => '8'
138
                                                           },
139
                                    'CLASS_HDR_WIDTH' => {
140
                                                           'redefine_param' => 1,
141
                                                           'default' => '8',
142
                                                           'content' => '',
143
                                                           'type' => 'Fixed',
144
                                                           'info' => 'Parameter',
145
                                                           'global_param' => 'Localparam'
146
                                                         },
147
                                    'S_Aw' => {
148
                                                'content' => '',
149
                                                'global_param' => 'Localparam',
150
                                                'info' => 'Parameter',
151
                                                'type' => 'Fixed',
152
                                                'redefine_param' => 1,
153
                                                'default' => '8'
154
                                              },
155
                                    'ROUTE_TYPE' => {
156
                                                      'redefine_param' => 1,
157
                                                      'default' => '   ',
158
                                                      'content' => '',
159
                                                      'info' => 'Parameter',
160
                                                      'global_param' => 'Parameter',
161
                                                      'type' => 'Fixed'
162
                                                    },
163
                                    'DST_ADR_HDR_WIDTH' => {
164
                                                             'content' => '',
165
                                                             'type' => 'Fixed',
166
                                                             'info' => 'Parameter',
167
                                                             'global_param' => 'Localparam',
168
                                                             'redefine_param' => 1,
169
                                                             'default' => '8'
170
                                                           },
171
                                    'NX' => {
172
                                              'default' => ' 4',
173
                                              'redefine_param' => 1,
174
                                              'type' => 'Fixed',
175
                                              'info' => 'Parameter',
176
                                              'global_param' => 'Parameter',
177
                                              'content' => ''
178
                                            },
179
                                    'SRC_ADR_HDR_WIDTH' => {
180
                                                             'default' => '8',
181
                                                             'redefine_param' => 1,
182
                                                             'type' => 'Fixed',
183
                                                             'info' => 'Parameter',
184
                                                             'global_param' => 'Localparam',
185
                                                             'content' => ''
186
                                                           },
187
                                    'ROUTE_NAME' => {
188
                                                      'global_param' => 'Parameter',
189
                                                      'type' => 'Fixed',
190
                                                      'info' => 'Parameter',
191
                                                      'content' => '',
192
                                                      'default' => '"XY"   ',
193
                                                      'redefine_param' => 1
194
                                                    },
195
                                    'Xw' => {
196
                                              'redefine_param' => 0,
197
                                              'default' => 'log2(NX)',
198
                                              'content' => '',
199
                                              'info' => undef,
200
                                              'type' => 'Fixed',
201
                                              'global_param' => 'Localparam'
202
                                            },
203
                                    'TAGw' => {
204
                                                'type' => 'Fixed',
205
                                                'info' => 'Parameter',
206
                                                'global_param' => 'Localparam',
207
                                                'content' => '',
208
                                                'default' => '3',
209
                                                'redefine_param' => 1
210
                                              },
211
                                    'DEBUG_EN' => {
212
                                                    'content' => '',
213
                                                    'info' => 'Parameter',
214
                                                    'global_param' => 'Parameter',
215 34 alirezamon
                                                    'type' => 'Fixed',
216
                                                    'redefine_param' => 1,
217 38 alirezamon
                                                    'default' => ' 1'
218 34 alirezamon
                                                  },
219 38 alirezamon
                                    'B' => {
220
                                             'redefine_param' => 1,
221
                                             'default' => ' 4',
222
                                             'content' => '',
223
                                             'info' => 'Parameter',
224
                                             'global_param' => 'Parameter',
225
                                             'type' => 'Fixed'
226
                                           },
227
                                    'Dw' => {
228
                                              'redefine_param' => 1,
229
                                              'default' => '32',
230
                                              'content' => '32,256,8',
231
                                              'info' => 'wishbone_bus data width in bits.',
232
                                              'global_param' => 'Localparam',
233
                                              'type' => 'Spin-button'
234
                                            },
235
                                    'Fpay' => {
236
                                                'default' => ' 32',
237
                                                'redefine_param' => 1,
238
                                                'info' => 'Parameter',
239
                                                'type' => 'Fixed',
240
                                                'global_param' => 'Parameter',
241
                                                'content' => ''
242
                                              },
243
                                    'NY' => {
244
                                              'redefine_param' => 1,
245
                                              'default' => ' 4',
246
                                              'content' => '',
247
                                              'global_param' => 'Parameter',
248
                                              'info' => 'Parameter',
249
                                              'type' => 'Fixed'
250
                                            },
251
                                    'P' => {
252
                                             'global_param' => 'Parameter',
253
                                             'info' => 'Parameter',
254
                                             'type' => 'Fixed',
255
                                             'content' => '',
256
                                             'default' => '5',
257
                                             'redefine_param' => 1
258
                                           },
259
                                    'SELw' => {
260
                                                'redefine_param' => 1,
261
                                                'default' => '4',
262
                                                'content' => '',
263
                                                'info' => 'Parameter',
264
                                                'type' => 'Fixed',
265
                                                'global_param' => 'Localparam'
266
                                              },
267
                                    'V' => {
268
                                             'redefine_param' => 1,
269
                                             'default' => '4',
270
                                             'content' => '',
271
                                             'info' => 'Parameter',
272
                                             'global_param' => 'Parameter',
273
                                             'type' => 'Fixed'
274
                                           },
275
                                    'CRC_EN' => {
276
                                                  'type' => 'Combo-box',
277
                                                  'global_param' => 'Localparam',
278
                                                  'info' => 'The parameter can be selected as "YES" or "NO".
279
If CRC is enabled, then two CRC32 generator modules will be added to the NI. One CRC generator for calculating CRC of sending packets and another for receiving packets.   The CRC32 value of each packet is send via tail flit and at destination NI, is will be compared with received packet generated CRC32. The matching results can be used for error-detection and can be read via NI slave interface. ',
280
                                                  'content' => '"YES","NO"',
281
                                                  'default' => '"NO"',
282
                                                  'redefine_param' => 1
283 34 alirezamon
                                                },
284 38 alirezamon
                                    'Yw' => {
285
                                              'default' => 'log2(NY)',
286
                                              'redefine_param' => 0,
287
                                              'global_param' => 'Localparam',
288
                                              'type' => 'Fixed',
289
                                              'info' => undef,
290
                                              'content' => ''
291
                                            },
292
                                    'M_Aw' => {
293
                                                'redefine_param' => 1,
294
                                                'default' => '32',
295
                                                'content' => 'Dw',
296
                                                'info' => 'Parameter',
297
                                                'type' => 'Fixed',
298
                                                'global_param' => 'Localparam'
299
                                              },
300
                                    'Fw' => {
301
                                              'type' => 'Fixed',
302
                                              'info' => undef,
303
                                              'global_param' => 'Localparam',
304
                                              'content' => '',
305
                                              'default' => '2+V+Fpay',
306
                                              'redefine_param' => 0
307
                                            },
308
                                    'MAX_TRANSACTION_WIDTH' => {
309
                                                                 'global_param' => 'Localparam',
310
                                                                 'type' => 'Spin-button',
311
                                                                 'info' => 'maximum packet size width  in words.
312
The maximum data that can be sent via one packet will be 2 power of MAX_DMA_TRANSACTION_WIDTH in words.',
313
                                                                 'content' => '4,32,1',
314
                                                                 'default' => '13',
315
                                                                 'redefine_param' => 1
316
                                                               },
317
                                    'C' => {
318
                                             'default' => ' 4',
319
                                             'redefine_param' => 1,
320
                                             'info' => 'Parameter',
321
                                             'global_param' => 'Parameter',
322
                                             'type' => 'Fixed',
323
                                             'content' => ''
324
                                           }
325
                                  },
326
                  'ports' => {
327
                               's_dat_o' => {
328
                                              'intfc_port' => 'dat_o',
329
                                              'range' => 'Dw-1       :   0',
330
                                              'intfc_name' => 'plug:wb_slave[0]',
331
                                              'type' => 'output'
332
                                            },
333
                               's_stb_i' => {
334
                                              'type' => 'input',
335
                                              'intfc_name' => 'plug:wb_slave[0]',
336
                                              'range' => '',
337
                                              'intfc_port' => 'stb_i'
338
                                            },
339
                               'm_receive_sel_o' => {
340
                                                      'range' => 'SELw-1          :   0',
341
                                                      'intfc_name' => 'plug:wb_master[1]',
342
                                                      'type' => 'output',
343
                                                      'intfc_port' => 'sel_o'
344
                                                    },
345
                               'm_receive_ack_i' => {
346
                                                      'intfc_port' => 'ack_i',
347 34 alirezamon
                                                      'range' => '',
348 38 alirezamon
                                                      'intfc_name' => 'plug:wb_master[1]',
349
                                                      'type' => 'input'
350 34 alirezamon
                                                    },
351 38 alirezamon
                               's_cyc_i' => {
352
                                              'intfc_port' => 'cyc_i',
353
                                              'type' => 'input',
354
                                              'intfc_name' => 'plug:wb_slave[0]',
355
                                              'range' => ''
356
                                            },
357
                               'm_send_addr_o' => {
358
                                                    'intfc_port' => 'adr_o',
359
                                                    'range' => 'M_Aw-1          :   0',
360
                                                    'type' => 'output',
361
                                                    'intfc_name' => 'plug:wb_master[0]'
362
                                                  },
363
                               'm_send_we_o' => {
364
                                                  'range' => '',
365
                                                  'intfc_name' => 'plug:wb_master[0]',
366
                                                  'type' => 'output',
367
                                                  'intfc_port' => 'we_o'
368 34 alirezamon
                                                },
369 38 alirezamon
                               'current_x' => {
370
                                                'intfc_port' => 'current_x',
371
                                                'range' => 'Xw-1   :   0',
372
                                                'intfc_name' => 'socket:ni[0]',
373
                                                'type' => 'input'
374 34 alirezamon
                                              },
375 38 alirezamon
                               'clk' => {
376
                                          'type' => 'input',
377
                                          'intfc_name' => 'plug:clk[0]',
378
                                          'range' => '',
379
                                          'intfc_port' => 'clk_i'
380
                                        },
381
                               'm_receive_addr_o' => {
382
                                                       'type' => 'output',
383
                                                       'intfc_name' => 'plug:wb_master[1]',
384
                                                       'range' => 'M_Aw-1          :   0',
385
                                                       'intfc_port' => 'adr_o'
386 34 alirezamon
                                                     },
387 38 alirezamon
                               's_dat_i' => {
388
                                              'type' => 'input',
389
                                              'intfc_name' => 'plug:wb_slave[0]',
390
                                              'range' => 'Dw-1       :   0',
391
                                              'intfc_port' => 'dat_i'
392
                                            },
393
                               'm_receive_dat_o' => {
394
                                                      'intfc_port' => 'dat_o',
395
                                                      'range' => 'Dw-1            :   0',
396
                                                      'type' => 'output',
397
                                                      'intfc_name' => 'plug:wb_master[1]'
398
                                                    },
399
                               's_sel_i' => {
400
                                              'intfc_port' => 'sel_i',
401
                                              'type' => 'input',
402
                                              'intfc_name' => 'plug:wb_slave[0]',
403
                                              'range' => 'SELw-1     :   0'
404
                                            },
405
                               's_ack_o' => {
406
                                              'intfc_port' => 'ack_o',
407 34 alirezamon
                                              'range' => '',
408
                                              'type' => 'output',
409 38 alirezamon
                                              'intfc_name' => 'plug:wb_slave[0]'
410 34 alirezamon
                                            },
411 38 alirezamon
                               'm_receive_stb_o' => {
412
                                                      'type' => 'output',
413
                                                      'intfc_name' => 'plug:wb_master[1]',
414 34 alirezamon
                                                      'range' => '',
415 38 alirezamon
                                                      'intfc_port' => 'stb_o'
416 34 alirezamon
                                                    },
417 38 alirezamon
                               'flit_out_wr' => {
418 34 alirezamon
                                                  'intfc_name' => 'socket:ni[0]',
419 38 alirezamon
                                                  'type' => 'output',
420
                                                  'range' => '',
421
                                                  'intfc_port' => 'flit_out_wr'
422 34 alirezamon
                                                },
423 38 alirezamon
                               'current_y' => {
424
                                                'intfc_port' => 'current_y',
425
                                                'intfc_name' => 'socket:ni[0]',
426
                                                'type' => 'input',
427
                                                'range' => 'Yw-1   :   0'
428
                                              },
429
                               'm_send_cti_o' => {
430
                                                   'range' => 'TAGw-1          :   0',
431
                                                   'type' => 'output',
432
                                                   'intfc_name' => 'plug:wb_master[0]',
433
                                                   'intfc_port' => 'cti_o'
434
                                                 },
435
                               'm_receive_we_o' => {
436
                                                     'range' => '',
437 34 alirezamon
                                                     'type' => 'output',
438 38 alirezamon
                                                     'intfc_name' => 'plug:wb_master[1]',
439
                                                     'intfc_port' => 'we_o'
440 34 alirezamon
                                                   },
441 38 alirezamon
                               'flit_in' => {
442
                                              'range' => 'Fw-1   :   0',
443
                                              'type' => 'input',
444
                                              'intfc_name' => 'socket:ni[0]',
445
                                              'intfc_port' => 'flit_in'
446
                                            },
447
                               'flit_out' => {
448
                                               'range' => 'Fw-1   :   0',
449
                                               'type' => 'output',
450
                                               'intfc_name' => 'socket:ni[0]',
451
                                               'intfc_port' => 'flit_out'
452
                                             },
453
                               's_addr_i' => {
454
                                               'intfc_port' => 'adr_i',
455
                                               'range' => 'S_Aw-1     :   0',
456
                                               'intfc_name' => 'plug:wb_slave[0]',
457
                                               'type' => 'input'
458
                                             },
459
                               'm_send_stb_o' => {
460
                                                   'type' => 'output',
461
                                                   'intfc_name' => 'plug:wb_master[0]',
462
                                                   'range' => '',
463
                                                   'intfc_port' => 'stb_o'
464
                                                 },
465
                               's_we_i' => {
466
                                             'intfc_port' => 'we_i',
467
                                             'intfc_name' => 'plug:wb_slave[0]',
468
                                             'type' => 'input',
469
                                             'range' => ''
470
                                           },
471
                               'm_receive_cti_o' => {
472
                                                      'intfc_port' => 'cti_o',
473
                                                      'range' => 'TAGw-1          :   0',
474
                                                      'intfc_name' => 'plug:wb_master[1]',
475
                                                      'type' => 'output'
476
                                                    },
477
                               's_cti_i' => {
478
                                              'intfc_port' => 'cti_i',
479
                                              'range' => 'TAGw-1     :   0',
480
                                              'intfc_name' => 'plug:wb_slave[0]',
481 34 alirezamon
                                              'type' => 'input'
482
                                            },
483 38 alirezamon
                               'm_send_cyc_o' => {
484
                                                   'type' => 'output',
485
                                                   'intfc_name' => 'plug:wb_master[0]',
486
                                                   'range' => '',
487
                                                   'intfc_port' => 'cyc_o'
488
                                                 },
489
                               'm_send_sel_o' => {
490
                                                   'intfc_port' => 'sel_o',
491
                                                   'range' => 'SELw-1          :   0',
492
                                                   'type' => 'output',
493
                                                   'intfc_name' => 'plug:wb_master[0]'
494
                                                 },
495
                               'reset' => {
496
                                            'range' => '',
497
                                            'type' => 'input',
498
                                            'intfc_name' => 'plug:reset[0]',
499
                                            'intfc_port' => 'reset_i'
500
                                          },
501
                               'credit_in' => {
502
                                                'type' => 'input',
503
                                                'intfc_name' => 'socket:ni[0]',
504
                                                'range' => 'V-1    :   0',
505
                                                'intfc_port' => 'credit_in'
506
                                              },
507
                               'm_send_dat_i' => {
508
                                                   'intfc_port' => 'dat_i',
509
                                                   'type' => 'input',
510
                                                   'intfc_name' => 'plug:wb_master[0]',
511
                                                   'range' => 'Dw-1           :  0'
512
                                                 },
513
                               'credit_out' => {
514
                                                 'range' => 'V-1    :   0',
515
                                                 'intfc_name' => 'socket:ni[0]',
516
                                                 'type' => 'output',
517
                                                 'intfc_port' => 'credit_out'
518
                                               },
519
                               'm_receive_cyc_o' => {
520
                                                      'intfc_name' => 'plug:wb_master[1]',
521
                                                      'type' => 'output',
522
                                                      'range' => '',
523
                                                      'intfc_port' => 'cyc_o'
524
                                                    },
525
                               'm_send_ack_i' => {
526
                                                   'intfc_port' => 'ack_i',
527
                                                   'intfc_name' => 'plug:wb_master[0]',
528
                                                   'type' => 'input',
529
                                                   'range' => ''
530
                                                 },
531
                               'irq' => {
532
                                          'range' => '',
533
                                          'type' => 'output',
534
                                          'intfc_name' => 'plug:interrupt_peripheral[0]',
535
                                          'intfc_port' => 'int_o'
536
                                        },
537
                               'flit_in_wr' => {
538
                                                 'range' => '',
539 34 alirezamon
                                                 'type' => 'input',
540 38 alirezamon
                                                 'intfc_name' => 'socket:ni[0]',
541
                                                 'intfc_port' => 'flit_in_wr'
542
                                               }
543
                             },
544
                  'description_pdf' => '/mpsoc/src_peripheral/ni/NI.pdf',
545
                  'category' => 'NoC',
546
                  'gui_status' => {
547
                                    'timeout' => 0,
548
                                    'status' => 'ideal'
549
                                  },
550
                  'system_h' => ' /*        NI wb registers addresses
551 34 alirezamon
 
552
            1   :   STATUS2_WB_ADDR           // status2:
553
            2   :   BURST_SIZE_WB_ADDR       // The busrt size in words
554
 
555
            3   :   SEND_DATA_SIZE_WB_ADDR,  // The size of data to be sent in byte
556
            4   :   SEND_STRT_WB_ADDR,       // The address of data to be sent   in byte
557
            5   :   SEND_DEST_WB_ADDR        // The destination router address
558
            6   :   SEND_CTRL_WB_ADDR
559
 
560
            7   :   RECEIVE_DATA_SIZE_WB_ADDR // The size of recieved data in byte
561
            8   :   RECEIVE_STRT_WB_ADDR      // The address pointer of reciever memory in byte
562
            9   :   RECEIVE_SRC_WB_ADDR       // The source router (the router which is sent this packet).
563
            10  :   RECEIVE_CTRL_WB_ADDR      // The NI reciever control register
564
            11  :   RECEIVE_MAX_BUFF_SIZ      // The receiver\'s  allocated buffer size in words. If the packet size is bigger tha the buffer size the rest of will be discarred
565
 
566
*/
567
 
568
 
569
 
570
#define ${IP}_STATUS1_REG   (*((volatile unsigned int *) ($BASE)))   //0
571
#define ${IP}_STATUS2_REG   (*((volatile unsigned int *) ($BASE+4)))   //1
572
#define ${IP}_BURST_SIZE_REG  (*((volatile unsigned int *) ($BASE+8))) //2
573
 
574
 
575
#define ${IP}_NUM_VCs   ${V}
576
 
577
#define ${IP}_SEND_DATA_SIZE_REG(v)  (*((volatile unsigned int *) ($BASE+12+(v<<6))))  //3
578
#define ${IP}_SEND_START_ADDR_REG(v)   (*((volatile unsigned int *) ($BASE+16+(v<<6))))  //4
579
#define ${IP}_SEND_DEST_REG(v)   (*((volatile unsigned int *) ($BASE+20+(v<<6)))) //5
580
#define ${IP}_SEND_CTRL_REG(v)    (*((volatile unsigned int *) ($BASE+24+(v<<6)))) //6
581
 
582
#define ${IP}_RECEIVE_DATA_SIZE_REG(v)  (*((volatile unsigned int *) ($BASE+28+(v<<6)))) //7
583
#define ${IP}_RECEIVE_STRT_ADDR_REG(v)   (*((volatile unsigned int *) ($BASE+32+(v<<6)))) //8
584
#define ${IP}_RECEIVE_CTRL_REG(v)    (*((volatile unsigned int *) ($BASE+36+(v<<6))))  //9
585
#define ${IP}_RECEIVE_MAX_BUFF_SIZ_REG(v)    (*((volatile unsigned int *) ($BASE+40+(v<<6)))) //10
586
#define ${IP}_RECEIVE_CRC_MATCH_REG(v)    (*((volatile unsigned int *) ($BASE+44+(v<<6)))) //11
587
 
588
 
589
 
590
// assign status1= {send_vc_is_busy,receive_vc_is_busy,receive_vc_packet_is_saved,receive_vc_got_packet};
591
// assign status2= {send_enable_binarry,receive_enable_binarry,crc_miss_match,got_pck_isr, save_done_isr,send_done_isr,got_pck_int_en, save_done_int_en,send_done_int_en};
592
 
593
 
594
#define ${IP}_got_packet(v)     ((${IP}_STATUS1_REG >> (v)) & 0x1)
595
#define ${IP}_packet_is_saved(v) ((${IP}_STATUS1_REG >> (${V}+v)) & 0x1)
596
#define ${IP}_receive_is_busy(v)        ((${IP}_STATUS1_REG >> (2*${V}+v)) & 0x1)
597
#define ${IP}_send_is_busy(v)   ((${IP}_STATUS1_REG >> (3*${V}+v)) & 0x1)
598
 
599
 
600
 
601
void ${IP}_initial (unsigned int burst_size) {
602
         ${IP}_BURST_SIZE_REG  =  burst_size;
603
}
604
 
605
 
606
void ${IP}_transfer (unsigned int v, unsigned int class_num, unsigned int data_start_addr,  unsigned int data_size, unsigned int dest_x,unsigned int dest_y){
607
         while (${IP}_send_is_busy(v)); // wait until VC is busy sending previous packet
608
 
609
        ${IP}_SEND_DATA_SIZE_REG(v)  = data_size;
610
        ${IP}_SEND_START_ADDR_REG(v)  = data_start_addr;
611
        ${IP}_SEND_DEST_REG(v)   = dest_x | (dest_y<<4)| (class_num<<8) ;
612
 
613
}
614
 
615
void ${IP}_receive (unsigned int v, unsigned int data_start_addr,  unsigned int max_buffer_size){
616
         while (${IP}_receive_is_busy(v)); // wait until VC is busy saving previous packet
617
 
618
        ${IP}_RECEIVE_STRT_ADDR_REG(v)  = data_start_addr;
619
        ${IP}_RECEIVE_MAX_BUFF_SIZ_REG(v) = max_buffer_size;
620
        ${IP}_RECEIVE_CTRL_REG(v)   = 1;
621
 
622
 
623
}',
624 38 alirezamon
                  'modules' => {
625
                                 'header_flit_generator' => {},
626
                                 'vc_wb_slave_registers' => {},
627
                                 'ni_vc_dma' => {},
628
                                 'ovc_status' => {},
629
                                 'ni_master' => {}
630
                               },
631
                  'version' => 38,
632
                  'parameters_order' => [
633
                                          'CLASS_HDR_WIDTH',
634
                                          'ROUTING_HDR_WIDTH',
635
                                          'DST_ADR_HDR_WIDTH',
636
                                          'SRC_ADR_HDR_WIDTH',
637
                                          'TOPOLOGY',
638
                                          'ROUTE_NAME',
639
                                          'NX',
640
                                          'NY',
641
                                          'C',
642
                                          'V',
643
                                          'B',
644
                                          'Fpay',
645
                                          'MAX_TRANSACTION_WIDTH',
646
                                          'MAX_BURST_SIZE',
647
                                          'DEBUG_EN',
648
                                          'Dw',
649
                                          'S_Aw',
650
                                          'M_Aw',
651
                                          'TAGw',
652
                                          'SELw',
653
                                          'Xw',
654
                                          'Yw',
655
                                          'Fw',
656
                                          'CRC_EN'
657
                                        ],
658
                  'unused' => {
659
                                'plug:wb_master[0]' => [
660
                                                         'dat_o',
661
                                                         'err_i',
662
                                                         'bte_o',
663
                                                         'rty_i',
664
                                                         'tag_o'
665
                                                       ],
666
                                'plug:wb_slave[0]' => [
667
                                                        'rty_o',
668
                                                        'bte_i',
669
                                                        'err_o',
670
                                                        'tag_i'
671
                                                      ],
672
                                'plug:wb_master[1]' => [
673
                                                         'err_i',
674
                                                         'bte_o',
675
                                                         'rty_i',
676
                                                         'dat_i',
677
                                                         'tag_o'
678
                                                       ]
679
                              },
680
                  'sockets' => {
681
                                 'ni' => {
682
                                           'value' => 1,
683
                                           'ni' => {},
684
                                           'type' => 'num',
685
                                           'connection_num' => 'single connection',
686
                                           '0' => {
687
                                                    'name' => 'ni'
688
                                                  }
689
                                         }
690
                               },
691
                  'module_name' => 'ni_master',
692
                  'ip_name' => 'ni_master'
693
                }, 'ip_gen' );

powered by: WebSVN 2.1.0

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