Mahyar Samani has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/53243 )
(
6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: tests: Adding MultiChannelMemory to x86-boot-tests
......................................................................
tests: Adding MultiChannelMemory to x86-boot-tests
This change adds modules from multi_channel.py to full system
tests for x86.
Change-Id: I585a381fa23c6595051ea917c080228e25e0a1a9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53243
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Bobby Bruce <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
M tests/gem5/configs/x86_boot_exit_run.py
2 files changed, 60 insertions(+), 11 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks
good to me, approved
Bobby Bruce: Looks good to me, approved
kokoro: Regressions pass
diff --git a/tests/gem5/configs/x86_boot_exit_run.py
b/tests/gem5/configs/x86_boot_exit_run.py
index 238136b..58e7713 100644
--- a/tests/gem5/configs/x86_boot_exit_run.py
+++ b/tests/gem5/configs/x86_boot_exit_run.py
@@ -35,16 +35,16 @@
get_runtime_coherence_protocol,
get_runtime_isa,
)
-from gem5.utils.requires import requires
-from gem5.components.boards.x86_board import X86Board
-from gem5.components.memory.single_channel import SingleChannelDDR3_1600
-from gem5.components.processors.simple_processor import SimpleProcessor
-from gem5.components.processors.cpu_types import CPUTypes
from gem5.isas import ISA
-from gem5.coherence_protocol import CoherenceProtocol
+from gem5.utils.requires import requires
from gem5.resources.resource import Resource
+from gem5.coherence_protocol import CoherenceProtocol
+from gem5.components.boards.x86_board import X86Board
+from gem5.components.processors.cpu_types import CPUTypes
+from gem5.components.processors.simple_processor import SimpleProcessor
import argparse
+import importlib
parser = argparse.ArgumentParser(
description="A script to run the gem5 boot test. This test boots the "
@@ -75,6 +75,13 @@
help="The CPU type.",
)
parser.add_argument(
+ "-d",
+ "--dram-class",
+ type=str,
+ required=True,
+ help="The python class for the memory interface to use"
+)
+parser.add_argument(
"-b",
"--boot-type",
type=str,
@@ -154,7 +161,11 @@
# Setup the system memory.
# Warning: This must be kept at 3GB for now. X86Motherboard does not
support
# anything else right now!
-memory = SingleChannelDDR3_1600(size="3GB")
+python_module = "gem5.components.memory.multi_channel"
+memory_class = getattr(
+ importlib.import_module(python_module), args.dram_class
+)
+memory = memory_class(size="3GiB")
# Setup a Processor.
diff --git a/tests/gem5/x86-boot-tests/test_linux_boot.py
b/tests/gem5/x86-boot-tests/test_linux_boot.py
index d90f53b..77d1c0d 100644
--- a/tests/gem5/x86-boot-tests/test_linux_boot.py
+++ b/tests/gem5/x86-boot-tests/test_linux_boot.py
@@ -39,13 +39,14 @@
cpu: str,
num_cpus: int,
mem_system: str,
+ memory_class: str,
length: str,
boot_type: str = "init",
to_tick: Optional[int] = None,
):
- name = "{}-cpu_{}-cores_{}_{}_x86-boot-test".format(
- cpu, str(num_cpus), mem_system, boot_type
+ name = "{}-cpu_{}-cores_{}_{}_{}_x86-boot-test".format(
+ cpu, str(num_cpus), mem_system, memory_class, boot_type
)
verifiers = []
additional_config_args = []
@@ -89,6 +90,8 @@
str(num_cpus),
"--mem-system",
mem_system,
+ "--dram-class",
+ memory_class,
"--boot-type",
boot_type,
"--resource-directory",
@@ -108,6 +111,7 @@
cpu="atomic",
num_cpus=1,
mem_system="classic",
+ memory_class="SingleChannelDDR3_1600",
to_tick=10000000000, #Simulates 1/100th of a second.
length=constants.quick_tag,
)
@@ -116,6 +120,7 @@
cpu="timing",
num_cpus=1,
mem_system="classic",
+ memory_class="SingleChannelDDR3_2133",
to_tick=10000000000,
length=constants.quick_tag,
)
@@ -124,6 +129,7 @@
cpu="atomic",
num_cpus=4,
mem_system="classic",
+ memory_class="SingleChannelDDR4_2400",
to_tick=10000000000,
length=constants.quick_tag,
)
@@ -132,6 +138,7 @@
cpu="o3",
num_cpus=1,
mem_system="classic",
+ memory_class="SingleChannelLPDDR3_1600",
to_tick=10000000000,
length=constants.quick_tag,
)
@@ -142,6 +149,7 @@
cpu="atomic",
num_cpus=1,
mem_system="classic",
+ memory_class="SingleChannelHBM",
boot_type="init",
length=constants.long_tag,
)
@@ -150,6 +158,7 @@
cpu="timing",
num_cpus=1,
mem_system="mesi_two_level",
+ memory_class="DualChannelDDR3_1600",
boot_type="init",
length=constants.long_tag,
)
@@ -158,6 +167,7 @@
cpu="timing",
num_cpus=1,
mem_system="mi_example",
+ memory_class="DualChannelDDR3_2133",
boot_type="init",
length=constants.long_tag,
)
@@ -166,6 +176,7 @@
cpu="atomic",
num_cpus=4,
mem_system="classic",
+ memory_class="DualChannelDDR4_2400",
boot_type="systemd",
length=constants.long_tag,
)
@@ -179,10 +190,20 @@
# cpu="o3",
# num_cpus=2,
# mem_system="mesi_two_level",
+# memory_class="DualChannelDDR4_2400"
# boot_type="init",
# length=constants.long_tag,
#)
+test_boot(
+ cpu="atomic",
+ num_cpus=4,
+ mem_system="classic",
+ memory_class="HBM2Stack",
+ boot_type="systemd",
+ length=constants.long_tag,
+)
+
#### The very-long (Weekly) tests ####
# This maps the cross product of the test to run. As 'init' is a subset
@@ -260,11 +281,11 @@
for cpu in run_map[mem_system]:
for num_cpus in run_map[mem_system][cpu]:
if run_map[mem_system][cpu][num_cpus]:
-
test_boot(
cpu=cpu,
num_cpus=num_cpus,
mem_system=mem_system,
+ memory_class="DualChannelDDR4_2400",
boot_type="systemd",
length=constants.very_long_tag,
- )
+ )
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53243
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I585a381fa23c6595051ea917c080228e25e0a1a9
Gerrit-Change-Number: 53243
Gerrit-PatchSet: 8
Gerrit-Owner: Mahyar Samani <[email protected]>
Gerrit-Reviewer: Bobby Bruce <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Mahyar Samani <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s