如何从TestHarness访问子模块寄存器?

时间:2019-05-02 16:02:59

标签: riscv chisel rocket-chip

我想从测试台TestHarness.scala更改存储在火箭核心寄存器中的值。我该如何访问寄存器?

TestHarness.scala中,我认为dut用于实例化ExampleRocketSystem模块:

val dut = Module(LazyModule(new ExampleRocketSystem).module)

从生成的Verilog中,我看到层次结构是:

ExampleRocketSystem dut
  --RocketTile tile
    --Rocket core
      --target_register

所以我尝试使用dut.tile.core.target_register来修改寄存器,但是出现了错误:

  

值图块不是freechips.rocketchip.system.ExampleRocketSystemModuleImp [freechips.rocketchip.system.ExampleRocketSystem]的成员

0 个答案:

没有答案
相关问题