summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util/Decoupled.scala
diff options
context:
space:
mode:
authorAdam Izraelevitz2019-06-11 01:45:34 -0600
committerRichard Lin2019-06-11 00:45:34 -0700
commit410f03b9122978e43db938d7774b451f2b9111d0 (patch)
tree26c58350adf6af35e539be27aefc88412529dcd5 /src/main/scala/chisel3/util/Decoupled.scala
parent821fe17b110e2a9017a335516227cb491c18cf43 (diff)
Added documentation to Decoupled, Conditionals, Counter (#1015)
* Added documentation to Decoupled, Conditionals, Counter * Fixed private Counter class error * Move Counter class deprecation and re-definition into util package object. * Revert "Move Counter class deprecation and re-definition into util package object." This reverts commit f61bdddf7051522363e1d203fcd46b512047c87d. * Restore the old Counter definition and address this in a separate PR. We can move the deprecation warning and the type definition into the util package object (see f61bdddf7051522363e1d203fcd46b512047c87d), but then we fail tests using Counter with a `ScalaReflectionException` in Aggregate.scala:779 (in def cloneType) when: `Some(mirror.reflect(this).symbol)` generates `type Counter is not a class`. * Made @ducky64 change to Counter doc Used to generate an inline (logic directly in the containing Module, no internal Module is created) hardware counter.
Diffstat (limited to 'src/main/scala/chisel3/util/Decoupled.scala')
-rw-r--r--src/main/scala/chisel3/util/Decoupled.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/scala/chisel3/util/Decoupled.scala b/src/main/scala/chisel3/util/Decoupled.scala
index 047973f5..0aa72e81 100644
--- a/src/main/scala/chisel3/util/Decoupled.scala
+++ b/src/main/scala/chisel3/util/Decoupled.scala
@@ -34,6 +34,9 @@ abstract class ReadyValidIO[+T <: Data](gen: T) extends Bundle
object ReadyValidIO {
implicit class AddMethodsToReadyValid[T<:Data](target: ReadyValidIO[T]) {
+
+ /** Indicates if IO is both ready and valid
+ */
def fire(): Bool = target.ready && target.valid
/** Push dat onto the output bits of this interface to let the consumer know it has happened.