-
Notifications
You must be signed in to change notification settings - Fork 52
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
Smart seq split #2217
base: main
Are you sure you want to change the base?
Smart seq split #2217
Conversation
- need to add guards for parent fsm - need to update with correct logic in case of split, instead of just single/duplicate
- added up till + including parent fsm transitions - next, make sure done / resets are implememented
- need to implement done/reset assignments - need to test enable and transition assignments - need to factor out & of all guards in a vec into ir::guard
- need to add correctness tests to runt.toml file
… 1 instead of 0 after first state finished)
@parthsarkar17 what is the status of this PR and what is blocking it from being merged? |
@rachitnigam, @calebmkim and I were deciding whether this splitting technique was "better" than duplication or not, given that they were pretty similar. We were also considering separating the idea of offloading onto a child register from the idea of creating two, identical children and parent registers (which is what this branch's code does). Originally, the idea would be that for |
@parthsarkar17, that makes sense! I think we should perhaps consider making a page in docs.calyxir.org that describes the various options and links to the experiments? My long-term worry is that all of these options will be impossible to understand without the context of specific experiments and rationale around them. |
Yeah, agreed, it seems like it can quickly get out of control. That's a good plan! I'll get on it |
@parthsarkar17 are we still planning to merge this PR? |
This pull request has not seen activity in 14 days and is being marked as stale. If you're continuing work on this, please reply and state how to get this PR in a mergeable state or what issues it is blocked on. If the PR is not ready for review, please mark it as a draft. The PR will be closed in 7 days if there is no further activity. |
This stale PR is being closed because it has not seen any activity in 7 days. If you're planning to continue work on it, please reopen it and mention how to make progress on it. |
@parthsarkar17 marking this as a draft so StaleBot doesn't close it for now |
Similar to duplication, the goal with splitting a
seq
block is ultimately to reduce fanout from the one register that normally controls a sequential schedule. Initially, we tried to transform:into:
The children schedules generated control registers like so:
which was the goal, except, with this, the following groups and assignments would be generated:
Lines 1 and 2 are pretty similar; they each check the current state of the FSM register and ensure some other group has finished, and then they each update their register's value with a new value (the same value for each register!). Once we got synthesis results from this "new-fsm-insertion" method, we saw that WS decreased and LUT usage increased; we suspected it had something to do with the fact that we were duplicating the logic to transition FSM states, since both
fsm0
andfsm1
have identical transition conditions (up to the names of the groups they are controlling) and new values.So, we decided to open up an option in TDCC that lets a
seq
block be controlled by a parent register, a child register, and duplicated versions of each register (that agree with their respective original at each cycle). We can hopefully, therefore, get the benefits of reducing fan-out, while also ensuring that we reuse logic wherever we can. Here's what thetdcc
group will look like for the above control block:In short, the idea is duplication, but with an emphasis on making sure the registers reuse logic to update themselves. Benchmarking + synthesis results are in progress.