Skip to content

Remove unary operators from wrapper for parser compat#47

Merged
robtaylor merged 1 commit intomainfrom
fix/wrap-parens
Feb 27, 2026
Merged

Remove unary operators from wrapper for parser compat#47
robtaylor merged 1 commit intomainfrom
fix/wrap-parens

Conversation

@robtaylor
Copy link
Contributor

Summary

  • Remove ~ (bitwise NOT) operators from wrap_openframe.py's OEB assign statements
  • The structural Verilog parser (sverilogparse) doesn't support unary operators in assigns
  • The wrapper is not simulated (sim uses --top-module top), so the polarity change doesn't affect simulation

Context

PR #44 (auto-rebuild of MCU SoC test data) failed the mcu-soc-metal CI job because the parser couldn't handle assign gpio_oeb[0] = ~\io$soc_flash_clk$oe ;. The existing netlist on main has a minimal wrapper without GPIO mapping logic, so this was never an issue before.

Test plan

  • Merge this PR, then re-trigger the MCU SoC P&R rebuild workflow
  • Verify the auto-PR's mcu-soc-metal CI passes with the new netlist

The structural Verilog parser (sverilogparse) doesn't support unary
operators (~, !) in assign statements.  The OEB inversion in the
openframe_project_wrapper wrapper caused parse failures when loom
tried to map the rebuilt netlist.

Since the wrapper is not simulated (sim uses --top-module top), we
pass through the $oe signal directly without inversion.

Co-developed-by: Claude Code v2.1.44 (claude-opus-4-6)
@robtaylor robtaylor merged commit 3eeb68d into main Feb 27, 2026
8 checks passed
@robtaylor robtaylor deleted the fix/wrap-parens branch February 27, 2026 10:41
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