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

sst/elements/cpuV2/cpu.h

00001 // Copyright 2009-2010 Sandia Corporation. Under the terms
00002 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
00003 // Government retains certain rights in this software.
00004 // 
00005 // Copyright (c) 2009-2010, Sandia Corporation
00006 // All rights reserved.
00007 // 
00008 // This file is part of the SST software package. For license
00009 // information, see the LICENSE file in the top level directory of the
00010 // distribution.
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

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