00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef SYSTEMC_H
00037 #define SYSTEMC_H
00038
00039
00040
00041 #include <cassert>
00042 #include <climits>
00043 #include <cmath>
00044 #include <cstddef>
00045 #include <cstdio>
00046 #include <cstdlib>
00047 #include <cstring>
00048 #include <exception>
00049 #include <fstream>
00050 #include <iostream>
00051 #include <memory>
00052 #include <string>
00053 #if defined(__EDG__)
00054 # include <strstream>
00055 #endif // defined(__EDG__)
00056 #include <typeinfo>
00057 #include <utility>
00058 #include <vector>
00059
00060
00061
00062 #if !(defined( _MSC_VER ) && _MSC_VER < 1300) && !defined( __BORLANDC__ )
00063 # if defined(__GNUC__) && (__GNUC__ == 2) // Maintain compatibility for 2.95.x
00064 using std::strstream;
00065 using std::strstreambuf;
00066 using std::istrstream;
00067 using std::ostrstream;
00068 # endif
00069
00070 using std::ios;
00071 using std::streambuf;
00072 using std::streampos;
00073 using std::streamsize;
00074 using std::iostream;
00075 using std::istream;
00076 using std::ostream;
00077 using std::cin;
00078 using std::cout;
00079 using std::cerr;
00080 using std::endl;
00081 using std::flush;
00082 using std::dec;
00083 using std::hex;
00084 using std::oct;
00085 # if defined(linux)
00086 using std::noshowbase;
00087 using std::showbase;
00088 # endif // defined(linux)
00089
00090
00091 using std::fstream;
00092 using std::ifstream;
00093 using std::ofstream;
00094
00095
00096
00097 # if !defined( _MSC_VER )
00098 using std::size_t;
00099 using std::FILE;
00100 using std::fpos_t;
00101 using std::fclose;
00102 using std::clearerr;
00103 # endif // defined(_MSC_VER)
00104
00105 using std::remove;
00106 using std::rename;
00107 using std::tmpfile;
00108 using std::tmpnam;
00109 using std::fflush;
00110 using std::fopen;
00111 using std::freopen;
00112 using std::setbuf;
00113 using std::setvbuf;
00114 using std::fprintf;
00115 using std::fscanf;
00116 using std::printf;
00117 using std::scanf;
00118 using std::sprintf;
00119 using std::sscanf;
00120 using std::vfprintf;
00121 using std::vprintf;
00122 using std::vsprintf;
00123 using std::fgetc;
00124 using std::fgets;
00125 using std::fputc;
00126 using std::fputs;
00127 using std::getc;
00128 using std::getchar;
00129 using std::gets;
00130 using std::putc;
00131 using std::putchar;
00132 using std::puts;
00133 using std::ungetc;
00134 using std::fread;
00135 using std::fwrite;
00136 using std::fgetpos;
00137 using std::fseek;
00138 using std::fsetpos;
00139 using std::ftell;
00140 using std::rewind;
00141 using std::feof;
00142 using std::ferror;
00143 using std::perror;
00144
00145
00146
00147 using std::div_t;
00148 using std::ldiv_t;
00149
00150 using std::atof;
00151 using std::atoi;
00152 using std::atol;
00153 using std::strtod;
00154 using std::strtol;
00155 using std::strtoul;
00156 using std::rand;
00157 using std::srand;
00158 using std::calloc;
00159 using std::free;
00160 using std::malloc;
00161 using std::realloc;
00162 using std::abort;
00163 using std::atexit;
00164 using std::exit;
00165 using std::getenv;
00166 using std::system;
00167 using std::bsearch;
00168 using std::qsort;
00169 using std::abs;
00170 using std::div;
00171 using std::labs;
00172 using std::ldiv;
00173 using std::mblen;
00174 using std::mbtowc;
00175 using std::wctomb;
00176 using std::mbstowcs;
00177 using std::wcstombs;
00178
00179
00180
00181 using std::memcpy;
00182 using std::memmove;
00183 using std::strcpy;
00184 using std::strncpy;
00185 using std::strcat;
00186 using std::strncat;
00187 using std::memcmp;
00188 using std::strcmp;
00189 using std::strcoll;
00190 using std::strncmp;
00191 using std::strxfrm;
00192 using std::memchr;
00193 using std::strchr;
00194 using std::strcspn;
00195 using std::strpbrk;
00196 using std::strrchr;
00197 using std::strspn;
00198 using std::strstr;
00199 using std::strtok;
00200 using std::memset;
00201 using std::strerror;
00202 using std::strlen;
00203
00204 #else
00205 #if defined( _MSC_VER )
00206
00207
00208 using std::ios;
00209 using std::streambuf;
00210 using std::streampos;
00211 using std::streamsize;
00212 using std::iostream;
00213 using std::istream;
00214 using std::ostream;
00215 using std::strstream;
00216 using std::strstreambuf;
00217 using std::istrstream;
00218 using std::ostrstream;
00219 using std::cin;
00220 using std::cout;
00221 using std::cerr;
00222 using std::endl;
00223 using std::flush;
00224 using std::dec;
00225 using std::hex;
00226 using std::oct;
00227
00228 using std::fstream;
00229 using std::ifstream;
00230 using std::ofstream;
00231
00232 #endif // MSC
00233 #endif // Everyone else
00234
00235
00236
00237 #include "systemc"
00238
00239
00240
00241 using sc_dt::SC_BIN;
00242 using sc_dt::SC_BIN_SM;
00243 using sc_dt::SC_BIN_US;
00244 using sc_dt::SC_CSD;
00245 using sc_dt::SC_DEC;
00246 using sc_dt::SC_HEX;
00247 using sc_dt::SC_HEX_SM;
00248 using sc_dt::SC_HEX_US;
00249 using sc_dt::SC_LOGIC_0;
00250 using sc_dt::SC_LOGIC_1;
00251 using sc_dt::SC_LOGIC_X;
00252 using sc_dt::SC_LOGIC_Z;
00253 using sc_dt::SC_NOBASE;
00254 using sc_dt::SC_OCT;
00255 using sc_dt::SC_OCT_SM;
00256 using sc_dt::SC_OCT_US;
00257 using sc_dt::int64;
00258 using sc_dt::sc_abs;
00259 using sc_dt::sc_bigint;
00260 using sc_dt::sc_biguint;
00261 using sc_dt::sc_bit;
00262 using sc_dt::sc_bv;
00263 using sc_dt::sc_bv_base;
00264 using sc_dt::sc_digit;
00265 using sc_dt::sc_int;
00266 using sc_dt::sc_int_base;
00267 using sc_dt::sc_io_show_base;
00268 using sc_dt::sc_length_context;
00269 using sc_dt::sc_length_param;
00270 using sc_dt::sc_logic;
00271 using sc_dt::sc_lv;
00272 using sc_dt::sc_lv_base;
00273 using sc_dt::sc_max;
00274 using sc_dt::sc_min;
00275 using sc_dt::sc_numrep;
00276 using sc_dt::sc_signed;
00277 using sc_dt::sc_string_old;
00278 using sc_dt::sc_uint;
00279 using sc_dt::sc_uint_base;
00280 using sc_dt::sc_unsigned;
00281 using sc_dt::uint64;
00282
00283 using sc_dt::sc_logic_0;
00284 using sc_dt::sc_logic_1;
00285 using sc_dt::sc_logic_Z;
00286 using sc_dt::sc_logic_X;
00287
00288
00289 #ifdef SC_INCLUDE_FX
00290 using sc_dt::sc_fxnum;
00291 using sc_dt::sc_fxnum_bitref;
00292 using sc_dt::sc_fxnum_fast;
00293 using sc_dt::sc_fix;
00294 using sc_dt::sc_fix_fast;
00295 using sc_dt::sc_ufix;
00296 using sc_dt::sc_ufix_fast;
00297 using sc_dt::sc_fixed;
00298 using sc_dt::sc_fixed_fast;
00299 using sc_dt::sc_ufixed;
00300 using sc_dt::sc_ufixed_fast;
00301 using sc_dt::sc_fxval;
00302 using sc_dt::sc_fxval_fast;
00303 using sc_dt::sc_fxcast_switch;
00304 using sc_dt::sc_fxcast_context;
00305 using sc_dt::sc_fxtype_params;
00306 using sc_dt::sc_fxtype_context;
00307 using sc_dt::sc_q_mode;
00308 using sc_dt::SC_RND;
00309 using sc_dt::SC_RND_ZERO;
00310 using sc_dt::SC_RND_MIN_INF;
00311 using sc_dt::SC_RND_INF;
00312 using sc_dt::SC_RND_CONV;
00313 using sc_dt::SC_TRN;
00314 using sc_dt::SC_TRN_ZERO;
00315 using sc_dt::sc_o_mode;
00316 using sc_dt::SC_SAT;
00317 using sc_dt::SC_SAT_ZERO;
00318 using sc_dt::SC_SAT_SYM;
00319 using sc_dt::SC_WRAP;
00320 using sc_dt::SC_WRAP_SM;
00321 using sc_dt::sc_switch;
00322 using sc_dt::SC_OFF;
00323 using sc_dt::SC_ON;
00324 using sc_dt::sc_fmt;
00325 using sc_dt::SC_F;
00326 using sc_dt::SC_E;
00327 using sc_dt::sc_context_begin;
00328 using sc_dt::SC_NOW;
00329 using sc_dt::SC_LATER;
00330
00331 #endif // SC_INCLUDE_FX
00332
00333 #if defined( _MSC_VER )
00334 using sc_dt::equal;
00335 using sc_dt::not_equal;
00336 using sc_dt::b_not;
00337 using sc_dt::b_and;
00338 using sc_dt::b_or;
00339 using sc_dt::b_xor;
00340 using sc_dt::lrotate;
00341 using sc_dt::rrotate;
00342 using sc_dt::reverse;
00343 using sc_dt::concat;
00344 using sc_dt::and_reduce;
00345 using sc_dt::or_reduce;
00346 using sc_dt::xor_reduce;
00347 using sc_dt::nand_reduce;
00348 using sc_dt::nor_reduce;
00349 using sc_dt::xnor_reduce;
00350
00351 #endif // defined( _MSC_VER )
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362 using namespace sc_core;
00363 #if !defined( __HP_aCC )
00364 using ::sc_core::wait;
00365 #endif // !defined( __HP_aCC )
00366
00367 #ifdef SC_USE_SC_STRING_OLD
00368 typedef sc_dt::sc_string_old sc_string;
00369 #endif
00370
00371 #ifdef SC_USE_STD_STRING
00372 typedef ::std::string sc_string;
00373 #endif
00374
00375 #endif