1 | /*------------------------------------------------------------\ |
---|
2 | | | |
---|
3 | | Tool : systemcass | |
---|
4 | | | |
---|
5 | | File : sc_ver.cc | |
---|
6 | | | |
---|
7 | | Author : Taktak Sami | |
---|
8 | | Buchmann Richard | |
---|
9 | | | |
---|
10 | | Date : 09_07_2004 | |
---|
11 | | | |
---|
12 | \------------------------------------------------------------*/ |
---|
13 | |
---|
14 | /* |
---|
15 | * This file is part of the Disydent Project |
---|
16 | * Copyright (C) Laboratoire LIP6 - Département ASIM |
---|
17 | * Universite Pierre et Marie Curie |
---|
18 | * |
---|
19 | * Home page : http://www-asim.lip6.fr/disydent |
---|
20 | * E-mail : mailto:richard.buchmann@lip6.fr |
---|
21 | * |
---|
22 | * This library is free software; you can redistribute it and/or modify it |
---|
23 | * under the terms of the GNU Library General Public License as published |
---|
24 | * by the Free Software Foundation; either version 2 of the License, or (at |
---|
25 | * your option) any later version. |
---|
26 | * |
---|
27 | * Disydent is distributed in the hope that it will be |
---|
28 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
---|
30 | * Public License for more details. |
---|
31 | * |
---|
32 | * You should have received a copy of the GNU General Public License along |
---|
33 | * with the GNU C Library; see the file COPYING. If not, write to the Free |
---|
34 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
35 | */ |
---|
36 | |
---|
37 | #include "sc_ver.h" |
---|
38 | #include <iostream> |
---|
39 | #include <cstring> //strcmp |
---|
40 | #include <cstdlib> //exit |
---|
41 | |
---|
42 | namespace sc_core { |
---|
43 | |
---|
44 | static |
---|
45 | const char copyright[] = |
---|
46 | " Copyright (c) 2003-2005 by all Contributors\n" |
---|
47 | " ALL RIGHTS RESERVED"; |
---|
48 | |
---|
49 | static |
---|
50 | const char systemc_version[] = |
---|
51 | "SystemCASS alpha --- Compilation date : " __DATE__ " " __TIME__; |
---|
52 | |
---|
53 | static |
---|
54 | const char splash_screen[] = |
---|
55 | " ____ _ ____ _ ____ ____ \n" |
---|
56 | "/ ___| _ _ ___| |_ ___ _ __ ___ / ___| / \\ / ___/ ___| \n" |
---|
57 | "\\___ \\| | | / __| __/ _ \\ '_ ` _ \\| | / _ \\ \\___ \\___ \\ \n" |
---|
58 | " ___) | |_| \\__ \\ || __/ | | | | | |___ / ___ \\ ___) |__) |\n" |
---|
59 | "|____/ \\__, |___/\\__\\___|_| |_| |_|\\____/_/ \\_\\____/____/ \n" |
---|
60 | " |___/ \n" |
---|
61 | "\n" |
---|
62 | " Cycle Accurate System Simulator\n" |
---|
63 | #ifdef DEBUG |
---|
64 | " DEBUG version\n" |
---|
65 | #endif |
---|
66 | #ifdef USE_PORT_DEPENDENCY |
---|
67 | " using explicit port dependancy\n" |
---|
68 | #endif |
---|
69 | " ASIM/LIP6/UPMC\n" |
---|
70 | " E-mail support: Richard.Buchmann@asim.lip6.fr\n" |
---|
71 | " Contributors : Richard Buchmann, Sami Taktak,\n" |
---|
72 | " Paul-Jerome Kingbo, Frédéric Pétrot,\n" |
---|
73 | " Nicolas Pouillon\n" |
---|
74 | "\n" |
---|
75 | " Last change : " __DATE__ "\n" |
---|
76 | "\n"; |
---|
77 | |
---|
78 | const char* |
---|
79 | sc_copyright() |
---|
80 | { |
---|
81 | return copyright; |
---|
82 | } |
---|
83 | |
---|
84 | const char* |
---|
85 | sc_version() |
---|
86 | { |
---|
87 | return systemc_version; |
---|
88 | } |
---|
89 | |
---|
90 | const char* |
---|
91 | get_splash_screen() |
---|
92 | { |
---|
93 | return splash_screen; |
---|
94 | } |
---|
95 | |
---|
96 | } // end of sc_core namespace |
---|
97 | |
---|
98 | bool |
---|
99 | casc_check_version (const char *runtime_ver) |
---|
100 | { |
---|
101 | const char *lib_version = SYSTEMC_VERSION; |
---|
102 | bool right_version = strcmp (runtime_ver, lib_version) == 0; |
---|
103 | if (right_version == false) |
---|
104 | { |
---|
105 | std::cerr << "Current SystemCASS library version doesn't match.\n"; |
---|
106 | std::cerr << "SystemCASS linked library is : " << lib_version << "\n"; |
---|
107 | std::cerr << "SystemCASS environnement variable points to : " << runtime_ver << "\n"; |
---|
108 | exit(125); |
---|
109 | } |
---|
110 | |
---|
111 | return true; |
---|
112 | } |
---|
113 | |
---|