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

Subversion Repositories noc

[/] [noc/] [src/] [top.cc] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 imori
/*
2
 * =====================================================================================
3
 *
4
 *       Filename:  tile.cc
5
 *
6
 *    Description:
7
 *
8
 *        Version:  1.0
9
 *        Created:  04/08/2009 10:49:51 PM
10
 *       Revision:  none
11
 *       Compiler:  gcc
12
 *
13
 *         Author:  Soontea Kwon (), Kwonst@skku.edu
14
 *        Company:  Mobile Electronics Lab
15
 *
16
 * =====================================================================================
17
 */
18
#include "top.h"
19
 
20
void top :: rl_conn(tile *tile_l, tile *tile_r, sc_signal<bool> *fdata_out,
21
                                        sc_signal<bool> *fdata_in, sc_signal<sc_logic> *foi_in,
22
                                        sc_signal<sc_logic> *foi_out, sc_signal<bool> *fin_write_n,
23
                                        sc_signal<bool> *fout_write_n, sc_signal<sc_uint<3> > *fout_full,
24
                                        sc_signal<sc_uint<3> > *fin_full, sc_signal<sc_uint<2> > *fout_sel,
25
                                        sc_signal<sc_uint<2> > *fin_sel)
26
{
27
        tile_l->e_oi_out(*foi_out);
28
        tile_r->w_oi_in(*foi_out);
29
        tile_l->e_oi_in(*foi_in);
30
        tile_r->w_oi_out(*foi_in);
31
 
32
        tile_l->e_data_out(*fdata_out);
33
        tile_r->w_data_in(*fdata_out);
34
        tile_l->e_data_in(*fdata_in);
35
        tile_r->w_data_out(*fdata_in);
36
 
37
        tile_l->e_out_write_n(*fout_write_n);
38
        tile_r->w_in_write_n(*fout_write_n);
39
        tile_l->e_in_write_n(*fin_write_n);
40
        tile_r->w_out_write_n(*fin_write_n);
41
 
42
        tile_l->e_out_full(*fout_full);
43
        tile_r->w_in_full(*fout_full);
44
        tile_l->e_in_full(*fin_full);
45
        tile_r->w_out_full(*fin_full);
46
 
47
        tile_l->e_out_sel(*fout_sel);
48
        tile_r->w_in_sel(*fout_sel);
49
        tile_l->e_in_sel(*fin_sel);
50
        tile_r->w_out_sel(*fin_sel);
51
}
52
 
53
void top :: ud_conn(tile *tile_u, tile *tile_d, sc_signal<bool> *fdata_out,
54
                                        sc_signal<bool> *fdata_in, sc_signal<sc_logic> *foi_in,
55
                                        sc_signal<sc_logic> *foi_out, sc_signal<bool> *fin_write_n,
56
                                        sc_signal<bool> *fout_write_n, sc_signal<sc_uint<3> > *fout_full,
57
                                        sc_signal<sc_uint<3> > *fin_full, sc_signal<sc_uint<2> > *fout_sel,
58
                                        sc_signal<sc_uint<2> > *fin_sel)
59
{
60
        tile_u->s_oi_out(*foi_out);
61
        tile_d->n_oi_in(*foi_out);
62
        tile_u->s_oi_in(*foi_in);
63
        tile_d->n_oi_out(*foi_in);
64
 
65
        tile_u->s_data_out(*fdata_out);
66
        tile_d->n_data_in(*fdata_out);
67
        tile_u->s_data_in(*fdata_in);
68
        tile_d->n_data_out(*fdata_in);
69
 
70
        tile_u->s_out_write_n(*fout_write_n);
71
        tile_d->n_in_write_n(*fout_write_n);
72
        tile_u->s_in_write_n(*fin_write_n);
73
        tile_d->n_out_write_n(*fin_write_n);
74
 
75
        tile_u->s_out_full(*fout_full);
76
        tile_d->n_in_full(*fout_full);
77
        tile_u->s_in_full(*fin_full);
78
        tile_d->n_out_full(*fin_full);
79
 
80
        tile_u->s_out_sel(*fout_sel);
81
        tile_d->n_in_sel(*fout_sel);
82
        tile_u->s_in_sel(*fin_sel);
83
        tile_d->n_out_sel(*fin_sel);
84
}
85
 
86
void top :: north_disable(tile *tile, sc_signal<bool> *fdata_out,
87
                                        sc_signal<bool> *fdata_in, sc_signal<sc_logic> *foi_in,
88
                                        sc_signal<sc_logic> *foi_out, sc_signal<bool> *fin_write_n,
89
                                        sc_signal<bool> *fout_write_n, sc_signal<sc_uint<3> > *fout_full,
90
                                        sc_signal<sc_uint<3> > *fin_full, sc_signal<sc_uint<2> > *fout_sel,
91
                                        sc_signal<sc_uint<2> > *fin_sel)
92
{
93
        tile->n_oi_out(*foi_out);
94
        tile->n_oi_in(*foi_in);
95
 
96
        tile->n_data_out(*fdata_out);
97
        tile->n_data_in(*fdata_in);
98
        tile->n_out_write_n(*fout_write_n);
99
        tile->n_in_write_n(*fin_write_n);
100
        tile->n_out_full(*fout_full);
101
        tile->n_in_full(*fin_full);
102
        tile->n_out_sel(*fout_sel);
103
        tile->n_in_sel(*fin_sel);
104
}
105
 
106
void top ::south_disable(tile *tile,sc_signal<bool> *fdata_out,
107
                                        sc_signal<bool> *fdata_in,  sc_signal<sc_logic> *foi_in,
108
                                        sc_signal<sc_logic> *foi_out, sc_signal<bool> *fin_write_n,
109
                                        sc_signal<bool> *fout_write_n, sc_signal<sc_uint<3> > *fout_full,
110
                                        sc_signal<sc_uint<3> > *fin_full, sc_signal<sc_uint<2> > *fout_sel,
111
                                        sc_signal<sc_uint<2> > *fin_sel )
112
{
113
        tile->s_oi_out(*foi_out);
114
        tile->s_oi_in(*foi_in);
115
 
116
        tile->s_data_out(*fdata_out);
117
        tile->s_data_in(*fdata_in);
118
        tile->s_out_write_n(*fout_write_n);
119
        tile->s_in_write_n(*fin_write_n);
120
        tile->s_out_full(*fout_full);
121
        tile->s_in_full(*fin_full);
122
        tile->s_out_sel(*fout_sel);
123
        tile->s_in_sel(*fin_sel);
124
 
125
}
126
 
127
void top ::east_disable(tile *tile, sc_signal<bool> *fdata_out,
128
                                        sc_signal<bool> *fdata_in,  sc_signal<sc_logic> *foi_in,
129
                                        sc_signal<sc_logic> *foi_out, sc_signal<bool> *fin_write_n,
130
                                        sc_signal<bool> *fout_write_n, sc_signal<sc_uint<3> > *fout_full,
131
                                        sc_signal<sc_uint<3> > *fin_full, sc_signal<sc_uint<2> > *fout_sel,
132
                                        sc_signal<sc_uint<2> > *fin_sel)
133
{
134
        tile->e_oi_out(*foi_out);
135
        tile->e_oi_in(*foi_in);
136
 
137
        tile->e_data_out(*fdata_out);
138
        tile->e_data_in(*fdata_in);
139
        tile->e_out_write_n(*fout_write_n);
140
        tile->e_in_write_n(*fin_write_n);
141
        tile->e_out_full(*fout_full);
142
        tile->e_in_full(*fin_full);
143
        tile->e_out_sel(*fout_sel);
144
        tile->e_in_sel(*fin_sel);
145
}
146
 
147
void top ::west_disable(tile *tile, sc_signal<bool> *fdata_out,
148
                                        sc_signal<bool> *fdata_in,  sc_signal<sc_logic> *foi_in,
149
                                        sc_signal<sc_logic> *foi_out, sc_signal<bool> *fin_write_n,
150
                                        sc_signal<bool> *fout_write_n, sc_signal<sc_uint<3> > *fout_full,
151
                                        sc_signal<sc_uint<3> > *fin_full, sc_signal<sc_uint<2> > *fout_sel,
152
                                        sc_signal<sc_uint<2> > *fin_sel)
153
{
154
        tile->w_oi_out(*foi_out);
155
        tile->w_oi_in(*foi_in);
156
 
157
        tile->w_data_out(*fdata_out);
158
        tile->w_data_in(*fdata_in);
159
        tile->w_out_write_n(*fout_write_n);
160
        tile->w_in_write_n(*fin_write_n);
161
        tile->w_out_full(*fout_full);
162
        tile->w_in_full(*fin_full);
163
        tile->w_out_sel(*fout_sel);
164
        tile->w_in_sel(*fin_sel);
165
}

powered by: WebSVN 2.1.0

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