gem5  v20.1.0.0
version.hh
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements. See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied. See the License for the specific language governing
16  permissions and limitations under the License.
17 
18  *****************************************************************************/
19 
20 /* ---------------------------------------------------------------------------
21  Original Author:
22  Charles Wilson, XtremeEDA Corporation
23 
24  @description
25  This header contains preprocessor and compiler symbols to allow for the
26  determination of the TLM version information. This conforms to
27  IEEE 1666-2005 section 8.5.5 - 8.5.7
28  The following are provided:
29 
30  preprocessor: TLM_VERSION_MAJOR numeric
31  TLM_VERSION_MINOR numeric
32  TLM_VERSION_PATCH numeric
33  TLM_VERSION_ORIGINATOR string ([A-Z][a-z][0-9]_)
34  TLM_VERSION_RELEASE_DATE ISO8601 date (YYYYMMDD)
35  TLM_VERSION_PRERELEASE string ([A-Z][a-z][0-9]_)
36  TLM_IS_PRERELEASE bool (1,0)
37  TLM_VERSION string {2.0.0_DR3-TLMWG}
38  TLM_COPYRIGHT string
39 
40  compiler: tlm_version_major const unsigned int
41  tlm_version_minor const unsigned int
42  tlm_version_patch const unsigned int
43  tlm_version_originator const std::string
44  tlm_version_release_date const std::string
45  tlm_version_prerelease const std::string
46  tlm_is_prerelease const bool
47  tlm_version const string
48  tlm_copyright const string
49 
50  accessors: inline const char* tlm_release (void)
51  inline const char* tlm_version (void)
52  inline const char* tlm_copyright (void)
53 --------------------------------------------------------------------------- */
54 
55 #ifndef __SYSTEMC_EXT_TLM_CORE_2_VERSION_HH__
56 #define __SYSTEMC_EXT_TLM_CORE_2_VERSION_HH__
57 
58 namespace tlm
59 {
60 
61 #define TLM_VERSION_MAJOR 2
62 #define TLM_VERSION_MINOR 0
63 #define TLM_VERSION_PATCH 4
64 #define TLM_VERSION_ORIGINATOR "Accellera"
65 #define TLM_VERSION_SEPARATOR "."
66 
67 #define TLM_IS_PRERELEASE 0
68 
69 #if TLM_IS_PRERELEASE
70 # define TLM_VERSION_PRERELEASE "pub_rev"
71 #else
72 # define TLM_VERSION_PRERELEASE ""
73 #endif
74 
75 #define TLM_VERSION_RELEASE_YEAR "2017"
76 #define TLM_VERSION_RELEASE_MONTH "10"
77 #define TLM_VERSION_RELEASE_DAY "12"
78 
79 #define TLM_COPYRIGHT \
80  "Copyright (c) 1996-" TLM_VERSION_RELEASE_YEAR " by all Contributors\n" \
81  "ALL RIGHTS RESERVED"
82 
83 /******************** do not modify below this line *************************/
84 
85 /************************* preprocessor symbols *****************************/
86 
87 #define TLM_VERSION_RELEASE_DATE TLM_VERSION_RELEASE_YEAR \
88  TLM_VERSION_RELEASE_MONTH \
89  TLM_VERSION_RELEASE_DAY
90 
91 #define TLM_VERSION_STR(x) TLM_VERSION_STR_HELPER(x)
92 #define TLM_VERSION_STR_HELPER(x) #x
93 
94 #define TLM_VERSION_STRING_MAJOR TLM_VERSION_STR(TLM_VERSION_MAJOR)
95 #define TLM_VERSION_STRING_MINOR TLM_VERSION_STR(TLM_VERSION_MINOR)
96 #define TLM_VERSION_STRING_PATCH TLM_VERSION_STR(TLM_VERSION_PATCH)
97 
98 #define TLM_VERSION_STRING_MMP TLM_VERSION_STRING_MAJOR TLM_VERSION_SEPARATOR \
99  TLM_VERSION_STRING_MINOR TLM_VERSION_SEPARATOR \
100  TLM_VERSION_STRING_PATCH
101 
102 #define TLM_VERSION_STRING_PRE_START "_"
103 #define TLM_VERSION_STRING_PRE_END "-"
104 
105 #if (TLM_IS_PRERELEASE == 1)
106 
107 # define TLM_VERSION_STRING_PRERELEASE TLM_VERSION_PRERELEASE
108 # define TLM_VERSION_STRING_RELEASE_DATE ""
109 
110 #else /* TLM_IS_PRERELEASE == 1 */
111 
112 # define TLM_VERSION_STRING_PRERELEASE ""
113 # define TLM_VERSION_STRING_RELEASE_DATE TLM_VERSION_RELEASE_DATE
114 
115 #endif /* TLM_IS_PRERELEASE == 1 */
116 
117 #define TLM_VERSION_STRING TLM_VERSION_STRING_MMP \
118  TLM_VERSION_STRING_PRE_START \
119  TLM_VERSION_STRING_PRERELEASE \
120  TLM_VERSION_STRING_PRE_END \
121  TLM_VERSION_ORIGINATOR
122 
123 #define TLM_VERSION_STRING_2 "TLM " \
124  TLM_VERSION_STRING_MMP \
125  " --- " \
126  TLM_VERSION_RELEASE_YEAR \
127  "-" \
128  TLM_VERSION_RELEASE_MONTH \
129  "-" \
130  TLM_VERSION_RELEASE_DAY
131 
132 #define TLM_VERSION TLM_VERSION_STRING
133 
134 /*************************** compiler symbols ********************************/
135 
136 const unsigned int tlm_version_major(TLM_VERSION_MAJOR);
137 const unsigned int tlm_version_minor(TLM_VERSION_MINOR);
138 const unsigned int tlm_version_patch(TLM_VERSION_PATCH);
139 
141 
142 const std::string tlm_version_string(TLM_VERSION_STRING);
146 const std::string tlm_copyright_string(TLM_COPYRIGHT);
147 const std::string tlm_version_string_2(TLM_VERSION_STRING_2);
148 
149 inline const char *tlm_release() { return tlm_version_string.c_str(); }
150 inline const char *tlm_version() { return tlm_version_string_2.c_str(); }
151 inline const char *tlm_copyright() { return tlm_copyright_string.c_str(); }
152 
153 } // namespace tlm
154 
155 #endif /* __SYSTEMC_EXT_TLM_CORE_2_VERSION_HH__ */
TLM_IS_PRERELEASE
#define TLM_IS_PRERELEASE
pre-release flag (1/0)
Definition: version.hh:84
tlm::tlm_version_string
const std::string tlm_version_string(TLM_VERSION_STRING)
tlm::tlm_version_release_date
const std::string tlm_version_release_date(TLM_VERSION_STRING_RELEASE_DATE)
tlm::tlm_copyright_string
const std::string tlm_copyright_string(TLM_COPYRIGHT)
tlm::tlm_version_minor
const unsigned int tlm_version_minor(TLM_VERSION_MINOR)
TLM_VERSION_MAJOR
#define TLM_VERSION_MAJOR
version major level ( numeric )
Definition: version.hh:78
tlm::tlm_version_patch
const unsigned int tlm_version_patch(TLM_VERSION_PATCH)
tlm::tlm_release
const char * tlm_release()
Definition: version.hh:166
tlm::tlm_version_originator
const std::string tlm_version_originator(TLM_VERSION_ORIGINATOR)
tlm::tlm_version_major
const unsigned int tlm_version_major(TLM_VERSION_MAJOR)
TLM_VERSION_STRING_2
#define TLM_VERSION_STRING_2
Definition: version.hh:140
TLM_COPYRIGHT
#define TLM_COPYRIGHT
Definition: version.hh:96
tlm::tlm_version_prerelease
const std::string tlm_version_prerelease(TLM_VERSION_PRERELEASE)
tlm
Definition: analysis_fifo.hh:27
tlm::tlm_copyright
const char * tlm_copyright()
Definition: version.hh:168
tlm::tlm_version_string_2
const std::string tlm_version_string_2(TLM_VERSION_STRING_2)
TLM_VERSION_PATCH
#define TLM_VERSION_PATCH
version patch level ( numeric )
Definition: version.hh:80
TLM_VERSION_MINOR
#define TLM_VERSION_MINOR
version minor level ( numeric )
Definition: version.hh:79
TLM_VERSION_ORIGINATOR
#define TLM_VERSION_ORIGINATOR
TLM creator string.
Definition: version.hh:81
tlm::tlm_is_prerelease
const bool tlm_is_prerelease(TLM_IS_PRERELEASE)
TLM_VERSION_STRING_RELEASE_DATE
#define TLM_VERSION_STRING_RELEASE_DATE
Definition: version.hh:130
TLM_VERSION_STRING
#define TLM_VERSION_STRING
Definition: version.hh:134
tlm::tlm_version
const char * tlm_version()
Definition: version.hh:167
TLM_VERSION_PRERELEASE
#define TLM_VERSION_PRERELEASE
pre-release version string
Definition: version.hh:89

Generated on Wed Sep 30 2020 14:02:16 for gem5 by doxygen 1.8.17