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.
748 B
748 B
| 1 | sample | data_out |
|---|---|---|
| 2 | 0 | 6 |
| 3 | 1 | 14 |
| 4 | 2 | -10 |
| 5 | 3 | 16 |
| 6 | 4 | 24 |
| 7 | 5 | -47 |
| 8 | 6 | 54 |
| 9 | 7 | 29 |
| 10 | 8 | -120 |
| 11 | 9 | 160 |
| 12 | 10 | -12 |
| 13 | 11 | -245 |
| 14 | 12 | 460 |
| 15 | 13 | -289 |
| 16 | 14 | -576 |
| 17 | 15 | 4423 |
| 18 | 16 | 9423 |
| 19 | 17 | 9136 |
| 20 | 18 | 8387 |
| 21 | 19 | 9092 |
| 22 | 20 | 8859 |
| 23 | 21 | 8687 |
| 24 | 22 | 8967 |
| 25 | 23 | 8818 |
| 26 | 24 | 8793 |
| 27 | 25 | 8894 |
| 28 | 26 | 8823 |
| 29 | 27 | 8831 |
| 30 | 28 | 8857 |
| 31 | 29 | 8833 |
| 32 | 30 | 8841 |
| 33 | 31 | 8847 |
| 34 | 32 | 8847 |
| 35 | 33 | 8847 |
| 36 | 34 | 8847 |
| 37 | 35 | 8847 |
| 38 | 36 | 8847 |
| 39 | 37 | 8847 |
| 40 | 38 | 8847 |
| 41 | 39 | 8847 |
| 42 | 40 | 8847 |
| 43 | 41 | 8847 |
| 44 | 42 | 8847 |
| 45 | 43 | 8847 |
| 46 | 44 | 8847 |
| 47 | 45 | 8847 |
| 48 | 46 | 8847 |
| 49 | 47 | 8847 |
| 50 | 48 | 8847 |
| 51 | 49 | 8847 |
| 52 | 50 | 8847 |
| 53 | 51 | 8847 |
| 54 | 52 | 8847 |
| 55 | 53 | 8847 |
| 56 | 54 | 8847 |
| 57 | 55 | 8847 |
| 58 | 56 | 8847 |
| 59 | 57 | 8847 |
| 60 | 58 | 8847 |
| 61 | 59 | 8847 |
| 62 | 60 | 8847 |
| 63 | 61 | 8847 |
| 64 | 62 | 8847 |
| 65 | 63 | 8847 |
| 66 | 64 | 8847 |
| 67 | 65 | 8847 |
| 68 | 66 | 8847 |
| 69 | 67 | 8847 |
| 70 | 68 | 8847 |
| 71 | 69 | 8847 |
| 72 | 70 | 8847 |
| 73 | 71 | 8847 |
| 74 | 72 | 8847 |
| 75 | 73 | 8847 |
| 76 | 74 | 8847 |
| 77 | 75 | 8847 |
| 78 | 76 | 8847 |
| 79 | 77 | 8847 |
| 80 | 78 | 8847 |
| 81 | 79 | 8847 |
| 82 | 80 | 8847 |
| 83 | 81 | 8847 |
| 84 | 82 | 8847 |
| 85 | 83 | 8847 |
| 86 | 84 | 8847 |
| 87 | 85 | 8847 |
| 88 | 86 | 8847 |
| 89 | 87 | 8847 |
| 90 | 88 | 8847 |
| 91 | 89 | 8847 |
| 92 | 90 | 8847 |
| 93 | 91 | 8847 |
| 94 | 92 | 8847 |
| 95 | 93 | 8847 |
| 96 | 94 | 8847 |