Add a sample Chip Data File to the simulator
Change-Id: I4cf0bd61c660505c453edc1afe5900c357ade9de
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/test/simulator/simulator.hpp b/test/simulator/simulator.hpp
index 29d1ef6..e5526d8 100644
--- a/test/simulator/simulator.hpp
+++ b/test/simulator/simulator.hpp
@@ -35,7 +35,17 @@
return theSimData;
}
+ public:
+ /** The list of supported chip types for the simulator. */
+ enum ChipType
+ {
+ SAMPLE = 0xdeadbeef,
+ };
+
private:
+ /** The Chip Data file paths for each support chip type. */
+ static const std::map<ChipType, const char*> cv_chipPath;
+
/** The list of configured chips used throughout a test case. */
std::vector<Chip> iv_chipList;
@@ -163,7 +173,8 @@
{ \
libhei::SimulatorData& simData = \
libhei::SimulatorData::getSingleton(); \
- simData.flushAll();
+ simData.flushAll(); \
+ libhei::ChipType_t chipType;
/**
* Use this to configure a chip object for the test case. There should be an
@@ -174,7 +185,8 @@
* macros.
*/
#define CHIP(CHIP, TYPE) \
- libhei::Chip CHIP{#CHIP, static_cast<libhei::ChipType_t>(TYPE)}; \
+ chipType = static_cast<libhei::ChipType_t>(libhei::SimulatorData::TYPE); \
+ libhei::Chip CHIP{#CHIP, chipType}; \
simData.addChip(CHIP);
/**