From c327dc328ca819031a086ae102fefe2909831e24 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Wed, 13 Dec 2017 21:13:52 -0800 Subject: Improve some of the ScalaDoc in chisel3.util --- src/main/scala/chisel3/util/Counter.scala | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/main/scala/chisel3/util/Counter.scala') diff --git a/src/main/scala/chisel3/util/Counter.scala b/src/main/scala/chisel3/util/Counter.scala index aa0c0d43..f6f99f67 100644 --- a/src/main/scala/chisel3/util/Counter.scala +++ b/src/main/scala/chisel3/util/Counter.scala @@ -4,10 +4,19 @@ package chisel3.util import chisel3._ import chisel3.internal.naming.chiselName // can't use chisel3_ version because of compile order -//import chisel3.core.ExplicitCompileOptions.Strict /** A counter module - * + * + * Typically instantiated with apply methods in [[Counter$ object Counter]] + * + * @example {{{ + * val countOn = true.B // increment counter every clock cycle + * val (counterValue, counterWrap) = Counter(countOn, 4) + * when (counterValue === 3.U) { + * ... + * } + * }}} + * * @param n number of counts before the counter resets (or one more than the * maximum output value of the counter), need not be a power of two */ @@ -46,14 +55,6 @@ object Counter * @param n number of counts before the counter resets * @return tuple of the counter value and whether the counter will wrap (the value is at * maximum and the condition is true). - * - * @example {{{ - * val countOn = true.B // increment counter every clock cycle - * val (counterValue, counterWrap) = Counter(countOn, 4) - * when (counterValue === 3.U) { - * ... - * } - * }}} */ @chiselName def apply(cond: Bool, n: Int): (UInt, Bool) = { -- cgit v1.2.3