X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=3b_sim%2Fccpu.hpp;h=4a8724004733e5812d3006f57bb4ede00e7ad5c5;hb=c0fc93c02587d16121457a37aa0f67ca6e3a2bc2;hp=86940a29f1f8743bbae2eb3aa923befbfd709365;hpb=69964280107c6139062349844f99ef80bc6f68be;p=calu.git diff --git a/3b_sim/ccpu.hpp b/3b_sim/ccpu.hpp index 86940a2..4a87240 100644 --- a/3b_sim/ccpu.hpp +++ b/3b_sim/ccpu.hpp @@ -5,8 +5,11 @@ #include "cmem.hpp" #include "cpmem.hpp" +#include "ccolor.h" + class Iinstr; +#include #include "Iinstr.hpp" @@ -15,7 +18,7 @@ class CCpu { bool m_Z, m_S, m_C, m_O; - CDat m_pc, m_pc_next; + CDat m_pc, m_pc_next, m_perf; CMem m_reg, m_ram; CPMem m_prog; @@ -34,6 +37,11 @@ class CCpu { Iinstr* getProg(const int) const; void setProg(const int, Iinstr*); + CDat getPerf() const; + void setPerf(CDat); + void incPerf(); + void incPerfBy(short); + CDat getCurPC() const; CDat getNextPC() const; void setNextPC(CDat); @@ -56,6 +64,8 @@ class CCpu { int getStack() const; void setStack(const int); + string colorifyInstr(string instr); + CCpu(int,int,int); };