From 2d7bf7a5fdb5ee722009d4816bb8aa355ead59fc Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 15 Jan 2016 14:23:28 -0800 Subject: flatten should return Seq[Bits], not Seq[UInt] Calling toBits inside of flatten makes asInput/asOutput/asDirectionless fail on SInts. Also, the abstract type Data was already defining it to return Seq[Bits], so this change didn't really change the API. --- src/main/scala/Chisel/Data.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/scala/Chisel/Data.scala') diff --git a/src/main/scala/Chisel/Data.scala b/src/main/scala/Chisel/Data.scala index f9b277e1..c72c7dfc 100644 --- a/src/main/scala/Chisel/Data.scala +++ b/src/main/scala/Chisel/Data.scala @@ -123,7 +123,7 @@ object Clock { // TODO: Document this. sealed class Clock(dirArg: Direction) extends Element(dirArg, Width(1)) { def cloneType: this.type = Clock(dirArg).asInstanceOf[this.type] - private[Chisel] override def flatten: IndexedSeq[UInt] = IndexedSeq() + private[Chisel] override def flatten: IndexedSeq[Bits] = IndexedSeq() private[Chisel] def cloneTypeWidth(width: Width): this.type = cloneType private[Chisel] def toType = "Clock" -- cgit v1.2.3