Skip to content

Fix exponential macro expansion in const_max!#22

Open
mercnz wants to merge 1 commit intosamitbasu:mainfrom
mercnz:fix-const-max-explosion
Open

Fix exponential macro expansion in const_max!#22
mercnz wants to merge 1 commit intosamitbasu:mainfrom
mercnz:fix-const-max-explosion

Conversation

@mercnz
Copy link
Copy Markdown

@mercnz mercnz commented Feb 10, 2026

had severe memory bloating, like 48gb+ this dramatically reduced it for me.

twitzelbos referenced this pull request in twitzelbos/rhdl Apr 29, 2026
Closes the remaining Tier 1/2 gaps and ships the first eight
Tier-3 protocol PHYs.  Lib test count: 275 -> 346 (0 regressions).

Tier 1/2 closeouts:
- core::pwm: saw-tooth + comparator (Roadmap #22, treated as
  Tier-3 entry but trivially small)
- core::comparator: unsigned wide comparator emitting all 5 flags
  in one call (Roadmap #10)
- core::register_file: bus-agnostic N-register array, combinational
  read + registered write, foundation for all peripheral adapters
  (Roadmap #17)

Tier 3 batch:
- core::uart_tx: 8-N-1 transmitter with runtime divisor (#18 TX half)
- core::uart_rx: 8-N-1 receiver with mid-baud sampling (#18 RX half)
- core::spi_master: Mode 0, MSB-first, 4-wire (#19)
- core::spi_slave: Mode 0, MSB-first, oversampled sclk_in (#20)
- core::i2c_master: write-only single-byte v1 with open-drain
  outputs - first widget that exercises tristate end-to-end (#21)
- core::ws2812: single-pixel WS2812/SK6812 driver (#26)
- core::dht22: 40-bit humidity/temperature single-wire sensor (#29)

CHANGELOG updates document per-widget design decisions, surprises
hit (or-patterns are forbidden in kernels; type inference for
.as_bits() returns the outer kernel const generic; FSMs that
"wait for line release" need an explicit two-step high-then-low
wait), and per-widget follow-ups.

CLAUDE.md and widget-roadmap.md updated; recommended-first-eight
list and the strikethrough roadmap are both kept current.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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