sim: added extensionmodule support + progger
[calu.git] / 3b_sim / ccpu.hpp
index 4a8724004733e5812d3006f57bb4ede00e7ad5c5..a9747c9092d8f61fa0d26161f56ebddbbe70a54f 100644 (file)
@@ -8,7 +8,9 @@
 #include "ccolor.h"
 
 class Iinstr;
+class Iext;
 
+#include "iext.hpp"
 #include <boost/regex.hpp>
 #include "Iinstr.hpp"
 
@@ -22,8 +24,12 @@ class CCpu {
                CMem<CDat> m_reg, m_ram;
                CPMem<Iinstr*> m_prog;
 
+               vector<Iext*> m_exts;
+
                CDat m_stack;
 
+               static const int EXT_MODEL_OFFSET = 0x2000;
+
        public:
                void registerExtension() {};
                void tick();
@@ -37,6 +43,8 @@ class CCpu {
                Iinstr* getProg(const int) const;
                void setProg(const int, Iinstr*);
 
+               void registerExtension(Iext*);
+
                CDat getPerf() const;
                void setPerf(CDat);
                void incPerf();