google / xls

XLS: Accelerated HW Synthesis

Home Page:http://google.github.io/xls/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[enhancement] User-specified `dead_if(predicate)` akin to `assume(predicate)` to enable clock gating

cdleary opened this issue · comments

What's hard to do? (limit 100 words)

Related to #542 -- similar to an "assume(p)" which would conceptually forward-propagate the truth of predicate p for subsequent optimization, for clock gating purposes we may want to add something like a "dead_if(p, value)" so you could mark that output values could be clock gated off under certain conditions p. Notably this is a semantic change, not a hint. The benefit would be that liveness analysis could reverse-flow to clock gate out all dependent operations under that predicate.

Current best alternative workaround (limit 100 words)

Right now the value is just always assumed live under all conditions (aside from explicit valid bit specification to XLS causing clock gating).

Your view of the "best case XLS enhancement" (limit 100 words)

Users can specify dead_if predicates, and ideally it could be orthogonal to the functional block (instead of /having/ to be inline), and that would cause the complete frontier of possible clock gating under that predicate to occur.

@meheff notes that our current conditional specialization does basic observability analysis here:

for (Node* node : ReverseTopoSort(f)) {

Another relevant ref that came up in discussion, paper from UCLA/AutoESL in '09:
https://www.csl.cornell.edu/~zhiruz/pdfs/blodc-islped2009.pdf