Skip to content

Commit 5b05b7b

Browse files
committed
feat(ut): add new test target: test-top-ut-set2-way2-mshr4
1 parent d663d40 commit 5b05b7b

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,17 @@ test-top-ut:
6969
mill -i CoupledL2.test.runMain coupledL2.TestTopForUT -td $(BUILD_DIR)/TestTop --target systemverilog --split-verilog
7070
$(MEM_GEN_SEP) "$(MEM_GEN)" "$(BUILD_DIR)/TestTop/TestTop.sv.conf" "$(BUILD_DIR)/TestTop"
7171

72+
test-top-ut-set2-way4-mshr4:
73+
SETS=2 WAYS=4 MSHRS=4 mill -i CoupledL2.test.runMain coupledL2.TestTopForUT -td $(BUILD_DIR)/TestTopSet2Way4Mshr4 --target systemverilog --split-verilog
74+
$(MEM_GEN_SEP) "$(MEM_GEN)" "$(BUILD_DIR)/TestTopSet2Way4Mshr4/TestTop.sv.conf" "$(BUILD_DIR)/TestTopSet2Way4Mshr4"
75+
7276
test-top-ut-release:
7377
mill -i CoupledL2.test.runMain coupledL2.TestTopForUT -td $(BUILD_DIR)/release/TestTop --target systemverilog --split-verilog
74-
$(MEM_GEN_SEP) "$(MEM_GEN)" "$(BUILD_DIR)/TestTop/TestTop.sv.conf" "$(BUILD_DIR)/TestTop"
78+
$(MEM_GEN_SEP) "$(MEM_GEN)" "$(BUILD_DIR)/release/TestTop/TestTop.sv.conf" "$(BUILD_DIR)/release/TestTop"
7579

7680
test-top-ut-mmio:
7781
mill -i CoupledL2.test.runMain coupledL2.MMIOBridgeTop -td $(BUILD_DIR)/MMIOBridgeTop --target systemverilog --split-verilog
78-
$(MEM_GEN_SEP) "$(MEM_GEN)" "$(BUILD_DIR)/TestTop/TestTop.sv.conf" "$(BUILD_DIR)/TestTop"
82+
$(MEM_GEN_SEP) "$(MEM_GEN)" "$(BUILD_DIR)/MMIOBridgeTop/TestTop.sv.conf" "$(BUILD_DIR)/MMIOBridgeTop/TestTop"
7983

8084
clean:
8185
rm -rf ./build

src/test/scala/chi/TestTopForUT.scala

+7-3
Original file line numberDiff line numberDiff line change
@@ -469,16 +469,20 @@ class MMIOBridgeTop()(implicit p: Parameters) extends LazyModule {
469469

470470
object TestTopForUT extends App {
471471

472+
val ENV_WAYS = sys.env.getOrElse("WAYS", "4").toInt
473+
val ENV_SETS = sys.env.getOrElse("SETS", "256").toInt
474+
val ENV_MSHRS = sys.env.getOrElse("MSHRS", "16").toInt
472475
val isMMIOBridgeTop = sys.env.getOrElse("MMIOBRIDGE_TOP", "0") == "1"
473476
val isReleaseRTL = sys.env.getOrElse("RELEASE_RTL", "0") == "1"
474-
println(s"isMMIOBridgeTop: $isMMIOBridgeTop, isReleaseRTL: $isReleaseRTL")
477+
println(s"ENV_WAYS: $ENV_WAYS, ENV_SETS: $ENV_SETS, ENV_MSHRS: $ENV_MSHRS, isMMIOBridgeTop: $isMMIOBridgeTop, isReleaseRTL: $isReleaseRTL")
475478

476479
Constantin.init(false)
477480

478481
val config = new Config((_, _, _) => {
479482
case L2ParamKey => L2Param(
480-
ways = 4,
481-
sets = 256,
483+
ways = ENV_WAYS,
484+
sets = ENV_SETS,
485+
mshrs = ENV_MSHRS,
482486
clientCaches = Seq(L1Param(
483487
aliasBitsOpt = Some(2),
484488
vaddrBitsOpt = Some(36),

0 commit comments

Comments
 (0)