Mahyar Samani has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/53243 )
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
---
M tests/gem5/x86-boot-tests/test_linux_boot.py
M tests/gem5/configs/x86_boot_exit_run.py
2 files changed, 105 insertions(+), 20 deletions(-)
diff --git a/tests/gem5/configs/x86_boot_exit_run.py
b/tests/gem5/configs/x86_boot_exit_run.py
index 238136b..90f99af 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,20 @@
help="The CPU type.",
)
parser.add_argument(
+ "-p",
+ "--python-mem-module",
+ type=str,
+ required=True,
+ help="The python module that includes definition for the memory to
test"
+)
+parser.add_argument(
+ "-d",
+ "--python-mem-dram",
+ type=str,
+ required=True,
+ help="The python class for the memory interface to use"
+)
+parser.add_argument(
"-b",
"--boot-type",
type=str,
@@ -154,7 +168,10 @@
# 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")
+memory_class = getattr(
+ importlib.import_module(args.python_mem_module),
args.python_mem_interface
+)
+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 600d04b..de2f499 100644
--- a/tests/gem5/x86-boot-tests/test_linux_boot.py
+++ b/tests/gem5/x86-boot-tests/test_linux_boot.py
@@ -39,13 +39,15 @@
cpu: str,
num_cpus: int,
mem_system: str,
+ memory_module: 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_module, memory_class,
boot_type
)
verifiers = []
additional_config_args = []
@@ -89,6 +91,10 @@
str(num_cpus),
"--mem-system",
mem_system,
+ "--python-mem-module",
+ memory_module,
+ "--python-mem-dram",
+ memory_class,
"--boot-type",
boot_type,
"--resource-directory",
@@ -108,6 +114,8 @@
cpu="atomic",
num_cpus=1,
mem_system="classic",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
to_tick=10000000000, #Simulates 1/100th of a second.
length=constants.quick_tag,
)
@@ -116,6 +124,8 @@
cpu="timing",
num_cpus=1,
mem_system="classic",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
to_tick=10000000000,
length=constants.quick_tag,
)
@@ -124,6 +134,8 @@
cpu="atomic",
num_cpus=4,
mem_system="classic",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
to_tick=10000000000,
length=constants.quick_tag,
)
@@ -132,6 +144,8 @@
cpu="o3",
num_cpus=1,
mem_system="classic",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
to_tick=10000000000,
length=constants.quick_tag,
)
@@ -142,6 +156,8 @@
cpu="atomic",
num_cpus=1,
mem_system="classic",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
boot_type="init",
length=constants.long_tag,
)
@@ -150,6 +166,8 @@
cpu="timing",
num_cpus=1,
mem_system="mesi_two_level",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
boot_type="init",
length=constants.long_tag,
)
@@ -158,6 +176,8 @@
cpu="timing",
num_cpus=1,
mem_system="mi_example",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
boot_type="init",
length=constants.long_tag,
)
@@ -166,6 +186,8 @@
cpu="atomic",
num_cpus=4,
mem_system="classic",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
boot_type="systemd",
length=constants.long_tag,
)
@@ -174,6 +196,8 @@
cpu="o3",
num_cpus=2,
mem_system="mesi_two_level",
+ memory_module="gem5.componenets.memory.multi_channel",
+ memory_class="SingleChannelDDR3_1600",
boot_type="init",
length=constants.long_tag,
)
@@ -251,15 +275,47 @@
},
}
-for mem_system in run_map:
- for cpu in run_map[mem_system]:
- for num_cpus in run_map[mem_system][cpu]:
- if run_map[mem_system][cpu][num_cpus]:
+common_memory_classes = [
+ "SingleChannelDDR3_1600",
+ "SingleChannelDDR3_2133",
+ "SingleChannelDDR4_2400",
+ "SingleChannelLPDDR3_1600",
+ "SingleChannelHBM",
+]
+multi_memory_classes = [
+ "DualChannelDDR3_1600",
+ "DualChannelDDR3_2133",
+ "DualChannelDDR4_2400",
+ "DualChannelLPDDR3_1600",
+ "HBM2Stack",
+]
- test_boot(
- cpu=cpu,
- num_cpus=num_cpus,
- mem_system=mem_system,
- boot_type="systemd",
- length=constants.very_long_tag,
- )
+for mem_class in common_memory_classes + multi_memory_classes:
+ for mem_system in run_map:
+ 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_module="gem5.components.memory.multi_channel",
+ memory_class=mem_class,
+ boot_type="systemd",
+ length=constants.very_long_tag,
+ )
+
+for mem_class in common_memory_classes:
+ for mem_system in run_map:
+ 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_module="gem5.components.memory.single_channel",
+ memory_class=mem_class,
+ 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: 1
Gerrit-Owner: Mahyar Samani <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s