From ef1400f45404210121f53b38585602a8c7c2560e Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Thu, 14 Dec 2017 15:04:50 -0800 Subject: Add error message for <> of Vec and Seq of different lengths (#739) Fixes #482--- chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chiselFrontend/src') diff --git a/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala b/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala index a4eeb8a5..b89961aa 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala @@ -176,7 +176,9 @@ sealed class Vec[T <: Data] private[core] (gen: => T, val length: Int) * @note the length of this Vec must match the length of the input Seq */ def <> (that: Seq[T])(implicit sourceInfo: SourceInfo, moduleCompileOptions: CompileOptions): Unit = { - require(this.length == that.length) + if (this.length != that.length) { + Builder.error("Vec and Seq being bulk connected have different lengths!") + } for ((a, b) <- this zip that) a <> b } -- cgit v1.2.3