gem5.components.processors.cpu_types module

class gem5.components.processors.cpu_types.CPUTypes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ATOMIC = 'atomic'
KVM = 'kvm'
MINOR = 'minor'
O3 = 'o3'
TIMING = 'timing'
gem5.components.processors.cpu_types.get_cpu_type_from_str(input: str) CPUTypes

Will return the correct enum given the input string. This is matched on the enum’s value. E.g., “kvm” will return ISA.KVM. Throws an exception if the input string is invalid.

get_cpu_types_str_set() can be used to determine the valid strings.

This is for parsing text inputs that specify CPU Type targets.

Parameters:

input – The CPU Type to return, as a string. Case-insensitive.

gem5.components.processors.cpu_types.get_cpu_types_str_set() Set[str]

Returns a set of all the CPU types as strings.

gem5.components.processors.cpu_types.get_mem_mode(input: CPUTypes) MemMode

Returns the correct memory mode to be set for a given CPUType.

Parameters:

input – The CPUType to check.