diff options
| author | Jim Lawson | 2019-03-28 09:32:42 -0700 |
|---|---|---|
| committer | GitHub | 2019-03-28 09:32:42 -0700 |
| commit | 0d00420ba2d00a957ace9112ab570fe52abea9d3 (patch) | |
| tree | 8160d506e5c10966186d60cd350aaf2c2fcc9722 /chiselFrontend/src/main/scala/chisel3/core | |
| parent | 73fdf2be93ea0378a6aef5e6bd0b7e7730bc7ebb (diff) | |
Make core.DontCare private to chisel3 (#1054)
Force clients to access 'DontCare' through the chisel3 package to ensure it's created as a chisel3 object and not a client object.
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Data.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Data.scala b/chiselFrontend/src/main/scala/chisel3/core/Data.scala index ee8c90a1..daa89045 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Data.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Data.scala @@ -670,9 +670,10 @@ object WireDefault { /** RHS (source) for Invalidate API. * Causes connection logic to emit a DefInvalid when connected to an output port (or wire). */ -object DontCare extends Element { +private[chisel3] object DontCare extends Element { // This object should be initialized before we execute any user code that refers to it, // otherwise this "Chisel" object will end up on the UserModule's id list. + // We make it private to chisel3 so it has to be accessed through the package object. private[chisel3] override val width: Width = UnknownWidth() |
