Skip to content

Commit

Permalink
[script] wrap programOutputPath for emulator
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin committed Jun 11, 2024
1 parent d85986a commit 270d56d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion script/src/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ object Main:
name = "event-log-path",
doc = "Set the event log path"
) eventLogFilePath: Option[os.Path] = None,
@arg(
name = "program-output-path",
doc = "Path to store the ELF stdout/stderr"
) programOutputFilePath: Option[os.Path] = None,
@arg(
name = "out-dir",
doc = "path to save wave file and perf result file"
Expand Down Expand Up @@ -231,6 +235,11 @@ object Main:
val eventLogPath =
if eventLogFilePath.isDefined then eventLogFilePath.get
else outputPath / "rtl-event.log"
val programOutputPath =
if programOutputFilePath.isDefined then programOutputFilePath.get
else outputPath / "mmio-store.txt"
if os.exists(programOutputPath) then
os.remove(programOutputPath)

def dumpCycleAsFloat() =
val ratio = dumpCycle.toFloat
Expand Down Expand Up @@ -302,7 +311,9 @@ object Main:
.arr(0)
.obj("beatbyte")
.toString(),
s"--log-path=${emulatorLogPath}"
s"--log-path=${emulatorLogPath}",
"--program-output-path",
programOutputPath.toString,
) ++ optionals(noLog.value, Seq("--no-logging"))
++ optionals(noFileLog.value, Seq("--no-file-logging"))
++ optionals(noConsoleLog.value, Seq("--no-console-logging"))
Expand Down

0 comments on commit 270d56d

Please sign in to comment.