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

sst/elements/genericProc/ssBackEnd/smpMemory.h

00001 // Copyright 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) 2007,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 SMPMEMORY_H
00014 #define SMPMEMORY_H
00015 
00016 #include "sharedMemory.h"
00017 #include "level1/SW2.h"
00018 
00019 class smpProc;
00020 
00021 //: Shared memory for SMP system
00022 //!SEC:shmem
00023 class smpMemory : public sharedMemory, public SW2 {
00024 public:
00025   typedef vector<smpProc*> smpVec;
00026 protected:
00027   smpVec smps;
00028   static const int postSizeBits = 8;
00029   void registerPost() {
00030     portCount[TO_DRAM] -= postSizeBits;
00031     portCount[FROM_DRAM] -= postSizeBits * (smps.size() - 1);
00032   }
00033 public:
00034   smpMemory(string cfgstr, const vector<DRAM*>& d) : sharedMemory(cfgstr), SW2(cfgstr,d) {;}
00035   void registerProcessor(sharedMemProc* p, smpProc* sm) {
00036     sharedMemory::registerProcessor(p);
00037     smps.push_back(sm);
00038   }
00039   const smpVec& getSMPs() const {return smps;}
00040   virtual void setup(){SW2::setup();}
00041   virtual void finish(){SW2::finish();}
00042   virtual void handleParcel(parcel *p){SW2::handleParcel(p);}
00043   virtual void preTic(){SW2::preTic();}
00044   virtual void postTic(){;}
00045 };
00046 
00047 #endif

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