stdlib: added errout and output file option in SE process

In the set_se_binary_workload(), added stdout_file and stderr_file
arguments to setup process.errout and process.output.

Change-Id: I54db2248578f485a633d6b6212fa6c62bcbca4de
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64151
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
diff --git a/src/python/gem5/components/boards/se_binary_workload.py b/src/python/gem5/components/boards/se_binary_workload.py
index 62837fd..afd7cef 100644
--- a/src/python/gem5/components/boards/se_binary_workload.py
+++ b/src/python/gem5/components/boards/se_binary_workload.py
@@ -32,6 +32,7 @@
 
 from typing import Optional, List
 from m5.util import warn
+from pathlib import Path
 
 
 class SEBinaryWorkload:
@@ -53,6 +54,8 @@
         binary: AbstractResource,
         exit_on_work_items: bool = True,
         stdin_file: Optional[AbstractResource] = None,
+        stdout_file: Optional[Path] = None,
+        stderr_file: Optional[Path] = None,
         arguments: List[str] = [],
         simpoint: SimPoint = None,
     ) -> None:
@@ -91,6 +94,10 @@
         process.cmd = [binary_path] + arguments
         if stdin_file is not None:
             process.input = stdin_file.get_local_path()
+        if stdout_file is not None:
+            process.output = stdout_file.as_posix()
+        if stderr_file is not None:
+            process.errout = stderr_file.as_posix()
 
         for core in self.get_processor().get_cores():
             core.set_workload(process)