gem5.isas.html
gem5.isas module¶
Specifies the ISA enum
- class gem5.isas.ISA(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
The ISA Enums which may be used in the gem5 stdlib to specify ISAs.
Their value may be used to translate the ISA to strings and compare against inputs and environment variables.
E.g., to check if the X86 ISA is compiled:
if buildEnv[f"USE_{ISA.X86.value}_ISA"]: ...
- ARM = 'arm'¶
- MIPS = 'mips'¶
- NULL = 'null'¶
- POWER = 'power'¶
- RISCV = 'riscv'¶
- SPARC = 'sparc'¶
- X86 = 'x86'¶
- gem5.isas.get_isa_from_str(input: str) ISA ¶
Will return the correct enum given the input string. This is matched on the enum’s value. E.g., “x86” will return ISA.X86. Throws an exception if the input string is invalid.
get_isas_str_set()
can be used to determine the valid strings.This is for parsing text inputs that specify ISA targets.
- Parameters:
input – The ISA to return, as a string. Case-insensitive.
- gem5.isas.get_isas_str_set() Set[str] ¶
Returns a set of all the ISA as strings.