-
Notifications
You must be signed in to change notification settings - Fork 269
Expand file tree
/
Copy pathCompilerConfigs.scala
More file actions
166 lines (139 loc) · 4.45 KB
/
Copy pathCompilerConfigs.scala
File metadata and controls
166 lines (139 loc) · 4.45 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
//See LICENSE for license details.
package firesim.configs
import firrtl.options.Dependency
import org.chipsalliance.cde.config.{Config, Parameters}
import midas.TargetTransforms
// Experimental: mixing this in will enable assertion synthesis
class WithSynthAsserts
extends Config((_, _, _) => { case midas.SynthAsserts =>
true
})
// Experimental: mixing this in will enable print synthesis
class WithPrintfSynthesis
extends Config((_, _, _) => { case midas.SynthPrints =>
true
})
// MIDAS 2.0 Switches
class WithMultiCycleRamModels
extends Config((_, _, _) => { case midas.GenerateMultiCycleRamModels =>
true
})
class WithModelMultiThreading
extends Config((_, _, _) => { case midas.EnableModelMultiThreading =>
true
})
// Short name aliases for above
class MCRams extends WithMultiCycleRamModels
class MTModels extends WithModelMultiThreading
class WithILADepth(depth: Int)
extends Config((_, _, _) => { case midas.ILADepthKey =>
depth
})
class ILADepth1024 extends WithILADepth(1024)
class ILADepth2048 extends WithILADepth(2048)
class ILADepth4096 extends WithILADepth(4096)
class ILADepth8192 extends WithILADepth(8192)
class ILADepth16384 extends WithILADepth(16384)
// ADDITIONAL TARGET TRANSFORMATIONS
// These run on the the Target FIRRTL before Target-toHost Bridges are extracted ,
// and decoupling is introduced
// Replaces Rocket Chip's black-box async resets with a synchronous equivalent
class WithAsyncResetReplacement
extends Config((_, _, up) => { case TargetTransforms =>
Dependency(firesim.passes.AsyncResetRegPass) +: up(TargetTransforms)
})
// The wiring transform is normally only run as part of ReplSeqMem
class WithWiringTransform
extends Config((_, _, up) => { case TargetTransforms =>
Dependency[firrtl.passes.wiring.WiringTransform] +: up(TargetTransforms)
})
// ADDITIONAL HOST TRANSFORMATIONS
// These run on the generated simulator(after all Golden Gate transformations:
// host-decoupling is introduced, and BridgeModules are elaborated)
// Tells ILATopWiringTransform to actually populate the ILA
class WithAutoILA
extends Config((_, _, _) => { case midas.EnableAutoILA =>
true
})
// Implements the AutoCounter performace counters features
class WithAutoCounter
extends Config((_, _, _) => { case midas.EnableAutoCounter =>
true
})
class WithAutoCounterPrintf
extends Config((_, _, _) => {
case midas.EnableAutoCounter => true
case midas.AutoCounterUsePrintfImpl => true
case midas.SynthPrints => true
})
class BaseF1Config
extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new WithAsyncResetReplacement ++
new midas.EC2F1Config
)
class BaseF2Config
extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new WithAsyncResetReplacement ++
new midas.EC2F2Config
)
class BaseXilinxAlveoU200Config
extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new WithAsyncResetReplacement ++
new midas.XilinxAlveoU200Config
)
class BaseXilinxAlveoU250Config
extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new WithAsyncResetReplacement ++
new midas.XilinxAlveoU250Config
)
class BaseXilinxAlveoU280Config
extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new WithAsyncResetReplacement ++
new midas.XilinxAlveoU280Config
)
class BaseNitefuryConfig
extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new WithAsyncResetReplacement ++
new midas.NitefuryConfig
)
class BaseXilinxVCU118Config
extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new WithAsyncResetReplacement ++
new midas.XilinxVCU118Config
)
class BaseVitisConfig
extends Config(
new WithDefaultMemModel ++
new WithWiringTransform ++
new WithAsyncResetReplacement ++
new midas.VitisConfig
)
class NoConfig extends Config(Parameters.empty)
class BaseBridgesConfig
extends Config(
new WithDefaultMemModel
)
class DefaultF1Config
extends Config(
new BaseBridgesConfig ++
new midas.F1Config
)
class DefaultVitisConfig
extends Config(
new BaseBridgesConfig ++
new midas.VitisConfig
)