base, sim: Make ByteOrder into a ScopedEnum accessible to Python
There is currently no good way of passing a byte order as a Param since the ByteOrder type is defined in C++. Make this into a generated ScopedEnum that can be used in Params. Change-Id: I990f402340c17c4e0799de57df19516ae61794d4 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33174 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -1513,6 +1513,14 @@ class ScopedEnum(Enum):
|
||||
# If not None, use this as the enum name rather than this class name
|
||||
enum_name = None
|
||||
|
||||
class ByteOrder(ScopedEnum):
|
||||
"""Enum representing component's byte order (endianness)"""
|
||||
|
||||
vals = [
|
||||
'big',
|
||||
'little',
|
||||
]
|
||||
|
||||
# how big does a rounding error need to be before we warn about it?
|
||||
frequency_tolerance = 0.001 # 0.1%
|
||||
|
||||
|
||||
Reference in New Issue
Block a user