stdlib: Remove 'exit_on_work_items' from boards' constructor
This has been moved to the `set_kernel_disk_workload` function, and is set to True by default. Change-Id: I9df2fa2946dd942b5011f05b948542097310352e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52223 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
This commit is contained in:
@@ -67,7 +67,6 @@ class AbstractBoard(System):
|
||||
processor: "AbstractProcessor",
|
||||
memory: "AbstractMemory",
|
||||
cache_hierarchy: "AbstractCacheHierarchy",
|
||||
exit_on_work_items: bool = False,
|
||||
) -> None:
|
||||
super(AbstractBoard, self).__init__()
|
||||
"""
|
||||
@@ -75,8 +74,6 @@ class AbstractBoard(System):
|
||||
:param processor: The processor for this board.
|
||||
:param memory: The memory for this board.
|
||||
:param cache_hierarchy: The Cachie Hierarchy for this board.
|
||||
:param exit_on_work_items: Whether the simulation should exit
|
||||
on work items.
|
||||
"""
|
||||
|
||||
# Set up the clock domain and the voltage domain.
|
||||
@@ -84,9 +81,6 @@ class AbstractBoard(System):
|
||||
self.clk_domain.clock = clk_freq
|
||||
self.clk_domain.voltage_domain = VoltageDomain()
|
||||
|
||||
# Set whether to exit on work items.
|
||||
self.exit_on_work_items = exit_on_work_items
|
||||
|
||||
# Set the processor, memory, and cache hierarchy.
|
||||
self.processor = processor
|
||||
self.memory = memory
|
||||
|
||||
@@ -136,6 +136,7 @@ class KernelDiskWorkload:
|
||||
readfile: Optional[str] = None,
|
||||
readfile_contents: Optional[str] = None,
|
||||
kernel_args: Optional[List[str]] = None,
|
||||
exit_on_work_items: bool = True,
|
||||
) -> None:
|
||||
"""
|
||||
This function allows the setting of a full-system run with a Kernel
|
||||
@@ -151,6 +152,8 @@ class KernelDiskWorkload:
|
||||
be created with the value of `readfile_contents`.
|
||||
:param kernel_args: An optional parameter for setting arguments to be
|
||||
passed to the kernel. By default set to `get_default_kernel_args()`.
|
||||
:param exit_on_work_items: Whether the simulation should exit on work
|
||||
items. True by default.
|
||||
"""
|
||||
|
||||
# Set the kernel to use.
|
||||
@@ -176,3 +179,6 @@ class KernelDiskWorkload:
|
||||
file.close()
|
||||
|
||||
self._add_disk_to_board(disk_image=disk_image)
|
||||
|
||||
# Set whether to exit on work items.
|
||||
self.exit_on_work_items = exit_on_work_items
|
||||
@@ -85,11 +85,8 @@ class RiscvBoard(AbstractBoard, KernelDiskWorkload):
|
||||
processor: AbstractProcessor,
|
||||
memory: AbstractMemorySystem,
|
||||
cache_hierarchy: AbstractCacheHierarchy,
|
||||
exit_on_work_items: bool = False,
|
||||
) -> None:
|
||||
super().__init__(
|
||||
clk_freq, processor, memory, cache_hierarchy, exit_on_work_items
|
||||
)
|
||||
super().__init__(clk_freq, processor, memory, cache_hierarchy)
|
||||
requires(isa_required=ISA.RISCV)
|
||||
|
||||
@overrides(AbstractBoard)
|
||||
|
||||
@@ -57,14 +57,12 @@ class SimpleBoard(AbstractBoard, SEBinaryWorkload):
|
||||
processor: AbstractProcessor,
|
||||
memory: AbstractMemorySystem,
|
||||
cache_hierarchy: AbstractCacheHierarchy,
|
||||
exit_on_work_items: bool = False,
|
||||
) -> None:
|
||||
super(SimpleBoard, self).__init__(
|
||||
clk_freq=clk_freq,
|
||||
processor=processor,
|
||||
memory=memory,
|
||||
cache_hierarchy=cache_hierarchy,
|
||||
exit_on_work_items=exit_on_work_items,
|
||||
)
|
||||
|
||||
@overrides(AbstractBoard)
|
||||
|
||||
@@ -77,14 +77,12 @@ class X86Board(AbstractBoard, KernelDiskWorkload):
|
||||
processor: AbstractProcessor,
|
||||
memory: AbstractMemorySystem,
|
||||
cache_hierarchy: AbstractCacheHierarchy,
|
||||
exit_on_work_items: bool = False,
|
||||
) -> None:
|
||||
super(X86Board, self).__init__(
|
||||
clk_freq=clk_freq,
|
||||
processor=processor,
|
||||
memory=memory,
|
||||
cache_hierarchy=cache_hierarchy,
|
||||
exit_on_work_items=exit_on_work_items,
|
||||
)
|
||||
|
||||
requires(isa_required=ISA.X86)
|
||||
|
||||
Reference in New Issue
Block a user