SystemC 3.0.0
Accellera SystemC proof-of-concept library
systemc.h
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
22 systemc.h - Top-level include file for the SystemC library with usings.
23
24 Original Author: Stan Y. Liao, Synopsys, Inc.
25
26 *****************************************************************************/
27
28/*****************************************************************************
29
30 MODIFICATION LOG - modifiers, enter your name, affiliation, date and
31 changes you are making here.
32
33 Name, Affiliation, Date: Andy Goodrich, Forte Design Systems, 31 Mar 2005
34 Description of Modification: Changes for namespace support.
35
36 *****************************************************************************/
37
38#ifndef SYSTEMC_H
39#define SYSTEMC_H
40
41// INCLUDE SYSTEM (std) DEFINITIONS:
42
43#include <cassert>
44#include <climits>
45#include <cmath> // math.h?
46#include <cstddef>
47#include <cstdint>
48#include <cstdio>
49#include <cstdlib>
50#include <cstring>
51#include <exception>
52#include <fstream>
53#include <iostream>
54#include <memory>
55#include <string>
56#include <typeinfo>
57#include <utility>
58#include <vector>
59
60// USINGS FOR I/O STREAM SUPPORT:
61
62 using std::ios;
63 using std::streambuf;
64 using std::streampos;
65 using std::streamsize;
66 using std::iostream;
67 using std::istream;
68 using std::ostream;
69 using std::cin;
70 using std::cout;
71 using std::cerr;
72 using std::endl;
73 using std::flush;
74 using std::dec;
75 using std::hex;
76 using std::oct;
77 using std::noshowbase;
78 using std::showbase;
79
80 using std::fstream;
81 using std::ifstream;
82 using std::ofstream;
83
84// from <cstdio>:
85
86 using std::size_t;
87 using std::FILE;
88 using std::fpos_t;
89 using std::fclose;
90 using std::clearerr;
91
92 using std::remove;
93 using std::rename;
94 using std::tmpfile;
95 using std::tmpnam;
96 using std::fflush;
97 using std::fopen;
98 using std::freopen;
99 using std::setbuf;
100 using std::setvbuf;
101 using std::fprintf;
102 using std::fscanf;
103 using std::printf;
104 using std::scanf;
105 using std::sprintf;
106 using std::sscanf;
107 using std::vfprintf;
108 using std::vprintf;
109 using std::vsprintf;
110 using std::fgetc;
111 using std::fgets;
112 using std::fputc;
113 using std::fputs;
114 using std::getc;
115 using std::getchar;
116 using std::putc;
117 using std::putchar;
118 using std::puts;
119 using std::ungetc;
120 using std::fread;
121 using std::fwrite;
122 using std::fgetpos;
123 using std::fseek;
124 using std::fsetpos;
125 using std::ftell;
126 using std::rewind;
127 using std::feof;
128 using std::ferror;
129 using std::perror;
130
131// from <cstdlib>:
132
133 using std::div_t;
134 using std::ldiv_t;
135
136 using std::atof;
137 using std::atoi;
138 using std::atol;
139 using std::strtod;
140 using std::strtol;
141 using std::strtoul;
142 using std::rand;
143 using std::srand;
144 using std::calloc;
145 using std::free;
146 using std::malloc;
147 using std::realloc;
148 using std::abort;
149 using std::atexit;
150 using std::exit;
151 using std::getenv;
152 using std::system;
153 using std::bsearch;
154 using std::qsort;
155 using std::abs;
156 using std::div;
157 using std::labs;
158 using std::ldiv;
159 using std::mblen;
160 using std::mbtowc;
161 using std::mbstowcs;
162#if !defined(__CYGWIN__) && !defined(__CYGWIN32)
163 using std::wctomb;
164 using std::wcstombs;
165#endif
166
167// from <cstring>:
168
169 using std::memcpy;
170 using std::memmove;
171 using std::strcpy;
172 using std::strncpy;
173 using std::strcat;
174 using std::strncat;
175 using std::memcmp;
176 using std::strcmp;
177 using std::strcoll;
178 using std::strncmp;
179 using std::strxfrm;
180 using std::memchr;
181 using std::strchr;
182 using std::strcspn;
183 using std::strpbrk;
184 using std::strrchr;
185 using std::strspn;
186 using std::strstr;
187 using std::strtok;
188 using std::memset;
189 using std::strerror;
190 using std::strlen;
191
192// INCLUDE SYSTEMC DEFINITIONS for sc_dt AND sc_core NAMESPACES:
193
194#include "systemc"
195
196// USINGS FOR THE sc_dt NAMESPACE:
197
198using sc_dt::SC_BIN;
199using sc_dt::SC_BIN_SM;
200using sc_dt::SC_BIN_US;
201using sc_dt::SC_CSD;
202using sc_dt::SC_DEC;
203using sc_dt::SC_HEX;
204using sc_dt::SC_HEX_SM;
205using sc_dt::SC_HEX_US;
210using sc_dt::SC_NOBASE;
211using sc_dt::SC_OCT;
212using sc_dt::SC_OCT_SM;
213using sc_dt::SC_OCT_US;
214using sc_dt::int64;
215using sc_dt::sc_abs;
216using sc_dt::sc_bigint;
218using sc_dt::sc_bit;
219using sc_dt::sc_bv;
221using sc_dt::sc_digit;
222using sc_dt::sc_int;
227using sc_dt::sc_logic;
228using sc_dt::sc_lv;
230using sc_dt::sc_max;
231using sc_dt::sc_min;
232using sc_dt::sc_numrep;
233using sc_dt::sc_signed;
234using sc_dt::sc_uint;
237using sc_dt::uint64;
238// #ifdef SC_DT_DEPRECATED
243// #endif
244
245#ifdef SC_INCLUDE_FX
246 using sc_dt::sc_fxnum;
249 using sc_dt::sc_fix;
250 using sc_dt::sc_fix_fast;
251 using sc_dt::sc_ufix;
253 using sc_dt::sc_fixed;
255 using sc_dt::sc_ufixed;
257 using sc_dt::sc_fxval;
263 using sc_dt::sc_q_mode;
264 using sc_dt::SC_RND;
265 using sc_dt::SC_RND_ZERO;
267 using sc_dt::SC_RND_INF;
268 using sc_dt::SC_RND_CONV;
269 using sc_dt::SC_TRN;
270 using sc_dt::SC_TRN_ZERO;
271 using sc_dt::sc_o_mode;
272 using sc_dt::SC_SAT;
273 using sc_dt::SC_SAT_ZERO;
274 using sc_dt::SC_SAT_SYM;
275 using sc_dt::SC_WRAP;
276 using sc_dt::SC_WRAP_SM;
277 using sc_dt::sc_switch;
278 using sc_dt::SC_OFF;
279 using sc_dt::SC_ON;
280 using sc_dt::sc_fmt;
281 using sc_dt::SC_F;
282 using sc_dt::SC_E;
284 using sc_dt::SC_NOW;
285 using sc_dt::SC_LATER;
286#endif // SC_INCLUDE_FX
287
288// USINGS FOR sc_core:
289//
290// The explicit using for ::sc_core::wait is to remove an ambiguity with
291// the constructor for the system's union wait on Unix and Linux.
292// It is generally advisable to explicitly select the SystemC wait
293// functions using ::sc_core::wait(...).
294
295using namespace sc_core;
297
298typedef ::std::string sc_string;
299
300#endif // SYSTEMC_H
::std::string sc_string
Definition: systemc.h:298
SC_API void wait(int, sc_simcontext *)
bool sc_io_show_base(systemc_ostream &stream_object)
Definition: sc_string.h:113
sc_q_mode
Definition: sc_fxdefs.h:91
@ SC_RND_CONV
Definition: sc_fxdefs.h:96
@ SC_RND
Definition: sc_fxdefs.h:92
@ SC_RND_MIN_INF
Definition: sc_fxdefs.h:94
@ SC_TRN_ZERO
Definition: sc_fxdefs.h:98
@ SC_TRN
Definition: sc_fxdefs.h:97
@ SC_RND_ZERO
Definition: sc_fxdefs.h:93
@ SC_RND_INF
Definition: sc_fxdefs.h:95
SC_API const sc_logic SC_LOGIC_0
SC_API const sc_logic SC_LOGIC_X
SC_API const sc_logic sc_logic_1
sc_context_begin
Definition: sc_context.h:129
@ SC_NOW
Definition: sc_context.h:130
@ SC_LATER
Definition: sc_context.h:131
sc_numrep
Definition: sc_string.h:56
@ SC_CSD
Definition: sc_string.h:68
@ SC_HEX_SM
Definition: sc_string.h:67
@ SC_OCT_US
Definition: sc_string.h:64
@ SC_BIN
Definition: sc_string.h:58
@ SC_HEX
Definition: sc_string.h:61
@ SC_BIN_US
Definition: sc_string.h:62
@ SC_NOBASE
Definition: sc_string.h:57
@ SC_BIN_SM
Definition: sc_string.h:63
@ SC_OCT_SM
Definition: sc_string.h:65
@ SC_OCT
Definition: sc_string.h:59
@ SC_HEX_US
Definition: sc_string.h:66
@ SC_DEC
Definition: sc_string.h:60
unsigned long long uint64
Definition: sc_nbdefs.h:216
const T sc_min(const T &a, const T &b)
Definition: sc_macros.h:40
const T sc_abs(const T &a)
Definition: sc_macros.h:56
@ SC_F
Definition: sc_fxdefs.h:174
@ SC_E
Definition: sc_fxdefs.h:175
const T sc_max(const T &a, const T &b)
Definition: sc_macros.h:48
SC_API const sc_logic sc_logic_0
SC_API const sc_logic sc_logic_X
SC_API const sc_logic SC_LOGIC_Z
SC_API const sc_logic SC_LOGIC_1
sc_switch
Definition: sc_fxdefs.h:149
@ SC_OFF
Definition: sc_fxdefs.h:150
@ SC_ON
Definition: sc_fxdefs.h:151
unsigned int sc_digit
Definition: sc_nbdefs.h:161
SC_API const sc_logic sc_logic_Z
long long int64
Definition: sc_nbdefs.h:215
sc_o_mode
Definition: sc_fxdefs.h:120
@ SC_WRAP
Definition: sc_fxdefs.h:124
@ SC_WRAP_SM
Definition: sc_fxdefs.h:125
@ SC_SAT_SYM
Definition: sc_fxdefs.h:123
@ SC_SAT_ZERO
Definition: sc_fxdefs.h:122
@ SC_SAT
Definition: sc_fxdefs.h:121