From 2cd897e240b12e6f42dc82b92edcb6d15ce0ebb9 Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Tue, 7 Jun 2016 16:13:01 -0700 Subject: [PATCH] Revert "include the unmatched field in CDEMatchError" This reverts commit ff2937a788bbbeaba3b6cf22f7520ef783a474a8. --- context-dependent-environments | 2 +- src/main/scala/Configs.scala | 64 ++++++++++++++++---------------- src/main/scala/TestConfigs.scala | 22 +++++------ 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/context-dependent-environments b/context-dependent-environments index 6ce66711..846f0098 160000 --- a/context-dependent-environments +++ b/context-dependent-environments @@ -1 +1 @@ -Subproject commit 6ce66711e7d9b65c49806734fa4028ed1305cf21 +Subproject commit 846f00987cc95aa6b9b806d3c8c690c6e011b89d diff --git a/src/main/scala/Configs.scala b/src/main/scala/Configs.scala index 9a6d8c3a..c95200c2 100644 --- a/src/main/scala/Configs.scala +++ b/src/main/scala/Configs.scala @@ -305,7 +305,7 @@ class BaseConfig extends Config ( case UseHtifClockDiv => true case ConfigString => makeConfigString() case GlobalAddrMap => globalAddrMap - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }}, knobValues = { case "NTILES" => 1 @@ -316,35 +316,35 @@ class BaseConfig extends Config ( case "L1I_SETS" => 64 case "L1I_WAYS" => 4 case "L1I_BUFFER_WAYS" => false - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError } ) class DefaultConfig extends Config(new WithBlockingL1 ++ new BaseConfig) -class With2Cores extends Config(knobValues = { case "NTILES" => 2; case field => throw new CDEMatchError(field) }) -class With4Cores extends Config(knobValues = { case "NTILES" => 4; case field => throw new CDEMatchError(field) }) -class With8Cores extends Config(knobValues = { case "NTILES" => 8; case field => throw new CDEMatchError(field) }) +class With2Cores extends Config(knobValues = { case "NTILES" => 2; case _ => throw new CDEMatchError }) +class With4Cores extends Config(knobValues = { case "NTILES" => 4; case _ => throw new CDEMatchError }) +class With8Cores extends Config(knobValues = { case "NTILES" => 8; case _ => throw new CDEMatchError }) -class With2BanksPerMemChannel extends Config(knobValues = { case "NBANKS_PER_MEM_CHANNEL" => 2; case field => throw new CDEMatchError(field) }) -class With4BanksPerMemChannel extends Config(knobValues = { case "NBANKS_PER_MEM_CHANNEL" => 4; case field => throw new CDEMatchError(field) }) -class With8BanksPerMemChannel extends Config(knobValues = { case "NBANKS_PER_MEM_CHANNEL" => 8; case field => throw new CDEMatchError(field) }) +class With2BanksPerMemChannel extends Config(knobValues = { case "NBANKS_PER_MEM_CHANNEL" => 2; case _ => throw new CDEMatchError }) +class With4BanksPerMemChannel extends Config(knobValues = { case "NBANKS_PER_MEM_CHANNEL" => 4; case _ => throw new CDEMatchError }) +class With8BanksPerMemChannel extends Config(knobValues = { case "NBANKS_PER_MEM_CHANNEL" => 8; case _ => throw new CDEMatchError }) class With2MemoryChannels extends Config( (pname,site,here) => pname match { case NMemoryChannels => Dump("N_MEM_CHANNELS", 2) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError } ) class With4MemoryChannels extends Config( (pname,site,here) => pname match { case NMemoryChannels => Dump("N_MEM_CHANNELS", 4) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError } ) class With8MemoryChannels extends Config( (pname,site,here) => pname match { case NMemoryChannels => Dump("N_MEM_CHANNELS", 8) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError } ) @@ -371,27 +371,27 @@ class WithL2Cache extends Config( case InnerTLId => "L1toL2" case OuterTLId => "L2toMC"}))) case L2Replacer => () => new SeqRandom(site(NWays)) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }, - knobValues = { case "L2_WAYS" => 8; case "L2_CAPACITY_IN_KB" => 2048; case "L2_SPLIT_METADATA" => false; case field => throw new CDEMatchError(field) } + knobValues = { case "L2_WAYS" => 8; case "L2_CAPACITY_IN_KB" => 2048; case "L2_SPLIT_METADATA" => false; case _ => throw new CDEMatchError } ) class WithPLRU extends Config( (pname, site, here) => pname match { case L2Replacer => () => new SeqPLRU(site(NSets), site(NWays)) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) -class WithL2Capacity2048 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 2048; case field => throw new CDEMatchError(field) }) -class WithL2Capacity1024 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 1024; case field => throw new CDEMatchError(field) }) -class WithL2Capacity512 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 512; case field => throw new CDEMatchError(field) }) -class WithL2Capacity256 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 256; case field => throw new CDEMatchError(field) }) -class WithL2Capacity128 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 128; case field => throw new CDEMatchError(field) }) -class WithL2Capacity64 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 64; case field => throw new CDEMatchError(field) }) +class WithL2Capacity2048 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 2048; case _ => throw new CDEMatchError }) +class WithL2Capacity1024 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 1024; case _ => throw new CDEMatchError }) +class WithL2Capacity512 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 512; case _ => throw new CDEMatchError }) +class WithL2Capacity256 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 256; case _ => throw new CDEMatchError }) +class WithL2Capacity128 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 128; case _ => throw new CDEMatchError }) +class WithL2Capacity64 extends Config(knobValues = { case "L2_CAPACITY_IN_KB" => 64; case _ => throw new CDEMatchError }) -class With1L2Ways extends Config(knobValues = { case "L2_WAYS" => 1; case field => throw new CDEMatchError(field) }) -class With2L2Ways extends Config(knobValues = { case "L2_WAYS" => 2; case field => throw new CDEMatchError(field) }) -class With4L2Ways extends Config(knobValues = { case "L2_WAYS" => 4; case field => throw new CDEMatchError(field) }) +class With1L2Ways extends Config(knobValues = { case "L2_WAYS" => 1; case _ => throw new CDEMatchError }) +class With2L2Ways extends Config(knobValues = { case "L2_WAYS" => 2; case _ => throw new CDEMatchError }) +class With4L2Ways extends Config(knobValues = { case "L2_WAYS" => 4; case _ => throw new CDEMatchError }) class DefaultL2Config extends Config(new WithL2Cache ++ new BaseConfig) class DefaultL2FPGAConfig extends Config(new WithL2Capacity64 ++ new WithL2Cache ++ new DefaultFPGAConfig) @@ -405,7 +405,7 @@ class WithRV32 extends Config( case UseUser => false case UseAtomics => false case UseFPU => false - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError } ) @@ -413,14 +413,14 @@ class FPGAConfig extends Config ( (pname,site,here) => pname match { case NAcquireTransactors => 4 case UseHtifClockDiv => false - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError } ) class WithBlockingL1 extends Config ( knobValues = { case "L1D_MSHRS" => 0 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError } ) @@ -441,7 +441,7 @@ class SmallConfig extends Config ( case StoreDataQueueDepth => 2 case ReplayQueueDepth => 2 case NAcquireTransactors => 2 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }}, knobValues = { case "L1D_SETS" => 64 @@ -449,7 +449,7 @@ class SmallConfig extends Config ( case "L1I_SETS" => 64 case "L1I_WAYS" => 1 case "L1D_MSHRS" => 0 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError } ) @@ -488,7 +488,7 @@ class WithRoccExample extends Config( generator = (p: Parameters) => Module(new CharacterCountExample()(p)))) case RoccMaxTaggedMemXacts => 1 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class RoccExampleConfig extends Config(new WithRoccExample ++ new BaseConfig) @@ -504,7 +504,7 @@ class WithDmaController extends Config( DmaCtrlRegNumbers.CSR_BASE, DmaCtrlRegNumbers.CSR_END))) case RoccMaxTaggedMemXacts => 1 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithStreamLoopback extends Config( @@ -512,7 +512,7 @@ class WithStreamLoopback extends Config( case UseStreamLoopback => true case StreamLoopbackSize => 128 case StreamLoopbackWidth => 64 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class DmaControllerConfig extends Config(new WithDmaController ++ new WithStreamLoopback ++ new DefaultL2Config) @@ -529,7 +529,7 @@ class OctoChannelBenchmarkConfig extends Config(new With8MemoryChannels ++ new S class EightChannelConfig extends Config(new With8MemoryChannels ++ new BaseConfig) -class WithSplitL2Metadata extends Config(knobValues = { case "L2_SPLIT_METADATA" => true; case field => throw new CDEMatchError(field) }) +class WithSplitL2Metadata extends Config(knobValues = { case "L2_SPLIT_METADATA" => true; case _ => throw new CDEMatchError }) class SplitL2MetadataTestConfig extends Config(new WithSplitL2Metadata ++ new DefaultL2Config) class DualCoreConfig extends Config(new With2Cores ++ new BaseConfig) diff --git a/src/main/scala/TestConfigs.scala b/src/main/scala/TestConfigs.scala index eb7a0a13..2b914ca2 100644 --- a/src/main/scala/TestConfigs.scala +++ b/src/main/scala/TestConfigs.scala @@ -44,7 +44,7 @@ class WithGroundTest extends Config( case RoccNCSRs => site(GroundTestCSRs).size case UseFPU => false case UseAtomics => true - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithMemtest extends Config( @@ -56,19 +56,19 @@ class WithMemtest extends Config( case GeneratorStartAddress => site(GlobalAddrMap)("mem").start case BuildGroundTest => (id: Int, p: Parameters) => Module(new GeneratorTest(id)(p)) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithCacheFillTest extends Config( (pname, site, here) => pname match { case BuildGroundTest => (id: Int, p: Parameters) => Module(new CacheFillTest()(p)) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }, knobValues = { case "L2_WAYS" => 4 case "L2_CAPACITY_IN_KB" => 4 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithBroadcastRegressionTest extends Config( @@ -78,7 +78,7 @@ class WithBroadcastRegressionTest extends Config( case GroundTestRegressions => (p: Parameters) => RegressionTests.broadcastRegressions(p) case GroundTestMaxXacts => 3 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithCacheRegressionTest extends Config( @@ -88,7 +88,7 @@ class WithCacheRegressionTest extends Config( case GroundTestRegressions => (p: Parameters) => RegressionTests.cacheRegressions(p) case GroundTestMaxXacts => 3 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithDmaTest extends Config( @@ -104,7 +104,7 @@ class WithDmaTest extends Config( (0x00800008, 0x00800008, 64)) case DmaTestDataStart => 0x3012CC00 case DmaTestDataStride => 8 - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithDmaStreamTest extends Config( @@ -116,21 +116,21 @@ class WithDmaStreamTest extends Config( size = site(StreamLoopbackWidth) / 8) case GroundTestCSRs => Seq(DmaCtrlRegNumbers.CSR_BASE + DmaCtrlRegNumbers.OUTSTANDING) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithNastiConverterTest extends Config( (pname, site, here) => pname match { case BuildGroundTest => (id: Int, p: Parameters) => Module(new NastiConverterTest()(p)) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithUnitTest extends Config( (pname, site, here) => pname match { case BuildGroundTest => (id: Int, p: Parameters) => Module(new UnitTestSuite()(p)) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class WithTraceGen extends Config( @@ -140,7 +140,7 @@ class WithTraceGen extends Config( case NGenerators => site(NTiles) case MaxGenerateRequests => 128 case AddressBag => List(0x8, 0x10, 0x108, 0x100008) - case field => throw new CDEMatchError(field) + case _ => throw new CDEMatchError }) class GroundTestConfig extends Config(new WithGroundTest ++ new BaseConfig)