Skip to content

Commit

Permalink
Fixes for newer CustomFileEmission API
Browse files Browse the repository at this point in the history
Signed-off-by: Schuyler Eldridge <[email protected]>
  • Loading branch information
seldridge committed Aug 11, 2020
1 parent 191f7b4 commit 19844a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/chisel3/stage/ChiselAnnotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ case class ChiselCircuitAnnotation(circuit: Circuit)

protected def suffix: Option[String] = Some(".fir")

override def toBytes: Iterable[Byte] = OldEmitter.emit(circuit).toBytes
override def getBytes: Iterable[Byte] = OldEmitter.emit(circuit).getBytes

}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/chisel3/stage/ChiselStage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ChiselStage extends Stage with PreservesAll[Phase] {

annos
.collectFirst {
case a: ChiselCircuitAnnotation => a.toBytes.get
case a: ChiselCircuitAnnotation => a.getBytes
}
.get
.map(_.toChar)
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/chisel3/stage/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package object stage {
options.foreach {
case a@ ChiselCircuitAnnotation(b) =>
chiselCircuit = Some(b)
chirrtlCircuit = a.toBytes.map(_.map(_.toChar).mkString)
chirrtlCircuit = Some(a.getBytes.map(_.toChar).mkString)
case _ =>
}

Expand Down

0 comments on commit 19844a0

Please sign in to comment.