From 3f5cfc7050bfde6b38e5845549ba1478b221d8df Mon Sep 17 00:00:00 2001 From: Porterlu <1258210724@qq.com> Date: Fri, 9 Aug 2024 23:23:33 +0800 Subject: [PATCH] fix connection in RocketTileInterface --- rocketemu/src/TestBench.scala | 1 + rocketv/src/RocketTile.scala | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rocketemu/src/TestBench.scala b/rocketemu/src/TestBench.scala index 035012337..ae5482676 100644 --- a/rocketemu/src/TestBench.scala +++ b/rocketemu/src/TestBench.scala @@ -67,6 +67,7 @@ class TestBench(generator: SerializableModuleGenerator[RocketTile, RocketTilePar dut.io.mtip := 0.U dut.io.meip := 0.U dut.io.msip := 0.U + dut.io.seip.foreach(_ := 0.U) dut.io.buserror := 0.U // get resetVector from simulator diff --git a/rocketv/src/RocketTile.scala b/rocketv/src/RocketTile.scala index 9f3fe7e6b..bf5b33ac2 100644 --- a/rocketv/src/RocketTile.scala +++ b/rocketv/src/RocketTile.scala @@ -375,11 +375,11 @@ class RocketTileInterface(parameter: RocketTileParameter) extends Bundle { val mtip: Bool = Input(Bool()) val msip: Bool = Input(Bool()) val meip: Bool = Input(Bool()) - val seip: Option[Bool] = Option.when(parameter.usingSupervisor)(Bool()) - val lip: Vec[Bool] = Vec(parameter.nLocalInterrupts, Bool()) - val nmi = Option.when(parameter.usingNMI)(Bool()) - val nmiInterruptVector = Option.when(parameter.usingNMI)(UInt(parameter.resetVectorBits.W)) - val nmiIxceptionVector = Option.when(parameter.usingNMI)(UInt(parameter.resetVectorBits.W)) + val seip: Option[Bool] = Option.when(parameter.usingSupervisor)(Input(Bool())) + val lip: Vec[Bool] = Input(Vec(parameter.nLocalInterrupts, Bool())) + val nmi = Option.when(parameter.usingNMI)(Input(Bool())) + val nmiInterruptVector = Option.when(parameter.usingNMI)(Input(UInt(parameter.resetVectorBits.W))) + val nmiIxceptionVector = Option.when(parameter.usingNMI)(Input(UInt(parameter.resetVectorBits.W))) // TODO: buserror should be handled by NMI val buserror: Bool = Input(Bool()) val wfi: Bool = Output(Bool())