-
Notifications
You must be signed in to change notification settings - Fork 9
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
Instance bundles and systemverilog generate
labels
#367
Comments
This seems interesting but I don't quite yet understand the example you've used to motivate the problem. Can you either draw out the pipeline to show how exactly the registers are being reused or discuss in more details? Given this, if I'm understanding this correctly, the TLDR is that you need some generative way to define
In general, I think bundles should be able to solve these generative problems but there is a high-overhead in modeling them like this. OTOH, there are particular challenges in proving resource reuse safe and we haven't implement the right checks yet (#76). |
Oh my god this isn't an approach I had considered at all... What a solution! I'll definitely try it out, thanks! I think the labeling idea might still have some worth discussing though at least in the future so I'll hold off on closing this for now. |
Yeah, I think framing this as "instance bundles" is not a bad idea at all and perhaps can be a syntactic feature (#138) but we need to be careful about encoding it. You can imagine a source-to-source transformation that takes all those |
One of the current limitations of the filament language quite severly limits optimization of pipelining. SayI have a component that requires me to instantiate
N
registers, which I will reuse such thatThis is currently directly applicable to the PEASE FFT, which needs to take synchronized input and stagger it so that the combinational butterflies can iterate through chunks of registers and perform combinational logic on the data, then passing it back to the same register. Between stages all registers hold their data for the same number of cycles, and at the end each register needs to re-synchronize their outputs.
Possible Solutions
Instance Bundles
This is probably the simplest and easiest to understand implementation.
Loop Labeling
This is a weird idea I had thinking about this issue in the middle of the night, but I what if we consider labeling
for
loops? For example, we can doTypechecking this should be as simple as plugging in the expression in
{}
fori
, just like we do bundle typechecking now. This is an odd idea but with some syntax highlighting it should allow us to eliminate bundles and implement all forms of "array" structures at once. For example, if we uselet
port syntax orlet
param syntax we can do the following:and we can even use nested for loops to automatically support n-dimensional arrays. Therefore, an
n-d
bundle can be desugared as follows:The syntax could definitely be discussed but this is just an idea that seemed very interesting to me.
The text was updated successfully, but these errors were encountered: