-
Notifications
You must be signed in to change notification settings - Fork 902
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
Memory inference redesign #1959
Comments
Better handling of transparency would also be something I'd like to see, needed to support most TDP patterns - c.f. #1390 and amaranth-lang/amaranth#216 |
Not in scope:
|
It should handle multiple write ports without giving up and falling back to flops. |
I mean, uh, that's kind of obvious :p |
I've done a bit of digging on the TDP inference, and managed to get a prototype mapping going through the Python API, but got sidetracked while working on test scenarios. The MyHDL test cases are outdated, I'll have to revisit/CI them again.. |
From an RTLIL (post-inference) PoV: Currently, memories seem to have two possible representations: Either as a combination of an
I'm looking forward to input, including options I may have overlooked - especially from the devs who ultimately have the final say in this :) |
We could also support arbitrarily many independent ports by basically concatenating them in |
@clairexen Is it really not an option to replace |
@clairexen any update on this? |
@whitequark Sorry, I don't understand what "fine grained $mem* cells" means in this context. Can you elaborate? |
I meant, can we get rid of |
After some great discussion on IRC yesterday, I thought I'd add my memory cell redesign draft here as well: https://gist.github.com/Xiretza/fec08b9810a66efd368705a7f4a51aa7 Executive summary (of revision 2):
Please let me know if you can think of any requirements that can't be modeled easily with these proposed cells. |
Removing Next, I am not sure whether asymmetrical properties should end up in a (virtual) primitive, most BRAM primitives I am aware of don't have such a built-in property and infer with glue logic to implement asymmetric behaviour. For what I've eperimented with, TDP problems turned up mostly during technology mapping. The above mentioned mapping prototype was revisited, test case finds in this repo: https://github.com/hackfin/hdlplayground (quick start: fire up binder, open up More comments:
|
The point of removing
If |
Some thoughts after doing a lot of reading:
|
It's still not entirely clear to me how Question is, if There might be a few users still depending on |
This has been said already — by not having a simulateable model, and handling
It could, but why would we ever want to do it specifically using
If you're depending on the raw cell in some way, you'd better describe how instead of just saying it. |
Yes, and how would other languages be handled? This would implicitely output a different structure than the yosys kernel is aware of, unless run through a pass, no? So you'd offload the problem of conversion to the language output plugins.
I think I've given quite a few examples on that subject (above links), incl. hints on how to handle TDP for the ECP5 case with minor changes to the |
Correct, and so what? The language output handles this already anyway. The current Verilog backend does not emit the
What, your one-off TDP scripts? Given that the point of this issue is to handle this properly within yosys core, I don't think keeping them working is worth it.
... this is pretty much a GHDL bug that needs to be fixed, given that the current memory optimization passes operate only on the unpacked cells anyway (
I'm not — RTLIL, including the cell primitives, is not and has never been considered a stable interface. Perhaps it should be, but at the moment we really don't have the means to do that (and this is, btw, independent of the
I'm not offloading anything — the |
See also ghdl/ghdl#1069. And I tend to keep them working (as a reference) until I see these test cases inferring like in other $-Tools.
The yosys LaTeX docs kinda insinuates so. I have no problem with that, if there's an entry point documenting changes. But that's another topic indeed. Compatibility breaks are kinda painful when introduced suddenly without a reference test that demonstrates the 'new' way.
I fully agree on reducing maintenance work. I just found it easier to map and verify a single pseudo primitive instead of different ones that need to get collected and sorted out accordingly. So you're saying that collecting this information from |
Here goes a proposal for the new text format description, along with some examples: https://gist.github.com/mwkmwkmwk/2e51a10ba55bda239ac1b667ca062693 Open issues:
|
So, since people have been asking about this, here's the current status: First, the memory model changes and recognition passes for newly-supported features have all landed. This includes:
HOWEVER, our current BRAM mapping pass ( While some new functionality (init/reset values, specifically) could be reasonably retrofitted into |
This is excellent work @mwkmwkmwk and I want to say a huge thank you for taking on this epic task! |
A very, very untested solution is now available as #3189. |
Requirements:
The text was updated successfully, but these errors were encountered: