00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _CPU_H
00014 #define _CPU_H
00015
00016 #include <sst/core/component.h>
00017 #include <sst/elements/include/memoryDev.h>
00018
00019 #ifndef CPUV2_DBG
00020 #define CPUV2_DBG
00021 #endif
00022
00023 using namespace SST;
00024
00025 class Cpu : public Component {
00026
00027 typedef enum { RUN, STOP } inst_t;
00028
00029 struct Foo {
00030 inst_t inst;
00031 };
00032
00033 public:
00034 Cpu( ComponentId_t id, Params_t& params );
00035
00036 private:
00037
00038 Cpu( const Cpu& c );
00039 Cpu();
00040
00041 bool clock( Cycle_t );
00042 bool processEvent( Event *e );
00043
00044 private:
00045 std::string m_frequency;
00046
00047 typedef MemoryDev< uint64_t, Foo* > memDev_t;
00048
00049 memDev_t::addr_t m_pc;
00050 memDev_t::addr_t m_pcStop;
00051
00052 memDev_t* m_memory;
00053
00054 Log< CPUV2_DBG >& m_dbg;
00055 Log<> m_log;
00056 };
00057
00058 #endif