From 9d24ad728f24ae9cfeeecd6c43ae2f452d1a261c Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 5 Oct 2017 14:53:52 +0200 Subject: [PATCH] Fixed compile issues popping up in different environment --- external/elfio | 2 +- riscv.sc/src/CMakeLists.txt | 3 +++ riscv.sc/src/sysc/clint.cpp | 6 +++--- sc-components | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/external/elfio b/external/elfio index fbf8eaf..1fdbb64 160000 --- a/external/elfio +++ b/external/elfio @@ -1 +1 @@ -Subproject commit fbf8eafc2dab3ac441bc5221d967e23a2e6fdc46 +Subproject commit 1fdbb6423528684e7b5d6dd9095b64f5617b1434 diff --git a/riscv.sc/src/CMakeLists.txt b/riscv.sc/src/CMakeLists.txt index 9a37b54..982cec2 100644 --- a/riscv.sc/src/CMakeLists.txt +++ b/riscv.sc/src/CMakeLists.txt @@ -26,9 +26,12 @@ set_target_properties(${LIBRARY_NAME} PROPERTIES # This is a make target, so you can do a "make riscv-sc" set(APPLICATION_NAME riscv.sc) +link_directories(${SystemC_LIBRARY_DIR}) + add_executable(${APPLICATION_NAME} ${APP_SOURCES}) # Links the target exe against the libraries + target_link_libraries(${APPLICATION_NAME} ${LIBRARY_NAME}) target_link_libraries(${APPLICATION_NAME} risc-v) target_link_libraries(${APPLICATION_NAME} dbt-core) diff --git a/riscv.sc/src/sysc/clint.cpp b/riscv.sc/src/sysc/clint.cpp index 009f365..d314602 100644 --- a/riscv.sc/src/sysc/clint.cpp +++ b/riscv.sc/src/sysc/clint.cpp @@ -80,17 +80,17 @@ void clint::reset_cb() { } void clint::update_mtime() { - auto diff = (sc_time_stamp() - last_updt) / clk; + auto diff = (sc_core::sc_time_stamp() - last_updt) / clk; auto diffi = (int)diff; regs->r_mtime += (diffi + cnt_fraction) / lfclk_mutiplier; cnt_fraction = (cnt_fraction + diffi) % lfclk_mutiplier; mtime_evt.cancel(); - if (regs->r_mtimecmp > regs->r_mtime && clk > SC_ZERO_TIME) { + if (regs->r_mtimecmp > regs->r_mtime && clk > sc_core::SC_ZERO_TIME) { sc_core::sc_time next_trigger = (clk * lfclk_mutiplier) * (regs->r_mtimecmp - regs->mtime) - cnt_fraction * clk; mtime_evt.notify(next_trigger); } else mtime_int_o.write(true); - last_updt = sc_time_stamp(); + last_updt = sc_core::sc_time_stamp(); } } /* namespace sysc */ diff --git a/sc-components b/sc-components index f1c733d..2629710 160000 --- a/sc-components +++ b/sc-components @@ -1 +1 @@ -Subproject commit f1c733dc2caed17742feca32a275eb21d15a4c8d +Subproject commit 26297107a0f1a36b320ff26e41cd42e808841321