Commit b5507d45 by Luis Vega Committed by Jared Roesch

[VTA][TSIM] Use Module instead of RawModule for testbench by creating an empty…

[VTA][TSIM] Use Module instead of RawModule for testbench by creating an empty bundle for the IO (#3242)

* use Module instead of RawModule for testbench by creating an empty bundle for the IO

* change default back to verilog
parent c0afc918
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
package test package test
import chisel3._ import chisel3._
import chisel3.experimental.{RawModule, withClockAndReset}
import vta.dpi._ import vta.dpi._
import accel._ import accel._
...@@ -29,21 +28,19 @@ import accel._ ...@@ -29,21 +28,19 @@ import accel._
* Instantiate Host and Memory DPI modules. * Instantiate Host and Memory DPI modules.
* *
*/ */
class VTASimShell extends RawModule { class VTASimShell extends Module {
val io = IO(new Bundle { val io = IO(new Bundle {
val clock = Input(Clock())
val reset = Input(Bool())
val host = new VTAHostDPIMaster val host = new VTAHostDPIMaster
val mem = new VTAMemDPIClient val mem = new VTAMemDPIClient
}) })
val host = Module(new VTAHostDPI) val host = Module(new VTAHostDPI)
val mem = Module(new VTAMemDPI) val mem = Module(new VTAMemDPI)
mem.io.reset := io.reset mem.io.dpi <> io.mem
mem.io.clock := io.clock mem.io.reset := reset
host.io.reset := io.reset mem.io.clock := clock
host.io.clock := io.clock
io.mem <> mem.io.dpi
io.host <> host.io.dpi io.host <> host.io.dpi
host.io.reset := reset
host.io.clock := clock
} }
/** Test accelerator. /** Test accelerator.
...@@ -51,15 +48,10 @@ class VTASimShell extends RawModule { ...@@ -51,15 +48,10 @@ class VTASimShell extends RawModule {
* Instantiate and connect the simulation-shell and the accelerator. * Instantiate and connect the simulation-shell and the accelerator.
* *
*/ */
class TestAccel extends RawModule { class TestAccel extends Module {
val clock = IO(Input(Clock())) val io = IO(new Bundle {})
val reset = IO(Input(Bool()))
val sim_shell = Module(new VTASimShell) val sim_shell = Module(new VTASimShell)
val vta_accel = withClockAndReset(clock, reset) { Module(new Accel) } val vta_accel = Module(new Accel)
sim_shell.io.clock := clock
sim_shell.io.reset := reset
vta_accel.io.host <> sim_shell.io.host vta_accel.io.host <> sim_shell.io.host
sim_shell.io.mem <> vta_accel.io.mem sim_shell.io.mem <> vta_accel.io.mem
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment