aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/custom-compiler.stanza
blob: 4d63a173befb5242b89f8e3ce66848a96471f8a9 (plain)
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
defpackage firrtl/custom-compiler :
   import core
   import verse
   import firrtl/ir-utils
   import firrtl/ir2
   import firrtl/passes
   import firrtl/errors
   import firrtl/verilog
   import firrtl/custom-passes

public defstruct InstrumentedVerilog <: Compiler :
   file: String with: (as-method => true)
   args: List<String>
public defmethod passes (c:InstrumentedVerilog) -> List<Pass> :
   to-list $ [
      WhenCoverage(args(c)[0],args(c)[1])
      RemoveSpecialChars()
      RemoveScopes()
      CheckHighForm()
      TempElimination()
      ToWorkingIR()
      ;; MakeExplicitReset()
      ResolveKinds()
      CheckKinds()
      InferTypes()
      CheckTypes()
      ResolveGenders()
      CheckGenders()
      ExpandAccessors()
      LowerToGround()
      ExpandIndexedConnects()
      ExpandWhens()
      InferWidths()
      SplitExp()
      ToRealIR()
      RemoveSpecialChars()
      CheckHighForm()
      CheckLowForm()
      Verilog(file(c))
   ]