Closed baltazarortiz closed 4 years ago
I was able to get it to build with these configs:
class SmallRocketConfig extends Config(
new WithTop ++ // use default top
new WithBootROM ++ // use default bootrom
new freechips.rocketchip.subsystem.WithNSmallCores(1) ++
new freechips.rocketchip.system.BaseConfig)
class ScratchpadRocketConfig extends Config(
new freechips.rocketchip.subsystem.WithNoMemPort ++
new freechips.rocketchip.subsystem.WithNMemoryChannels(0) ++
new freechips.rocketchip.subsystem.WithNBanks(0) ++
new freechips.rocketchip.subsystem.WithScratchpadsOnly ++
new SmallRocketConfig)
Basically, removing the L2 cache and the mbus fully by setting the number of memory channels to 0 and the number of banks to 0. If this works for you we should update the documentation (you can submit a PR if you want).
This works for 64 and 32 bit cores (passes asm and bmark tests), thank you! I'll submit a PR.
With the same configuration, Rocket still gets the exceptions from above. I'll make a separate issue in the Rocket repo about that.
In the documentation, there is an example config for making the L1 cache into a scratchpad.
I copied the
SmallRocketConfig
andScratchpadRocketConfig
definitions intoRocketConfigs.scala
, then tried to build using verilator withmake CONFIG=ScratchpadRocketConfig -j8
. This gives the following error:I also tried using this config directly in Rocket, and get the same error.
I then tried taking the
MMIOPortOnlyConfig
and swapping inDefaultSmallConfig
:This builds successfully, though it is a bit unclear to me what some of the Configs are doing here even after looking at the documentation, and specifically why enabling these fixes the previous error.
When I run the tests using this Config, some tests pass, and the rest result in exceptions (the same happens when using
TinyConfig
). I'm aware that the default scratchpad size is small enough that some tests don't pass, but previous issues mentioning this showed actual failures rather than exceptions.Specific questions: