Files
overwatch/9_Firmware/9_2_FPGA/tb/fir_sine_passband.csv
Jason baa24fd01e Add Phase 0.5 DDC co-simulation suite: bit-accurate Python model, scene generator, and 5/5 scenario validation
Bit-accurate Python model (fpga_model.py) mirrors full DDC RTL chain:
NCO -> mixer -> CIC -> FIR with exact fixed-point arithmetic matching
RTL DSP48E1 pipeline behavior including CREG=1 delay on CIC int_0.

Synthetic radar scene generator (radar_scene.py) produces ADC test
vectors for 5 scenarios: DC, single target (500m), multi-target (5),
noise-only, and 1 MHz sine wave.

DDC co-sim testbench (tb_ddc_cosim.v) feeds hex vectors through RTL
DDC and exports baseband I/Q to CSV. All 5 scenarios compile and run
with Icarus Verilog (iverilog -g2001 -DSIMULATION).

Comparison framework (compare.py) validates Python vs RTL using
statistical metrics (RMS ratio, DC offset, peak ratio) rather than
exact sample match due to RTL LFSR phase dithering. Results: 5/5 PASS.
2026-03-16 16:01:40 +02:00

7.3 KiB

1sampledata_indata_out
2530900
3636810
4742570
5848172
6953581
71058773
81163746
91268450
101372897
1114770511
12158090-5
1316844315
1417876314
15189048-17
1619929740
172095104
18219685-69
19229822486
202399211667
212499802806
2225100003839
232699804947
242799216006
252898227018
262996858038
273095109008
283192979939
2932904810844
3033876311697
3134844312505
3235809013267
3336770513974
3437728914626
3538684515221
3639637415756
3740587716229
3841535816637
3942481716981
4043425717257
4144368117465
4245309017605
4346248617675
4447187317675
4548125317605
464962717465
4750017257
4851-62716981
4952-125316637
5053-187316229
5154-248615756
5255-309015221
5356-368114626
5457-425713973
5558-481713264
5659-535812503
5760-587711694
5861-637410838
5962-68459939
6063-72899001
6164-77058027
6265-80907022
6366-84435990
6467-87634932
6568-90483856
6669-92972765
6770-95101663
6871-9685554
6972-9822-555
7073-9921-1664
7174-9980-2766
7275-10000-3857
7376-9980-4933
7477-9921-5991
7578-9822-7023
7679-9685-8028
7780-9510-9002
7881-9297-9940
7982-9048-10839
8083-8763-11695
8184-8443-12504
8285-8090-13265
8386-7705-13974
8487-7289-14627
8588-6845-15222
8689-6374-15757
8790-5877-16230
8891-5358-16638
8992-4817-16982
9093-4257-17258
9194-3681-17466
9295-3090-17606
9396-2486-17676
9497-1873-17676
9598-1253-17606
9699-627-17466
971000-17258
98101627-16982
991021253-16638
1001031873-16230
1011042486-15757
1021053090-15222
1031063681-14627
1041074257-13974
1051084817-13265
1061095358-12504
1071105877-11695
1081116374-10839
1091126845-9940
1101137289-9002
1111147705-8028
1121158090-7023
1131168443-5991
1141178763-4933
1151189048-3857
1161199297-2766
1171209510-1664
1181219685-555
1191229822554
12012399211663
12112499802765
122125100003856
12312699804932
12412799215990
12512898227022
12612996858027
12713095109001
12813192979939
129132904810838
130133876311694
131134844312503
132135809013264
133136770513973
134137728914626
135138684515221
136139637415756
137140587716229
138141535816637
139142481716981
140143425717257
141144368117465
142145309017605
143146248617675
144147187317675
145148125317605
14614962717465
147150017257
148151-62716981
149152-125316637
150153-187316229
151154-248615756
152155-309015221
153156-368114626
154157-425713973
155158-481713264
156159-535812503
157160-587711694
158161-637410838
159162-68459939
160163-72899001
161164-77058027
162165-80907022
163166-84435990
164167-87634932
165168-90483856
166169-92972765
167170-95101663
168171-9685554
169172-9822-555
170173-9921-1664
171174-9980-2766
172175-9999-3857
173176-9980-4933
174177-9921-5991
175178-9822-7023
176179-9685-8028
177180-9510-9002
178181-9297-9940
179182-9048-10839
180183-8763-11695
181184-8443-12504
182185-8090-13265
183186-7705-13974
184187-7289-14627
185188-6845-15222
186189-6374-15757
187190-5877-16230
188191-5358-16638
189192-4817-16982
190193-4257-17258
191194-3681-17467
192195-3090-17607
193196-2486-17675
194197-1873-17675
195198-1253-17607
196199-627-17467
1972000-17258
198201627-16982
1992021253-16638
2002031873-16230
2012042486-15757
2022053090-15222
2032063681-14627
2042074257-13974
2052084817-13265
2062095358-12504
2072105877-11695
2082116374-10839
2092126845-9940
2102137289-9002
2112147705-8028
2122158090-7023
2132168443-5991
2142178763-4933
2152189048-3857
2162199297-2766
2172209510-1664
2182219685-555
2192229822554
22022399211663
22122499802765
22222599993856
22322699804932
22422799215990
22522898227022
22622996858027
22723095109001
22823192979939
229232904810838
230233876311694
231234844312503
232235809013264
233236770513973
234237728914626
235238684515221
236239637415756
237240587716229
238241535816637
239242481716981
240243425717257
241244368117466
242245309017606
243246248617674
244247187317674
245248125317606
24624962717466
247250017257
248251-62716981
249252-125316637
250253-187316229
251254-248615756
252255-309015221
253256-368114626
254257-425713973
255258-481713264
256259-535812503
257260-587711694
258261-637410838
259262-68459939
260263-72899001
261264-77058027
262265-80907022
263266-84435990
264267-87634932
265268-90483856
266269-92972765
267270-95101663
268271-9685554
269272-9822-555
270273-9921-1664
271274-9980-2766
272275-9999-3857
273276-9980-4933
274277-9921-5991
275278-9822-7023
276279-9685-8028
277280-9510-9002
278281-9297-9940
279282-9048-10839
280283-8763-11695
281284-8443-12504
282285-8090-13265
283286-7705-13974
284287-7289-14627
285288-6845-15222
286289-6374-15757
287290-5877-16230
288291-5358-16638
289292-4817-16982
290293-4257-17258
291294-3681-17467
292295-3090-17607
293296-2486-17675
294297-1873-17675
295298-1253-17607
296299-627-17467
2973000-17258
298301627-16982
2993021253-16638
3003031873-16230
3013042486-15757
3023053090-15222
3033063681-14627
3043074257-13974
3053084817-13265
3063095358-12504
3073105877-11695
3083116374-10839
3093126845-9940
3103137289-9002
3113147705-8028
3123158090-7023
3133168443-5991
3143178763-4933
3153189048-3857
3163199297-2766
3173209510-1664
3183219685-555
3193229822554
32032399211663
32132499802765
32232599993856
32332699804932
32432799215990
32532898227022
32632996858027
32733095109001
32833192979939
329332904810838
330333876311694
331334844312503
332335809013264
333336770513973
334337728914626
335338684515221
336339637415756
337340587716229
338341535816637
339342481716981
340343425717257
341344368117466
342345309017606
343346248617674
344347187317674
345348125317606
34634962717466
347350017257
348351-62716981
349352-125316637
350353-187316229
351354-248615756
352355-309015221
353356-368114626
354357-425713973
355358-481713264
356359-535812503
357360-587711694
358361-637410838
359362-68459939
360363-72899001
361364-77058027
362365-80907022
363366-84435990
364367-87634932
365368-90483856
366369-92972765
367370-95101663
368371-9685554
369372-9822-555
370373-9921-1664
371374-9980-2766
372375-9999-3857
373376-9980-4933
374377-9921-5991
375378-9822-7023
376379-9685-8028
377380-9510-9002
378381-9297-9940
379382-9048-10839
380383-8763-11695
381384-8443-12504
382385-8090-13265
383386-7705-13974
384387-7289-14627
385388-6845-15222
386389-6374-15757
387390-5877-16230
388391-5358-16638
389392-4817-16982
390393-4257-17258
391394-3681-17467
392395-3090-17607
393396-2486-17675
394397-1873-17675
395398-1253-17607
396399-627-17467
3974000-17258
398401627-16982
3994021253-16638
4004031873-16230
4014042486-15757
4024053090-15222
4034063681-14627
4044074257-13974
4054084817-13265
4064095358-12504
4074105877-11695
4084116374-10839
4094126845-9940
4104137289-9002
4114147705-8028
4124158090-7023
4134168443-5991
4144178763-4933
4154189048-3857
4164199297-2766
4174209510-1664
4184219685-555
4194229822554
42042399211663
42142499802765
42242599993856
42342699804932
42442799215990
42542898227022
42642996858027
42743095109001
42843192979939
429432904810838
430433876311694
431434844312503
432435809013264
433436770513973
434437728914626
435438684515221
436439637415756
437440587716229
438441535816637
439442481716981
440443425717257
441444368117466
442445309017606
443446248617674
444447187317674
445448125317606
44644962717466
447450017257
448451-62716981
449452-125316637
450453-187316229
451454-248615756
452455-309015221
453456-368114626
454457-425713973
455458-481713264
456459-535812503
457460-587711694
458461-637410838
459462-68459939
460463-72899001
461464-77058027
462465-80907022
463466-84435990
464467-87634932
465468-90483856
466469-92972765
467470-95101663
468471-9685554
469472-9822-555
470473-9921-1664
471474-9980-2766
472475-9999-3857
473476-9980-4933
474477-9921-5991
475478-9822-7023
476479-9685-8028
477480-9510-9002
478481-9297-9940
479482-9048-10839
480483-8763-11695
481484-8443-12504
482485-8090-13265
483486-7705-13974
484487-7289-14627
485488-6845-15222
486489-6374-15757
487490-5877-16230
488491-5358-16638
489492-4817-16982
490493-4257-17258
491494-3681-17467
492495-3090-17607
493496-2486-17675
494497-1873-17675
495498-1253-17607
496499-627-17467