From d00a0bba32cae0b6f1f6b33691a41b7a580b52fc Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Mon, 12 Mar 2018 21:29:55 -0700 Subject: [PATCH] Revert "Debug: don't need to fully populate flags array" This reverts commit 197699b93add3c3ab3fb6c9ac15ce321703d91cb. --- src/main/scala/devices/debug/Debug.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/scala/devices/debug/Debug.scala b/src/main/scala/devices/debug/Debug.scala index 03b43ed8..f29e8af3 100644 --- a/src/main/scala/devices/debug/Debug.scala +++ b/src/main/scala/devices/debug/Debug.scala @@ -784,7 +784,7 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int, beatBytes: I val go = Bool() } - val flags = Wire(init = Vec.fill(nComponents){new flagBundle().fromBits(0.U)}) + val flags = Wire(init = Vec.fill(1024){new flagBundle().fromBits(0.U)}) assert ((cfg.hartSelToHartId(selectedHartReg) < 1024.U), "HartSel to HartId Mapping is illegal for this Debug Implementation, because HartID must be < 1024 for it to work."); flags(cfg.hartSelToHartId(selectedHartReg)).go := goReg @@ -903,10 +903,9 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int, beatBytes: I ABSTRACT(cfg) -> RegFieldGroup("debug_abstract", Some("Instructions generated by Debug Module"), abstractGeneratedMem.zipWithIndex.map{ case (x,i) => RegField.r(32, x, RegFieldDesc(s"debug_abstract_$i", ""))}), FLAGS -> RegFieldGroup("debug_flags", Some("Memory region used to control hart going/resuming in Debug Mode"), - flags.zipWithIndex.map{case(x, i) => RegField.r(8, x.asUInt(), RegFieldDesc(s"debug_flags_${i}", ""))}), + flags.zipWithIndex.map{case(x, i) => RegField.r(8, x.asUInt(), RegFieldDesc(s"debug_flags_$i", ""))}), ROMBASE -> RegFieldGroup("debug_rom", Some("Debug ROM"), - DebugRomContents().zipWithIndex.map{case (x, i) => RegField.r(8, (x & 0xFF).U(8.W), - RegFieldDesc(s"debug_rom_$i", "", reset=Some(x)))}) + DebugRomContents().zipWithIndex.map{case (x, i) => RegField.r(8, (x & 0xFF).U(8.W), RegFieldDesc(s"debug_rom_$i", "", reset=Some(x)))}) ) // Override System Bus accesses with dmactive reset.