Skip to content

Instantly share code, notes, and snippets.

@sergev
Created January 8, 2019 23:01
Show Gist options
  • Save sergev/c820cba57a9219dc923c77f2a037da04 to your computer and use it in GitHub Desktop.
Save sergev/c820cba57a9219dc923c77f2a037da04 to your computer and use it in GitHub Desktop.
Print SystemC version
#include <systemc>
#include <tlm.h>
using namespace std;
int sc_main(int argc, char* argv[])
{
#ifdef IEEE_1666_SYSTEMC
cout << SC_VERSION << endl;
cout << SC_VERSION_RELEASE_DATE << endl;
#endif
cout << TLM_VERSION << endl;
cout << TLM_VERSION_RELEASE_DATE << endl;
return 0;
}
@sergev
Copy link
Author

sergev commented Jan 8, 2019

Compile with:

g++ -I$SYSTEMC_INCLUDE print-systemc-version.cpp -L$SYSTEMC_LIBDIR -lsystemc -o print-systemc-version

@sergev
Copy link
Author

sergev commented Jan 8, 2019

Output:

        SystemC 2.3.3-Accellera --- Jan  8 2019 13:36:42
        Copyright (c) 1996-2018 by all Contributors,
        ALL RIGHTS RESERVED
2.3.3-Accellera
20181013
2.0.5_pub_rev-Accellera
20180904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment