summaryrefslogtreecommitdiff
path: root/chiselFrontend/src/main/scala/chisel3/core/Reg.scala
diff options
context:
space:
mode:
authorJim Lawson2016-08-16 11:59:20 -0700
committerJim Lawson2016-08-17 13:41:43 -0700
commitf41f2533c55e506f7d5bf2ee0198de4d9a3dbea3 (patch)
tree4a9786dd4e468d9517517603b06b123e1e35b44f /chiselFrontend/src/main/scala/chisel3/core/Reg.scala
parenta264157a47f56216cebf2d98c1c8118c344dad5f (diff)
Reduce rocket-chip elaboration errors.
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Reg.scala')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Reg.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Reg.scala b/chiselFrontend/src/main/scala/chisel3/core/Reg.scala
index f5706833..6c357461 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Reg.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Reg.scala
@@ -10,7 +10,9 @@ import chisel3.internal.sourceinfo.{SourceInfo, UnlocatableSourceInfo}
object Reg {
private[core] def makeType[T <: Data](t: T = null, next: T = null, init: T = null): T = {
if (t ne null) {
- Binding.checkUnbound(t, s"t ($t) must be unbound Type. Try using cloneType?")
+ if (Builder.compileOptions.regTypeMustBeUnbound) {
+ Binding.checkUnbound(t, s"t ($t) must be unbound Type. Try using cloneType?")
+ }
t.chiselCloneType
} else if (next ne null) {
next.cloneTypeWidth(Width())