Browse Source

Backward compatibility fixes

Eyck Jentzsch 5 months ago
parent
commit
174bc50f9f
3 changed files with 9 additions and 2 deletions
  1. 3
    0
      incl/scc/value_registry.h
  2. 2
    2
      src/ordered_semaphore.cpp
  3. 4
    0
      src/value_registry.cpp

+ 3
- 0
incl/scc/value_registry.h View File

@@ -12,6 +12,9 @@
12 12
 #include <sysc/tracing/sc_trace.h>
13 13
 #include <sysc/kernel/sc_simcontext.h>
14 14
 #include <sstream>
15
+#ifndef SC_API
16
+#define SC_API
17
+#endif
15 18
 
16 19
 namespace scc {
17 20
 struct value_registry_if {

+ 2
- 2
src/ordered_semaphore.cpp View File

@@ -46,7 +46,7 @@ ordered_semaphore::report_error( const char* id, const char* add_msg ) const
46 46
 
47 47
 ordered_semaphore::ordered_semaphore( int init_value_ )
48 48
 : sc_core::sc_object( sc_core::sc_gen_unique_name( "semaphore" ) ),
49
-  m_free( (std::string(SC_KERNEL_EVENT_PREFIX)+"_free_event").c_str() ),
49
+  m_free( (std::string("$$$$kernel_event$$$$_")+"_free_event").c_str() ),
50 50
   m_value( init_value_ )
51 51
 {
52 52
 	if( m_value < 0 ) {
@@ -56,7 +56,7 @@ ordered_semaphore::ordered_semaphore( int init_value_ )
56 56
 
57 57
 ordered_semaphore::ordered_semaphore( const char* name_, int init_value_ )
58 58
 : sc_object( name_ ),
59
-  m_free( (std::string(SC_KERNEL_EVENT_PREFIX)+"_free_event").c_str() ),
59
+  m_free( (std::string("$$$$kernel_event$$$$_")+"_free_event").c_str() ),
60 60
   m_value( init_value_ )
61 61
 {
62 62
 	if( m_value < 0 ) {

+ 4
- 0
src/value_registry.cpp View File

@@ -17,7 +17,9 @@ using namespace sc_core;
17 17
 using namespace scc;
18 18
 
19 19
 std::ostream& operator<<(std::ostream& os, const sc_event& evt){
20
+#if SYSTEMC_VERSION >= 20181013
20 21
     os<<evt.triggered();
22
+#endif
21 23
     return os;
22 24
 }
23 25
 
@@ -59,8 +61,10 @@ public:
59 61
         } \
60 62
     }
61 63
 
64
+#if SYSTEMC_VERSION >= 20181013
62 65
     DECL_TRACE_METHOD_A( sc_event )
63 66
     DECL_TRACE_METHOD_A( sc_time )
67
+#endif
64 68
 
65 69
     //DECL_TRACE_METHOD_A( bool )
66 70
     void trace(const bool& object, const std::string& name ) override {