Skip to content

Commit

Permalink
[FIREmitter] Support String types
Browse files Browse the repository at this point in the history
  • Loading branch information
youngar committed Jul 31, 2023
1 parent 84210ee commit b7119e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Dialect/FIRRTL/Export/FIREmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,7 @@ void Emitter::emitType(Type type, bool includeConst) {
emitType(type.getType());
ps << ">";
})
.Case<StringType>([&](StringType type) { ps << "String"; })
.Case<BigIntType>([&](BigIntType type) { ps << "Integer"; })
.Case<PathType>([&](PathType type) { ps << "Path"; })
.Default([&](auto type) {
Expand Down
2 changes: 2 additions & 0 deletions test/Dialect/FIRRTL/emit-basic.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ firrtl.circuit "Foo" {
// CHECK-NEXT: output b0 : UInt
// CHECK-NEXT: output b1 : Probe<UInt<1>>
// CHECK-NEXT: output b2 : RWProbe<UInt<1>>
// CHECK-NEXT: input string : String
// CHECK-NEXT: input integer : Integer
// CHECK-NEXT: input path : Path
in %a00: !firrtl.clock,
Expand All @@ -51,6 +52,7 @@ firrtl.circuit "Foo" {
out %b0: !firrtl.uint,
out %b1: !firrtl.probe<uint<1>>,
out %b2: !firrtl.rwprobe<uint<1>>,
in %string: !firrtl.string,
in %integer: !firrtl.bigint,
in %path : !firrtl.path
) {}
Expand Down

0 comments on commit b7119e8

Please sign in to comment.