configs,stdlib,tests: Remove get_runtime_isa() (#241)

`get_runtime_isa()` has been deprecated for some time. It is a leftover
piece of code from when gem5 was compiled to a single ISA and that ISA
used to configure the simulated system to use that ISA. Since multi-ISA
compilations are possible, `get_runtime_isa()` should not be used.
Unless the gem5 binary is compiled to a single ISA, a failure will
occur.

The new proceedure for specify which ISA to use is by the setting of the
correct `BaseCPU` implementation. E.g., `X86SimpleTimingCPU` of
`ArmO3CPU`.

This patch removes the remaining `get_runtime_isa()` instances and
removes the function itself. The `SimpleCore` class has been updated to
allow for it's CPU factory to return a class, needed by scripts in
"configs/common".

The deprecated functionality in the standard library, which allowed for
the specifying of an ISA when setting up a processor and/or core has
also been removed. Setting an ISA is now manditory.

Fixes #216.
This commit is contained in:
Bobby R. Bruce
2023-12-04 09:53:35 -08:00
committed by GitHub
parent 7b98641953
commit 569e21f798
20 changed files with 125 additions and 178 deletions

View File

@@ -48,7 +48,6 @@ from m5.util import (
)
from gem5.isas import ISA
from gem5.runtime import get_runtime_isa
addToPath("../")
@@ -62,8 +61,8 @@ from topologies import *
def define_options(parser):
# By default, ruby uses the simple timing cpu
parser.set_defaults(cpu_type="TimingSimpleCPU")
# By default, ruby uses the simple timing cpu and the X86 ISA
parser.set_defaults(cpu_type="X86TimingSimpleCPU")
parser.add_argument(
"--ruby-clock",
@@ -331,9 +330,9 @@ def send_evicts(options):
# 1. The O3 model must keep the LSQ coherent with the caches
# 2. The x86 mwait instruction is built on top of coherence invalidations
# 3. The local exclusive monitor in ARM systems
if options.cpu_type == "DerivO3CPU" or get_runtime_isa() in (
ISA.X86,
ISA.ARM,
):
if isinstance(
options.cpu_type, DerivO3CPU
) or ObjectList.CPUList().get_isa(options.cpu_type) in [ISA.X86, ISA.ARM]:
return True
return False