summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Sweeney2018-06-25 13:47:52 -0700
committerJack Koenig2018-06-25 13:47:52 -0700
commite564fff139768e6a232d118ec7155ecf080f1bc4 (patch)
tree92337228f81f1ab05cab1820000a1d89007f719f
parent980778b1874b93b7e2778eb0c8f666f9691176f1 (diff)
Correcting documentation errors in Arbiter.scala (#839)
Documentation for example had parameters in wrong order, and was missing @param. Additionally, it was lacking a module wrapper. This has been corrected.
-rw-r--r--src/main/scala/chisel3/util/Arbiter.scala9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/scala/chisel3/util/Arbiter.scala b/src/main/scala/chisel3/util/Arbiter.scala
index 623dd619..0da4bbc5 100644
--- a/src/main/scala/chisel3/util/Arbiter.scala
+++ b/src/main/scala/chisel3/util/Arbiter.scala
@@ -91,8 +91,10 @@ class LockingArbiter[T <: Data](gen: T, n: Int, count: Int, needsLock: Option[T
/** Hardware module that is used to sequence n producers into 1 consumer.
* Producers are chosen in round robin order.
*
+ * @param gen data type
+ * @param n number of inputs
* @example {{{
- * val arb = new RRArbiter(2, UInt())
+ * val arb = Module(new RRArbiter(UInt(), 2))
* arb.io.in(0) <> producer0.io.out
* arb.io.in(1) <> producer1.io.out
* consumer.io.in <> arb.io.out
@@ -104,8 +106,11 @@ class RRArbiter[T <: Data](gen:T, n: Int) extends LockingRRArbiter[T](gen, n, 1)
/** Hardware module that is used to sequence n producers into 1 consumer.
* Priority is given to lower producer.
*
+ * @param gen data type
+ * @param n number of inputs
+ *
* @example {{{
- * val arb = Module(new Arbiter(2, UInt()))
+ * val arb = Module(new Arbiter(UInt(), 2))
* arb.io.in(0) <> producer0.io.out
* arb.io.in(1) <> producer1.io.out
* consumer.io.in <> arb.io.out