-
Notifications
You must be signed in to change notification settings - Fork 954
ecp5: Make -abc9 the default #1544
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
Conversation
Signed-off-by: David Shah <[email protected]>
What about iCE40? |
I don't consider myself the "owner" of synth_ice40 enough to make such a decision, but if there is a consensus for that I'm happy to do that too. |
I'm very much in favor of doing the switch for iCE40 as well, since there is no downside that I know of, and the QoS improves massively. |
Regarding third party users: nMigen currently does not add So this PR (and any follow-up for iCE40) would benefit all developers using nMigen who do not already use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a number of concerns with making this default:
abc9
is still currently in flux and is far from stable in terms of features, attributes, etc.synth_ecp5 -abc9
has timing numbers (and thus optimises) only for the 5G variant- Not all arrival timings are present, e.g.:
TRELLIS_DPR16X4
yosys/techlibs/ecp5/cells_sim.v
Line 118 in 2ec6d83
/* (* abc9_arrival=<TODO> *) */ TRELLIS_RAM16X2
yosys/techlibs/ecp5/cells_sim.v
Line 71 in 2ec6d83
output DO0, DO1 yosys/techlibs/ecp5/cells_sim.v
Line 220 in 2ec6d83
module TRELLIS_FF(input CLK, LSR, CE, DI, M, output reg Q); - etc.?
- Are all box timings present?
Quite frankly this applies to the whole of the Yosys, nextpnr and trellis flow....
In practice the lack of any absolute timing constraints and the fact each variant is proportionately similar means this is a small issue, I can add exact per-device numbers. This also doesn't change abc9 being a strict improvement over abc for any device.
Noted, will add these -
Other than the missing arrival times above; yes |
Indeed. But why add more chaos on top? I'm well aware that Off the top of my head, abc9 still needs:
which will also likely bring some more short-term breakage.
I understand that this is difficult, and there are many factors why it won't provide a big benefit, but users should be made aware of that.
Can you add a comment to this effect please? Regarding arrival times and box timings, what about these guys? yosys/techlibs/ecp5/cells_sim.v Lines 153 to 159 in 2ec6d83
yosys/techlibs/ecp5/cells_sim.v Lines 305 to 324 in 2ec6d83
|
@eddiehung I would like to emphasize this part as much as possible. The QoS with plain If your view is that |
Indeed. My argument is that robustness is something that should also be taken into account, and I'm personally not fully convinced that it is mature enough. If others are and are willing to help maintain it as I continue to add new features then I would feel a lot more comfortable. There are some areas which
I wouldn't go as far as to say not soon. It is probably my top item but it is slow progress and I am being stretched thin so I don't want to make any promises I can't keep.
I have no objection to that, nor am I involved in |
The main reason flowmap beats abc is it maps no wide LUTs, only LUT4s whereas abc1 is obscenely wasteful at using wide LUTs. Adding -nowidelut would probably get a similar area gain but at the expense of a 10-15% Fmax drop. I do agree, if abc9 is unlikely to be stable for the foreseeable future, I'd rather put time into flowmap and use that too. |
I'm a bit confused here--flowmap has a |
flowmap would also need to know that a LUT5 costs twice the area as a a LUT4, for example (this is the limit of abc1), and also ideally know that a LUT5 is slower than a LUT4 (this is what abc9 adds) |
In order to see a flowmap based flow as the default for ECP5, I'd like to see a feature set roughly similar to abc9 - I don't think any of this is too much work though, I may well even be able to get much of it done before abc9 is stable.
Nice to haves would be
|
We're in agreement here. I'm happy to discuss any improvements to it whever it's convenient. I'll be able to work on |
For the record, |
Closing this for now while we consider the best way forward. |
This was added in #1181.
This was added in #1661.
This was added in #1582.
Not sure about those, but they should surely be added by now (even considering the glacial pace of ABC development). With all this in mind, would you still be opposed to making ABC9 the default for ECP5 (and possibly Xilinx, but not iCE40, considering #1792)? |
I would correct that statement and say that the raw capability for architectures to support sequential synthesis was added by #1181, but so far that capability is only realised for Xilinx.
Specifically, there are two known upstream issues.
Without intending to sound rude: please help me understand why you're pushing for it to become default? My concern is that making it default will only cause a wider set of users to hit some of the known issues above, to which the rest of us will have to suggest the workaround is to go back to |
Okay, but my general impression is that most people don't know
That'd be nice.
I really don't think it's critical at all to be honest. My general experience with ABC versus ABC9 is that ABC is better (in Fmax/area) when targeting LUT4s, while ABC9 handles larger LUTs more efficiently; that makes them complimentary, rather than competitive.
Because at the rate of ABC's development, they won't be fully working this time next year either >.>
Sure, and there's the risk of unknown bugs lurking in there, too. But for ECP5 (at least in the default wide-LUT mode) there is a very distinct advantage to using ABC9 over ABC in Fmax and area, and for a lot of the users that will be the entirety of their Yosys experience. It'd be nice to give ABC9 a "fallback to ABC" mode for the rare case of ABC9 bugs, but my general opinion is that the present number of bugs is in no way an indicator of future bugs, and if really necessary there's the option of maintaining a small ABC downstream. I'm not arguing this for the sake of the power users, I'm arguing it for the majority who don't even know what ABC9 does. |
There's
And unfortunately that's out of my hands. I can't in good faith bless something that has known bugs, particularly one that can give a incorrect result (and which took me a significant amount of time to debug). Others can pull the trigger if they so wish, but there's a limit to what I can support.
I'm afraid I disagree here. I would say a lot of users are new to Yosys, and it's those users -- non power users -- that I want to provide something that works. That blinks. That works out of the box, for hobbyists and teachers and students. They aren't trying to push their designs to minimise delay or area. Those who are ready to climb outside of the sandbox can then start playing with more advanced and experimental features.
I think we agree that no-one needs to know what ABC9 does, and they will never need to if it works out of the box. That's where I'm trying to drive this towards. |
@eddiehung I see your arguments, but the absolute minimum that I believe should be done is indicating somewhere that for advanced use, |
abc9 gives substantially better area on almost any non-trivial design by virtue of using wide LUTs in a vaguely sensible way. Several third party frameworks like LiteX have been using it as default for a while, so it seems time for it to be the default for everyone - and give them a better impression of the capabilities of the open source tools!
Fixes #1323