From 29146944458222cfd8eea23a7f6f9d0076f3bea6 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Tue, 12 Mar 2024 21:19:07 +0800 Subject: [PATCH] =?UTF-8?q?>=20configure(npc)=20=20ysyx=5F22040000=20?= =?UTF-8?q?=E6=9D=8E=E5=BF=83=E6=9D=A8=20=20Linux=20calcite=206.6.19=20#1-?= =?UTF-8?q?NixOS=20SMP=20PREEMPT=5FDYNAMIC=20Fri=20Mar=20=201=2012:35:11?= =?UTF-8?q?=20UTC=202024=20x86=5F64=20GNU/Linux=20=20=2021:19:07=20=20up?= =?UTF-8?q?=203=20days=2012:09,=20=202=20users,=20=20load=20average:=201.2?= =?UTF-8?q?5,=201.77,=201.50?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/core/src/main/scala/Main.scala | 4 ++-- npc/core/src/test/scala/Main.scala | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/npc/core/src/main/scala/Main.scala b/npc/core/src/main/scala/Main.scala index a9eb10e..b69b51f 100644 --- a/npc/core/src/main/scala/Main.scala +++ b/npc/core/src/main/scala/Main.scala @@ -89,7 +89,7 @@ class Control(width: Int) extends Module { import flow.components.{RegisterFile, RegFileInterface, ProgramCounter, ALU} import chisel3.util.experimental.loadMemoryFromFileInline -class Flow(memoryFile: String) extends Module { +class Flow extends Module { // val dataType = UInt(32.W) val ram = SRAM( @@ -98,7 +98,7 @@ class Flow(memoryFile: String) extends Module { numReadPorts = 2, numWritePorts = 1, numReadwritePorts = 0, - memoryFile = HexMemoryFile(memoryFile) + // memoryFile = HexMemoryFile(memoryFile) ) val control = Module(new Control(32)) val reg = RegisterFile(32, UInt(32.W), 2, 2) diff --git a/npc/core/src/test/scala/Main.scala b/npc/core/src/test/scala/Main.scala index 6a04681..9c006f4 100644 --- a/npc/core/src/test/scala/Main.scala +++ b/npc/core/src/test/scala/Main.scala @@ -39,9 +39,8 @@ class RV32CPUSpec extends AnyFreeSpec with ChiselScalatestTester { } } "should compile" in { - test(new Flow("../resource/addi.txt")) { c => + test(new Flow("../resource/addi.txt")).withAnnotations(Seq(WriteVcdAnnotation)) { c => c.clock.step(1) - // c.clock.step(100) } }