Skip to content

Commit

Permalink
Remove inlineCircuit annotation
Browse files Browse the repository at this point in the history
This removes InlineHelpers.inlineCircuit. This is dangerous and confusing
as it allows a module to result in a circuit being inlined.

Signed-off-by: Schuyler Eldridge <[email protected]>
  • Loading branch information
seldridge committed Jul 18, 2018
1 parent d5208c6 commit bc96990
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/main/scala/chisel3/util/Inline.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,33 +88,6 @@ trait FlattenInstance { self: BaseModule =>
* inlined.
*/
trait InlineHelpers { self: BaseModule =>
/* If used anywhere, this will result in every module in the design being
* inlined. The resulting circuit will contain only one module. */

/** This, if used anywhere, will result in the entire circuit being
* flattened to a single module.
*
* @example {{{
* /* Providing some module internals */
* trait Internals { this: Module =>
* val io = IO(new Bundle{ val a = Input(Bool()) })
* }
* class Bar extends Module with Internals with InlineHelpers
* class Top extends Module with InlineHelpers {
* val io = IO(new Bundle{ val a = Input(Bool()) })
* val Seq(x, y, z) = Seq.fill(3)(Module(new Bar))
* Seq(x, y, z).map(_.io.a := io.a)
* /* All modules in the entire circuit will be inlined. Here, that is x, y,
* * and z. */
* inlineCircuit()
* }
* }}}
*/
def inlineCircuit(): Unit = chisel3.experimental.annotate(
new ChiselAnnotation with RunFirrtlTransform {
def toFirrtl = InlineAnnotation(self.toNamed match { case ModuleName(_, c) => c } )
def transformClass = classOf[InlineInstances] } )

/** Inline a specific instance inside a Module
*
* @param m the module to inline
Expand Down

0 comments on commit bc96990

Please sign in to comment.