yowasp-yosys 0.35.0.0.post605__py3-none-any.whl → 0.36.0.8.post623.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yowasp_yosys/share/cmp2softlogic.v +117 -0
- yowasp_yosys/share/include/backends/cxxrtl/{cxxrtl_capi.cc → runtime/cxxrtl/capi/cxxrtl_capi.cc} +3 -3
- yowasp_yosys/share/include/backends/cxxrtl/{cxxrtl_vcd_capi.cc → runtime/cxxrtl/capi/cxxrtl_capi_vcd.cc} +3 -3
- yowasp_yosys/share/include/backends/cxxrtl/{cxxrtl_vcd_capi.h → runtime/cxxrtl/capi/cxxrtl_capi_vcd.h} +3 -3
- yowasp_yosys/share/include/backends/cxxrtl/{cxxrtl.h → runtime/cxxrtl/cxxrtl.h} +2 -1
- yowasp_yosys/share/include/backends/cxxrtl/{cxxrtl_vcd.h → runtime/cxxrtl/cxxrtl_vcd.h} +1 -1
- yowasp_yosys/share/include/kernel/rtlil.h +3 -0
- yowasp_yosys/share/nexus/brams_map.v +6 -6
- yowasp_yosys/share/python3/ywio.py +8 -2
- yowasp_yosys/share/quicklogic/{pp3_cells_sim.v → pp3/cells_sim.v} +77 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/TDP18K_FIFO.v +344 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/arith_map.v +99 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/bram_types_sim.v +74035 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/brams_map.v +4288 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/brams_sim.v +10949 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/cells_sim.v +375 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/dsp_final_map.v +265 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/dsp_map.v +102 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/dsp_sim.v +4527 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/ffs_map.v +133 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/libmap_brams.txt +22 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/libmap_brams_map.v +483 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/sram1024x18_mem.v +64 -0
- yowasp_yosys/share/quicklogic/qlf_k6n10f/ufifo_ctl.v +620 -0
- yowasp_yosys/smtbmc.py +99 -55
- yowasp_yosys/witness.py +16 -7
- yowasp_yosys/yosys.wasm +0 -0
- yowasp_yosys/ywio.py +8 -2
- {yowasp_yosys-0.35.0.0.post605.dist-info → yowasp_yosys-0.36.0.8.post623.dev0.dist-info}/METADATA +12 -12
- {yowasp_yosys-0.35.0.0.post605.dist-info → yowasp_yosys-0.36.0.8.post623.dev0.dist-info}/RECORD +42 -28
- {yowasp_yosys-0.35.0.0.post605.dist-info → yowasp_yosys-0.36.0.8.post623.dev0.dist-info}/WHEEL +1 -1
- yowasp_yosys/share/quicklogic/lut_sim.v +0 -76
- /yowasp_yosys/share/include/backends/cxxrtl/{cxxrtl_capi.h → runtime/cxxrtl/capi/cxxrtl_capi.h} +0 -0
- /yowasp_yosys/share/quicklogic/{cells_sim.v → common/cells_sim.v} +0 -0
- /yowasp_yosys/share/quicklogic/{abc9_map.v → pp3/abc9_map.v} +0 -0
- /yowasp_yosys/share/quicklogic/{abc9_model.v → pp3/abc9_model.v} +0 -0
- /yowasp_yosys/share/quicklogic/{abc9_unmap.v → pp3/abc9_unmap.v} +0 -0
- /yowasp_yosys/share/quicklogic/{pp3_cells_map.v → pp3/cells_map.v} +0 -0
- /yowasp_yosys/share/quicklogic/{pp3_ffs_map.v → pp3/ffs_map.v} +0 -0
- /yowasp_yosys/share/quicklogic/{pp3_latches_map.v → pp3/latches_map.v} +0 -0
- /yowasp_yosys/share/quicklogic/{pp3_lut_map.v → pp3/lut_map.v} +0 -0
- {yowasp_yosys-0.35.0.0.post605.dist-info → yowasp_yosys-0.36.0.8.post623.dev0.dist-info}/entry_points.txt +0 -0
- {yowasp_yosys-0.35.0.0.post605.dist-info → yowasp_yosys-0.36.0.8.post623.dev0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
// Copyright 2020-2022 F4PGA Authors
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
|
|
17
|
+
`timescale 1ps/1ps
|
|
18
|
+
|
|
19
|
+
`default_nettype none
|
|
20
|
+
(* abc9_lut=1 *)
|
|
21
|
+
module LUT1(output wire O, input wire I0);
|
|
22
|
+
parameter [1:0] INIT = 0;
|
|
23
|
+
assign O = I0 ? INIT[1] : INIT[0];
|
|
24
|
+
specify
|
|
25
|
+
(I0 => O) = 74;
|
|
26
|
+
endspecify
|
|
27
|
+
endmodule
|
|
28
|
+
|
|
29
|
+
(* abc9_lut=2 *)
|
|
30
|
+
module LUT2(output wire O, input wire I0, I1);
|
|
31
|
+
parameter [3:0] INIT = 0;
|
|
32
|
+
wire [ 1: 0] s1 = I1 ? INIT[ 3: 2] : INIT[ 1: 0];
|
|
33
|
+
assign O = I0 ? s1[1] : s1[0];
|
|
34
|
+
specify
|
|
35
|
+
(I0 => O) = 116;
|
|
36
|
+
(I1 => O) = 74;
|
|
37
|
+
endspecify
|
|
38
|
+
endmodule
|
|
39
|
+
|
|
40
|
+
(* abc9_lut=3 *)
|
|
41
|
+
module LUT3(output wire O, input wire I0, I1, I2);
|
|
42
|
+
parameter [7:0] INIT = 0;
|
|
43
|
+
wire [ 3: 0] s2 = I2 ? INIT[ 7: 4] : INIT[ 3: 0];
|
|
44
|
+
wire [ 1: 0] s1 = I1 ? s2[ 3: 2] : s2[ 1: 0];
|
|
45
|
+
assign O = I0 ? s1[1] : s1[0];
|
|
46
|
+
specify
|
|
47
|
+
(I0 => O) = 162;
|
|
48
|
+
(I1 => O) = 116;
|
|
49
|
+
(I2 => O) = 174;
|
|
50
|
+
endspecify
|
|
51
|
+
endmodule
|
|
52
|
+
|
|
53
|
+
(* abc9_lut=3 *)
|
|
54
|
+
module LUT4(output wire O, input wire I0, I1, I2, I3);
|
|
55
|
+
parameter [15:0] INIT = 0;
|
|
56
|
+
wire [ 7: 0] s3 = I3 ? INIT[15: 8] : INIT[ 7: 0];
|
|
57
|
+
wire [ 3: 0] s2 = I2 ? s3[ 7: 4] : s3[ 3: 0];
|
|
58
|
+
wire [ 1: 0] s1 = I1 ? s2[ 3: 2] : s2[ 1: 0];
|
|
59
|
+
assign O = I0 ? s1[1] : s1[0];
|
|
60
|
+
specify
|
|
61
|
+
(I0 => O) = 201;
|
|
62
|
+
(I1 => O) = 162;
|
|
63
|
+
(I2 => O) = 116;
|
|
64
|
+
(I3 => O) = 74;
|
|
65
|
+
endspecify
|
|
66
|
+
endmodule
|
|
67
|
+
|
|
68
|
+
(* abc9_lut=3 *)
|
|
69
|
+
module LUT5(output wire O, input wire I0, I1, I2, I3, I4);
|
|
70
|
+
parameter [31:0] INIT = 0;
|
|
71
|
+
wire [15: 0] s4 = I4 ? INIT[31:16] : INIT[15: 0];
|
|
72
|
+
wire [ 7: 0] s3 = I3 ? s4[15: 8] : s4[ 7: 0];
|
|
73
|
+
wire [ 3: 0] s2 = I2 ? s3[ 7: 4] : s3[ 3: 0];
|
|
74
|
+
wire [ 1: 0] s1 = I1 ? s2[ 3: 2] : s2[ 1: 0];
|
|
75
|
+
assign O = I0 ? s1[1] : s1[0];
|
|
76
|
+
specify
|
|
77
|
+
(I0 => O) = 228;
|
|
78
|
+
(I1 => O) = 189;
|
|
79
|
+
(I2 => O) = 143;
|
|
80
|
+
(I3 => O) = 100;
|
|
81
|
+
(I4 => O) = 55;
|
|
82
|
+
endspecify
|
|
83
|
+
endmodule
|
|
84
|
+
|
|
85
|
+
(* abc9_lut=5 *)
|
|
86
|
+
module LUT6(output wire O, input wire I0, I1, I2, I3, I4, I5);
|
|
87
|
+
parameter [63:0] INIT = 0;
|
|
88
|
+
wire [31: 0] s5 = I5 ? INIT[63:32] : INIT[31: 0];
|
|
89
|
+
wire [15: 0] s4 = I4 ? s5[31:16] : s5[15: 0];
|
|
90
|
+
wire [ 7: 0] s3 = I3 ? s4[15: 8] : s4[ 7: 0];
|
|
91
|
+
wire [ 3: 0] s2 = I2 ? s3[ 7: 4] : s3[ 3: 0];
|
|
92
|
+
wire [ 1: 0] s1 = I1 ? s2[ 3: 2] : s2[ 1: 0];
|
|
93
|
+
assign O = I0 ? s1[1] : s1[0];
|
|
94
|
+
specify
|
|
95
|
+
(I0 => O) = 251;
|
|
96
|
+
(I1 => O) = 212;
|
|
97
|
+
(I2 => O) = 166;
|
|
98
|
+
(I3 => O) = 123;
|
|
99
|
+
(I4 => O) = 77;
|
|
100
|
+
(I5 => O) = 43;
|
|
101
|
+
endspecify
|
|
102
|
+
endmodule
|
|
103
|
+
|
|
104
|
+
(* abc9_flop, lib_whitebox *)
|
|
105
|
+
module sh_dff(
|
|
106
|
+
output reg Q,
|
|
107
|
+
input wire D,
|
|
108
|
+
(* clkbuf_sink *)
|
|
109
|
+
input wire C
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
initial Q = 1'b0;
|
|
113
|
+
always @(posedge C)
|
|
114
|
+
Q <= D;
|
|
115
|
+
|
|
116
|
+
specify
|
|
117
|
+
(posedge C => (Q +: D)) = 0;
|
|
118
|
+
$setuphold(posedge C, D, 0, 0);
|
|
119
|
+
endspecify
|
|
120
|
+
|
|
121
|
+
endmodule
|
|
122
|
+
|
|
123
|
+
(* abc9_box, lib_whitebox *)
|
|
124
|
+
(* keep *)
|
|
125
|
+
module adder_carry(
|
|
126
|
+
output wire sumout,
|
|
127
|
+
(* abc9_carry *)
|
|
128
|
+
output wire cout,
|
|
129
|
+
input wire p,
|
|
130
|
+
input wire g,
|
|
131
|
+
(* abc9_carry *)
|
|
132
|
+
input wire cin
|
|
133
|
+
);
|
|
134
|
+
assign sumout = p ^ cin;
|
|
135
|
+
assign cout = p ? cin : g;
|
|
136
|
+
|
|
137
|
+
specify
|
|
138
|
+
(p => sumout) = 35;
|
|
139
|
+
(g => sumout) = 35;
|
|
140
|
+
(cin => sumout) = 40;
|
|
141
|
+
(p => cout) = 67;
|
|
142
|
+
(g => cout) = 65;
|
|
143
|
+
(cin => cout) = 69;
|
|
144
|
+
endspecify
|
|
145
|
+
|
|
146
|
+
endmodule
|
|
147
|
+
|
|
148
|
+
(* abc9_flop, lib_whitebox *)
|
|
149
|
+
module dff(
|
|
150
|
+
output reg Q,
|
|
151
|
+
input wire D,
|
|
152
|
+
(* clkbuf_sink *)
|
|
153
|
+
input wire C
|
|
154
|
+
);
|
|
155
|
+
initial Q = 1'b0;
|
|
156
|
+
|
|
157
|
+
always @(posedge C)
|
|
158
|
+
Q <= D;
|
|
159
|
+
|
|
160
|
+
specify
|
|
161
|
+
(posedge C=>(Q+:D)) = 285;
|
|
162
|
+
$setuphold(posedge C, D, 56, 0);
|
|
163
|
+
endspecify
|
|
164
|
+
|
|
165
|
+
endmodule
|
|
166
|
+
|
|
167
|
+
(* abc9_flop, lib_whitebox *)
|
|
168
|
+
module dffn(
|
|
169
|
+
output reg Q,
|
|
170
|
+
input wire D,
|
|
171
|
+
(* clkbuf_sink *)
|
|
172
|
+
input wire C
|
|
173
|
+
);
|
|
174
|
+
initial Q = 1'b0;
|
|
175
|
+
|
|
176
|
+
always @(negedge C)
|
|
177
|
+
Q <= D;
|
|
178
|
+
|
|
179
|
+
specify
|
|
180
|
+
(negedge C=>(Q+:D)) = 285;
|
|
181
|
+
$setuphold(negedge C, D, 56, 0);
|
|
182
|
+
endspecify
|
|
183
|
+
|
|
184
|
+
endmodule
|
|
185
|
+
|
|
186
|
+
(* abc9_flop, lib_whitebox *)
|
|
187
|
+
module dffsre(
|
|
188
|
+
output reg Q,
|
|
189
|
+
input wire D,
|
|
190
|
+
(* clkbuf_sink *)
|
|
191
|
+
input wire C,
|
|
192
|
+
input wire E,
|
|
193
|
+
input wire R,
|
|
194
|
+
input wire S
|
|
195
|
+
);
|
|
196
|
+
initial Q = 1'b0;
|
|
197
|
+
|
|
198
|
+
always @(posedge C or negedge S or negedge R)
|
|
199
|
+
if (!R)
|
|
200
|
+
Q <= 1'b0;
|
|
201
|
+
else if (!S)
|
|
202
|
+
Q <= 1'b1;
|
|
203
|
+
else if (E)
|
|
204
|
+
Q <= D;
|
|
205
|
+
|
|
206
|
+
specify
|
|
207
|
+
(posedge C => (Q +: D)) = 280;
|
|
208
|
+
(R => Q) = 0;
|
|
209
|
+
(S => Q) = 0;
|
|
210
|
+
$setuphold(posedge C, D, 56, 0);
|
|
211
|
+
$setuphold(posedge C, E, 32, 0);
|
|
212
|
+
$setuphold(posedge C, R, 0, 0);
|
|
213
|
+
$setuphold(posedge C, S, 0, 0);
|
|
214
|
+
$recrem(posedge R, posedge C, 0, 0);
|
|
215
|
+
$recrem(posedge S, posedge C, 0, 0);
|
|
216
|
+
endspecify
|
|
217
|
+
|
|
218
|
+
endmodule
|
|
219
|
+
|
|
220
|
+
(* abc9_flop, lib_whitebox *)
|
|
221
|
+
module dffnsre(
|
|
222
|
+
output reg Q,
|
|
223
|
+
input wire D,
|
|
224
|
+
(* clkbuf_sink *)
|
|
225
|
+
input wire C,
|
|
226
|
+
input wire E,
|
|
227
|
+
input wire R,
|
|
228
|
+
input wire S
|
|
229
|
+
);
|
|
230
|
+
initial Q = 1'b0;
|
|
231
|
+
|
|
232
|
+
always @(negedge C or negedge S or negedge R)
|
|
233
|
+
if (!R)
|
|
234
|
+
Q <= 1'b0;
|
|
235
|
+
else if (!S)
|
|
236
|
+
Q <= 1'b1;
|
|
237
|
+
else if (E)
|
|
238
|
+
Q <= D;
|
|
239
|
+
|
|
240
|
+
specify
|
|
241
|
+
(negedge C => (Q +: D)) = 280;
|
|
242
|
+
(R => Q) = 0;
|
|
243
|
+
(S => Q) = 0;
|
|
244
|
+
$setuphold(negedge C, D, 56, 0);
|
|
245
|
+
$setuphold(negedge C, E, 32, 0);
|
|
246
|
+
$setuphold(negedge C, R, 0, 0);
|
|
247
|
+
$setuphold(negedge C, S, 0, 0);
|
|
248
|
+
$recrem(posedge R, negedge C, 0, 0);
|
|
249
|
+
$recrem(posedge S, negedge C, 0, 0);
|
|
250
|
+
endspecify
|
|
251
|
+
|
|
252
|
+
endmodule
|
|
253
|
+
|
|
254
|
+
(* abc9_flop, lib_whitebox *)
|
|
255
|
+
module sdffsre(
|
|
256
|
+
output reg Q,
|
|
257
|
+
input wire D,
|
|
258
|
+
(* clkbuf_sink *)
|
|
259
|
+
input wire C,
|
|
260
|
+
input wire E,
|
|
261
|
+
input wire R,
|
|
262
|
+
input wire S
|
|
263
|
+
);
|
|
264
|
+
initial Q = 1'b0;
|
|
265
|
+
|
|
266
|
+
always @(posedge C)
|
|
267
|
+
if (!R)
|
|
268
|
+
Q <= 1'b0;
|
|
269
|
+
else if (!S)
|
|
270
|
+
Q <= 1'b1;
|
|
271
|
+
else if (E)
|
|
272
|
+
Q <= D;
|
|
273
|
+
|
|
274
|
+
specify
|
|
275
|
+
(posedge C => (Q +: D)) = 280;
|
|
276
|
+
$setuphold(posedge C, D, 56, 0);
|
|
277
|
+
$setuphold(posedge C, R, 32, 0);
|
|
278
|
+
$setuphold(posedge C, S, 0, 0);
|
|
279
|
+
$setuphold(posedge C, E, 0, 0);
|
|
280
|
+
endspecify
|
|
281
|
+
|
|
282
|
+
endmodule
|
|
283
|
+
|
|
284
|
+
(* abc9_flop, lib_whitebox *)
|
|
285
|
+
module sdffnsre(
|
|
286
|
+
output reg Q,
|
|
287
|
+
input wire D,
|
|
288
|
+
(* clkbuf_sink *)
|
|
289
|
+
input wire C,
|
|
290
|
+
input wire E,
|
|
291
|
+
input wire R,
|
|
292
|
+
input wire S
|
|
293
|
+
);
|
|
294
|
+
initial Q = 1'b0;
|
|
295
|
+
|
|
296
|
+
always @(negedge C)
|
|
297
|
+
if (!R)
|
|
298
|
+
Q <= 1'b0;
|
|
299
|
+
else if (!S)
|
|
300
|
+
Q <= 1'b1;
|
|
301
|
+
else if (E)
|
|
302
|
+
Q <= D;
|
|
303
|
+
|
|
304
|
+
specify
|
|
305
|
+
(negedge C => (Q +: D)) = 280;
|
|
306
|
+
$setuphold(negedge C, D, 56, 0);
|
|
307
|
+
$setuphold(negedge C, R, 32, 0);
|
|
308
|
+
$setuphold(negedge C, S, 0, 0);
|
|
309
|
+
$setuphold(negedge C, E, 0, 0);
|
|
310
|
+
endspecify
|
|
311
|
+
|
|
312
|
+
endmodule
|
|
313
|
+
|
|
314
|
+
(* abc9_flop, lib_whitebox *)
|
|
315
|
+
module latchsre (
|
|
316
|
+
output reg Q,
|
|
317
|
+
input wire S,
|
|
318
|
+
input wire R,
|
|
319
|
+
input wire D,
|
|
320
|
+
input wire G,
|
|
321
|
+
input wire E
|
|
322
|
+
);
|
|
323
|
+
initial Q = 1'b0;
|
|
324
|
+
|
|
325
|
+
always @*
|
|
326
|
+
begin
|
|
327
|
+
if (!R)
|
|
328
|
+
Q <= 1'b0;
|
|
329
|
+
else if (!S)
|
|
330
|
+
Q <= 1'b1;
|
|
331
|
+
else if (E && G)
|
|
332
|
+
Q <= D;
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
specify
|
|
336
|
+
(posedge G => (Q +: D)) = 0;
|
|
337
|
+
$setuphold(posedge G, D, 0, 0);
|
|
338
|
+
$setuphold(posedge G, E, 0, 0);
|
|
339
|
+
$setuphold(posedge G, R, 0, 0);
|
|
340
|
+
$setuphold(posedge G, S, 0, 0);
|
|
341
|
+
endspecify
|
|
342
|
+
|
|
343
|
+
endmodule
|
|
344
|
+
|
|
345
|
+
(* abc9_flop, lib_whitebox *)
|
|
346
|
+
module latchnsre (
|
|
347
|
+
output reg Q,
|
|
348
|
+
input wire S,
|
|
349
|
+
input wire R,
|
|
350
|
+
input wire D,
|
|
351
|
+
input wire G,
|
|
352
|
+
input wire E
|
|
353
|
+
);
|
|
354
|
+
initial Q = 1'b0;
|
|
355
|
+
|
|
356
|
+
always @*
|
|
357
|
+
begin
|
|
358
|
+
if (!R)
|
|
359
|
+
Q <= 1'b0;
|
|
360
|
+
else if (!S)
|
|
361
|
+
Q <= 1'b1;
|
|
362
|
+
else if (E && !G)
|
|
363
|
+
Q <= D;
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
specify
|
|
367
|
+
(negedge G => (Q +: D)) = 0;
|
|
368
|
+
$setuphold(negedge G, D, 0, 0);
|
|
369
|
+
$setuphold(negedge G, E, 0, 0);
|
|
370
|
+
$setuphold(negedge G, R, 0, 0);
|
|
371
|
+
$setuphold(negedge G, S, 0, 0);
|
|
372
|
+
endspecify
|
|
373
|
+
|
|
374
|
+
endmodule
|
|
375
|
+
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// Copyright 2020-2022 F4PGA Authors
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
|
|
17
|
+
module dsp_t1_20x18x64_cfg_ports (
|
|
18
|
+
input [19:0] a_i,
|
|
19
|
+
input [17:0] b_i,
|
|
20
|
+
input [ 5:0] acc_fir_i,
|
|
21
|
+
output [37:0] z_o,
|
|
22
|
+
output [17:0] dly_b_o,
|
|
23
|
+
|
|
24
|
+
input clock_i,
|
|
25
|
+
input reset_i,
|
|
26
|
+
|
|
27
|
+
input [2:0] feedback_i,
|
|
28
|
+
input load_acc_i,
|
|
29
|
+
input unsigned_a_i,
|
|
30
|
+
input unsigned_b_i,
|
|
31
|
+
|
|
32
|
+
input [2:0] output_select_i,
|
|
33
|
+
input saturate_enable_i,
|
|
34
|
+
input [5:0] shift_right_i,
|
|
35
|
+
input round_i,
|
|
36
|
+
input subtract_i,
|
|
37
|
+
input register_inputs_i
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
parameter [19:0] COEFF_0 = 20'd0;
|
|
41
|
+
parameter [19:0] COEFF_1 = 20'd0;
|
|
42
|
+
parameter [19:0] COEFF_2 = 20'd0;
|
|
43
|
+
parameter [19:0] COEFF_3 = 20'd0;
|
|
44
|
+
|
|
45
|
+
QL_DSP2 # (
|
|
46
|
+
.MODE_BITS ({COEFF_3, COEFF_2, COEFF_1, COEFF_0})
|
|
47
|
+
) _TECHMAP_REPLACE_ (
|
|
48
|
+
.a (a_i),
|
|
49
|
+
.b (b_i),
|
|
50
|
+
.acc_fir (acc_fir_i),
|
|
51
|
+
.z (z_o),
|
|
52
|
+
.dly_b (dly_b_o),
|
|
53
|
+
|
|
54
|
+
.clk (clock_i),
|
|
55
|
+
.reset (reset_i),
|
|
56
|
+
|
|
57
|
+
.feedback (feedback_i),
|
|
58
|
+
.load_acc (load_acc_i),
|
|
59
|
+
.unsigned_a (unsigned_a_i),
|
|
60
|
+
.unsigned_b (unsigned_b_i),
|
|
61
|
+
|
|
62
|
+
.f_mode (1'b0), // No fracturation
|
|
63
|
+
.output_select (output_select_i),
|
|
64
|
+
.saturate_enable (saturate_enable_i),
|
|
65
|
+
.shift_right (shift_right_i),
|
|
66
|
+
.round (round_i),
|
|
67
|
+
.subtract (subtract_i),
|
|
68
|
+
.register_inputs (register_inputs_i)
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
endmodule
|
|
72
|
+
|
|
73
|
+
module dsp_t1_10x9x32_cfg_ports (
|
|
74
|
+
input [ 9:0] a_i,
|
|
75
|
+
input [ 8:0] b_i,
|
|
76
|
+
input [ 5:0] acc_fir_i,
|
|
77
|
+
output [18:0] z_o,
|
|
78
|
+
output [ 8:0] dly_b_o,
|
|
79
|
+
|
|
80
|
+
(* clkbuf_sink *)
|
|
81
|
+
input clock_i,
|
|
82
|
+
input reset_i,
|
|
83
|
+
|
|
84
|
+
input [2:0] feedback_i,
|
|
85
|
+
input load_acc_i,
|
|
86
|
+
input unsigned_a_i,
|
|
87
|
+
input unsigned_b_i,
|
|
88
|
+
|
|
89
|
+
input [2:0] output_select_i,
|
|
90
|
+
input saturate_enable_i,
|
|
91
|
+
input [5:0] shift_right_i,
|
|
92
|
+
input round_i,
|
|
93
|
+
input subtract_i,
|
|
94
|
+
input register_inputs_i
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
parameter [9:0] COEFF_0 = 10'd0;
|
|
98
|
+
parameter [9:0] COEFF_1 = 10'd0;
|
|
99
|
+
parameter [9:0] COEFF_2 = 10'd0;
|
|
100
|
+
parameter [9:0] COEFF_3 = 10'd0;
|
|
101
|
+
|
|
102
|
+
wire [37:0] z;
|
|
103
|
+
wire [17:0] dly_b;
|
|
104
|
+
|
|
105
|
+
QL_DSP2 # (
|
|
106
|
+
.MODE_BITS ({10'd0, COEFF_3,
|
|
107
|
+
10'd0, COEFF_2,
|
|
108
|
+
10'd0, COEFF_1,
|
|
109
|
+
10'd0, COEFF_0})
|
|
110
|
+
) _TECHMAP_REPLACE_ (
|
|
111
|
+
.a ({10'd0, a_i}),
|
|
112
|
+
.b ({ 9'd0, b_i}),
|
|
113
|
+
.acc_fir (acc_fir_i),
|
|
114
|
+
.z (z),
|
|
115
|
+
.dly_b (dly_b),
|
|
116
|
+
|
|
117
|
+
.clk (clock_i),
|
|
118
|
+
.reset (reset_i),
|
|
119
|
+
|
|
120
|
+
.feedback (feedback_i),
|
|
121
|
+
.load_acc (load_acc_i),
|
|
122
|
+
.unsigned_a (unsigned_a_i),
|
|
123
|
+
.unsigned_b (unsigned_b_i),
|
|
124
|
+
|
|
125
|
+
.f_mode (1'b1), // Enable fractuation, Use the lower half
|
|
126
|
+
.output_select (output_select_i),
|
|
127
|
+
.saturate_enable (saturate_enable_i),
|
|
128
|
+
.shift_right (shift_right_i),
|
|
129
|
+
.round (round_i),
|
|
130
|
+
.subtract (subtract_i),
|
|
131
|
+
.register_inputs (register_inputs_i)
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
assign z_o = z[18:0];
|
|
135
|
+
assign dly_b_o = dly_b_o[8:0];
|
|
136
|
+
|
|
137
|
+
endmodule
|
|
138
|
+
|
|
139
|
+
module dsp_t1_20x18x64_cfg_params (
|
|
140
|
+
input [19:0] a_i,
|
|
141
|
+
input [17:0] b_i,
|
|
142
|
+
input [ 5:0] acc_fir_i,
|
|
143
|
+
output [37:0] z_o,
|
|
144
|
+
output [17:0] dly_b_o,
|
|
145
|
+
|
|
146
|
+
input clock_i,
|
|
147
|
+
input reset_i,
|
|
148
|
+
|
|
149
|
+
input [2:0] feedback_i,
|
|
150
|
+
input load_acc_i,
|
|
151
|
+
input unsigned_a_i,
|
|
152
|
+
input unsigned_b_i,
|
|
153
|
+
input subtract_i
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
parameter [19:0] COEFF_0 = 20'd0;
|
|
157
|
+
parameter [19:0] COEFF_1 = 20'd0;
|
|
158
|
+
parameter [19:0] COEFF_2 = 20'd0;
|
|
159
|
+
parameter [19:0] COEFF_3 = 20'd0;
|
|
160
|
+
|
|
161
|
+
parameter [2:0] OUTPUT_SELECT = 3'd0;
|
|
162
|
+
parameter [0:0] SATURATE_ENABLE = 1'd0;
|
|
163
|
+
parameter [5:0] SHIFT_RIGHT = 6'd0;
|
|
164
|
+
parameter [0:0] ROUND = 1'd0;
|
|
165
|
+
parameter [0:0] REGISTER_INPUTS = 1'd0;
|
|
166
|
+
|
|
167
|
+
QL_DSP3 # (
|
|
168
|
+
.MODE_BITS ({
|
|
169
|
+
REGISTER_INPUTS,
|
|
170
|
+
ROUND,
|
|
171
|
+
SHIFT_RIGHT,
|
|
172
|
+
SATURATE_ENABLE,
|
|
173
|
+
OUTPUT_SELECT,
|
|
174
|
+
1'b0, // Not fractured
|
|
175
|
+
COEFF_3,
|
|
176
|
+
COEFF_2,
|
|
177
|
+
COEFF_1,
|
|
178
|
+
COEFF_0
|
|
179
|
+
})
|
|
180
|
+
) _TECHMAP_REPLACE_ (
|
|
181
|
+
.a (a_i),
|
|
182
|
+
.b (b_i),
|
|
183
|
+
.acc_fir (acc_fir_i),
|
|
184
|
+
.z (z_o),
|
|
185
|
+
.dly_b (dly_b_o),
|
|
186
|
+
|
|
187
|
+
.clk (clock_i),
|
|
188
|
+
.reset (reset_i),
|
|
189
|
+
|
|
190
|
+
.feedback (feedback_i),
|
|
191
|
+
.load_acc (load_acc_i),
|
|
192
|
+
.unsigned_a (unsigned_a_i),
|
|
193
|
+
.unsigned_b (unsigned_b_i),
|
|
194
|
+
.subtract (subtract_i)
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
endmodule
|
|
198
|
+
|
|
199
|
+
module dsp_t1_10x9x32_cfg_params (
|
|
200
|
+
input [ 9:0] a_i,
|
|
201
|
+
input [ 8:0] b_i,
|
|
202
|
+
input [ 5:0] acc_fir_i,
|
|
203
|
+
output [18:0] z_o,
|
|
204
|
+
output [ 8:0] dly_b_o,
|
|
205
|
+
|
|
206
|
+
(* clkbuf_sink *)
|
|
207
|
+
input clock_i,
|
|
208
|
+
input reset_i,
|
|
209
|
+
|
|
210
|
+
input [2:0] feedback_i,
|
|
211
|
+
input load_acc_i,
|
|
212
|
+
input unsigned_a_i,
|
|
213
|
+
input unsigned_b_i,
|
|
214
|
+
input subtract_i
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
parameter [9:0] COEFF_0 = 10'd0;
|
|
218
|
+
parameter [9:0] COEFF_1 = 10'd0;
|
|
219
|
+
parameter [9:0] COEFF_2 = 10'd0;
|
|
220
|
+
parameter [9:0] COEFF_3 = 10'd0;
|
|
221
|
+
|
|
222
|
+
parameter [2:0] OUTPUT_SELECT = 3'd0;
|
|
223
|
+
parameter [0:0] SATURATE_ENABLE = 1'd0;
|
|
224
|
+
parameter [5:0] SHIFT_RIGHT = 6'd0;
|
|
225
|
+
parameter [0:0] ROUND = 1'd0;
|
|
226
|
+
parameter [0:0] REGISTER_INPUTS = 1'd0;
|
|
227
|
+
|
|
228
|
+
wire [37:0] z;
|
|
229
|
+
wire [17:0] dly_b;
|
|
230
|
+
|
|
231
|
+
QL_DSP3 # (
|
|
232
|
+
.MODE_BITS ({
|
|
233
|
+
REGISTER_INPUTS,
|
|
234
|
+
ROUND,
|
|
235
|
+
SHIFT_RIGHT,
|
|
236
|
+
SATURATE_ENABLE,
|
|
237
|
+
OUTPUT_SELECT,
|
|
238
|
+
1'b1, // Fractured
|
|
239
|
+
10'd0, COEFF_3,
|
|
240
|
+
10'd0, COEFF_2,
|
|
241
|
+
10'd0, COEFF_1,
|
|
242
|
+
10'd0, COEFF_0
|
|
243
|
+
})
|
|
244
|
+
) _TECHMAP_REPLACE_ (
|
|
245
|
+
.a ({10'd0, a_i}),
|
|
246
|
+
.b ({ 9'd0, b_i}),
|
|
247
|
+
.acc_fir (acc_fir_i),
|
|
248
|
+
.z (z),
|
|
249
|
+
.dly_b (dly_b),
|
|
250
|
+
|
|
251
|
+
.clk (clock_i),
|
|
252
|
+
.reset (reset_i),
|
|
253
|
+
|
|
254
|
+
.feedback (feedback_i),
|
|
255
|
+
.load_acc (load_acc_i),
|
|
256
|
+
.unsigned_a (unsigned_a_i),
|
|
257
|
+
.unsigned_b (unsigned_b_i),
|
|
258
|
+
.subtract (subtract_i)
|
|
259
|
+
);
|
|
260
|
+
|
|
261
|
+
assign z_o = z[18:0];
|
|
262
|
+
assign dly_b_o = dly_b_o[8:0];
|
|
263
|
+
|
|
264
|
+
endmodule
|
|
265
|
+
|