X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=3b_sim%2Fccpu.hpp;h=fb9447db2c6fb1aee57abcc70f2d4785b95c6b0a;hb=ad798a166d5abd342b031251f4a9931b81b2812d;hp=4a8724004733e5812d3006f57bb4ede00e7ad5c5;hpb=c0fc93c02587d16121457a37aa0f67ca6e3a2bc2;p=calu.git diff --git a/3b_sim/ccpu.hpp b/3b_sim/ccpu.hpp index 4a87240..fb9447d 100644 --- a/3b_sim/ccpu.hpp +++ b/3b_sim/ccpu.hpp @@ -8,7 +8,9 @@ #include "ccolor.h" class Iinstr; +class Iext; +#include "iext.hpp" #include #include "Iinstr.hpp" @@ -22,10 +24,15 @@ class CCpu { CMem m_reg, m_ram; CPMem m_prog; + vector m_exts; + CDat m_stack; + static const int EXT_MODEL_OFFSET = 0x2000; + public: void registerExtension() {}; + void applyToExtensions(const vector& in); void tick(); CDat getRegister(const int) const; @@ -37,6 +44,8 @@ class CCpu { Iinstr* getProg(const int) const; void setProg(const int, Iinstr*); + void registerExtension(Iext*); + CDat getPerf() const; void setPerf(CDat); void incPerf();