diplomacy: make config.Parameters available in bundle connect()
This makes it posisble to use Parameters to control Monitors. However, we need to make all LazyModules carry Parameters.
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
package uncore.tilelink2
|
||||
|
||||
import Chisel._
|
||||
import config._
|
||||
import diplomacy._
|
||||
import regmapper._
|
||||
import unittest._
|
||||
@ -213,7 +214,7 @@ trait RRTest0Module extends HasRegMap
|
||||
regmap(RRTest0Map.map:_*)
|
||||
}
|
||||
|
||||
class RRTest0(address: BigInt) extends TLRegisterRouter(address, 0, 32, 0, 4)(
|
||||
class RRTest0(address: BigInt)(implicit p: Parameters) extends TLRegisterRouter(address, 0, 32, 0, 4)(
|
||||
new TLRegBundle((), _) with RRTest0Bundle)(
|
||||
new TLRegModule((), _, _) with RRTest0Module)
|
||||
|
||||
@ -250,11 +251,11 @@ trait RRTest1Module extends Module with HasRegMap
|
||||
regmap(map:_*)
|
||||
}
|
||||
|
||||
class RRTest1(address: BigInt) extends TLRegisterRouter(address, 0, 32, 6, 4)(
|
||||
class RRTest1(address: BigInt)(implicit p: Parameters) extends TLRegisterRouter(address, 0, 32, 6, 4)(
|
||||
new TLRegBundle((), _) with RRTest1Bundle)(
|
||||
new TLRegModule((), _, _) with RRTest1Module)
|
||||
|
||||
class FuzzRRTest0 extends LazyModule {
|
||||
class FuzzRRTest0()(implicit p: Parameters) extends LazyModule {
|
||||
val fuzz = LazyModule(new TLFuzzer(5000))
|
||||
val rrtr = LazyModule(new RRTest0(0x400))
|
||||
|
||||
@ -265,11 +266,11 @@ class FuzzRRTest0 extends LazyModule {
|
||||
}
|
||||
}
|
||||
|
||||
class TLRR0Test extends UnitTest(timeout = 500000) {
|
||||
class TLRR0Test()(implicit p: Parameters) extends UnitTest(timeout = 500000) {
|
||||
io.finished := Module(LazyModule(new FuzzRRTest0).module).io.finished
|
||||
}
|
||||
|
||||
class FuzzRRTest1 extends LazyModule {
|
||||
class FuzzRRTest1()(implicit p: Parameters) extends LazyModule {
|
||||
val fuzz = LazyModule(new TLFuzzer(5000))
|
||||
val rrtr = LazyModule(new RRTest1(0x400))
|
||||
|
||||
@ -280,7 +281,7 @@ class FuzzRRTest1 extends LazyModule {
|
||||
}
|
||||
}
|
||||
|
||||
class TLRR1Test extends UnitTest(timeout = 500000) {
|
||||
class TLRR1Test()(implicit p: Parameters) extends UnitTest(timeout = 500000) {
|
||||
io.finished := Module(LazyModule(new FuzzRRTest1).module).io.finished
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user