gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 namespace sim_clock
50 {
51 extern Tick Frequency;
52 
53 namespace as_float
54 {
55 
60 extern double s;
61 extern double ms;
62 extern double us;
63 extern double ns;
64 extern double ps;
65 
70 extern double Hz;
71 extern double kHz;
72 extern double MHz;
73 extern double GHz;
74 
75 } // namespace as_float
76 
82 namespace as_int
83 {
84 extern Tick s;
85 extern Tick ms;
86 extern Tick us;
87 extern Tick ns;
88 extern Tick ps;
89 
90 } // namespace as_int
91 } // namespace sim_clock
94 void fixClockFrequency();
95 bool clockFrequencyFixed();
96 
97 void setClockFrequency(Tick ticksPerSecond);
98 Tick getClockFrequency(); // Ticks per second.
99 
100 void setOutputDir(const std::string &dir);
101 
102 void registerExitCallback(const std::function<void()> &callback);
103 void doExitCleanup();
104 
105 } // namespace gem5
106 
107 #endif /* __SIM_CORE_HH__ */
gem5::sim_clock::as_float::us
double us
microsecond
Definition: core.cc:53
gem5::sim_clock::Frequency
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
Definition: core.cc:47
gem5::sim_clock::as_int::us
Tick us
microsecond
Definition: core.cc:67
gem5::sim_clock::as_int::s
Tick s
second
Definition: core.cc:65
gem5::sim_clock::as_float::Hz
double Hz
These variables the inverse of above.
Definition: core.cc:57
gem5::doExitCleanup
void doExitCleanup()
Do C++ simulator exit processing.
Definition: core.cc:153
gem5::sim_clock::as_float::GHz
double GHz
GHz.
Definition: core.cc:60
gem5::getClockFrequency
Tick getClockFrequency()
Definition: core.cc:121
gem5::sim_clock::as_int::ps
Tick ps
picosecond
Definition: core.cc:69
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::sim_clock::as_float::ns
double ns
nanosecond
Definition: core.cc:54
gem5::sim_clock::as_float::ps
double ps
picosecond
Definition: core.cc:55
gem5::clockFrequencyFixed
bool clockFrequencyFixed()
Definition: core.cc:112
compiler.hh
gem5::sim_clock::as_float::ms
double ms
millisecond
Definition: core.cc:52
gem5::fixClockFrequency
void fixClockFrequency()
Definition: core.cc:84
gem5::setOutputDir
void setOutputDir(const std::string &dir)
Definition: core.cc:124
types.hh
gem5::sim_clock::as_float::kHz
double kHz
kHz
Definition: core.cc:58
gem5::setClockFrequency
void setClockFrequency(Tick tps)
Definition: core.cc:115
gem5::registerExitCallback
void registerExitCallback(const std::function< void()> &callback)
Register an exit callback.
Definition: core.cc:143
gem5::sim_clock::as_int::ms
Tick ms
millisecond
Definition: core.cc:66
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:59
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:51
gem5::sim_clock::as_int::ns
Tick ns
nanosecond
Definition: core.cc:68

Generated on Sun Jul 30 2023 01:56:59 for gem5 by doxygen 1.8.17