diff options
| author | ducky64 | 2017-11-22 22:26:09 -0800 |
|---|---|---|
| committer | Richard Lin | 2018-01-02 13:41:56 -0800 |
| commit | 48e30fab101c5552c73fc5a76cad3ccc6b38946f (patch) | |
| tree | 318a05ff87cb6948c964de5738aa979c27d278e8 /src/main | |
| parent | 11c1112661e04094bccfd805e737e0318eb91ebc (diff) | |
Support for inner classes, implicit parameter lists, supertypess
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/scala/chisel3/compatibility.scala | 12 | ||||
| -rw-r--r-- | src/main/scala/chisel3/testers/BasicTester.scala | 9 |
2 files changed, 8 insertions, 13 deletions
diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala index 3c12b483..f299a287 100644 --- a/src/main/scala/chisel3/compatibility.scala +++ b/src/main/scala/chisel3/compatibility.scala @@ -250,9 +250,9 @@ package object Chisel { // scalastyle:ignore package.object.name abstract class BlackBox(params: Map[String, Param] = Map.empty[String, Param]) extends chisel3.core.BlackBox(params) { // This class auto-wraps the BlackBox with IO(...), allowing legacy code (where IO(...) wasn't // required) to build. - override def _compatAutoWrapPorts(): Unit = { // scalastyle:ignore method.name - if (!_compatIoPortBound()) { - _bindIoInPlace(io) + override def _autoWrapPorts(): Unit = { // scalastyle:ignore method.name + if (!_ioPortBound()) { + IO(io) } } } @@ -278,9 +278,9 @@ package object Chisel { // scalastyle:ignore package.object.name def this(_clock: Clock, _reset: Bool)(implicit moduleCompileOptions: CompileOptions) = this(Option(_clock), Option(_reset))(moduleCompileOptions) - override def _compatAutoWrapPorts(): Unit = { // scalastyle:ignore method.name - if (!_compatIoPortBound() && io != null) { - _bindIoInPlace(io) + override def _autoWrapPorts(): Unit = { // scalastyle:ignore method.name + if (!_ioPortBound() && io != null) { + IO(io) } } } diff --git a/src/main/scala/chisel3/testers/BasicTester.scala b/src/main/scala/chisel3/testers/BasicTester.scala index 4cd03863..7bb441ba 100644 --- a/src/main/scala/chisel3/testers/BasicTester.scala +++ b/src/main/scala/chisel3/testers/BasicTester.scala @@ -11,14 +11,9 @@ import internal.firrtl._ import internal.sourceinfo.SourceInfo //import chisel3.core.ExplicitCompileOptions.NotStrict -class TesterIO extends Bundle { - // The testbench has no IOs, rather it should communicate using printf, assert, and stop. - // This is here (instead of just `new Bundle()`, since that has an implicit compileOptions - // constructor argument which is misapplied by clonetype -} - class BasicTester extends Module() { - val io = IO(new TesterIO) + // The testbench has no IOs, rather it should communicate using printf, assert, and stop. + val io = IO(new Bundle() {}) def popCount(n: Long): Int = n.toBinaryString.count(_=='1') |
