Skip to content

Resource-optimization RTL + legacy-Python removal [stacks on #87] - #88

Draft
bengineerd wants to merge 22 commits into
fp-pidfrom
cleanup
Draft

Resource-optimization RTL + legacy-Python removal [stacks on #87]#88
bengineerd wants to merge 22 commits into
fp-pidfrom
cleanup

Conversation

@bengineerd

Copy link
Copy Markdown
Contributor

Part of Issue #70 (Floating-point PID firmware). Stacks on PR #87 (fp-pid → wtj-refactor) — review/merge that first.

What this adds on top of #87

This is the cleanup-branch remainder: everything the FP-PID base (#87) does, plus the resource-utilization firmware work, legacy-Python removal, and build/analysis tooling. Diff is ~42 files vs fp-pid.

Resource-optimization RTL (the main content)

Generics to trim FPGA utilization, across the DSP and comms paths:

  • GEN_PID_DEBUG_G — conditionally generate the per-row PID-debug stream (AdcDsp / AdcDspFp), so builds that don't need debug reclaim the resources.
  • RSSI_WINDOW_ADDR_SIZE_G, MEMORY_TYPE_G / SYNTH_MODE_G tuning across EthCore, PgpEthCore, WarmTdmCore2, PgpCore, FastDacDriver, EventBuilder, BiquadFilter.
  • BRAM enablement for FastDacDriver.
  • Target generics: 160Coord / 325Coord carry GEN_PID_DEBUG_G, RSSI_WINDOW_ADDR_SIZE_G, ROW_ADDR_BITS_G=6, Power_DefaultOpt strategy.

Legacy Python removal

Removes the legacy module layer (_Ad9106, _ColumnModule, _RowModule, _RowModuleDacs, _RowDacDriver, _RowSelect, _SaBiasOffset, _TesBias, _WarmTdmCommon, _WarmTdmCore) and the Legacy/LegacyCh0Feb board types, trims _Amplifiers/_FrontEnds. The operations-era R_CABLECableR rename (from #78) is preserved.

Tooling / docs

Vivado power-analysis + VCD-dump scripts (in ColumnFpgaBoard325Coord10G/vivado/), PGP-ring-network doc, plan docs, extra logging.

Base branch / stacking

Targets fp-pid (PR #87). Once #87 merges (→ wtj-refactor, then pre-release), retarget this to follow. Reviewing this against #87 isolates the resource/legacy/tooling delta from the FP-PID base and the operations refactor beneath it.

Status — draft, needs hardware validation

Verified in emulate: tree builds in both fixed-point and --floatPid modes; legacy classes confirmed gone; GEN_PID_DEBUG_G present in both RTL and target ruckus.tcl; both Python packages compile clean. Remaining gates (Issue #70, firmware/bench):

  • Vivado 2024.1 synthesis — confirm the resource generics actually reduce utilization / close timing
  • Hardware validation of the FP servo + the reduced-resource build

🤖 Generated with Claude Code

bengineerd and others added 22 commits May 22, 2026 17:29
Delete Legacy board support (ColumnModule, RowModule, WarmTdmCore v1,
RowDacDriver v1, Ad9106, RowSelect) and remove dead numRowSelects/
numChipSelects parameters from the entire stack. Simplify GroupConfig
to hold only columnBoards, rowBoards, maxRows, host. Extract variable
helper classes to _GroupVariables.py. Fix broken tuning diagnostic
functions (sq1Ramp, tesRamp) to use ActivateRowIndex/DeactivateRowIndex
directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
It was a stub that did nothing — the linked set/get were already
removed and the variable just held False permanently.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Vivado power-analysis TCL scripts for the ColumnFpgaBoard325
Coordinator target (SAIF generation, post-route runs, vectorless
activity) and a UCLI/FSDB dump script for the GroupTb simulation to
feed switching activity into Vivado power estimation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bring in the MAP RAM address width fix for RowDacDriver2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…keep cleanup FW; remove legacy)

Brings the operations refactor (PR #78) and the target-cleanup firmware reorg
onto the cleanup branch, while preserving cleanup's unique firmware work and
re-applying cleanup's "remove legacy Python" on top. Merge, not rebase.

27 conflicts resolved, batched:

Software / structure (wtj-refactor canonical):
- operations package, _GroupConfig/_GroupVariables (rowAddrBits model,
  GroupBroadcastVariable, G3/G4/G6 graduations), _Tuning, warmTdmServer:
  took wtj/fp-pid versions.
- useFloatPid threading preserved via fp-pid's reconciled versions.
- submodules -> wtj (surf 0ca723d, ruckus 66fd4a9).

Target reorg:
- kept cleanup's resource generics (GEN_PID_DEBUG_G, RSSI_WINDOW_ADDR_SIZE_G,
  ROW_ADDR_BITS_G=6, Power_DefaultOpt) on 160Coord/325Coord.
- moved cleanup's 5 vivado power-analysis scripts into the renamed
  325Coord10G/vivado/; deleted the reorg-obsoleted old FP target.
- releases.yaml RogueScripts -> wtj (correct ../ paths + reorg script list).

Firmware (preserve cleanup's RTL work):
- AdcDsp.vhd keeps cleanup's GEN_PID_DEBUG_G generate-blocks + wtj's
  pidStateRamAddr resize. firmware/python drivers took fp-pid's rows= naming
  (no cleanup-unique content there; the generics live in the RTL).

Remove legacy Python (cleanup's f917982, applied on top of wtj):
- deleted 10 legacy modules (_Ad9106, _ColumnModule, _RowModule, _RowModuleDacs,
  _RowDacDriver, _RowSelect, _SaBiasOffset, _TesBias, _WarmTdmCommon,
  _WarmTdmCore).
- _Amplifiers.py: wtj's version (with the R_CABLE->CableR G3 rename) minus the
  two legacy amp classes (ColumnBoardC00SaAmp, FEAmplifier3).
- _ArgParser.py: wtj operations body + rowAddrBits, with Legacy/LegacyCh0Feb
  board-type choices and dict entries trimmed.
- _FrontEnds.py, firmware __init__.py: cleanup's post-removal versions.

Verified: all tracked python compiles; ColumnModule/_Ad9106 confirmed gone; the
emulate tree builds in both fixed-point and --floatPid modes (--floatPid selects
AdcDspFp); cleanup's GEN_PID_DEBUG_G present in both RTL and target ruckus.tcl.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merges the current fp-pid tip into cleanup so cleanup can open a clean,
mergeable PR against fp-pid (the stacked-PR base). cleanup and fp-pid were
siblings (both = wtj-refactor + FP PID, divergent), so this reconciles the
~10 overlapping files (_HardwareGroup, _RowDacDriver2, _RowFpgaBoard,
_ArgParser, _Group, _GroupRoot, warmTdmGui, submodules, the FP target).

Recursive auto-merge resolved consistently; verified the invariants hold:
- legacy Python stays removed (fp-pid carries it; NOT resurrected here);
- cleanup's resource-optimization RTL preserved (GEN_PID_DEBUG_G in AdcDsp +
  target ruckus.tcl, EthCore/PgpEthCore/WarmTdmCore2 generics);
- legacy board types absent from _ArgParser;
- FP target ColumnFpgaBoard325Coord10G keeps USE_FLOAT_PID_G=true;
- submodules at surf 0ca723d / ruckus 66fd4a9.

Verified: tracked python compiles; ColumnModule gone; emulate tree builds in
both fixed-point and --floatPid modes (--floatPid -> AdcDspFp).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bengineerd bengineerd changed the title Resource-optimization RTL + legacy-Python removal [FP-PID track, stacks on #87] Resource-optimization RTL + legacy-Python removal [stacks on #87] Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant