From ce15ad50a5c175db06c3bba5e3bf46b6c5466c47 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Tue, 5 Oct 2021 10:27:18 -0700 Subject: Remove all Bundle cloneTypes and chiselRuntimeDeprecate its use (#2052) * Remove all manual cloneTypes and make it chisel runtime deprecated to add one * runtime deprecate cloneType with runtime reflection * [Backport this commit] Bundle: add check that override def cloneType still works (will be made an error later) * Plugin: make it an error to override cloneType and add a test for that * Docs: can't compile the cloneType anymore * BundleSpec: comment out failing test I cannot get to fail or ignore Co-authored-by: Jack Koenig --- src/main/scala/chisel3/util/Valid.scala | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/main/scala/chisel3/util/Valid.scala') diff --git a/src/main/scala/chisel3/util/Valid.scala b/src/main/scala/chisel3/util/Valid.scala index 6c6d685e..838d43ca 100644 --- a/src/main/scala/chisel3/util/Valid.scala +++ b/src/main/scala/chisel3/util/Valid.scala @@ -29,8 +29,6 @@ class Valid[+T <: Data](gen: T) extends Bundle { * @return a Chisel [[Bool]] true if `valid` is asserted */ def fire(dummy: Int = 0): Bool = valid - - override def cloneType: this.type = Valid(gen).asInstanceOf[this.type] } /** Factory for generating "valid" interfaces. A "valid" interface is a data-communicating interface between a producer -- cgit v1.2.3 From 7930544e9c8047f27285420204d25f78c753ea57 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Fri, 8 Oct 2021 09:07:04 -0700 Subject: Add nullary .fire to Valid and deprecate dummy version (#2156) Also replace all uses of .fire() with .fire--- src/main/scala/chisel3/util/Valid.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/scala/chisel3/util/Valid.scala') diff --git a/src/main/scala/chisel3/util/Valid.scala b/src/main/scala/chisel3/util/Valid.scala index 838d43ca..4d348014 100644 --- a/src/main/scala/chisel3/util/Valid.scala +++ b/src/main/scala/chisel3/util/Valid.scala @@ -28,6 +28,9 @@ class Valid[+T <: Data](gen: T) extends Bundle { /** True when `valid` is asserted * @return a Chisel [[Bool]] true if `valid` is asserted */ + def fire: Bool = valid + + @deprecated("Calling this function with an empty argument list is invalid in Scala 3. Use the form without parentheses instead", "Chisel 3.5") def fire(dummy: Int = 0): Bool = valid } -- cgit v1.2.3 From a79f57565e7157d137628d1aaeae750f98e3d88b Mon Sep 17 00:00:00 2001 From: Abongwa Bonalais Date: Wed, 3 Nov 2021 05:56:37 +0100 Subject: Add field grouping ScalaDoc for other subclasses of Bundle (#2214) * Add field grouping scaladocs for DecoupledIo * Added groupdesc to DecoupledIO * Added groupings for IrrevocableIO * Add groupings for ValidIO * Add field grouping scaladoc for PRNGIO * Add field grouping scaladoc for QueueIO * Added groupings for PipeIO * Update src/main/scala/chisel3/util/Decoupled.scala Commited Sugestion Co-authored-by: Megan Wachs * Update src/main/scala/chisel3/util/Decoupled.scala Co-authored-by: Megan Wachs * Update src/main/scala/chisel3/util/Decoupled.scala Co-authored-by: Megan Wachs * Update src/main/scala/chisel3/util/Decoupled.scala Co-authored-by: Megan Wachs * Update src/main/scala/chisel3/util/Decoupled.scala Co-authored-by: Megan Wachs * Update src/main/scala/chisel3/util/Valid.scala Co-authored-by: Megan Wachs * Update src/main/scala/chisel3/util/Valid.scala Co-authored-by: Megan Wachs * Update src/main/scala/chisel3/util/Valid.scala Co-authored-by: Megan Wachs Co-authored-by: Megan Wachs --- src/main/scala/chisel3/util/Valid.scala | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/main/scala/chisel3/util/Valid.scala') diff --git a/src/main/scala/chisel3/util/Valid.scala b/src/main/scala/chisel3/util/Valid.scala index 4d348014..5d80502a 100644 --- a/src/main/scala/chisel3/util/Valid.scala +++ b/src/main/scala/chisel3/util/Valid.scala @@ -17,12 +17,17 @@ import chisel3._ * @tparam T the type of the data * @param gen some data * @see [[Valid$ Valid factory]] for concrete examples + * @groupdesc Signals The actual hardware fields of the Bundle */ class Valid[+T <: Data](gen: T) extends Bundle { - /** A bit that will be asserted when `bits` is valid */ + /** A bit that will be asserted when `bits` is valid + * @group Signals + */ val valid = Output(Bool()) - /** Some data */ + /** The data to be transferred, qualified by `valid` + * @group Signals + */ val bits = Output(gen) /** True when `valid` is asserted @@ -173,13 +178,18 @@ class Pipe[T <: Data](val gen: T, val latency: Int = 1)(implicit compileOptions: /** Interface for [[Pipe]]s composed of a [[Valid]] input and [[Valid]] output * @define notAQueue + * @groupdesc Signals Hardware fields of the Bundle */ class PipeIO extends Bundle { - /** [[Valid]] input */ + /** [[Valid]] input + * @group Signals + */ val enq = Input(Valid(gen)) - /** [[Valid]] output. Data will appear here `latency` cycles after being valid at `enq`. */ + /** [[Valid]] output. Data will appear here `latency` cycles after being valid at `enq`. + * @group Signals + */ val deq = Output(Valid(gen)) } -- cgit v1.2.3