• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/elements/mcopteron/cpu.h

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

Generated on Fri Oct 22 2010 11:02:21 for SST by  doxygen 1.7.1