summaryrefslogtreecommitdiff
path: root/docs/src/cookbooks/cookbook.md
diff options
context:
space:
mode:
authorJack2023-01-12 06:11:50 +0000
committerJack2023-01-12 06:11:50 +0000
commit8ba5f8d5011df70e817d3011ea4afd6976df243e (patch)
tree5899c699e5164588c40aa7c3a7c5e62b79d7b804 /docs/src/cookbooks/cookbook.md
parent5aa60ecda6bd2b02dfc7253a47e53c7647981a5c (diff)
parent6a63353f2a6c3311e61b9a7b5b899d8ad904a86d (diff)
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to 'docs/src/cookbooks/cookbook.md')
-rw-r--r--docs/src/cookbooks/cookbook.md5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/src/cookbooks/cookbook.md b/docs/src/cookbooks/cookbook.md
index e7485e66..5b8239a7 100644
--- a/docs/src/cookbooks/cookbook.md
+++ b/docs/src/cookbooks/cookbook.md
@@ -445,13 +445,12 @@ getVerilogString(new Top(new UsingCloneTypeBundle(UInt(8.W))))
### How do I create a finite state machine (FSM)?
-The advised way is to use [`ChiselEnum`](https://www.chisel-lang.org/api/latest/chisel3/experimental/index.html#ChiselEnum=chisel3.experimental.EnumFactory) to construct enumerated types representing the state of the FSM.
-State transitions are then handled with [`switch`](https://www.chisel-lang.org/api/latest/chisel3/util/switch$.html)/[`is`](https://www.chisel-lang.org/api/latest/chisel3/util/is$.html) and [`when`](https://www.chisel-lang.org/api/latest/chisel3/when$.html)/[`.elsewhen`](https://www.chisel-lang.org/api/latest/chisel3/WhenContext.html#elsewhen(elseCond:=%3Echisel3.Bool)(block:=%3EUnit)(implicitsourceInfo:chisel3.internal.sourceinfo.SourceInfo,implicitcompileOptions:chisel3.CompileOptions):chisel3.WhenContext)/[`.otherwise`](https://www.chisel-lang.org/api/latest/chisel3/WhenContext.html#otherwise(block:=%3EUnit)(implicitsourceInfo:chisel3.internal.sourceinfo.SourceInfo,implicitcompileOptions:chisel3.CompileOptions):Unit).
+The advised way is to use `ChiselEnum` to construct enumerated types representing the state of the FSM.
+State transitions are then handled with `switch`/`is` and `when`/`.elsewhen`/`.otherwise`.
```scala mdoc:silent:reset
import chisel3._
import chisel3.util.{switch, is}
-import chisel3.experimental.ChiselEnum
object DetectTwoOnes {
object State extends ChiselEnum {