From af6173d011ec19d80e0ffce0ff9a5658f876225e Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 10 May 2016 13:48:16 -0700 Subject: Have Bits.toBools return Seq, not Vec The return value of Bits.toBools doesn't need to be dynamically indexed (as you could have just dynamically indexed the Bits itself), so returning a Seq instead of a Vec is mroe appropriate. This breaks a circular dependence between Bits and Vec, which helps with macros/frontend refactoring. --- chiselFrontend/src/main/scala/Chisel/Bits.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chiselFrontend') diff --git a/chiselFrontend/src/main/scala/Chisel/Bits.scala b/chiselFrontend/src/main/scala/Chisel/Bits.scala index 27790336..ce177ef1 100644 --- a/chiselFrontend/src/main/scala/Chisel/Bits.scala +++ b/chiselFrontend/src/main/scala/Chisel/Bits.scala @@ -155,7 +155,7 @@ sealed abstract class Bits(dirArg: Direction, width: Width, override val litArg: /** Returns the contents of this wire as a [[Vec]] of [[Bool]]s. */ - def toBools: Vec[Bool] = Vec.tabulate(this.getWidth)(i => this(i)) + def toBools: Seq[Bool] = Seq.tabulate(this.getWidth)(i => this(i)) /** Reinterpret cast to a SInt. * -- cgit v1.2.3