Deleted Added
sdiff udiff text old ( 2901:f9a45473ab55 ) new ( 2914:2c524dc023d2 )
full compact
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
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;

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

32#ifndef __DEV_IO_DEVICE_HH__
33#define __DEV_IO_DEVICE_HH__
34
35#include "base/chunk_generator.hh"
36#include "mem/mem_object.hh"
37#include "mem/packet_impl.hh"
38#include "sim/eventq.hh"
39#include "sim/sim_object.hh"
40#include "mem/tport.hh"
41
42class Platform;
43class PioDevice;
44class DmaDevice;
45class System;
46
47/**
48 * The PioPort class is a programmed i/o port that all devices that are
49 * sensitive to an address range use. The port takes all the memory
50 * access types and roles them into one read() and write() call that the device
51 * must respond to. The device must also provide the addressRanges() function
52 * with which it returns the address ranges it is interested in. */
53
54class PioPort : public SimpleTimingPort
55{
56 protected:
57 /** The device that this port serves. */
58 PioDevice *device;
59
60 /** The system that device/port are in. This is used to select which mode
61 * we are currently operating in. */
62 System *sys;
63
64 /** The current status of the peer(bus) that we are connected to. */
65 Status peerStatus;
66
67 virtual bool recvTiming(Packet *pkt);
68
69 virtual Tick recvAtomic(Packet *pkt);
70
71 virtual void recvFunctional(Packet *pkt) ;
72
73 virtual void recvStatusChange(Status status)
74 { peerStatus = status; }
75
76 virtual void getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop);
77
78 public:
79 PioPort(PioDevice *dev, System *s, std::string pname = "-pioport");
80
81};
82
83
84class DmaPort : public Port
85{
86 protected:
87 struct DmaReqState : public Packet::SenderState
88 {

--- 219 unchanged lines hidden ---