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 <power.jg@gmail.com> Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -35,16 +35,16 @@ from gem5.runtime import (
|
||||
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 "
|
||||
@@ -74,6 +74,13 @@ parser.add_argument(
|
||||
required=True,
|
||||
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",
|
||||
@@ -154,7 +161,11 @@ assert cache_hierarchy != None
|
||||
# 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.
|
||||
|
||||
|
||||
@@ -39,13 +39,14 @@ def test_boot(
|
||||
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 @@ def test_boot(
|
||||
str(num_cpus),
|
||||
"--mem-system",
|
||||
mem_system,
|
||||
"--dram-class",
|
||||
memory_class,
|
||||
"--boot-type",
|
||||
boot_type,
|
||||
"--resource-directory",
|
||||
@@ -108,6 +111,7 @@ test_boot(
|
||||
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 @@ test_boot(
|
||||
cpu="timing",
|
||||
num_cpus=1,
|
||||
mem_system="classic",
|
||||
memory_class="SingleChannelDDR3_2133",
|
||||
to_tick=10000000000,
|
||||
length=constants.quick_tag,
|
||||
)
|
||||
@@ -124,6 +129,7 @@ test_boot(
|
||||
cpu="atomic",
|
||||
num_cpus=4,
|
||||
mem_system="classic",
|
||||
memory_class="SingleChannelDDR4_2400",
|
||||
to_tick=10000000000,
|
||||
length=constants.quick_tag,
|
||||
)
|
||||
@@ -132,6 +138,7 @@ test_boot(
|
||||
cpu="o3",
|
||||
num_cpus=1,
|
||||
mem_system="classic",
|
||||
memory_class="SingleChannelLPDDR3_1600",
|
||||
to_tick=10000000000,
|
||||
length=constants.quick_tag,
|
||||
)
|
||||
@@ -142,6 +149,7 @@ test_boot(
|
||||
cpu="atomic",
|
||||
num_cpus=1,
|
||||
mem_system="classic",
|
||||
memory_class="SingleChannelHBM",
|
||||
boot_type="init",
|
||||
length=constants.long_tag,
|
||||
)
|
||||
@@ -150,6 +158,7 @@ test_boot(
|
||||
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 @@ test_boot(
|
||||
cpu="timing",
|
||||
num_cpus=1,
|
||||
mem_system="mi_example",
|
||||
memory_class="DualChannelDDR3_2133",
|
||||
boot_type="init",
|
||||
length=constants.long_tag,
|
||||
)
|
||||
@@ -166,6 +176,7 @@ test_boot(
|
||||
cpu="atomic",
|
||||
num_cpus=4,
|
||||
mem_system="classic",
|
||||
memory_class="DualChannelDDR4_2400",
|
||||
boot_type="systemd",
|
||||
length=constants.long_tag,
|
||||
)
|
||||
@@ -179,10 +190,20 @@ test_boot(
|
||||
# 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 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_class="DualChannelDDR4_2400",
|
||||
boot_type="systemd",
|
||||
length=constants.very_long_tag,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user