Skip to content
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

[enhancement] Scheduling: (send, receive) pairs on internal channels should be constrained together #1804

Open
grebe opened this issue Dec 18, 2024 · 1 comment
Labels
enhancement New feature or request scheduler Scheduling algorithm for XLS IR operations

Comments

@grebe
Copy link
Collaborator

grebe commented Dec 18, 2024

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

Consider a proc A with the following schedule:

| x=recv(chIn); f(x) -|> x=g(x) -|> send(chInternal, h(x)) |

and a proc B that receives the result of proc A

| y=recv(chInternal); y=a(y) -|> y=b(y) -|> send(chOut, c(y)) |

The current scheduling implementation applies an IO delay to the recv(chInternal) (also the send), but that scheduling option should really only be for external channels.

Current best alternative workaround (limit 100 words)

Disable FIFO configs with bypass+no-register_pop_outputs. This impacts throughput and potentially deadlock behavior.

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

It's not difficult to not add the IO delay to internal channels, but depending on the FIFO config (in particular, is bypass enabled and it pop output flopping disabled?) you may need the delay on recv(chInternal) to be constrained by the delay on the send. However, because they are in different pipelines, you need to say something like startTime(recv(chInternal)) = stageVar + (startTime(send(chInternal)) % clock_period_ps). Ideally we'd schedule all procs at once with constraints that allows the scheduler to decide if it's better to increase flop count in one proc to reduce flops in the other.

@grebe grebe added enhancement New feature or request scheduler Scheduling algorithm for XLS IR operations labels Dec 18, 2024
@grebe
Copy link
Collaborator Author

grebe commented Dec 18, 2024

Also, we may want a separate codegen option for specifying delay behavior through FIFOs- the equality I wrote is only true if the FIFO has no delay.

copybara-service bot pushed a commit that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scheduler Scheduling algorithm for XLS IR operations
Projects
None yet
Development

No branches or pull requests

1 participant