Skip to content

Add bus blocks - #335

Merged
milanofthe merged 17 commits into
mainfrom
feature/bus-blocks
Sep 14, 2026
Merged

milanofthe merged 17 commits into
mainfrom
feature/bus-blocks

Conversation

@milanofthe

Copy link
Copy Markdown
Member

Adds Bus Creator and Bus Selector blocks to group signals into one wire.

  • Bus Creator bundles its inputs into a bus, Bus Selector picks signals out of it. Both live in a new library category Buses and are drawn as trapezoids; wires carrying a bus are twice as thick, bus ports have a heavier outline.
  • Buses exist only in the editor. Before code generation they are resolved into direct wiring, including buses passing through subsystem ports: src/lib/bus/expand.ts for the editor, pathview/buses.py for pathview convert. tests/fixtures/bus_expansion.json is shared by both test suites.
  • Signal names are the labels of the wires into a Bus Creator and can be edited inline at the port. Selector signals are picked in the properties dialog or inline at the port. Renaming a signal asks whether selectors using it, also in subsystems, should follow.
  • Port handles, port labels and the +/- port controls moved from BaseNode into a shared NodePorts component; the connection label editor became a shared InlineInput.
  • pvm spec: section 4.4 Buses.

Models without bus blocks generate the same code as before (checked on all examples).

Checks: npm test, pytest tests/, svelte-check, vite build.

@milanofthe
milanofthe merged commit 0fd680d into main Sep 14, 2026
4 checks passed
@milanofthe
milanofthe deleted the feature/bus-blocks branch September 14, 2026 20:02
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