Feat/merged bitwise bus#481
Closed
diegokingston wants to merge 19 commits into
Closed
Conversation
…yte) Merges 3 separate byte-level bitwise buses into 1 with op_type discriminant. Reduces CPU interactions from 24 to 8, saving ~8 aux columns. Affects CPU, bitwise, shift, and potentially memw_aligned tables.
Replace three separate BusId variants (AndByte=3, OrByte=4, XorByte=5) with a single BitwiseByte=3 variant using an op_type discriminant field (0=AND, 1=OR, 2=XOR). Renumber subsequent variants accordingly.
Replace three separate BusId::AndByte/OrByte/XorByte receivers with three BitwiseByte receivers distinguished by a constant op_type field: AND receiver: op_type=0, OR receiver: op_type=1, XOR receiver: op_type=2 MU_AND, MU_OR, MU_XOR multiplicity columns remain separate and unchanged. Adds LinearTerm to import.
Replace three separate 8-iteration loops (AND_BYTE, OR_BYTE, XOR_BYTE) with a single merged loop over BitwiseByte using: - Multiplicity::Sum3(AND, OR, XOR) (at most 1 active per cycle) - op_type field: 1*OR + 2*XOR (so AND=0, OR=1, XOR=2) This reduces CPU bus interactions from 24 to 8. AND/OR/XOR are mutually exclusive per cycle (enforced by DECODE), so Sum3 acts as a single active multiplicity.
Update SHIFT-C1, SHIFT-C2, and SHIFT-C11 interactions from BusId::AndByte to BusId::BitwiseByte, adding a constant op_type=0 (AND) as the 4th bus field to match the merged bus protocol.
…type=0 Update the alignment-check bus interaction from BusId::AndByte to BusId::BitwiseByte, adding a constant op_type=0 (AND) as the 4th field.
Update the PC alignment AND_BYTE interaction to BusId::BitwiseByte with a constant op_type=0 (AND) as the 4th bus field.
Update standalone bus interaction tests in bitwise_bus_tests.rs and bitwise_tests.rs to use BusId::BitwiseByte with a constant op_type=0 on both sender and receiver sides (both test AND operations). Add LinearTerm to imports where missing.
Collaborator
Author
|
/bench 3 |
Benchmark — fib_iterative_8M (median of 3)Table parallelism: 32 (auto = cores / 3)
Commit: fe2fe55 · Baseline: cached · Runner: self-hosted bench |
Collaborator
|
/bench |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.