simple_mem.cc (9294:8fb03b13de02) simple_mem.cc (9342:6fec8f26e56d)
1/*
2 * Copyright (c) 2010-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

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

171 if (if_name != "port") {
172 return MemObject::getSlavePort(if_name, idx);
173 } else {
174 return port;
175 }
176}
177
178unsigned int
1/*
2 * Copyright (c) 2010-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

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

171 if (if_name != "port") {
172 return MemObject::getSlavePort(if_name, idx);
173 } else {
174 return port;
175 }
176}
177
178unsigned int
179SimpleMemory::drain(Event *de)
179SimpleMemory::drain(DrainManager *dm)
180{
180{
181 int count = port.drain(de);
181 int count = port.drain(dm);
182
183 if (count)
182
183 if (count)
184 changeState(Draining);
184 setDrainState(Drainable::Draining);
185 else
185 else
186 changeState(Drained);
186 setDrainState(Drainable::Drained);
187 return count;
188}
189
190SimpleMemory::MemoryPort::MemoryPort(const std::string& _name,
191 SimpleMemory& _memory)
192 : QueuedSlavePort(_name, &_memory, queueImpl),
193 queueImpl(_memory, *this), memory(_memory)
194{ }

--- 41 unchanged lines hidden ---
187 return count;
188}
189
190SimpleMemory::MemoryPort::MemoryPort(const std::string& _name,
191 SimpleMemory& _memory)
192 : QueuedSlavePort(_name, &_memory, queueImpl),
193 queueImpl(_memory, *this), memory(_memory)
194{ }

--- 41 unchanged lines hidden ---