summaryrefslogtreecommitdiff
path: root/docs/src/explanations/chisel-type-vs-scala-type.md
diff options
context:
space:
mode:
authorJack2022-11-11 06:53:04 +0000
committerJack2022-11-11 06:53:04 +0000
commit3ce953c81f06519351c48277e3474b5720ec07ff (patch)
treeac79dcb80d0528c2ae86ca21da4cf424715ab645 /docs/src/explanations/chisel-type-vs-scala-type.md
parentadccde9998c91875e5490cff6d5822ffacc593ed (diff)
parentc8046636a25474be4c547c6fe9c6d742ea7b1d13 (diff)
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to 'docs/src/explanations/chisel-type-vs-scala-type.md')
-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)))
```