source: branches/with_autoconf/src/sc_ver.cc @ 62

Last change on this file since 62 was 20, checked in by nipo, 16 years ago

Sync up with trunk changes

File size: 3.8 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 "sc_ver.h"
38#include <iostream>
39#ifdef HAVE_CONFIG_H
40#include "config.h"
41#endif
42#include <cstring> //strcmp
43#include <cstdlib> //exit
44
45namespace sc_core {
46
47static
48const char copyright[] =
49    "        Copyright (c) 2003-2005 by all Contributors\n"
50    "                    ALL RIGHTS RESERVED";
51
52static
53const char systemc_version[] =
54    "SystemCASS alpha --- Compilation date : " __DATE__ " " __TIME__;
55
56static 
57const char splash_screen[] =
58        " ____            _                  ____    _    ____ ____  \n"
59        "/ ___| _   _ ___| |_ ___ _ __ ___  / ___|  / \\  / ___/ ___| \n"
60        "\\___ \\| | | / __| __/ _ \\ '_ ` _ \\| |     / _ \\ \\___ \\___ \\ \n"
61        " ___) | |_| \\__ \\ ||  __/ | | | | | |___ / ___ \\ ___) |__) |\n"
62        "|____/ \\__, |___/\\__\\___|_| |_| |_|\\____/_/   \\_\\____/____/ \n"
63        "       |___/                                                \n"
64        "\n"
65        "         Cycle Accurate System Simulator\n"
66#ifdef CONFIG_DEBUG
67  "            DEBUG version\n"
68#endif
69#ifdef USE_PORT_DEPENDENCY
70  "            using explicit port dependancy\n"
71#endif
72        "            ASIM/LIP6/UPMC\n"
73        "            E-mail support:  Richard.Buchmann@asim.lip6.fr\n"
74        "            Contributors : Richard Buchmann, Sami Taktak,\n"
75  "                           Paul-Jerome Kingbo, Frédéric Pétrot,\n"
76  "                           Nicolas Pouillon\n"
77        "\n"
78        "                           Last change : " __DATE__ "\n"
79        "\n";
80
81const char*
82sc_copyright()
83{
84    return copyright;
85}
86
87const char*
88sc_version()
89{
90    return systemc_version;
91}
92
93const char*
94get_splash_screen()
95{
96    return splash_screen;
97}
98
99} // end of sc_core namespace
100
101bool
102casc_check_version (const char *runtime_ver)
103{
104  const char *lib_version = SYSTEMC_VERSION;
105  bool right_version =  strcmp (runtime_ver, lib_version) == 0;
106  if (right_version == false)
107  {
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
Note: See TracBrowser for help on using the repository browser.