Skip to content

feat(fpga): instantiate UART/SPI/TopLevel modules in synthesis, fix type-suffixed literals#360

Merged
gHashTag merged 2 commits intomasterfrom
fix/fpga-synthesis-modules
Apr 8, 2026
Merged

feat(fpga): instantiate UART/SPI/TopLevel modules in synthesis, fix type-suffixed literals#360
gHashTag merged 2 commits intomasterfrom
fix/fpga-synthesis-modules

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

@gHashTag gHashTag commented Apr 8, 2026

Summary

  • Lexer fix: Type-suffixed literals (3u32, 1usize, etc.) now correctly parsed as single Number token — prevents AST corruption and invalid Verilog codegen
  • FPGA synthesis with real modules: Top-level wrapper instantiates ZeroDSP_UART, SPI_Master, ZeroDSP_TopLevel with LED ready-status indicators
  • Yosys script fix: Reads all working Verilog modules (uart, spi, top_level, wrapper) for full hierarchy synthesis

Verification

Test Result
t27c fpga-build --smoke PASS (5 modules + wrapper)
t27c fpga-build --docker false PASS (Yosys synthesis: 112 cells, 27 FDRE, 3 submodules)
t27c validate-phi-identity PASS (L5)
UART/SPI/TopLevel Verilog Yosys parse OK
MAC/Bridge Verilog Deferred (deeper codegen issues)

Closes #359

gHashTag added 2 commits April 8, 2026 17:08
…ixed literals

- fix(lexer): consume type suffixes (u8,u16,u32,u64,i8..i64,f16,f32,f64)
  after number literals so '3u32' is a single Number token, not two tokens
- feat(fpga-build): top-level wrapper now instantiates ZeroDSP_UART,
  SPI_Master, ZeroDSP_TopLevel with LED ready-status indicators
- fix(fpga-build): Yosys script reads all working Verilog modules
  (uart, spi, top_level, wrapper) for full hierarchy synthesis
- Yosys synthesis PASSES: 112 cells, 27 FDRE, 3 submodules
- mac.v and bridge.v have deeper codegen issues (deferred)

Closes #359
Repository ruleset requires seal-coverage check on every PR, but paths
filter prevented it from running when only bootstrap/ files changed.

Closes #359
@gHashTag gHashTag merged commit 902e994 into master Apr 8, 2026
8 checks passed
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.

feat(fpga): instantiate UART/SPI/TopLevel modules in synthesis, fix type-suffixed literals

1 participant