From aecf601e803bfd2371667a3fb60bfcd83c333027 Mon Sep 17 00:00:00 2001 From: Kamimiao Date: Tue, 19 Nov 2024 16:16:35 +0800 Subject: [PATCH] feat(Configs): add FpgaDiffDefaultConfig (#3893) Add a configuration to enable basic diff when fpga difftest is used. --- src/main/scala/top/Configs.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/scala/top/Configs.scala b/src/main/scala/top/Configs.scala index 9a16eb0f5e..4fd63c70f1 100644 --- a/src/main/scala/top/Configs.scala +++ b/src/main/scala/top/Configs.scala @@ -464,3 +464,20 @@ class FpgaDefaultConfig(n: Int = 1) extends Config( ) }) ) + +class FpgaDiffDefaultConfig(n: Int = 1) extends Config( + (new WithNKBL3(3 * 1024, inclusive = false, banks = 1, ways = 6) + ++ new WithNKBL2(2 * 512, inclusive = true, banks = 4) + ++ new WithNKBL1D(64, ways = 8) + ++ new BaseConfig(n)).alter((site, here, up) => { + case DebugOptionsKey => up(DebugOptionsKey).copy( + AlwaysBasicDiff = true, + AlwaysBasicDB = false + ) + case SoCParamsKey => up(SoCParamsKey).copy( + L3CacheParamsOpt = Some(up(SoCParamsKey).L3CacheParamsOpt.get.copy( + sramClkDivBy2 = false, + )), + ) + }) +)