diff options
| author | Jack Koenig | 2022-01-10 16:32:51 -0800 |
|---|---|---|
| committer | GitHub | 2022-01-10 16:32:51 -0800 |
| commit | 2b48fd15a7711dcd44334fbbc538667a102a581a (patch) | |
| tree | 4b4766347c3943d65c13e5de2d139b14821eec61 /src/main/scala/chisel3/util/experimental/Inline.scala | |
| parent | 92e77a97af986629766ac9038f0ebc8ab9a48fa1 (diff) | |
| parent | bff8dc0738adafa1176f6959a33ad86f6373c558 (diff) | |
Merge pull request #2246 from chipsalliance/scalafmt
Add scalafmt configuration and apply it.
Diffstat (limited to 'src/main/scala/chisel3/util/experimental/Inline.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/experimental/Inline.scala | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/main/scala/chisel3/util/experimental/Inline.scala b/src/main/scala/chisel3/util/experimental/Inline.scala index 1d5fcb89..fd5c6aa5 100644 --- a/src/main/scala/chisel3/util/experimental/Inline.scala +++ b/src/main/scala/chisel3/util/experimental/Inline.scala @@ -6,7 +6,7 @@ import chisel3._ import chisel3.experimental.{BaseModule, ChiselAnnotation, RunFirrtlTransform} import firrtl.Transform import firrtl.passes.{InlineAnnotation, InlineInstances} -import firrtl.transforms.{NoDedupAnnotation, FlattenAnnotation, Flatten} +import firrtl.transforms.{Flatten, FlattenAnnotation, NoDedupAnnotation} import firrtl.annotations.Annotation /** Inlines an instance of a module @@ -40,11 +40,15 @@ import firrtl.annotations.Annotation * }}} */ trait InlineInstance { self: BaseModule => - Seq(new ChiselAnnotation with RunFirrtlTransform { - def toFirrtl: Annotation = InlineAnnotation(self.toNamed) - def transformClass: Class[_ <: Transform] = classOf[InlineInstances] }, - new ChiselAnnotation { - def toFirrtl: Annotation = NoDedupAnnotation(self.toNamed) }) + Seq( + new ChiselAnnotation with RunFirrtlTransform { + def toFirrtl: Annotation = InlineAnnotation(self.toNamed) + def transformClass: Class[_ <: Transform] = classOf[InlineInstances] + }, + new ChiselAnnotation { + def toFirrtl: Annotation = NoDedupAnnotation(self.toNamed) + } + ) .map(chisel3.experimental.annotate(_)) } @@ -75,10 +79,14 @@ trait InlineInstance { self: BaseModule => * }}} */ trait FlattenInstance { self: BaseModule => - Seq(new ChiselAnnotation with RunFirrtlTransform { - def toFirrtl: Annotation = FlattenAnnotation(self.toNamed) - def transformClass: Class[_ <: Transform] = classOf[Flatten] }, - new ChiselAnnotation { - def toFirrtl: Annotation = NoDedupAnnotation(self.toNamed) }) - .map(chisel3.experimental.annotate(_)) + Seq( + new ChiselAnnotation with RunFirrtlTransform { + def toFirrtl: Annotation = FlattenAnnotation(self.toNamed) + def transformClass: Class[_ <: Transform] = classOf[Flatten] + }, + new ChiselAnnotation { + def toFirrtl: Annotation = NoDedupAnnotation(self.toNamed) + } + ) + .map(chisel3.experimental.annotate(_)) } |
