Fixed compile issues popping up in different environment
This commit is contained in:
2
external/elfio
vendored
2
external/elfio
vendored
Submodule external/elfio updated: fbf8eafc2d...1fdbb64235
@ -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)
|
||||
|
@ -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 */
|
||||
|
Submodule sc-components updated: f1c733dc2c...26297107a0
Reference in New Issue
Block a user