summaryrefslogtreecommitdiff
path: root/chiselFrontend/src/main/scala/chisel3/core/Clock.scala
diff options
context:
space:
mode:
authorRichard Lin2019-01-22 15:06:08 -0800
committerGitHub2019-01-22 15:06:08 -0800
commitb39bc25ff76762d93300975e533ec3bd4f119d1c (patch)
tree38a8219d1c8ef6c61fd667a3f46a189091e2ea20 /chiselFrontend/src/main/scala/chisel3/core/Clock.scala
parent40f4d3edf93cf48294bd6555a1deaa07571b2d3d (diff)
Define Data .toString (#985)
toString on Data subtypes will now print the type and optionally binding information including literals and IO names as feasible.
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Clock.scala')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Clock.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Clock.scala b/chiselFrontend/src/main/scala/chisel3/core/Clock.scala
index 88208d9a..1bc2260c 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Clock.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Clock.scala
@@ -13,6 +13,8 @@ object Clock {
// TODO: Document this.
sealed class Clock(private[chisel3] val width: Width = Width(1)) extends Element {
+ override def toString: String = s"Clock$bindingToString"
+
def cloneType: this.type = Clock().asInstanceOf[this.type]
private[core] def typeEquivalent(that: Data): Boolean =