Skip to content

Commit 1ca6333

Browse files
mehnadnerducbjrl
authored andcommitted
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. (cherry picked from commit e564fff)
1 parent 568545c commit 1ca6333

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/scala/chisel3/util/Arbiter.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ class LockingArbiter[T <: Data](gen: T, n: Int, count: Int, needsLock: Option[T
9191
/** Hardware module that is used to sequence n producers into 1 consumer.
9292
* Producers are chosen in round robin order.
9393
*
94+
* @param gen data type
95+
* @param n number of inputs
9496
* @example {{{
95-
* val arb = new RRArbiter(2, UInt())
97+
* val arb = Module(new RRArbiter(UInt(), 2))
9698
* arb.io.in(0) <> producer0.io.out
9799
* arb.io.in(1) <> producer1.io.out
98100
* consumer.io.in <> arb.io.out
@@ -104,8 +106,11 @@ class RRArbiter[T <: Data](gen:T, n: Int) extends LockingRRArbiter[T](gen, n, 1)
104106
/** Hardware module that is used to sequence n producers into 1 consumer.
105107
* Priority is given to lower producer.
106108
*
109+
* @param gen data type
110+
* @param n number of inputs
111+
*
107112
* @example {{{
108-
* val arb = Module(new Arbiter(2, UInt()))
113+
* val arb = Module(new Arbiter(UInt(), 2))
109114
* arb.io.in(0) <> producer0.io.out
110115
* arb.io.in(1) <> producer1.io.out
111116
* consumer.io.in <> arb.io.out

0 commit comments

Comments
 (0)