source: sources/src/sc_ver.cc

Last change on this file was 63, checked in by bouyer, 5 years ago

Remplace USE_OPENMP with _OPENMP, the latter is automagically defined
by the compiler.

File size: 4.1 KB
Line 
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 <iostream>
38#include <cstring> //strcmp
39#include <cstdlib> //exit
40
41#include "sc_ver.h"
42
43#ifdef HAVE_CONFIG_H
44#include "config.h"
45#endif
46
47
48namespace sc_core {
49
50
51static const char copyright[] =
52    "        Copyright (c) 2003-2009 by all Contributors\n"
53    "                    ALL RIGHTS RESERVED";
54
55static const char systemc_version[] =
56    PACKAGE_STRING " --- Compilation date : " __DATE__ " " __TIME__;
57
58static const char splash_screen[] =
59    " ____            _                  ____    _    ____ ____  \n"
60    "/ ___| _   _ ___| |_ ___ _ __ ___  / ___|  / \\  / ___/ ___| \n"
61    "\\___ \\| | | / __| __/ _ \\ '_ ` _ \\| |     / _ \\ \\___ \\___ \\ \n"
62    " ___) | |_| \\__ \\ ||  __/ | | | | | |___ / ___ \\ ___) |__) |\n"
63    "|____/ \\__, |___/\\__\\___|_| |_| |_|\\____/_/   \\_\\____/____/ \n"
64    "       |___/                                                \n"
65    "\n"
66    "         Cycle Accurate System Simulator\n"
67#ifdef CONFIG_DEBUG
68    "            DEBUG version\n"
69#endif
70#ifdef USE_PORT_DEPENDENCY
71    "            using explicit port dependancy\n"
72#endif
73    "            ASIM/LIP6/UPMC\n"
74    "            E-mail support:  Richard.Buchmann@asim.lip6.fr\n"
75    "            Contributors : Richard Buchmann, Sami Taktak,\n"
76    "                           Paul-Jerome Kingbo, Frederic Pétrot,\n"
77    "                           Nicolas Pouillon\n"
78    "\n"
79    "                           Last change : " __DATE__ "\n"
80#ifdef _OPENMP
81    "            Compiled with OpenMP enabled\n"
82#endif
83    "\n";
84
85
86const char * sc_copyright() {
87    return copyright;
88}
89
90
91const char * sc_version() {
92    return systemc_version;
93}
94
95
96const char * get_splash_screen() {
97    return splash_screen;
98}
99
100
101} // end of sc_core namespace
102
103
104bool casc_check_version(const char * runtime_ver) {
105    const char * lib_version = SYSTEMC_VERSION;
106    bool right_version = strcmp(runtime_ver, lib_version) == 0;
107    if (right_version == false) {
108        std::cerr << "Current SystemCASS library version doesn't match.\n";
109        std::cerr << "SystemCASS linked library is : " << lib_version << "\n";
110        std::cerr << "SystemCASS environnement variable points to : " << runtime_ver << "\n";
111        exit(125);
112    }
113
114    return true;
115}
116
117
118/*
119# Local Variables:
120# tab-width: 4;
121# c-basic-offset: 4;
122# c-file-offsets:((innamespace . 0)(inline-open . 0));
123# indent-tabs-mode: nil;
124# End:
125#
126# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
127*/
128
Note: See TracBrowser for help on using the repository browser.