int FliTimedCbHdl::cleanup_callback(void) { switch (get_call_state()) { case GPI_PRIMED: /* Issue #188: Work around for modelsim that is harmless to othes too, we tag the time as delete, let it fire then do not pass up */ LOG_DEBUG("Not removing PRIMED timer %p", m_time_ps); set_call_state(GPI_DELETE); return 0; case GPI_CALL: LOG_DEBUG("Not removing CALL timer yet %p", m_time_ps); set_call_state(GPI_DELETE); return 0; case GPI_DELETE: LOG_DEBUG("Removing Postponed DELETE timer %p", m_time_ps); break; default: break; } FliProcessCbHdl::cleanup_callback(); FliImpl* impl = (FliImpl*)m_impl; impl->cache.put_timer(this); return 0; }
int FliTimedCbHdl::arm_callback(void) { mti_ScheduleWakeup(m_proc_hdl, m_time_ps); m_sensitised = true; set_call_state(GPI_PRIMED); return 0; }
int FliShutdownCbHdl::arm_callback(void) { mti_AddQuitCB(handle_fli_callback,(void *)this); set_call_state(GPI_PRIMED); return 0; }
int FliStartupCbHdl::arm_callback(void) { mti_AddLoadDoneCB(handle_fli_callback,(void *)this); set_call_state(GPI_PRIMED); return 0; }
int FliTimedCbHdl::arm_callback(void) { #if defined(__LP64__) || defined(_WIN64) mti_ScheduleWakeup64(m_proc_hdl, m_time_ps); #else mtiTime64T m_time_union_ps; MTI_TIME64_ASGN(m_time_union_ps, (mtiInt32T)((m_time_ps) >> 32), (mtiUInt32T)(m_time_ps)); mti_ScheduleWakeup64(m_proc_hdl, m_time_union_ps); #endif m_sensitised = true; set_call_state(GPI_PRIMED); return 0; }
int FliSimPhaseCbHdl::arm_callback(void) { if (NULL == m_proc_hdl) { LOG_DEBUG("Creating a new process to sensitise with priority %d", m_priority); m_proc_hdl = mti_CreateProcessWithPriority(NULL, handle_fli_callback, (void *)this, m_priority); } if (!m_sensitised) { mti_ScheduleWakeup(m_proc_hdl, 0); m_sensitised = true; } set_call_state(GPI_PRIMED); return 0; }
int FliSignalCbHdl::arm_callback(void) { if (NULL == m_proc_hdl) { LOG_DEBUG("Creating a new process to sensitise to signal %s", mti_GetSignalName(m_sig_hdl)); m_proc_hdl = mti_CreateProcess(NULL, handle_fli_callback, (void *)this); } if (!m_sensitised) { mti_Sensitize(m_proc_hdl, m_sig_hdl, MTI_EVENT); m_sensitised = true; } set_call_state(GPI_PRIMED); return 0; }
int VhpiShutdownCbHdl::run_callback(void) { set_call_state(GPI_DELETE); gpi_embed_end(); return 0; }