gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
etherdevice.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007 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;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
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  * Authors: Ali Saidi
29  */
30 
36 #ifndef __DEV_NET_ETHERDEVICE_HH__
37 #define __DEV_NET_ETHERDEVICE_HH__
38 
39 #include "base/statistics.hh"
40 #include "dev/pci/device.hh"
41 #include "params/EtherDevBase.hh"
42 #include "params/EtherDevice.hh"
43 #include "sim/sim_object.hh"
44 
45 class EtherInt;
46 
47 class EtherDevice : public PciDevice
48 {
49  public:
50  typedef EtherDeviceParams Params;
51  EtherDevice(const Params *params)
52  : PciDevice(params)
53  {}
54 
55  const Params *
56  params() const
57  {
58  return dynamic_cast<const Params *>(_params);
59  }
60 
61  public:
62  void regStats();
63 
64  protected:
114 };
115 
126 class EtherDevBase : public EtherDevice
127 {
128  public:
129  EtherDevBase(const EtherDevBaseParams *params)
130  : EtherDevice(params)
131  {}
132 
133  const EtherDevBaseParams *
134  params() const
135  {
136  return dynamic_cast<const EtherDevBaseParams *>(_params);
137  }
138 
139 };
140 
141 #endif // __DEV_NET_ETHERDEVICE_HH__
142 
EtherDevice(const Params *params)
Definition: etherdevice.hh:51
Stats::Formula totBandwidth
Definition: etherdevice.hh:79
Stats::Scalar postedSwi
Definition: etherdevice.hh:87
Stats::Scalar totalRxIdle
Definition: etherdevice.hh:92
Stats::Scalar descDmaReads
Definition: etherdevice.hh:75
Stats::Scalar descDmaWrites
Definition: etherdevice.hh:76
Dummy class to keep the Python class hierarchy in sync with the C++ object hierarchy.
Definition: etherdevice.hh:126
PCI device, base implementation is only config space.
Definition: device.hh:70
Stats::Scalar totalRxOk
Definition: etherdevice.hh:95
Stats::Scalar totalTxOk
Definition: etherdevice.hh:101
Stats::Scalar rxIpChecksums
Definition: etherdevice.hh:70
Stats::Scalar rxUdpChecksums
Definition: etherdevice.hh:74
Stats::Scalar postedRxIdle
Definition: etherdevice.hh:90
Stats::Scalar totalRxDesc
Definition: etherdevice.hh:98
Stats::Scalar rxTcpChecksums
Definition: etherdevice.hh:72
Stats::Scalar txBytes
Definition: etherdevice.hh:65
Stats::Formula coalescedRxOrn
Definition: etherdevice.hh:109
Stats::Formula totPackets
Definition: etherdevice.hh:80
Declaration of Statistics objects.
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2508
Stats::Scalar postedTxDesc
Definition: etherdevice.hh:105
Stats::Formula coalescedTxOk
Definition: etherdevice.hh:100
Stats::Scalar postedTxOk
Definition: etherdevice.hh:99
Stats::Scalar rxPackets
Definition: etherdevice.hh:68
Stats::Formula coalescedTxDesc
Definition: etherdevice.hh:106
const EtherDevBaseParams * params() const
Definition: etherdevice.hh:134
Stats::Formula txBandwidth
Definition: etherdevice.hh:83
void regStats()
Callback to set stat parameters.
Definition: etherdevice.cc:37
Stats::Scalar totalTxDesc
Definition: etherdevice.hh:107
Stats::Formula coalescedTxIdle
Definition: etherdevice.hh:103
Stats::Scalar totalRxOrn
Definition: etherdevice.hh:110
Stats::Scalar descDmaWrBytes
Definition: etherdevice.hh:78
Stats::Scalar txIpChecksums
Definition: etherdevice.hh:69
const Params * params() const
Definition: etherdevice.hh:56
Stats::Scalar postedTxIdle
Definition: etherdevice.hh:102
Stats::Scalar droppedPackets
Definition: etherdevice.hh:113
Stats::Scalar descDmaRdBytes
Definition: etherdevice.hh:77
Stats::Formula coalescedSwi
Definition: etherdevice.hh:88
Stats::Scalar postedRxOk
Definition: etherdevice.hh:93
Stats::Scalar rxBytes
Definition: etherdevice.hh:66
Stats::Scalar totalTxIdle
Definition: etherdevice.hh:104
A formula for statistics that is calculated when printed.
Definition: statistics.hh:3012
EtherDeviceParams Params
Definition: etherdevice.hh:50
Stats::Formula coalescedRxIdle
Definition: etherdevice.hh:91
Stats::Scalar txUdpChecksums
Definition: etherdevice.hh:73
Stats::Scalar postedRxOrn
Definition: etherdevice.hh:108
Stats::Formula txPacketRate
Definition: etherdevice.hh:85
Stats::Formula coalescedTotal
Definition: etherdevice.hh:111
Stats::Formula totBytes
Definition: etherdevice.hh:81
Stats::Scalar postedRxDesc
Definition: etherdevice.hh:96
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:110
Stats::Scalar totalSwi
Definition: etherdevice.hh:89
Stats::Formula rxPacketRate
Definition: etherdevice.hh:86
Stats::Formula rxBandwidth
Definition: etherdevice.hh:84
Stats::Scalar postedInterrupts
Definition: etherdevice.hh:112
Stats::Formula coalescedRxDesc
Definition: etherdevice.hh:97
EtherDevBase(const EtherDevBaseParams *params)
Definition: etherdevice.hh:129
Stats::Formula coalescedRxOk
Definition: etherdevice.hh:94
Stats::Scalar txTcpChecksums
Definition: etherdevice.hh:71
Stats::Formula totPacketRate
Definition: etherdevice.hh:82
Stats::Scalar txPackets
Definition: etherdevice.hh:67

Generated on Fri Feb 28 2020 16:27:00 for gem5 by doxygen 1.8.13