summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/DMASequencer.cc
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:12 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:12 -0700
commit808701a10c7d2b79feb3746c2b47c5faa3fca042 (patch)
tree7568c1ff50ad192134621f1e17e74e34154e69e7 /src/mem/ruby/system/DMASequencer.cc
parent64b2205992783b6b0268f18e1930a81b109600eb (diff)
downloadgem5-808701a10c7d2b79feb3746c2b47c5faa3fca042.tar.xz
memtest: Memtester support for DMA
This patch adds DMA testing to the Memtester and is inherits many changes from Polina's old tester_dma_extension patch. Since Ruby does not work in atomic mode, the atomic mode options are removed.
Diffstat (limited to 'src/mem/ruby/system/DMASequencer.cc')
-rw-r--r--src/mem/ruby/system/DMASequencer.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mem/ruby/system/DMASequencer.cc b/src/mem/ruby/system/DMASequencer.cc
index a7f3a8aec..4d10a1e2f 100644
--- a/src/mem/ruby/system/DMASequencer.cc
+++ b/src/mem/ruby/system/DMASequencer.cc
@@ -49,6 +49,10 @@ DMASequencer::init()
RequestStatus
DMASequencer::makeRequest(const RubyRequest &request)
{
+ if (m_is_busy) {
+ return RequestStatus_BufferFull;
+ }
+
uint64_t paddr = request.paddr;
uint8_t* data = request.data;
int len = request.len;
@@ -108,6 +112,7 @@ DMASequencer::issueNext()
assert(m_is_busy == true);
active_request.bytes_completed = active_request.bytes_issued;
if (active_request.len == active_request.bytes_completed) {
+ DPRINTF(RubyDma, "DMA request completed\n");
ruby_hit_callback(active_request.pkt);
m_is_busy = false;
return;
@@ -141,6 +146,7 @@ DMASequencer::issueNext()
assert(m_mandatory_q_ptr != NULL);
m_mandatory_q_ptr->enqueue(msg);
active_request.bytes_issued += msg->getLen();
+ DPRINTF(RubyDma, "Next DMA segment issued to the DMA cntrl\n");
}
void