Esempio n. 1
0
static PLI_INT32 finish_cb(p_cb_data cause)
{
      struct vcd_info *cur, *next;

      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) {
	    fstWriterEmitTimeChange(dump_file, dumpvars_time);
      }

      fstWriterClose(dump_file);

      for (cur = vcd_list ;  cur ;  cur = next) {
	    next = cur->next;
	    free(cur);
      }
      vcd_list = 0;
      vcd_names_delete(&fst_tab);
      vcd_names_delete(&fst_var);
      nexus_ident_delete();
      free(dump_path);
      dump_path = 0;

      return 0;
}
Esempio n. 2
0
static PLI_INT32 sys_dumpall_calltf(ICARUS_VPI_CONST PLI_BYTE8*name)
{
      s_vpi_time now;
      PLI_UINT64 now64;

      (void)name; /* Parameter is not used. */

      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;
}
Esempio n. 3
0
static PLI_INT32 sys_dumpon_calltf(ICARUS_VPI_CONST PLI_BYTE8*name)
{
      s_vpi_time now;
      PLI_UINT64 now64;

      if (!dump_is_off) return 0;

      dump_is_off = 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;
      }

      fstWriterEmitDumpActive(dump_file, 1); /* $dumpon */
      vcd_checkpoint();

      return 0;
}
Esempio n. 4
0
File: fst.c Progetto: SnookEE/nvc
static void fst_event_cb(uint64_t now, tree_t decl, watch_t *w, void *user)
{
   if (now != last_time) {
      fstWriterEmitTimeChange(fst_ctx, now);
      last_time = now;
   }

   fst_data_t *data = user;
   if (likely(data != NULL))
      (*data->fmt)(decl, w, data);
}
Esempio n. 5
0
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;
}
Esempio n. 6
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;
}
Esempio n. 7
0
File: fst.c Progetto: SnookEE/nvc
static void fst_close(void)
{
   fstWriterEmitTimeChange(fst_ctx, rt_now(NULL));
   fstWriterClose(fst_ctx);
}