Browse Source

Include fixes

Fixed missing includes for tracable and made fmt header-only
pull/2/head
Eyck Jentzsch 1 year ago
parent
commit
7c989da056
7 changed files with 10 additions and 4 deletions
  1. +3
    -2
      incl/scc/register.h
  2. +2
    -1
      incl/util/logging.h
  3. +1
    -1
      src/CMakeLists.txt
  4. +1
    -0
      src/configurable_tracer.cpp
  5. +1
    -0
      src/scv_tr_sqlite/scv_tr_sqlite.cpp
  6. +1
    -0
      src/tracer_base.cpp
  7. +1
    -0
      src/value_registry.cpp

+ 3
- 2
incl/scc/register.h View File

@@ -20,6 +20,7 @@
#include <memory>

#include "resetable.h"
#include "traceable.h"
#include "resource_access_if.h"
#include "util/delegate.h"
#include "utilities.h"
@@ -234,7 +235,7 @@ public:
*
* @param write_cb
*/
void set_write_cb(std::function<bool(this_type &, DATATYPE &)> write_cb) {
void set_write_cb(std::function<bool(this_type &, const DATATYPE &)> write_cb) {
wr_cb = [write_cb](this_type &reg, DATATYPE &data, sc_core::sc_time delay) { return write_cb(reg, data); };
}
/**
@@ -242,7 +243,7 @@ public:
*
* @param write_cb
*/
void set_write_cb(std::function<bool(this_type &, DATATYPE &, sc_core::sc_time)> write_cb) { wr_cb = write_cb; }
void set_write_cb(std::function<bool(this_type &, const DATATYPE &, sc_core::sc_time)> write_cb) { wr_cb = write_cb; }
/**
* trace the register value to the given trace file
*


+ 2
- 1
incl/util/logging.h View File

@@ -81,7 +81,8 @@ public:
os << std::endl;
T::output(os.str());
// TODO: use a more specific exception
if (get_last_log_level() == FATAL && abort_on_fatal()) throw std::runtime_error(os.str());
if (get_last_log_level() == FATAL && abort_on_fatal())
abort();
}
/**
* get the underlying ostringstream for a certain log level and category


+ 1
- 1
src/CMakeLists.txt View File

@@ -46,7 +46,7 @@ if(SCV_FOUND)
add_definitions(-DWITH_SCV)
target_include_directories (${LIBRARY_NAME} PUBLIC ${SCV_INCLUDE_DIRS})
target_link_libraries (${LIBRARY_NAME} ${SCV_LIBRARIES})
target_link_libraries (${LIBRARY_NAME} fmt)
# target_link_libraries (${LIBRARY_NAME} fmt)
endif()
set_target_properties(${LIBRARY_NAME} PROPERTIES
VERSION ${VERSION} # ${VERSION} was defined in the main CMakeLists.


+ 1
- 0
src/configurable_tracer.cpp View File

@@ -32,6 +32,7 @@
******************************************************************************/

#include "scc/configurable_tracer.h"
#include "scc/traceable.h"

using namespace scc;



+ 1
- 0
src/scv_tr_sqlite/scv_tr_sqlite.cpp View File

@@ -20,6 +20,7 @@
#include <stdexcept>
#include <string>
#include <vector>
#define FMT_HEADER_ONLY
#include <fmt/format.h>
// clang-format off
#include "scv/scv_util.h"


+ 1
- 0
src/tracer_base.cpp View File

@@ -21,6 +21,7 @@
*/

#include "scc/tracer_base.h"
#include "scc/traceable.h"
#include <string.h>




+ 1
- 0
src/value_registry.cpp View File

@@ -9,6 +9,7 @@
#include <sysc/datatypes/fx/sc_fxval.h>
#include <sysc/datatypes/fx/sc_fxnum.h>
#include <string>
#include <cstring>
#include <sstream>
#include <unordered_map>



Loading…
Cancel
Save