summaryrefslogtreecommitdiff
path: root/dev/io_device.cc
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-02-11 16:07:55 -0500
committerNathan Binkert <binkertn@umich.edu>2004-02-11 16:07:55 -0500
commitcc53465cd5b48183936278cda617be68a4520ff5 (patch)
treee95f5dab32095eff25cdfc0bcfbaecb77ef0fe80 /dev/io_device.cc
parent5e82f8d84c4d8a8ec4ce914f02328a068ea2cacc (diff)
downloadgem5-cc53465cd5b48183936278cda617be68a4520ff5.tar.xz
Add support for all devices to get requests from a timing memory bus.
In the future, this can be used for actual data, but for now, it's so that devices can respond to timing accesses properly. This way, an uncached access on a bus further away will take longer to respond. dev/alpha_console.cc: dev/alpha_console.hh: suport the separate IO bus --HG-- extra : convert_revision : ececb70f5febfd00231f6e406f93b2a79be01261
Diffstat (limited to 'dev/io_device.cc')
-rw-r--r--dev/io_device.cc51
1 files changed, 51 insertions, 0 deletions
diff --git a/dev/io_device.cc b/dev/io_device.cc
new file mode 100644
index 000000000..65a18aec6
--- /dev/null
+++ b/dev/io_device.cc
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2003 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "dev/io_device.hh"
+#include "mem/bus/base_interface.hh"
+
+PioDevice::PioDevice(const std::string &name)
+ : FunctionalMemory(name), pioInterface(NULL)
+{}
+
+PioDevice::~PioDevice()
+{
+ if (pioInterface)
+ delete pioInterface;
+}
+
+DmaDevice::DmaDevice(const std::string &name)
+ : PioDevice(name), dmaInterface(NULL)
+{}
+
+DmaDevice::~DmaDevice()
+{
+ if (dmaInterface)
+ delete dmaInterface;
+}
+