Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

How to add Inclusive cache to Freedom? #144

Open
yintianyu opened this issue Nov 6, 2019 · 1 comment
Open

How to add Inclusive cache to Freedom? #144

yintianyu opened this issue Nov 6, 2019 · 1 comment

Comments

@yintianyu
Copy link

yintianyu commented Nov 6, 2019

I'm in Branch bump-stuff.

I can successfully add Inclusive cache to Rocket-Chip by adding this to system/Configs.scala.

class L2CacheConfig extends Config(new WithInclusiveCache ++ new DefaultConfig)

However, when I modify freedom's unleashed/DevKitConfigs.scala like this:

// Default FreedomU500Config
class FreedomU500Config extends Config(
  new WithJtagDTM            ++
  new WithNMemoryChannels(1) ++
//  new WithNBigCores(1)       ++
//  new BaseConfig
  new L2CacheConfig
)

It failed when generating verilog:

[error] (run-main-0) java.lang.IllegalArgumentException: requirement failed: AcquireB(TransferSizes[1, 64]) < AcquireT(TransferSizes[1, 128])
[error] java.lang.IllegalArgumentException: requirement failed: AcquireB(TransferSizes[1, 64]) < AcquireT(TransferSizes[1, 128])
[error] 	at scala.Predef$.require(Predef.scala:277)
[error] 	at freechips.rocketchip.tilelink.TLManagerParameters.<init>(Parameters.scala:48)
[error] 	at freechips.rocketchip.tilelink.TLManagerParameters.copy(Parameters.scala:37)
[error] 	at freechips.rocketchip.tilelink.TLCacheCork.$anonfun$node$5(CacheCork.scala:22)
[error] 	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error] 	at scala.collection.immutable.List.foreach(List.scala:389)
[error] 	at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error] 	at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error] 	at scala.collection.immutable.List.map(List.scala:295)
[error] 	at freechips.rocketchip.tilelink.TLCacheCork.$anonfun$node$3(CacheCork.scala:22)
[error] 	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error] 	at scala.collection.immutable.List.foreach(List.scala:389)
[error] 	at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error] 	at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error] 	at scala.collection.immutable.List.map(List.scala:295)
[error] 	at freechips.rocketchip.diplomacy.MixedAdapterNode.mapParamsU(Nodes.scala:481)
[error] 	at freechips.rocketchip.diplomacy.MixedNode.liftedTree3$1(Nodes.scala:354)
[error] 	at freechips.rocketchip.diplomacy.MixedNode.uiParams$lzycompute(Nodes.scala:351)
[error] 	at freechips.rocketchip.diplomacy.MixedNode.uiParams(Nodes.scala:350)
...

Does anyone know how to solve this?

@erikdanie
Copy link
Contributor

This probably means that you need to put in a TLFragmenter (https://github.com/chipsalliance/rocket-chip/blob/master/src/main/scala/tilelink/Fragmenter.scala#L26) to convert the larger transactions down. You can search freedom and rocket-chip for some examples of how it is used.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants