/
Config.scala
53 lines (45 loc) · 1.5 KB
/
Config.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//See LICENSE for license details.
package firesim.midasexamples
import midas._
import midas.widgets._
import freechips.rocketchip.config._
import junctions._
import firesim.configs.{WithDefaultMemModel, WithWiringTransform}
class NoConfig extends Config(Parameters.empty)
// This is incomplete and must be mixed into a complete platform config
class BaseMidasExamplesConfig extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new Config((site, here, up) => {
case DesiredHostFrequency => 75
case SynthAsserts => true
case GenerateMultiCycleRamModels => true
case EnableModelMultiThreading => true
case EnableAutoILA => true
case SynthPrints => true
case EnableAutoCounter => true
})
)
class DefaultF1Config extends Config(
new firesim.configs.WithEC2F1Artefacts ++
new BaseMidasExamplesConfig ++
new midas.F1Config
)
class DefaultVitisConfig extends Config(
new BaseMidasExamplesConfig ++
new midas.VitisConfig
)
class PointerChaserConfig extends Config((site, here, up) => {
case MemSize => BigInt(1 << 30) // 1 GB
case NMemoryChannels => 1
case CacheBlockBytes => 64
case CacheBlockOffsetBits => chisel3.util.log2Up(here(CacheBlockBytes))
case NastiKey => NastiParameters(dataBits = 64, addrBits = 32, idBits = 3)
case Seed => System.currentTimeMillis
})
class AutoCounterPrintf extends Config((site, here, up) => {
case AutoCounterUsePrintfImpl => true
})
class NoSynthAsserts extends Config((site, here, up) => {
case SynthAsserts => false
})