Added getScomReg, getIdScomReg, & associated calls
Added getScomReg and getIdScomReg to simulator.hpp. These lookup the
register values from a map and return the value.
In user_interface.cpp and the registerRead function, added case stanzas that
call the above functions, take care of endianness, and pass the data back
to the caller through the o_buffer and io_bufSize parameters.
Signed-off-by: Paul Greenwood <Paul.Greenwood@ibm.com>
Change-Id: Ie07e97d23a2f0a9b0073d99d8744fef91c8586a0
diff --git a/test/simulator/simulator.hpp b/test/simulator/simulator.hpp
index 9fe5c2b..29d1ef6 100644
--- a/test/simulator/simulator.hpp
+++ b/test/simulator/simulator.hpp
@@ -58,6 +58,18 @@
*/
void addChip(const Chip& i_chip);
+ /** @brief Retrieve ScomReg from map and return its value */
+ uint64_t getScomReg(const Chip& i_chip, uint32_t i_address)
+ {
+ return iv_scomRegData[i_chip][i_address];
+ }
+
+ /** @breif Retrieve idScomReg from map and return its value */
+ uint64_t getIdScomReg(const Chip& i_chip, uint64_t i_address)
+ {
+ return iv_idScomRegData[i_chip][i_address];
+ }
+
/** @brief Adds a SCOM register to iv_scomRegData. */
void addScomReg(const Chip& i_chip, uint32_t i_address, uint64_t i_value)
{