build and name hwacha correctly
This commit is contained in:
Submodule generators/boom updated: 92313af2a0...2f8c419ff8
@@ -3,14 +3,18 @@ package example
|
|||||||
import chisel3._
|
import chisel3._
|
||||||
import chisel3.util.{log2Up}
|
import chisel3.util.{log2Up}
|
||||||
|
|
||||||
import freechips.rocketchip.config.{Parameters, Config}
|
import freechips.rocketchip.config.{Field, Parameters, Config}
|
||||||
import freechips.rocketchip.subsystem.{WithRoccExample, WithNMemoryChannels, WithNBigCores, WithRV32}
|
import freechips.rocketchip.subsystem.{RocketTilesKey, WithRoccExample, WithNMemoryChannels, WithNBigCores, WithRV32}
|
||||||
import freechips.rocketchip.diplomacy.{LazyModule, ValName}
|
import freechips.rocketchip.diplomacy.{LazyModule, ValName}
|
||||||
import freechips.rocketchip.devices.tilelink.BootROMParams
|
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 testchipip._
|
||||||
|
|
||||||
|
import hwacha.{Hwacha}
|
||||||
|
|
||||||
import sifive.blocks.devices.gpio._
|
import sifive.blocks.devices.gpio._
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,16 +136,14 @@ class WithMultiRoCC extends Config((site, here, up) => {
|
|||||||
* And you call WithMultiRoCCHwacha(Seq(0,1))
|
* And you call WithMultiRoCCHwacha(Seq(0,1))
|
||||||
* Then Core 0 and 1 will get a Hwacha
|
* 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) => {
|
class WithMultiRoCCHwacha(harts: Seq[Int]) extends Config((site, here, up) => {
|
||||||
case MultiRoCCKey => {
|
case MultiRoCCKey => {
|
||||||
require(harts.max <= ((up(RocketTilesKey, site).length + up(BoomTilesKey, site).length) - 1))
|
require(harts.max <= ((up(RocketTilesKey, site).length + up(BoomTilesKey, site).length) - 1))
|
||||||
up(MultiRoCCKey, site) ++ harts.distinct.map{ i =>
|
up(MultiRoCCKey, site) ++ harts.distinct.map{ i =>
|
||||||
(i -> Seq((p: Parameters) => {
|
(i -> Seq((p: Parameters) => {
|
||||||
implicit val q = p
|
LazyModule(new Hwacha()(p)).suggestName("hwacha")
|
||||||
implicit val v = implicitly[ValName]
|
|
||||||
LazyModule(new Hwacha()(p))
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user