Auto-find SystemC version

Assigned To: 
Anonymous
Importance: 
10
Description: 

Use one of the SystemC-provided macros to find the version instead of defining yet another one (SYSTEMC21V1). This is good because users can change the SystemC path in Makefiles and don't bother to set/unset the -DSYSTEMC21V1 gcc option depending on which version of SystemC was chosen.

SystemC already provides 3 kinds of macros to query the version:

(SystemC 2.1)

  1. define SYSTEMC_VERSION 20050714
  2. define SC_RELEASE_STRING "2.1.v1"
  3. define SC_API_VERSION_STRING sc_api_version_2_1_0

(SystemC 2.2)

  1. define SYSTEMC_VERSION 20060505
  2. define SC_RELEASE_STRING "2.2.05jun06_beta"
  3. define SC_API_VERSION_STRING sc_api_version_2_2_0

One option is to substitute "#ifdef SYSTEMC21V1" to "#if SYSTEMC_VERSION <= 20050714"

Status: 
active
Category: 
task