From 1da50d910b5324497fb7bd0e69f84149a064792e Mon Sep 17 00:00:00 2001 From: ducky Date: Fri, 11 Dec 2015 18:00:13 -0800 Subject: Fix Counter doc --- src/main/scala/Chisel/util/Counter.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/scala/Chisel') diff --git a/src/main/scala/Chisel/util/Counter.scala b/src/main/scala/Chisel/util/Counter.scala index 356cedc8..3425b6a2 100644 --- a/src/main/scala/Chisel/util/Counter.scala +++ b/src/main/scala/Chisel/util/Counter.scala @@ -8,8 +8,9 @@ package Chisel */ class Counter(val n: Int) { val value = if (n == 1) UInt(0) else Reg(init=UInt(0, log2Up(n))) - /** Increment the counter this cycle. Returns whether the counter is at its - * maximum (and will wrap around on the next inc() call). + /** Increment the counter, returning whether the counter currently is at the + * maximum and will wrap. The incremented value is registered and will be + * visible on the next cycle. */ def inc(): Bool = { if (n == 1) { -- cgit v1.2.3