gem5  v22.0.0.2
core.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006 The Regents of The University of Michigan
3  * Copyright (c) 2013 Advanced Micro Devices, Inc.
4  * Copyright (c) 2013 Mark D. Hill and David A. Wood
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are
9  * met: redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer;
11  * redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution;
14  * neither the name of the copyright holders nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef __SIM_CORE_HH__
32 #define __SIM_CORE_HH__
33 
38 #include <functional>
39 #include <string>
40 
41 #include "base/compiler.hh"
42 #include "base/types.hh"
43 
44 namespace gem5
45 {
46 
49 GEM5_DEPRECATED_NAMESPACE(SimClock, sim_clock);
50 namespace sim_clock
51 {
52 extern Tick Frequency;
53 
54 GEM5_DEPRECATED_NAMESPACE(Float, as_float);
55 namespace as_float
56 {
57 
62 extern double s;
63 extern double ms;
64 extern double us;
65 extern double ns;
66 extern double ps;
67 
72 extern double Hz;
73 extern double kHz;
74 extern double MHz;
75 extern double GHz;
76 
77 } // namespace as_float
78 
84 GEM5_DEPRECATED_NAMESPACE(Int, as_int);
85 namespace as_int
86 {
87 extern Tick s;
88 extern Tick ms;
89 extern Tick us;
90 extern Tick ns;
91 extern Tick ps;
92 
93 } // namespace as_int
94 } // namespace sim_clock
97 void fixClockFrequency();
98 bool clockFrequencyFixed();
99 
100 void setClockFrequency(Tick ticksPerSecond);
101 Tick getClockFrequency(); // Ticks per second.
102 
103 void setOutputDir(const std::string &dir);
104 
105 void registerExitCallback(const std::function<void()> &callback);
106 void doExitCleanup();
107 
108 } // namespace gem5
109 
110 #endif /* __SIM_CORE_HH__ */
gem5::sim_clock::GEM5_DEPRECATED_NAMESPACE
GEM5_DEPRECATED_NAMESPACE(Float, as_float)
gem5::sim_clock::as_float::us
double us
microsecond
Definition: core.cc:55
gem5::sim_clock::Frequency
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
Definition: core.cc:48
gem5::sim_clock::as_int::us
Tick us
microsecond
Definition: core.cc:70
gem5::sim_clock::as_int::s
Tick s
second
Definition: core.cc:68
gem5::sim_clock::as_float::Hz
double Hz
These variables the inverse of above.
Definition: core.cc:59
gem5::doExitCleanup
void doExitCleanup()
Do C++ simulator exit processing.
Definition: core.cc:156
gem5::sim_clock::as_float::GHz
double GHz
GHz.
Definition: core.cc:62
gem5::getClockFrequency
Tick getClockFrequency()
Definition: core.cc:124
gem5::sim_clock::as_int::ps
Tick ps
picosecond
Definition: core.cc:72
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::sim_clock::as_float::ns
double ns
nanosecond
Definition: core.cc:56
gem5::sim_clock::as_float::ps
double ps
picosecond
Definition: core.cc:57
gem5::clockFrequencyFixed
bool clockFrequencyFixed()
Definition: core.cc:115
compiler.hh
gem5::sim_clock::as_float::ms
double ms
millisecond
Definition: core.cc:54
gem5::fixClockFrequency
void fixClockFrequency()
Definition: core.cc:87
gem5::GEM5_DEPRECATED_NAMESPACE
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
gem5::setOutputDir
void setOutputDir(const std::string &dir)
Definition: core.cc:127
types.hh
gem5::sim_clock::as_float::kHz
double kHz
kHz
Definition: core.cc:60
gem5::setClockFrequency
void setClockFrequency(Tick tps)
Definition: core.cc:118
gem5::registerExitCallback
void registerExitCallback(const std::function< void()> &callback)
Register an exit callback.
Definition: core.cc:146
gem5::sim_clock::as_int::ms
Tick ms
millisecond
Definition: core.cc:69
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::sim_clock::as_float::MHz
double MHz
MHz.
Definition: core.cc:61
gem5::sim_clock::as_float::s
double s
These variables equal the number of ticks in the unit of time they're named after in a double.
Definition: core.cc:53
gem5::sim_clock::as_int::ns
Tick ns
nanosecond
Definition: core.cc:71

Generated on Thu Jul 28 2022 13:32:36 for gem5 by doxygen 1.8.17