Browse Source

Include fixes

Fixed missing includes for tracable and made fmt header-only
Eyck Jentzsch 8 months ago
parent
commit
7c989da056

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

@@ -20,6 +20,7 @@
20 20
 #include <memory>
21 21
 
22 22
 #include "resetable.h"
23
+#include "traceable.h"
23 24
 #include "resource_access_if.h"
24 25
 #include "util/delegate.h"
25 26
 #include "utilities.h"
@@ -234,7 +235,7 @@ public:
234 235
      *
235 236
      * @param write_cb
236 237
      */
237
-    void set_write_cb(std::function<bool(this_type &, DATATYPE &)> write_cb) {
238
+    void set_write_cb(std::function<bool(this_type &, const DATATYPE &)> write_cb) {
238 239
         wr_cb = [write_cb](this_type &reg, DATATYPE &data, sc_core::sc_time delay) { return write_cb(reg, data); };
239 240
     }
240 241
     /**
@@ -242,7 +243,7 @@ public:
242 243
      *
243 244
      * @param write_cb
244 245
      */
245
-    void set_write_cb(std::function<bool(this_type &, DATATYPE &, sc_core::sc_time)> write_cb) { wr_cb = write_cb; }
246
+    void set_write_cb(std::function<bool(this_type &, const DATATYPE &, sc_core::sc_time)> write_cb) { wr_cb = write_cb; }
246 247
     /**
247 248
      * trace the register value to the given trace file
248 249
      *

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

@@ -81,7 +81,8 @@ public:
81 81
         os << std::endl;
82 82
         T::output(os.str());
83 83
         // TODO: use a more specific exception
84
-        if (get_last_log_level() == FATAL && abort_on_fatal()) throw std::runtime_error(os.str());
84
+        if (get_last_log_level() == FATAL && abort_on_fatal())
85
+            abort();
85 86
     }
86 87
     /**
87 88
      * 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)
46 46
     add_definitions(-DWITH_SCV)
47 47
 	target_include_directories (${LIBRARY_NAME} PUBLIC ${SCV_INCLUDE_DIRS})
48 48
     target_link_libraries (${LIBRARY_NAME} ${SCV_LIBRARIES})
49
-    target_link_libraries (${LIBRARY_NAME} fmt)
49
+#    target_link_libraries (${LIBRARY_NAME} fmt)
50 50
 endif()
51 51
 set_target_properties(${LIBRARY_NAME} PROPERTIES
52 52
   VERSION ${VERSION}  # ${VERSION} was defined in the main CMakeLists.

+ 1
- 0
src/configurable_tracer.cpp View File

@@ -32,6 +32,7 @@
32 32
  ******************************************************************************/
33 33
 
34 34
 #include "scc/configurable_tracer.h"
35
+#include "scc/traceable.h"
35 36
 
36 37
 using namespace scc;
37 38
 

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

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

+ 1
- 0
src/tracer_base.cpp View File

@@ -21,6 +21,7 @@
21 21
  */
22 22
 
23 23
 #include "scc/tracer_base.h"
24
+#include "scc/traceable.h"
24 25
 #include <string.h>
25 26
 
26 27
 

+ 1
- 0
src/value_registry.cpp View File

@@ -9,6 +9,7 @@
9 9
 #include <sysc/datatypes/fx/sc_fxval.h>
10 10
 #include <sysc/datatypes/fx/sc_fxnum.h>
11 11
 #include <string>
12
+#include <cstring>
12 13
 #include <sstream>
13 14
 #include <unordered_map>
14 15