summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman2019-11-17 17:19:14 -0800
committerGitHub2019-11-17 17:19:14 -0800
commitd4f64fa60bec87a12633fe5f398f1cf0e6e4f068 (patch)
tree3ebd2cf3dafbab82c9f6e3f3081b2476af192ace
parent9406e2bb5fa0a99f26f601a2f77db31f5598fc3b (diff)
Improve error message when assigning from Seq to Vec (#1239)
-rw-r--r--chiselFrontend/src/main/scala/chisel3/Aggregate.scala2
1 files changed, 1 insertions, 1 deletions
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
}