-
Notifications
You must be signed in to change notification settings - Fork 53
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
Reducing control fan-out #382
Comments
This is a good idea IMO. Just a couple of disconnected thoughts:
|
Experiment to see if fan-out problems can be fixed using this:
We also realized that we don't need a whole new pass to do this. We can just disable/undo the effect of |
@parthsarkar17 is there a general issue from the calyx-opt work that has subsumed this? For example, we should link your work on splitting FSMs to this issue/close this issue as being subsumed by the new work. |
The closest thing I can think of is #2020-- some comments towards the end of that issue dealt with this issue of fan-out. In general though, I think it's a good idea to summarize our work so far in an issue/discussion. I'll make one, and we can link this issue through there if it's better than #2020. |
Awesome! Once you have the issue, please link it back to this one. |
Control signals in Calyx programs often have high fan outs. For example, in a
par
statement withn
children, thego
signal to the corresponding group to implement the control will have a fan-out ofn
.With the ntt pipelines that execute a lot of simple groups in the same par block (and even larger systolic arrays), this will quickly become a problem.
A possible solution is trading off latency for fan-out by inserting registers to forward the control signals:
par
block withn
children, instantiate two control registers and connectpar
s go signal to the register.n/2
control statements. Each half of control statements get their go signal from one of the two registers.This slows down the par block by one cycle but reduces fan-out by a factor of two. In general, given a maximal fan-out of
m
(specified by attribute, target, or compiler flag), this pass can uselog_m n
more cycles to break up the control flow signal.This is partly inspired by conversation with @zhangzhiru on control pipelining. The problem is harder because they need to forward the signal within the context of pipelines. However, I think this could be a good base of giving frontend or compiler toolchains a way to guarantee synthesizability of Calyx designs.
The text was updated successfully, but these errors were encountered: