-
Notifications
You must be signed in to change notification settings - Fork 178
Prune/Don't Emit Output Annotation Sequence #1272
Comments
I can't provide the source code as this really only appears to be happening in a larger context. I'll try to describe the code involved in general terms...
The Top module is not particularly big, even with all the sub-modules. It's ca. 20000 ALMs as measured in Altera Quartus speak, which is ~5% of the biggest Arria 10 FPGA (28 nm). I guess I could even say that it's pretty small as things go these days. To hazard a guess, I believe that there's a problem with some sort of global optimization/analysis in Chisel that is blowing up. The Altera P&R tools have no problem with this design. Verilator compiles it in no time. That said, before I reworked the code, I had a single mid-level module that incorporated the low level module. This giant mid-level module caused Verilator to generate .cpp files that g++ took forever to build. |
I haven't had time to really dig into this, but I noticed that the Namely, things which are serialized to files should not be included in the serialized output annotation sequence. However, for inter-stage communication not through files it's fine to leave the full annotation sequence intact. There's some initial work on this here: https://github.com/freechipsproject/firrtl/tree/dont-serialize |
Concretely the issue is that the This problem didn't come up for Rocket Chip because that project is only serializing annotations internal to the circuit and not these annotations that come from options. Therefore, this implicit output annotation file option was never communicated. #1269 should fix this. |
@seldridge Does a unit-test exist to check for this problem? |
@seldridge I tried to test with 0.1-SNAPSHOT, but it fails to build with the following error message:
|
@oharboe: There's actually not a unit test for this problem. Granted, I think the unit test would really be that That's an error that's indicative of something else... There was a flattening of the package hierarchy that moved You should be able to just add a library dependency for testers2 as |
@oharboe It's not practical to build and publish locally as I'm testing on a build server, which is where it crashed. What would be the correct package combo to try out? |
You should be able to use |
Gotit. However, it's not practical to build Chisel on our build server, so I need prepublished packages. Is there a publish package combo I can test with? |
The most recently published SNAPSHOT of chisel-testers2 is v0.2-20191127-SNAPSHOT. This should pull compatible versions of all the other libraries. |
@ucbjrl quite. that image doesnt include the fix, so i guess i wait. |
We've just published 0.2-20191218-SNAPSHOT of chisel-testers2 which should depend on the v1.3-20191218-SNAPSHOT version of FIRRTL which should contain this fix. This fix has also been back ported to FIRRTL v1.2.2 which should be pulled in by chisel-testers2 v0.1.2. Note: the 0.2.x branch of chisel-testers2 has undergone a package rename - from |
@ucbjrl I've upgraded to chisel-testers2 v0.1.2 and removed my hack and now it works. Thanks! |
Checklist
What is the current behavior?
There are reported issues related to
Stage
s always serializing their output annotation sequence. Either there needs to be a way to turn this off or too many or too many large annotations are being serialized. It may also be worth not serializing annotations, unless the user requests it. This is really a method of checkpoint-restart or an interface between stages that are communicating via files.The result of this is out-of-memory errors in the JVM during annotation serialization.
This may be as simple as using a
DontSerialize
annotation that is attached to large things which are serialized in other ways (e.g., circuits).What is the expected behavior?
FIRRTL shouldn't get out-of-memory errors for normal circuits (Rocket Chip sized?).
Steps to Reproduce
Unclear at this time. @oharboe may be able to help.
Your environment
External Information
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/chisel-users/qbx_G58dCEY/eJN-IfOzAwAJ
The text was updated successfully, but these errors were encountered: