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/user_interface.cpp b/test/simulator/user_interface.cpp
index 7ed998a..2bcc2af 100644
--- a/test/simulator/user_interface.cpp
+++ b/test/simulator/user_interface.cpp
@@ -22,20 +22,29 @@
     HEI_ASSERT(nullptr != o_buffer);
     HEI_ASSERT(0 != io_bufSize);
 
+    // Get access to data through the singleton
+    SimulatorData& theSimData = SimulatorData::getSingleton();
+
     switch (i_regType)
     {
-        // BEGIN temporary code
-        // TODO: add cases for REG_TYPE_SCOM and REG_TYPE_ID_SCOM
         case REG_TYPE_SCOM:
         {
-            uint64_t x = htobe64(0x8800000000000000);
-            memcpy(o_buffer, &x, sizeof(x));
+            // Get the register value and change its endianness
+            uint64_t regValue =
+                htobe64(theSimData.getScomReg(i_chip, (uint32_t)i_address));
+            // Get size of register value for calling code and memcopy
+            io_bufSize = sizeof(regValue);
+            memcpy(o_buffer, &regValue, io_bufSize);
             break;
         }
         case REG_TYPE_ID_SCOM:
         {
-            uint64_t x = htobe64(0x8000);
-            memcpy(o_buffer, &x, sizeof(x));
+            // Get the register value and change its endianness
+            uint64_t regValue =
+                htobe64(theSimData.getIdScomReg(i_chip, i_address));
+            // Get size of register value for calling code and memcopy
+            io_bufSize = sizeof(regValue);
+            memcpy(o_buffer, &regValue, io_bufSize);
             break;
         }
         // END temporary code