Fixed compile issues popping up in different environment

This commit is contained in:
Eyck Jentzsch 2017-10-05 14:53:52 +02:00
parent 0a42c9d2ea
commit 9d24ad728f
4 changed files with 8 additions and 5 deletions

2
external/elfio vendored

@ -1 +1 @@
Subproject commit fbf8eafc2dab3ac441bc5221d967e23a2e6fdc46
Subproject commit 1fdbb6423528684e7b5d6dd9095b64f5617b1434

View File

@ -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)

View File

@ -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 */

@ -1 +1 @@
Subproject commit f1c733dc2caed17742feca32a275eb21d15a4c8d
Subproject commit 26297107a0f1a36b320ff26e41cd42e808841321