when
chisel3.when
object when
Attributes
- Source
- When.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
when.type
Members list
In this article
Create a when condition block, where whether a block of logic is executed or not depends on the conditional.
Create a when condition block, where whether a block of logic is executed or not depends on the conditional.
logic that runs only if cond is true
condition to execute upon
when ( myData === 3.U ) {
// Some logic to run when myData equals 3.
} .elsewhen ( myData === 1.U ) {
// Some logic to run when myData equals 1.
} .otherwise {
// Some logic to run when myData is neither 3 nor 1.
}
Returns the current when condition
Returns the current when condition
This is the conjunction of conditions for all whens going up the call stack
when (a) {
when (b) {
when (c) {
}.otherwise {
when.cond // this is equal to: a && b && !c
}
}
}