diff options
| author | mergify[bot] | 2022-08-02 16:28:23 +0000 |
|---|---|---|
| committer | GitHub | 2022-08-02 16:28:23 +0000 |
| commit | 945416c628656498be7a98dcd4899f2b9e830c00 (patch) | |
| tree | 9d0d088ce631957a1d1e1864524f9e7fba92478f /docs | |
| parent | 6b658d740d976c7706c53c756acd069262d9ef59 (diff) | |
Fix example in Chisel Type vs Scala Type article (#2655) (#2657)
(cherry picked from commit 0b2c211beefeefb72c86ea69a0b2a0101b2f2c20)
Co-authored-by: Megan Wachs <megan@sifive.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/src/explanations/chisel-type-vs-scala-type.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/src/explanations/chisel-type-vs-scala-type.md b/docs/src/explanations/chisel-type-vs-scala-type.md index 6c311a21..ead509d3 100644 --- a/docs/src/explanations/chisel-type-vs-scala-type.md +++ b/docs/src/explanations/chisel-type-vs-scala-type.md @@ -245,13 +245,13 @@ that you have more information than it can infer to convert Scala types: ```scala mdoc:silent class ScalaCastingModule(gen: () => Bundle) extends Module { - val io = gen().asInstanceOf[MyBundle] + val io = IO(Output(gen().asInstanceOf[MyBundle])) io.foo := 0.U } ``` This works if we do indeed have more information than the compiler: -``` scala mdoc:silent +```scala mdoc:silent ChiselStage.elaborate(new ScalaCastingModule( () => new MyBundle(3))) ``` |
