summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Module.scala
diff options
context:
space:
mode:
authorRichard Lin2017-10-05 12:13:27 -0700
committerGitHub2017-10-05 12:13:27 -0700
commit8168a8eea6c3465966081c5acd0347e09791361c (patch)
tree23fc79aaaeb512b445748dd78dbb5ce3bb67e372 /src/test/scala/chiselTests/Module.scala
parent0f1b64173c305f5d36e4c84a8e575ff6f997b359 (diff)
the cloneType and chiselCloneType hot mess 🔥 (#653)
Addresses #419 cloneType is now marked (through comments only) as an internal API. chiselCloneType deprecated (and changed to cloneTypeFull internally, analogous to cloneTypeWidth). chiselTypeOf(data) introduced as the external API to get a chisel type from a hardware object Intended usage: cloning is an implementation detail, and chisel types and hardware objects both should act as immutable types, with operations like Input(...), Reg(...), etc returning a copy and leaving the original unchanged. Hence, the clone operations are all deprecated. Deletes what appears to be an unused Bundle companion object. Input(...), Output(...), Flipped(...) require the object to be unbound
Diffstat (limited to 'src/test/scala/chiselTests/Module.scala')
-rw-r--r--src/test/scala/chiselTests/Module.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/scala/chiselTests/Module.scala b/src/test/scala/chiselTests/Module.scala
index 432cd278..e84e6a02 100644
--- a/src/test/scala/chiselTests/Module.scala
+++ b/src/test/scala/chiselTests/Module.scala
@@ -41,7 +41,7 @@ class ModuleVecTester(c: ModuleVec) extends Tester(c) {
class ModuleWire extends Module {
val io = IO(new SimpleIO)
- val inc = Wire(Module(new PlusOne).io.chiselCloneType)
+ val inc = Wire(chiselTypeOf(Module(new PlusOne).io))
inc.in := io.in
io.out := inc.out
}