aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/firrtl.stanza
blob: 2320bc8180cba47a837e4180d3190c94507c491f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
defpackage firrtl/firrtl :
  import core
  import verse
  import firrtl/ir-utils
  import firrtl/ir2


;============ FIRRTL ==============

public defstruct FIRRTL <: Pass :
   with-output: (() -> False) -> False  
public defmethod pass (b:FIRRTL) -> (Circuit -> Circuit) : emit-firrtl{with-output(b),_}
public defmethod name (b:FIRRTL) -> String : "To FIRRTL"
public defmethod short-name (b:FIRRTL) -> String : "To FIRRTL"

;============ Utilz =============

public defn emit-firrtl (with-output:(() -> False) -> False, c:Circuit) :
  with-output $ fn () :
    print(c)
  c