Skip to content

Commit

Permalink
Correcting documentation errors in Arbiter.scala (#839)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
mehnadnerd authored and ucbjrl committed Jul 17, 2018
1 parent 568545c commit 1ca6333
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/scala/chisel3/util/Arbiter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1ca6333

Please sign in to comment.