Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mux6 and Mux5 template #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Mux6 and Mux5 template #67

wants to merge 2 commits into from

Conversation

kevjue
Copy link

@kevjue kevjue commented Feb 4, 2022

This PR adds the Mux6 and Mux5 templates.

These templates will contain inputs of 6 bit selector/64 constants and 5 bit selector/32 constants respectively, and output the appropriate constant.

They are a tree (of depth 2) of mux components. The leaf components for both templates are mux3 components and handle the selector's least significant 3 bits and the root component handles the most significant 3 bits and 2 bits respectively.

I also added test cases for the new templates.

The tree based implementation does have a bit more constraints than if they were implemented "inline". But it should be within the same order of magnitude, and it is a whole lot easier to read and implement (hence less chance to be buggy).

@kevjue kevjue changed the title Mux6 template Mux6 and Mux5 template Feb 4, 2022
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