Browse Source

Backward compatibility fixes

pull/2/head
Eyck Jentzsch 9 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 @@
#include <sysc/tracing/sc_trace.h>
#include <sysc/kernel/sc_simcontext.h>
#include <sstream>
#ifndef SC_API
#define SC_API
#endif

namespace scc {
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

ordered_semaphore::ordered_semaphore( int init_value_ )
: sc_core::sc_object( sc_core::sc_gen_unique_name( "semaphore" ) ),
m_free( (std::string(SC_KERNEL_EVENT_PREFIX)+"_free_event").c_str() ),
m_free( (std::string("$$$$kernel_event$$$$_")+"_free_event").c_str() ),
m_value( init_value_ )
{
if( m_value < 0 ) {
@@ -56,7 +56,7 @@ ordered_semaphore::ordered_semaphore( int init_value_ )

ordered_semaphore::ordered_semaphore( const char* name_, int init_value_ )
: sc_object( name_ ),
m_free( (std::string(SC_KERNEL_EVENT_PREFIX)+"_free_event").c_str() ),
m_free( (std::string("$$$$kernel_event$$$$_")+"_free_event").c_str() ),
m_value( init_value_ )
{
if( m_value < 0 ) {

+ 4
- 0
src/value_registry.cpp View File

@@ -17,7 +17,9 @@ using namespace sc_core;
using namespace scc;

std::ostream& operator<<(std::ostream& os, const sc_event& evt){
#if SYSTEMC_VERSION >= 20181013
os<<evt.triggered();
#endif
return os;
}

@@ -59,8 +61,10 @@ public:
} \
}

#if SYSTEMC_VERSION >= 20181013
DECL_TRACE_METHOD_A( sc_event )
DECL_TRACE_METHOD_A( sc_time )
#endif

//DECL_TRACE_METHOD_A( bool )
void trace(const bool& object, const std::string& name ) override {

Loading…
Cancel
Save