SystemC  2.3.1
Accellera SystemC proof-of-concept library
sc_machine.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  The following code is derived, directly or indirectly, from the SystemC
4  source code Copyright (c) 1996-2014 by all Contributors.
5  All Rights reserved.
6 
7  The contents of this file are subject to the restrictions and limitations
8  set forth in the SystemC Open Source License (the "License");
9  You may not use this file except in compliance with such restrictions and
10  limitations. You may obtain instructions on how to receive a copy of the
11  License at http://www.accellera.org/. Software distributed by Contributors
12  under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13  ANY KIND, either express or implied. See the License for the specific
14  language governing rights and limitations under the License.
15 
16  *****************************************************************************/
17 
18 /*****************************************************************************
19 
20  sc_machine.h -- Machine-dependent Environment Settings
21 
22  Original Author: Andy Goodrich, Forte Design Systems, Inc.
23 
24  CHANGE LOG AT END OF FILE
25  *****************************************************************************/
26 
27 
28 #ifndef SC_MACHINE_H
29 #define SC_MACHINE_H
30 
31 #include <climits>
32 #include "sysc/packages/boost/detail/endian.hpp"
33 
34 // ----------------------------------------------------------------------------
35 // Little or big endian machine?
36 // ----------------------------------------------------------------------------
37 
38 #if defined( SC_BOOST_LITTLE_ENDIAN )
39 # define SC_LITTLE_ENDIAN
40 #elif defined( SC_BOOST_BIG_ENDIAN )
41 # define SC_BIG_ENDIAN
42 #else
43 # error "Could not detect the endianness of the CPU."
44 #endif
45 
46 // ----------------------------------------------------------------------------
47 // Are long data types 32-bit or 64-bit?
48 // ----------------------------------------------------------------------------
49 
50 #if ULONG_MAX > 0xffffffffUL
51 # define SC_LONG_64
52 #endif
53 
54 // $Log: sc_machine.h,v $
55 // Revision 1.5 2011/08/26 22:58:23 acg
56 // Torsten Maehne: changes for endian detection.
57 //
58 // Revision 1.4 2011/08/26 20:46:18 acg
59 // Andy Goodrich: moved the modification log to the end of the file to
60 // eliminate source line number skew when check-ins are done.
61 //
62 // Revision 1.3 2011/02/18 20:38:44 acg
63 // Andy Goodrich: Updated Copyright notice.
64 //
65 // Revision 1.2 2010/09/06 16:35:09 acg
66 // Andy Goodrich: changed i386 to __i386__ in ifdef.
67 //
68 // Revision 1.1.1.1 2006/12/15 20:20:06 acg
69 // SystemC 2.3
70 //
71 // Revision 1.3 2006/01/13 18:53:10 acg
72 // Andy Goodrich: Added $Log command so that CVS comments are reproduced in
73 // the source.
74 //
75 
76 #endif // !defined(SC_MACHINE_H)