You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[XLS] Switch from external-adapter channel legalization to internal arbitration
To support relaxed channel strictness settings (allowing multiple operations per channel per activation), we previously translated all operations to take place on their own channels, then inserted an external arbitrating adapter to mux the channels back together. This resulted in duplicated control-flow logic, and was difficult to optimize well without full-powered proc inlining - which ran into its own problems.
Instead, we now implement relaxed strictnesses by implementing additional legalizations within the proc: adding token-typed state to avoid cross-activation conflicts, and adding scheduling constraints to avoid having multiple (non-mutually-exclusive) operations in the same activation trigger at the same time. To support this, we also modify codegen to allow multiple operations per channel, relying on earlier compilation steps to ensure that we never see more than one trigger in a given cycle.
This passes all existing tests, except for a few where it revealed issues that were previously hidden by our choices in implementing the external adapter. We modify those tests accordingly. As best as I can tell, this should be no worse for performance than the previous version.
NOTE: This will also allow us to support proven-mutually-exclusive channels with mutually-exclusive operations that can't be merged, which reduces merging to an optimization; we'll remove the forced-merge logic for this case in a followup CL.
Fixes#2180
PiperOrigin-RevId: 760612461
0 commit comments