From d4f64fa60bec87a12633fe5f398f1cf0e6e4f068 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 17 Nov 2019 17:19:14 -0800 Subject: Improve error message when assigning from Seq to Vec (#1239) --- chiselFrontend/src/main/scala/chisel3/Aggregate.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chiselFrontend/src') diff --git a/chiselFrontend/src/main/scala/chisel3/Aggregate.scala b/chiselFrontend/src/main/scala/chisel3/Aggregate.scala index eaa56c36..1619fd17 100644 --- a/chiselFrontend/src/main/scala/chisel3/Aggregate.scala +++ b/chiselFrontend/src/main/scala/chisel3/Aggregate.scala @@ -204,7 +204,7 @@ sealed class Vec[T <: Data] private[chisel3] (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) + require(this.length == that.length, s"Cannot assign to a Vec of length ${this.length} from a Seq of different length ${that.length}") for ((a, b) <- this zip that) a := b } -- cgit v1.2.3