Repository navigation
rational: the guard band filter's named settings per half-band kind (IIR-c follow-up, question 20) - #115
Conversation
… follow-up) Question 20 of docs/IIR_PLAN.md, which IIR-c (#114) put to the maintainer, decided after it landed: "The settings can be different for the fir and near linear chains than the nonlinear chains." guard_band.h gains half_band_kind (fir, nonlinear, near_linear) beside guard_phase, and every named setting takes it with no default. I7's rule (question 14) is applied behind the half-band the filter serves: 5 / 7 / 7 / 7 behind the nonlinear half-band, 7 / 7 / 7 / 11 behind the FIR and near-linear ones. economy and balanced are one design behind every kind and take the kind all the same; guard_band_settings{} stays economy's and the constructor's and validate()'s default. Six designs per form, the two new ones (70 dB 1/3 at order 7, 120 dB 5/12 at order 11) already DspTap's committed Chebyshev II and type II FIR rows, so DspTap does not change; any other setting designs at run time as before. Every test over the named settings runs the six designs: the golden vectors regenerated (12 cases; the generator's sosfilt against direct-form check loosened to 1e-8, the order-11 polynomials agreeing within 1.7e-9), the four bit pins re-recorded as the cases they hash grew, the spec, fixed point, limit cycle and quantized linear stopbands; the order rule pins every kind's pick against its named setting; the aliases, composition and offering tests build each chain's filter at its own kind, and the offering table's near-linear rows with a filter move (down 2 at super_economy 25 and 43 multiplies, at transparent 49 and 121). The floating limit cycle at the new orders, over 20 starts per design: 4.4 (float) and 3.0 (double) times the smallest normal at super_economy's order 7, 8.4 and 7.7 at transparent's order 11, inside the bound of 16, which stays. Without flush-to-zero the residue reaches 11 times the smallest subnormal (bound 32). The Q15 linear limit is unchanged in kind and stays pinned (question 21: DspTap's Q15 rows, a later pin bump): -68.9 and -69.2 dB for the new rows. The header's settings table gains a half-band column, and README.md, rational/README.md, rational/CLAUDE.md and the book's guard band chapter state the settings per kind with the new windows, latencies and multiplies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
docs/IIR_PLAN.md v12 records the maintainer's answers to the two questions IIR-c (#114) put to him, given after it landed, and the follow-up that implements them: - question 20, the guard band settings behind the near-linear and the FIR half-band, decided per kind: "The settings can be different for the fir and near linear chains than the nonlinear chains." 5 / 7 / 7 / 7 behind the nonlinear half-band, 7 / 7 / 7 / 11 behind the FIR and near-linear ones, through half_band_kind (I6, I7, section 5 item 4, section 8); - question 21, the linear form in Q15, decided as "DspTap Q15 rows": DspTap commits Q15 linear rows designed with margin in a PR of its own; rational keeps the Q15 limit pinned as it is until the pin bump that brings them. v11's record of IIR-c stays as it was; IIR-c is marked landed. rational/PLAN.md: R26 and R28 state the settings per kind and the limit cycle at the new orders; v0.23 and section 6's record of IIR-c's follow-up carry its measurements and verification (488 of 488 hosted with GCC 13, Clang 18 and without exceptions, 507 of 507 with GCC 15; the M33, M55 and Hexagon legs in both builds; every rational ratchet binary byte-identical to IIR-c's, no baseline or ceiling re-recorded). docs/ROADMAP.md marks IIR-c landed and adds its follow-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
|
Hexagon cross rational (QEMU) was cancelled at its 20-minute limit ( This PR doesn't cause it. That runner was about 1.5× slower at every step, including the build and tests this PR doesn't change:
The underlying issue is the margin: the leg normally needs about 14½ of its 20 minutes. Proposed patch, not made here to keep this PR to its change: raise I'm re-running the leg once. Generated by Claude Code |
…an v13) docs/IIR_PLAN.md v13 records question 21's answer as it lands: DspTap 0.4.0 (tap/DspTap#69) commits the guard band filter's Q15 rows and the symmetric quantizer, and the pin move runs them, so the linear form in Q15 holds the 70 dB tier at the four 70 dB named settings (-89.2 / -70.4 / -72.3 / -70.7 dB at 32 / 40 / 50 / 60 taps); transparent's Q15 limit stays pinned (-70.9 / -69.2 dB), as the FIR stages state Q15 at transparent (section 5 item 4, section 8). rational/PLAN.md: R26 names the Q15 rows and the per-format length; v0.24 and section 6's record of the pin move carry the Q15 numbers per setting, what moved (the Q15 FIR pin and the Q15 rows' latency, window and multiplies) and what did not (every float, double and Q31 output, the Q15 Chebyshev II), the A/B (every async, bridge and rational ratchet binary byte-identical across the move on the M33, M55, Hexagon and host in both builds) and the verification. docs/ROADMAP.md adds the pin move after IIR-c's follow-up (#115) and moves TapTools' first step to DspTap v0.4.0, the family's floor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
…an v13) docs/IIR_PLAN.md v13 records question 21's answer as it lands: DspTap 0.4.0 (tap/DspTap#69) commits the guard band filter's Q15 rows and the symmetric quantizer, and the pin move runs them, so the linear form in Q15 holds the 70 dB tier at the four 70 dB named settings (-89.2 / -70.4 / -72.3 / -70.7 dB at 32 / 40 / 50 / 60 taps); transparent's Q15 limit stays pinned (-70.9 / -69.2 dB), as the FIR stages state Q15 at transparent (section 5 item 4, section 8). rational/PLAN.md: R26 names the Q15 rows and the per-format length; v0.24 and section 6's record of the pin move carry the Q15 numbers per setting, what moved (the Q15 FIR pin and the Q15 rows' latency, window and multiplies) and what did not (every float, double and Q31 output, the Q15 Chebyshev II), the A/B (every async, bridge and rational ratchet binary byte-identical across the move on the M33, M55, Hexagon and host in both builds) and the verification. docs/ROADMAP.md adds the pin move after IIR-c's follow-up (#115) and moves TapTools' first step to DspTap v0.4.0, the family's floor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
What this changes
This is IIR-c's follow-up for your answer to question 20, given after #114 merged: "The settings can be different for the fir and near linear chains than the nonlinear chains."
half_band_kind { fir, nonlinear, near_linear }, new inguard_band.hbesideguard_phase. Each named setting takes it, with no default, so every call site names the half-band its filter serves:super_economy(kind): order 5 behind the nonlinear half-band, 7 behind the FIR and near-linear ones;economy(kind)andbalanced(kind): order 7 behind every kind;transparent(kind): order 7 behind the nonlinear half-band, 11 behind the FIR and near-linear ones.These are the orders I7's rule picks behind each kind.
guard_band_settings{}is stilleconomy's numbers at order 7, valid behind every kind, and remains the constructor's andvalidate()'s default.Six tabulated designs per form instead of four. The two new ones, (70 dB, 1/3, order 7) and (120 dB, 5/12, order 11), are rows DspTap already commits, so the DspTap pin doesn't move.
Tests. Every battery over the named settings now covers the six designs: golden leg (vectors regenerated), bit pins, spec, fixed point, limit cycle, quantized linear stopbands. Beyond that:
Docs. Updated: the header's settings table (gaining a half-band column),
rational/README.md, the root README, the book chapter,rational/CLAUDE.md,rational/PLAN.md(R26, R28, a new follow-up record) anddocs/ROADMAP.md.docs/IIR_PLAN.mdgets a new v12 recording questions 20 and 21 as decided; v11's record of IIR-c is left as it landed.Question 21 (the linear form in Q15) is decided as DspTap Q15 rows: tap/DspTap#69, 0.4.0. This PR leaves the Q15 limit as #114 pinned it. Moving the pin to
v0.4.0lifts it, in a PR of its own after the tag.Why
Question 14's orders, 5 / 7 / 7 / 7, meet −A/2 in the guard band only behind the nonlinear half-band. Behind the near-linear and FIR half-bands they leave −31.4 / −31.6 dB at
super_economy(target −35) and −48.8 / −45.6 dB attransparent(target −60). Named settings per kind give every kind the order its rule picks.Verification
guard_band.OrderIsTheLowestOddOrderWhoseGuardBandAliasIsAtHalfAsuper_economyorder 7: stop edge 0.4350, Chebyshev II 20 multiplies, FIR 38 taps at −70.9 dB.transparentorder 11: stop edge 0.4669, 30 multiplies, FIR 102 taps at −120.1 dBguard_band.EachFormMeetsItsSpecsuper_economy: 4.4× float, 3.0× double; order 11 attransparent: 8.4× / 7.7×; on the M55, 4.4× / 3.0× and 4.2× / 6.4×. The worst stays order 7's 8.7× / 10.4×guard_band_float_test.TheChebyshevLimitCycleIsBoundedguard_band_test.MatchesTheGoldenLegguard_band_fixed_test.OutputsAreBitPinnedFullScaleDriveNeverWrapsInside,FixedPointSilenceIsExactlyZeroAfterTheWindowiir_subnormals.WithoutFlushToZeroTheGuardBandResidueIsBoundedguard_band_fixed_test.QuantizedLinearTablesAttainTheirStatedStopbandsWhere it ran:
-Werroron all three engines, 488 of 488 (my rebuild of the pushed head). The agent that built it also ran:-Werrorand GCC without exceptions or RTTI, 488 of 488 each;gcc:15image) with-Werror, 507 of 507;Notes for the reviewer
guard_band_settings::economy()without the kind no longer compiles. Nothing outside this tree consumes the filter yet: the C ABI is IIR-d's.super_economy, and 49 and 121 attransparent.Generated by Claude Code