Deleted Added
sdiff udiff text old ( 10472:399f35ed5cca ) new ( 10518:30e3715c9405 )
full compact
1/*
2 * Copyright (c) 2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <memory>
30
31#include "debug/RubyDma.hh"
32#include "debug/RubyStats.hh"
33#include "mem/protocol/SequencerMsg.hh"
34#include "mem/protocol/SequencerRequestType.hh"
35#include "mem/ruby/system/DMASequencer.hh"
36#include "mem/ruby/system/System.hh"
37
38DMASequencer::DMASequencer(const Params *p)
39 : RubyPort(p)
40{
41}
42
43void
44DMASequencer::init()
45{
46 RubyPort::init();
47 m_is_busy = false;
48 m_data_block_mask = ~ (~0 << RubySystem::getBlockSizeBits());
49}
50
51RequestStatus
52DMASequencer::makeRequest(PacketPtr pkt)
53{
54 if (m_is_busy) {
55 return RequestStatus_BufferFull;
56 }
57
58 uint64_t paddr = pkt->getAddr();

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

163
164void
165DMASequencer::ackCallback()
166{
167 issueNext();
168}
169
170void
171DMASequencer::recordRequestType(DMASequencerRequestType requestType) {
172 DPRINTF(RubyStats, "Recorded statistic: %s\n",
173 DMASequencerRequestType_to_string(requestType));
174}
175
176DMASequencer *
177DMASequencerParams::create()
178{
179 return new DMASequencer(this);
180}