From 71543700c8f8239d550cc24e26101743577087d9 Mon Sep 17 00:00:00 2001 From: Liphen Date: Fri, 29 Dec 2023 12:07:18 +0800 Subject: [PATCH] =?UTF-8?q?perf(lsu):=20=E4=BF=AE=E6=94=B9=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E4=BF=A1=E5=8F=B7=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chisel/playground/src/pipeline/memory/Lsu.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chisel/playground/src/pipeline/memory/Lsu.scala b/chisel/playground/src/pipeline/memory/Lsu.scala index 9a512c3..93e060d 100644 --- a/chisel/playground/src/pipeline/memory/Lsu.scala +++ b/chisel/playground/src/pipeline/memory/Lsu.scala @@ -139,7 +139,8 @@ class Lsu(implicit val config: CpuConfig) extends Module { lsExe.in.wdata := DontCare io.memoryUnit.out.ready := false.B when(lsExe.out.ready) { - state := s_amo_a; + state := s_amo_a; + // 告诉dcache已经完成一次访存操作,可以进入下一次访存 complete_single_request := true.B } atomMemReg := lsExe.out.rdata @@ -147,7 +148,6 @@ class Lsu(implicit val config: CpuConfig) extends Module { } is(s_amo_a) { - complete_single_request := false.B lsExe.in.mem_en := false.B lsExe.in.mem_addr := DontCare lsExe.in.info.op := DontCare @@ -187,6 +187,7 @@ class Lsu(implicit val config: CpuConfig) extends Module { ) { state := s_idle io.memoryUnit.out.ready := true.B + complete_single_request := false.B // 发生例外时应该由ctrl的allow to go控制 } setLr := io.memoryUnit.out.ready && (lrReq || scReq)