fix: restore T20-stripped print() calls in cosim scripts; add 60 mem validation tests

- Restored print() output in 6 generator/cosim scripts that ruff T20
  had silently stripped, leaving dead 'for _var: pass' stubs and
  orphaned expressions. Files restored from pre-ruff commit and
  re-linted with T20/ERA/ARG/E501 per-file-ignores.
- Removed 5 dead/self-blessing scripts (compare.py, compare_doppler.py,
  compare_mf.py, validate_mem_files.py, LUT.py).
- Added test_mem_validation.py: 60 pytest tests validating .mem files
  against independently-derived ground truth (twiddle factors, chirp
  waveforms, memory addressing, segment padding).
- Updated CI cross-layer-tests job to include test_mem_validation.py.
- All 150 tests pass (61 GUI + 29 cross-layer + 60 mem validation).
This commit is contained in:
Jason
2026-04-13 20:36:28 +05:45
parent 8901894b6c
commit 4578621c75
14 changed files with 744 additions and 1772 deletions
-24
View File
@@ -1,24 +0,0 @@
import numpy as np
# Define parameters
fs = 120e6 # Sampling frequency
Ts = 1 / fs # Sampling time
Tb = 1e-6 # Burst time
Tau = 30e-6 # Pulse repetition time
fmax = 15e6 # Maximum frequency on ramp
fmin = 1e6 # Minimum frequency on ramp
# Compute number of samples per ramp
n = int(Tb / Ts)
N = np.arange(0, n, 1)
# Compute instantaneous phase
theta_n = 2 * np.pi * ((N**2 * Ts**2 * (fmax - fmin) / (2 * Tb)) + fmin * N * Ts)
# Generate waveform and scale it to 8-bit unsigned values (0 to 255)
y = 1 + np.sin(theta_n) # Normalize from 0 to 2
y_scaled = np.round(y * 127.5).astype(int) # Scale to 8-bit range (0-255)
# Print values in Verilog-friendly format
for _i in range(n):
pass