Deleted Added
sdiff udiff text old ( 8931:7a1dfb191e3f ) new ( 9053:9cad1c26c3b3 )
full compact
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 39 unchanged lines hidden (view full) ---

48
49#ifndef __ABSTRACT_MEMORY_HH__
50#define __ABSTRACT_MEMORY_HH__
51
52#include "mem/mem_object.hh"
53#include "params/AbstractMemory.hh"
54#include "sim/stats.hh"
55
56/**
57 * An abstract memory represents a contiguous block of physical
58 * memory, with an associated address range, and also provides basic
59 * functionality for reading and writing this memory without any
60 * timing information. It is a MemObject since any subclass must have
61 * at least one slave port.
62 */
63class AbstractMemory : public MemObject

--- 71 unchanged lines hidden (view full) ---

135 return !isLLSC; // only do write if not an sc
136 } else {
137 // iterate over list...
138 return checkLockedAddrList(pkt);
139 }
140 }
141
142 /** Number of total bytes read from this memory */
143 Stats::Scalar bytesRead;
144 /** Number of instruction bytes read from this memory */
145 Stats::Scalar bytesInstRead;
146 /** Number of bytes written to this memory */
147 Stats::Scalar bytesWritten;
148 /** Number of read requests */
149 Stats::Scalar numReads;
150 /** Number of write requests */
151 Stats::Scalar numWrites;
152 /** Number of other requests */
153 Stats::Scalar numOther;
154 /** Read bandwidth from this memory */
155 Stats::Formula bwRead;
156 /** Read bandwidth from this memory */
157 Stats::Formula bwInstRead;
158 /** Write bandwidth from this memory */
159 Stats::Formula bwWrite;
160 /** Total bandwidth from this memory */
161 Stats::Formula bwTotal;
162
163 private:
164
165 // Prevent copying
166 AbstractMemory(const AbstractMemory&);
167
168 // Prevent assignment
169 AbstractMemory& operator=(const AbstractMemory&);
170
171 public:
172
173 typedef AbstractMemoryParams Params;
174
175 AbstractMemory(const Params* p);
176 virtual ~AbstractMemory();
177
178 const Params *
179 params() const
180 {
181 return dynamic_cast<const Params *>(_params);
182 }
183
184 /**
185 * Get the address range

--- 65 unchanged lines hidden ---