SST/macro
simple_memory_model.h
Go to the documentation of this file.
1 /*
2  * This file is part of SST/macroscale:
3  * The macroscale architecture simulator from the SST suite.
4  * Copyright (c) 2009 Sandia Corporation.
5  * This software is distributed under the BSD License.
6  * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7  * the U.S. Government retains certain rights in this software.
8  * For more information, see the LICENSE file in the top
9  * SST/macroscale directory.
10  */
11 
12 #ifndef SIMPLE_MEMORYMODEL_H_
13 #define SIMPLE_MEMORYMODEL_H_
14 
16 
17 namespace sstmac {
18 namespace hw {
19 
21 {
22  public:
24  memory_model(nd)
25  {
26  }
27 
28  virtual void
29  init_factory_params(sprockit::sim_parameters* params);
30 
31  virtual void
32  finalize_init();
33 
34  virtual ~simple_memory_model();
35 
36  virtual void
37  access(long bytes, double max_bw, callback* cb);
38 
39  double
40  max_single_bw() const {
41  return bw_;
42  }
43 
44  protected:
45  class link {
46  public:
47  link(double bw, timestamp lat) :
48  bw_(bw), lat_(lat), last_access_(0) {
49  }
50 
51  virtual ~link() { }
52 
53  virtual std::string
54  to_string() const {
55  return "memorymodel::link";
56  }
57 
58  virtual timestamp
59  new_access(timestamp now, long size, double max_bw);
60 
61  virtual void
62  access_done();
63 
64  protected:
65  double bw_;
68 
69  };
70 
71  protected:
73 
74  double bw_;
75 
77 
78 };
79 
80 }
81 } /* namespace sstmac */
82 #endif /* SIMPLE_MEMORYMODEL_H_ */
83 
virtual void init_factory_params(sprockit::sim_parameters *params)
A basic container for time (subject to future transplant).
Definition: timestamp.h:29
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual void access(long bytes, double max_bw, callback *cb)