static PLI_INT32 variable_cb_2(p_cb_data cause) { struct vcd_info* info = vcd_dmp_list; PLI_UINT64 now = timerec_to_time64(cause->time); if (now != vcd_cur_time) { fstWriterEmitTimeChange(dump_file, now); vcd_cur_time = now; } do { show_this_item(info); info->scheduled = 0; } while ((info = info->dmp_next) != 0); vcd_dmp_list = 0; return 0; }
static PLI_INT32 variable_cb_2(p_cb_data cause) { assert(cause->time->type == vpiSimTime); PLI_UINT64 now = timerec_to_time64(cause->time); if (now != vcd_cur_time) { vcd_work_set_time(now); vcd_cur_time = now; } while (vcd_dmp_list != VCD_INFO_ENDP) { struct vcd_info* info = vcd_dmp_list; show_this_item(info); vcd_dmp_list = info->dmp_next; info->dmp_next = 0; } return 0; }
static PLI_INT32 dumpvars_cb(p_cb_data cause) { if (dumpvars_status != 1) return 0; dumpvars_status = 2; dumpvars_time = timerec_to_time64(cause->time); vcd_cur_time = dumpvars_time; /* nothing to do for $enddefinitions $end */ if (!dump_is_off) { fstWriterEmitTimeChange(dump_file, dumpvars_time); /* nothing to do for $dumpvars... */ vcd_checkpoint(); /* ...nothing to do for $end */ } return 0; }
static PLI_INT32 dumpvars_cb(p_cb_data cause) { if (dumpvars_status != 1) return 0; dumpvars_status = 2; dumpvars_time = timerec_to_time64(cause->time); vcd_cur_time = dumpvars_time; fprintf(dump_file, "$enddefinitions $end\n"); if (!dump_is_off) { fprintf(dump_file, "#%" PLI_UINT64_FMT "\n", dumpvars_time); fprintf(dump_file, "$dumpvars\n"); vcd_checkpoint(); fprintf(dump_file, "$end\n"); } return 0; }
static PLI_INT32 finish_cb(p_cb_data cause) { if (finish_status != 0) return 0; finish_status = 1; dumpvars_time = timerec_to_time64(cause->time); if (!dump_is_off && !dump_is_full && dumpvars_time != vcd_cur_time) { vcd_work_set_time(dumpvars_time); } vcd_work_terminate(); delete_all_vcd_info(); vcd_scope_names_delete(); nexus_ident_delete(); free(dump_path); dump_path = 0; return 0; }
static PLI_INT32 sys_dumpall_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { s_vpi_time now; PLI_UINT64 now64; if (dump_is_off) return 0; if (dump_file == 0) return 0; if (dump_header_pending()) return 0; now.type = vpiSimTime; vpi_get_time(0, &now); now64 = timerec_to_time64(&now); if (now64 > vcd_cur_time) { vcd_work_set_time(now64); vcd_cur_time = now64; } vcd_checkpoint(); return 0; }
static PLI_INT32 sys_dumpall_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { s_vpi_time now; PLI_UINT64 now64; if (dump_is_off) return 0; if (dump_file == 0) return 0; if (dump_header_pending()) return 0; now.type = vpiSimTime; vpi_get_time(0, &now); now64 = timerec_to_time64(&now); if (now64 > vcd_cur_time) { fstWriterEmitTimeChange(dump_file, now64); vcd_cur_time = now64; } /* nothing to do for $dumpall... */ vcd_checkpoint(); return 0; }