Closed ccelio closed 8 years ago
Sorry that the pass print outs isn't more user friendly. You can change the level by modifying src/main/resources/logback.xml. I spent some time trying to figure out how to globally change the level programmatically (ie. with a command-line option), but couldn't figure it out. I'll try to take a look again soon.
As for a pass to print the number of nodes, I totally agree. This would help us detect issues like #200 and try to fix them before people with large designs get stuck.
This OutOfMemory error shows up when trying to compile BOOM after enabling BOOM's many "printf" statements to be emitted.
I can get it to compile to Verilog if I increase the Java limits to absurd levels:
java -Xmx16G -Xss32M -XX:MaxPermSize=4192M
-cp /scratch/celio/boom-chip/firrtl/utils/bin/firrtl.jar firrtl.Driver
-i /scratch/celio/boom-chip/vsim/generated-src/Top.BOOML1Config.fir
-o /scratch/celio/boom-chip/vsim/generated-src/Top.BOOML1Config.v -X verilog`
But that wasn't required before, and I'm noticing significant increases in compile times now. For example, BOOM without printfs takes 2x the amount of time to generate a Verilog file than it used to.
Can I look at your .fir file?
To reproduce:
git clone https://github.com/ucb-bar/rocket-chip.git boom-chip
cd boom-chip
git checkout boom
git submodule update --init
cd emulator
time make CONFIG=BOOMConfig
ls generated-src
To reproduce the "printf" issue that makes the graph bigger...
vim boom-chip/boom/src/main/scala/const.scala
modify line 24, set "val DEBUG_PRINTF=true".
Didn't build, getting the following error:
[error] /Users/cusgadmin/code/scala/boom-chip/rocket/src/main/scala/nbdcache.scala:10: object util is not a member of package uncore
[error] import uncore.util._
By starting from a clean repository checkout and following the above instructions, I am unable to reproduce your error message.
The rocket-chip commit is bb1c4e2ef9014a0f55f21937c6e02a35f80d43cd. The boom submodule commit is 75bba38ba406f4e6fb3b1f055cf72bd1619587ca.
Something in the last 1-2 weeks seems to have broke FIRRTL with regards to java GCC memory limit in using BOOM - I believe this commit (76684cbeb8b5d46138185432bc323a5de2eb7f59).
It's the oldest commit along the mainline (76684cbeb8b5d46138185432bc323a5de2eb7f59) I can replicate the error with, and thankfully it also still prints out the compiler passes so I can see where it is. Each pass was really really really slow: 38 seconds for expand-whens for example. It usually takes 2.5 minutes to get from "make" to a compiled emulator for BOOM. But this one crashes out at 7-8 minutes during InferWidths.
Trying to go to older FIRRTLs just gives me gives lower types errors... thanks to trying to update to latest rocket-chip. But that's not why I'm here.
Here's the failing output:
Another failure gave me a Java heap space error:
Asides:
I'd appreciate some sort of statistics output from FIRRTL telling me how many "nodes" a design used. It'd help keep an eye on exploding node counts from either broken Chisel/FIRRTL passes or poor Coding style. And it may help highlight when something like this starts to crop up.
Also, how can I turn back on the FIRRTL pass print outs? When this stuff is failing I'd like to know where I'm stuck at.