Andreas Sandberg has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/33295 )
Change subject: dev: Use the new ByteOrder param type in SimpleUart
......................................................................
dev: Use the new ByteOrder param type in SimpleUart
Use the new ByteOrder param type in SimpleUart. The default value is
currently little endian. However, it is expected that most users of
this device will use single-byte accesses which aren't affected by
endianness.
Change-Id: I3f5d4ea566e5127474cff976332bd53c5b49b9e2
Signed-off-by: Andreas Sandberg <andreas.sandb...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33295
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
---
M src/dev/serial/Uart.py
M src/dev/serial/simple.cc
2 files changed, 2 insertions(+), 4 deletions(-)
Approvals:
Giacomo Travaglini: Looks good to me, approved
Andreas Sandberg: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/dev/serial/Uart.py b/src/dev/serial/Uart.py
index 97efcdd..7955d69 100644
--- a/src/dev/serial/Uart.py
+++ b/src/dev/serial/Uart.py
@@ -52,7 +52,7 @@
class SimpleUart(Uart):
type = 'SimpleUart'
cxx_header = "dev/serial/simple.hh"
- big_endian = Param.Bool(False, "Is the device Big Endian?")
+ byte_order = Param.ByteOrder("little", "Device byte order")
pio_size = Param.Addr(0x4, "Size of address range")
end_on_eot = Param.Bool(False, "End the simulation when a EOT is "\
"received on the UART")
diff --git a/src/dev/serial/simple.cc b/src/dev/serial/simple.cc
index 97018ab..339d6b9 100644
--- a/src/dev/serial/simple.cc
+++ b/src/dev/serial/simple.cc
@@ -43,9 +43,7 @@
#include "sim/sim_exit.hh"
SimpleUart::SimpleUart(const SimpleUartParams *p)
- : Uart(p, p->pio_size),
- byteOrder(p->big_endian ? ByteOrder::big : ByteOrder::little),
- endOnEOT(p->end_on_eot)
+ : Uart(p, p->pio_size), byteOrder(p->byte_order),
endOnEOT(p->end_on_eot)
{
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33295
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3f5d4ea566e5127474cff976332bd53c5b49b9e2
Gerrit-Change-Number: 33295
Gerrit-PatchSet: 6
Gerrit-Owner: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s