Open sandwichmaker opened 1 year ago
Just a progress note: Alex has a detailed google doc that will make its way into markdown at some point -- originally I was thinking we'd just specialize the "disjoint" cones of logic that fed the individual sides of a select as specialized based on the select condition predicate (being true or false, respectively), but Alex has a proposal for specializing the whole graph so we don't lose information at join points, which should be less surprising to users, and he has a plan to do it in a way that's not combinatorial in the number of select operations (linear instead).
Consider the following fragment of code [pdk=asap7]
The right shift is guaranteed to be in the range [0,4].
The optimized ir is
and the generated verilog is
The resulting synthesis has area
130.8
.Now if we are explicit and use the code
The optimized ir is
and the verilog is
and the synth now has area `107.7'
So either XLS needs to be more explicit about the possible range for the shift or the synthesis tool needs to be able to reason about it. IMO this is evident at XLS level and would be good for XLS to do this as an optimization.