summaryrefslogtreecommitdiff
path: root/docs/src/explanations
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/explanations')
-rw-r--r--docs/src/explanations/chisel-type-vs-scala-type.md4
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)))
```