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

Subversion Repositories csa

[/] [csa/] [trunk/] [rtl/] [stream_byte.v] - Blame information for rev 36

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

Line No. Rev Author Line
1 20 simon111
 
2
 
3
// this module do a stream_byte opertion
4
 
5
 
6
module stream_byte(init,sb,
7
                                Ai,Bi,Di,Ei,Fi,Xi,Yi,Zi,pi,qi,ri,
8
                                Ao,Bo,Do,Eo,Fo,Xo,Yo,Zo,po,qo,ro,
9
                                op
10
                  );
11
input            init;
12
input [7     :0] sb;
13
 
14
input [10*4-1:0] Ai;
15
input [10*4-1:0] Bi;
16
input [3     :0] Di;
17
input [3     :0] Ei;
18
input [3     :0] Fi;
19
input [3     :0] Xi;
20
input [3     :0] Yi;
21
input [3     :0] Zi;
22
input            pi;
23
input            qi;
24
input            ri;
25
 
26
output [10*4-1:0] Ao;
27
output [10*4-1:0] Bo;
28
output [3     :0] Do;
29
output [3     :0] Eo;
30
output [3     :0] Fo;
31
output [3     :0] Xo;
32
output [3     :0] Yo;
33
output [3     :0] Zo;
34
output            po;
35
output            qo;
36
output            ro;
37
 
38
output[7     :0]  op;
39
 
40
// intermedate result;
41
wire [10*4-1:0] A1;
42
wire [10*4-1:0] B1;
43
wire [3     :0] D1;
44
wire [3     :0] E1;
45
wire [3     :0] F1;
46
wire [3     :0] X1;
47
wire [3     :0] Y1;
48
wire [3     :0] Z1;
49
wire            p1;
50
wire            q1;
51
 
52
wire [10*4-1:0] A2;
53
wire [10*4-1:0] B2;
54
wire [3     :0] D2;
55
wire [3     :0] E2;
56
wire [3     :0] F2;
57
wire [3     :0] X2;
58
wire [3     :0] Y2;
59
wire [3     :0] Z2;
60
wire            p2;
61
wire            q2;
62
 
63
wire [10*4-1:0] A3;
64
wire [10*4-1:0] B3;
65
wire [3     :0] D3;
66
wire [3     :0] E3;
67
wire [3     :0] F3;
68
wire [3     :0] X3;
69
wire [3     :0] Y3;
70
wire [3     :0] Z3;
71
wire            p3;
72
wire            q3;
73
wire [7     :0] _op;
74
 
75
wire [3     :0] in1;
76
wire [3     :0] in2;
77
 
78
assign in1 = sb[7:4];
79
assign in2 = sb[3:0];
80
 
81
stream_iteration  b1 (
82
                         .init(init)
83
                        ,.in1 (in2)
84
                        ,.in2 (in1)
85
                        ,.Ai  (Ai)
86
                        ,.Bi  (Bi)
87
                        ,.Di  (Di)
88
                        ,.Ei  (Ei)
89
                        ,.Fi  (Fi)
90
                        ,.Xi  (Xi)
91
                        ,.Yi  (Yi)
92
                        ,.Zi  (Zi)
93
                        ,.pi  (pi)
94
                        ,.qi  (qi)
95
                        ,.ri  (ri)
96
                        ,.Ao  (A1)
97
                        ,.Bo  (B1)
98
                        ,.Do  (D1)
99
                        ,.Eo  (E1)
100
                        ,.Fo  (F1)
101
                        ,.Xo  (X1)
102
                        ,.Yo  (Y1)
103
                        ,.Zo  (Z1)
104
                        ,.po  (p1)
105
                        ,.qo  (q1)
106
                        ,.ro  (r1)
107
                        ,.op  (_op[7:6])
108
                        );
109
 
110
stream_iteration  b2 (
111
                         .init(init)
112
                        ,.in1 (in1)
113
                        ,.in2 (in2)
114
                        ,.Ai  (A1)
115
                        ,.Bi  (B1)
116
                        ,.Di  (D1)
117
                        ,.Ei  (E1)
118
                        ,.Fi  (F1)
119
                        ,.Xi  (X1)
120
                        ,.Yi  (Y1)
121
                        ,.Zi  (Z1)
122
                        ,.pi  (p1)
123
                        ,.qi  (q1)
124
                        ,.ri  (r1)
125
                        ,.Ao  (A2)
126
                        ,.Bo  (B2)
127
                        ,.Do  (D2)
128
                        ,.Eo  (E2)
129
                        ,.Fo  (F2)
130
                        ,.Xo  (X2)
131
                        ,.Yo  (Y2)
132
                        ,.Zo  (Z2)
133
                        ,.po  (p2)
134
                        ,.qo  (q2)
135
                        ,.ro  (r2)
136
                        ,.op  (_op[5:4])
137
                        );
138
 
139
stream_iteration  b3 (
140
                         .init(init)
141
                        ,.in1 (in2)
142
                        ,.in2 (in1)
143
                        ,.Ai  (A2)
144
                        ,.Bi  (B2)
145
                        ,.Di  (D2)
146
                        ,.Ei  (E2)
147
                        ,.Fi  (F2)
148
                        ,.Xi  (X2)
149
                        ,.Yi  (Y2)
150
                        ,.Zi  (Z2)
151
                        ,.pi  (p2)
152
                        ,.qi  (q2)
153
                        ,.ri  (r2)
154
                        ,.Ao  (A3)
155
                        ,.Bo  (B3)
156
                        ,.Do  (D3)
157
                        ,.Eo  (E3)
158
                        ,.Fo  (F3)
159
                        ,.Xo  (X3)
160
                        ,.Yo  (Y3)
161
                        ,.Zo  (Z3)
162
                        ,.po  (p3)
163
                        ,.qo  (q3)
164
                        ,.ro  (r3)
165
                        ,.op  (_op[3:2])
166
                        );
167
 
168
stream_iteration  b4 (
169
                         .init(init)
170
                        ,.in1 (in1)
171
                        ,.in2 (in2)
172
                        ,.Ai  (A3)
173
                        ,.Bi  (B3)
174
                        ,.Di  (D3)
175
                        ,.Ei  (E3)
176
                        ,.Fi  (F3)
177
                        ,.Xi  (X3)
178
                        ,.Yi  (Y3)
179
                        ,.Zi  (Z3)
180
                        ,.pi  (p3)
181
                        ,.qi  (q3)
182
                        ,.ri  (r3)
183
                        ,.Ao  (Ao)
184
                        ,.Bo  (Bo)
185
                        ,.Do  (Do)
186
                        ,.Eo  (Eo)
187
                        ,.Fo  (Fo)
188
                        ,.Xo  (Xo)
189
                        ,.Yo  (Yo)
190
                        ,.Zo  (Zo)
191
                        ,.po  (po)
192
                        ,.qo  (qo)
193
                        ,.ro  (ro)
194
                        ,.op  (_op[1:0])
195
                        );
196
 
197
assign op=(init)?sb:_op;
198
endmodule

powered by: WebSVN 2.1.0

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