source: sources/src/sc_ver.cc @ 14

Last change on this file since 14 was 12, checked in by buchmann, 16 years ago

Changes:

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