From 41b4637c293eafa1021d4145b011d52bc7087b79 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 24 May 2019 21:13:14 -0700 Subject: [PATCH] build and name hwacha correctly --- generators/boom | 2 +- .../example/src/main/scala/ConfigMixins.scala | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/generators/boom b/generators/boom index 92313af2..2f8c419f 160000 --- a/generators/boom +++ b/generators/boom @@ -1 +1 @@ -Subproject commit 92313af2a0ed4d8a93591a08f42ede1a0ffd808a +Subproject commit 2f8c419ff8fa7d848d0d92d4977885cb1e1fa5b3 diff --git a/generators/example/src/main/scala/ConfigMixins.scala b/generators/example/src/main/scala/ConfigMixins.scala index 0c304d60..69e2b08b 100644 --- a/generators/example/src/main/scala/ConfigMixins.scala +++ b/generators/example/src/main/scala/ConfigMixins.scala @@ -3,14 +3,18 @@ package example import chisel3._ import chisel3.util.{log2Up} -import freechips.rocketchip.config.{Parameters, Config} -import freechips.rocketchip.subsystem.{WithRoccExample, WithNMemoryChannels, WithNBigCores, WithRV32} +import freechips.rocketchip.config.{Field, Parameters, Config} +import freechips.rocketchip.subsystem.{RocketTilesKey, WithRoccExample, WithNMemoryChannels, WithNBigCores, WithRV32} import freechips.rocketchip.diplomacy.{LazyModule, ValName} import freechips.rocketchip.devices.tilelink.BootROMParams -import freechips.rocketchip.tile.{XLen} +import freechips.rocketchip.tile.{XLen, BuildRoCC, TileKey, LazyRoCC} + +import boom.system.{BoomTilesKey} import testchipip._ +import hwacha.{Hwacha} + import sifive.blocks.devices.gpio._ /** @@ -132,16 +136,14 @@ class WithMultiRoCC extends Config((site, here, up) => { * And you call WithMultiRoCCHwacha(Seq(0,1)) * Then Core 0 and 1 will get a Hwacha * - * @param harts Seq of harts to specifiy which will get a Hwacha + * @param harts Seq of harts to specify which will get a Hwacha */ class WithMultiRoCCHwacha(harts: Seq[Int]) extends Config((site, here, up) => { case MultiRoCCKey => { require(harts.max <= ((up(RocketTilesKey, site).length + up(BoomTilesKey, site).length) - 1)) up(MultiRoCCKey, site) ++ harts.distinct.map{ i => (i -> Seq((p: Parameters) => { - implicit val q = p - implicit val v = implicitly[ValName] - LazyModule(new Hwacha()(p)) + LazyModule(new Hwacha()(p)).suggestName("hwacha") })) } }