Skip to content

Adding support for muxes and flip-flops#38

Open
sw23 wants to merge 4 commits into
drom:trunkfrom
sw23:trunk
Open

Adding support for muxes and flip-flops#38
sw23 wants to merge 4 commits into
drom:trunkfrom
sw23:trunk

Conversation

@sw23

@sw23 sw23 commented May 28, 2026

Copy link
Copy Markdown

Proposing support for multiplexors (muxes) and flip-flops. Here are a few examples:

[[ "x", ["?", "sel", "a", "b"] ]]
image
[[ "x", [ "?", "s", [ "&", "a", "b", "c", "d", "e" ], "f", "g", "h" ]]]
image
[[ "x", [ "?", "s1", [ "?", "s0", "a", "b", "c", "d" ], 
                     [ "?", "s0", "e", "f", "g", "h" ],
                     [ "?", "s0", "i", "j", "k", "l" ],
                     [ "?", "s0", "m", "n", "o", "p" ]]]]
image
[[ "q", [ "$dff", { "d": [ "|", "x", "y" ], "clk": "clk", "s": "set", "r": [ "&", "rst0", "rst1" ], "qn": "q_bar" } ]]]
image

GitHub Copilot wrote most of the code and I reviewed and had it refactor a few things. Any feedback is welcome!

I followed the proposal in #10
This proposes an implementation for #11

@sw23 sw23 changed the title Adding support for muxes Adding support for muxes and flip-flops May 31, 2026
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