1999-11-07 21:33:30 +01:00
|
|
|
/*
|
2003-02-11 06:21:33 +01:00
|
|
|
* Copyright (c) 1999-2003 Stephen Williams (steve@icarus.com)
|
1999-11-07 21:33:30 +01:00
|
|
|
*
|
|
|
|
|
* This source code is free software; you can redistribute it
|
|
|
|
|
* and/or modify it in source code form under the terms of the GNU
|
|
|
|
|
* General Public License as published by the Free Software
|
|
|
|
|
* Foundation; either version 2 of the License, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
|
*/
|
2002-08-12 03:34:58 +02:00
|
|
|
#ifdef HAVE_CVS_IDENT
|
2003-08-06 20:24:55 +02:00
|
|
|
#ident "$Id: sys_vcd.c,v 1.45 2003/08/06 18:24:55 steve Exp $"
|
1999-11-07 21:33:30 +01:00
|
|
|
#endif
|
|
|
|
|
|
2001-07-25 05:10:48 +02:00
|
|
|
# include "config.h"
|
2002-08-15 04:12:20 +02:00
|
|
|
# include "sys_priv.h"
|
2001-07-25 05:10:48 +02:00
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
/*
|
|
|
|
|
* This file contains the implementations of the VCD related
|
|
|
|
|
* funcitons.
|
|
|
|
|
*/
|
|
|
|
|
|
2000-01-24 00:54:36 +01:00
|
|
|
# include "vpi_user.h"
|
1999-11-07 21:33:30 +01:00
|
|
|
# include <stdio.h>
|
|
|
|
|
# include <stdlib.h>
|
|
|
|
|
# include <string.h>
|
|
|
|
|
# include <assert.h>
|
2000-04-08 07:28:39 +02:00
|
|
|
# include <time.h>
|
2001-09-30 07:18:46 +02:00
|
|
|
#ifdef HAVE_MALLOC_H
|
|
|
|
|
# include <malloc.h>
|
|
|
|
|
#endif
|
2003-02-11 06:21:33 +01:00
|
|
|
# include "vcd_priv.h"
|
|
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
static FILE*dump_file = 0;
|
|
|
|
|
|
2000-07-26 06:07:59 +02:00
|
|
|
static const char*units_names[] = {
|
|
|
|
|
"s",
|
|
|
|
|
"ms",
|
|
|
|
|
"us",
|
|
|
|
|
"ns",
|
|
|
|
|
"ps",
|
|
|
|
|
"fs"
|
|
|
|
|
};
|
|
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
struct vcd_info {
|
|
|
|
|
vpiHandle item;
|
|
|
|
|
vpiHandle cb;
|
|
|
|
|
struct t_vpi_time time;
|
2001-09-30 07:18:46 +02:00
|
|
|
const char*ident;
|
2003-04-27 04:22:27 +02:00
|
|
|
struct vcd_info* next;
|
|
|
|
|
struct vcd_info* dmp_next;
|
|
|
|
|
int scheduled;
|
1999-11-07 21:33:30 +01:00
|
|
|
};
|
|
|
|
|
|
2000-04-08 07:28:39 +02:00
|
|
|
|
2001-10-15 03:50:23 +02:00
|
|
|
static char vcdid[8] = "!";
|
|
|
|
|
|
2000-04-08 07:28:39 +02:00
|
|
|
static void gen_new_vcd_id(void)
|
|
|
|
|
{
|
2001-10-15 03:50:23 +02:00
|
|
|
static unsigned value = 0;
|
|
|
|
|
unsigned v = ++value;
|
2000-04-08 07:28:39 +02:00
|
|
|
int i;
|
2001-10-15 03:50:23 +02:00
|
|
|
|
|
|
|
|
for (i=0; i < sizeof(vcdid)-1; i++) {
|
|
|
|
|
vcdid[i] = (char)((v%94)+33); /* for range 33..126 */
|
|
|
|
|
v /= 94;
|
|
|
|
|
if(!v) {
|
|
|
|
|
vcdid[i+1] = '\0';
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2000-04-08 07:28:39 +02:00
|
|
|
}
|
|
|
|
|
|
2003-04-27 04:22:27 +02:00
|
|
|
static struct vcd_info *vcd_list = 0;
|
|
|
|
|
static struct vcd_info *vcd_dmp_list = 0;
|
1999-11-07 21:33:30 +01:00
|
|
|
unsigned long vcd_cur_time = 0;
|
2001-06-21 06:15:22 +02:00
|
|
|
static int dump_is_off = 0;
|
1999-11-07 21:33:30 +01:00
|
|
|
|
2000-04-09 06:18:16 +02:00
|
|
|
static char *truncate_bitvec(char *s)
|
|
|
|
|
{
|
|
|
|
|
char l, r;
|
|
|
|
|
|
|
|
|
|
r=*s;
|
|
|
|
|
if(r=='1')
|
|
|
|
|
return s;
|
|
|
|
|
else
|
|
|
|
|
s += 1;
|
|
|
|
|
|
|
|
|
|
for(;;s++) {
|
|
|
|
|
l=r; r=*s;
|
|
|
|
|
if(!r) return (s-1);
|
|
|
|
|
|
|
|
|
|
if(l!=r)
|
2003-08-06 20:24:55 +02:00
|
|
|
return(((l=='0')&&(r=='1'))?s:s-1);
|
2000-04-09 06:18:16 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2000-01-20 07:04:55 +01:00
|
|
|
static void show_this_item(struct vcd_info*info)
|
|
|
|
|
{
|
|
|
|
|
s_vpi_value value;
|
|
|
|
|
|
2003-02-11 06:21:33 +01:00
|
|
|
if (vpi_get(vpiType, info->item) == vpiRealVar) {
|
|
|
|
|
value.format = vpiRealVal;
|
|
|
|
|
vpi_get_value(info->item, &value);
|
|
|
|
|
fprintf(dump_file, "r%.16g %s\n", value.value.real, info->ident);
|
|
|
|
|
|
|
|
|
|
} else if (vpi_get(vpiSize, info->item) == 1) {
|
2000-01-20 07:04:55 +01:00
|
|
|
value.format = vpiBinStrVal;
|
|
|
|
|
vpi_get_value(info->item, &value);
|
|
|
|
|
fprintf(dump_file, "%s%s\n", value.value.str, info->ident);
|
|
|
|
|
} else {
|
|
|
|
|
value.format = vpiBinStrVal;
|
|
|
|
|
vpi_get_value(info->item, &value);
|
2000-04-09 06:18:16 +02:00
|
|
|
fprintf(dump_file, "b%s %s\n",
|
|
|
|
|
truncate_bitvec(value.value.str),
|
|
|
|
|
info->ident);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
static void show_this_item_x(struct vcd_info*info)
|
|
|
|
|
{
|
2003-02-12 06:28:01 +01:00
|
|
|
if (vpi_get(vpiType, info->item) == vpiRealVar) {
|
|
|
|
|
/* Some tools dump nothing here...? */
|
|
|
|
|
fprintf(dump_file, "rNaN %s\n", info->ident);
|
|
|
|
|
} else if (vpi_get(vpiSize, info->item) == 1) {
|
2001-10-14 20:32:06 +02:00
|
|
|
fprintf(dump_file, "x%s\n", info->ident);
|
|
|
|
|
} else {
|
|
|
|
|
fprintf(dump_file, "bx %s\n", info->ident);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2000-04-09 06:18:16 +02:00
|
|
|
/*
|
2001-09-30 07:18:46 +02:00
|
|
|
* managed qsorted list of scope names for duplicates bsearching
|
2000-04-09 06:18:16 +02:00
|
|
|
*/
|
|
|
|
|
|
2003-02-11 06:21:33 +01:00
|
|
|
struct vcd_names_list_s vcd_tab = { 0 };
|
2000-01-20 07:04:55 +01:00
|
|
|
|
2001-10-09 01:33:00 +02:00
|
|
|
|
|
|
|
|
static int dumpvars_status = 0; /* 0:fresh 1:cb installed, 2:callback done */
|
|
|
|
|
static unsigned long dumpvars_time;
|
|
|
|
|
inline static int dump_header_pending(void)
|
|
|
|
|
{
|
|
|
|
|
return dumpvars_status != 2;
|
|
|
|
|
}
|
|
|
|
|
|
2000-01-20 07:04:55 +01:00
|
|
|
/*
|
|
|
|
|
* This function writes out all the traced variables, whether they
|
|
|
|
|
* changed or not.
|
|
|
|
|
*/
|
|
|
|
|
static void vcd_checkpoint()
|
|
|
|
|
{
|
|
|
|
|
struct vcd_info*cur;
|
|
|
|
|
|
|
|
|
|
for (cur = vcd_list ; cur ; cur = cur->next)
|
|
|
|
|
show_this_item(cur);
|
|
|
|
|
}
|
|
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
static void vcd_checkpoint_x()
|
|
|
|
|
{
|
|
|
|
|
struct vcd_info*cur;
|
|
|
|
|
|
|
|
|
|
for (cur = vcd_list ; cur ; cur = cur->next)
|
|
|
|
|
show_this_item_x(cur);
|
|
|
|
|
}
|
|
|
|
|
|
2003-04-27 04:22:27 +02:00
|
|
|
static int variable_cb_2(p_cb_data cause)
|
1999-11-07 21:33:30 +01:00
|
|
|
{
|
2003-04-27 04:22:27 +02:00
|
|
|
struct vcd_info* info = vcd_dmp_list;
|
1999-11-07 21:33:30 +01:00
|
|
|
unsigned long now = cause->time->low;
|
2001-10-09 01:33:00 +02:00
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
if (now != vcd_cur_time) {
|
|
|
|
|
fprintf(dump_file, "#%lu\n", now);
|
|
|
|
|
vcd_cur_time = now;
|
|
|
|
|
}
|
|
|
|
|
|
2003-04-27 04:22:27 +02:00
|
|
|
do {
|
|
|
|
|
show_this_item(info);
|
|
|
|
|
info->scheduled = 0;
|
|
|
|
|
} while ((info = info->dmp_next) != 0);
|
|
|
|
|
|
|
|
|
|
vcd_dmp_list = 0;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int variable_cb_1(p_cb_data cause)
|
|
|
|
|
{
|
|
|
|
|
struct t_cb_data cb;
|
|
|
|
|
struct vcd_info*info = (struct vcd_info*)cause->user_data;
|
|
|
|
|
|
|
|
|
|
if (dump_is_off) return 0;
|
|
|
|
|
if (dump_header_pending()) return 0;
|
|
|
|
|
if (info->scheduled) return 0;
|
|
|
|
|
|
|
|
|
|
if (!vcd_dmp_list) {
|
|
|
|
|
cb = *cause;
|
|
|
|
|
cb.reason = cbReadOnlySynch;
|
|
|
|
|
cb.cb_rtn = variable_cb_2;
|
|
|
|
|
vpi_register_cb(&cb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
info->scheduled = 1;
|
|
|
|
|
info->dmp_next = vcd_dmp_list;
|
|
|
|
|
vcd_dmp_list = info;
|
1999-11-07 21:33:30 +01:00
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2001-09-30 07:18:46 +02:00
|
|
|
static int dumpvars_cb(p_cb_data cause)
|
|
|
|
|
{
|
2001-10-09 01:33:00 +02:00
|
|
|
if (dumpvars_status != 1)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
dumpvars_status = 2;
|
|
|
|
|
|
2001-09-30 07:18:46 +02:00
|
|
|
dumpvars_time = cause->time->low;
|
|
|
|
|
vcd_cur_time = dumpvars_time;
|
|
|
|
|
|
|
|
|
|
fprintf(dump_file, "$enddefinitions $end\n");
|
|
|
|
|
|
|
|
|
|
if (!dump_is_off) {
|
|
|
|
|
fprintf(dump_file, "#%lu\n", dumpvars_time);
|
|
|
|
|
fprintf(dump_file, "$dumpvars\n");
|
|
|
|
|
vcd_checkpoint();
|
|
|
|
|
fprintf(dump_file, "$end\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline static int install_dumpvars_callback(void)
|
|
|
|
|
{
|
|
|
|
|
struct t_cb_data cb;
|
|
|
|
|
static struct t_vpi_time time;
|
|
|
|
|
|
|
|
|
|
if (dumpvars_status == 1)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (dumpvars_status == 2) {
|
2003-05-15 18:51:08 +02:00
|
|
|
vpi_mcd_printf(1, "VCD Error:"
|
2001-10-14 20:32:06 +02:00
|
|
|
" $dumpvars ignored,"
|
|
|
|
|
" previously called at simtime %lu\n",
|
|
|
|
|
dumpvars_time);
|
2001-09-30 07:18:46 +02:00
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
time.type = vpiSimTime;
|
|
|
|
|
cb.time = &time;
|
|
|
|
|
cb.reason = cbReadOnlySynch;
|
|
|
|
|
cb.cb_rtn = dumpvars_cb;
|
|
|
|
|
cb.user_data = 0x0;
|
|
|
|
|
cb.obj = 0x0;
|
|
|
|
|
|
|
|
|
|
vpi_register_cb(&cb);
|
|
|
|
|
|
|
|
|
|
dumpvars_status = 1;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2001-06-21 06:15:22 +02:00
|
|
|
static int sys_dumpoff_calltf(char*name)
|
|
|
|
|
{
|
2001-10-14 20:32:06 +02:00
|
|
|
s_vpi_time now;
|
|
|
|
|
|
|
|
|
|
if (dump_is_off)
|
|
|
|
|
return 0;
|
|
|
|
|
|
2001-06-21 06:15:22 +02:00
|
|
|
dump_is_off = 1;
|
2001-10-14 20:32:06 +02:00
|
|
|
|
|
|
|
|
if (dump_file == 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (dump_header_pending())
|
|
|
|
|
return 0;
|
|
|
|
|
|
2002-12-21 01:55:57 +01:00
|
|
|
now.type = vpiSimTime;
|
2001-10-14 20:32:06 +02:00
|
|
|
vpi_get_time(0, &now);
|
|
|
|
|
if (now.low > vcd_cur_time)
|
|
|
|
|
fprintf(dump_file, "#%u\n", now.low);
|
|
|
|
|
vcd_cur_time = now.low;
|
|
|
|
|
|
|
|
|
|
fprintf(dump_file, "$dumpoff\n");
|
|
|
|
|
vcd_checkpoint_x();
|
|
|
|
|
fprintf(dump_file, "$end\n");
|
|
|
|
|
|
2001-06-21 06:15:22 +02:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int sys_dumpon_calltf(char*name)
|
|
|
|
|
{
|
2001-09-30 07:18:46 +02:00
|
|
|
s_vpi_time now;
|
2001-10-14 20:32:06 +02:00
|
|
|
|
|
|
|
|
if (!dump_is_off)
|
|
|
|
|
return 0;
|
|
|
|
|
|
2001-06-21 06:15:22 +02:00
|
|
|
dump_is_off = 0;
|
2001-09-30 07:18:46 +02:00
|
|
|
|
|
|
|
|
if (dump_file == 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
2001-10-09 01:33:00 +02:00
|
|
|
if (dump_header_pending())
|
|
|
|
|
return 0;
|
|
|
|
|
|
2002-12-21 01:55:57 +01:00
|
|
|
now.type = vpiSimTime;
|
2001-09-30 07:18:46 +02:00
|
|
|
vpi_get_time(0, &now);
|
2001-10-14 20:32:06 +02:00
|
|
|
if (now.low > vcd_cur_time)
|
2001-09-30 07:18:46 +02:00
|
|
|
fprintf(dump_file, "#%u\n", now.low);
|
2001-10-14 20:32:06 +02:00
|
|
|
vcd_cur_time = now.low;
|
|
|
|
|
|
|
|
|
|
fprintf(dump_file, "$dumpon\n");
|
|
|
|
|
vcd_checkpoint();
|
|
|
|
|
fprintf(dump_file, "$end\n");
|
2001-09-30 07:18:46 +02:00
|
|
|
|
2001-06-21 06:15:22 +02:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
static int sys_dumpall_calltf(char*name)
|
|
|
|
|
{
|
2000-01-20 07:04:55 +01:00
|
|
|
s_vpi_time now;
|
2000-07-31 05:34:31 +02:00
|
|
|
|
|
|
|
|
if (dump_file == 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
2001-10-09 01:33:00 +02:00
|
|
|
if (dump_header_pending())
|
|
|
|
|
return 0;
|
|
|
|
|
|
2002-12-21 01:55:57 +01:00
|
|
|
now.type = vpiSimTime;
|
2000-01-20 07:04:55 +01:00
|
|
|
vpi_get_time(0, &now);
|
2001-10-14 20:32:06 +02:00
|
|
|
if (now.low > vcd_cur_time)
|
|
|
|
|
fprintf(dump_file, "#%u\n", now.low);
|
2000-01-20 07:04:55 +01:00
|
|
|
vcd_cur_time = now.low;
|
2001-10-14 20:32:06 +02:00
|
|
|
|
|
|
|
|
fprintf(dump_file, "$dumpall\n");
|
2000-01-20 07:04:55 +01:00
|
|
|
vcd_checkpoint();
|
2001-10-14 20:32:06 +02:00
|
|
|
fprintf(dump_file, "$end\n");
|
2000-01-20 07:04:55 +01:00
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2001-01-22 21:58:31 +01:00
|
|
|
static void open_dumpfile(const char*path)
|
|
|
|
|
{
|
2001-01-23 19:50:26 +01:00
|
|
|
dump_file = fopen(path, "w");
|
|
|
|
|
|
2001-01-22 21:58:31 +01:00
|
|
|
if (dump_file == 0) {
|
2003-05-15 18:51:08 +02:00
|
|
|
vpi_mcd_printf(1,
|
2001-10-14 20:32:06 +02:00
|
|
|
"VCD Error: Unable to open %s for output.\n",
|
|
|
|
|
path);
|
2001-01-22 21:58:31 +01:00
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
int prec = vpi_get(vpiTimePrecision, 0);
|
|
|
|
|
unsigned scale = 1;
|
|
|
|
|
unsigned udx = 0;
|
|
|
|
|
time_t walltime;
|
|
|
|
|
|
2003-05-15 18:51:08 +02:00
|
|
|
vpi_mcd_printf(1,
|
2001-10-15 03:50:23 +02:00
|
|
|
"VCD info: dumpfile %s opened for output.\n",
|
|
|
|
|
path);
|
|
|
|
|
|
2001-01-22 21:58:31 +01:00
|
|
|
time(&walltime);
|
|
|
|
|
|
|
|
|
|
assert(prec >= -15);
|
|
|
|
|
while (prec < 0) {
|
|
|
|
|
udx += 1;
|
|
|
|
|
prec += 3;
|
|
|
|
|
}
|
|
|
|
|
while (prec > 0) {
|
|
|
|
|
scale *= 10;
|
|
|
|
|
prec -= 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fprintf(dump_file, "$date\n");
|
|
|
|
|
fprintf(dump_file, "\t%s",asctime(localtime(&walltime)));
|
|
|
|
|
fprintf(dump_file, "$end\n");
|
|
|
|
|
fprintf(dump_file, "$version\n");
|
|
|
|
|
fprintf(dump_file, "\tIcarus Verilog\n");
|
|
|
|
|
fprintf(dump_file, "$end\n");
|
|
|
|
|
fprintf(dump_file, "$timescale\n");
|
|
|
|
|
fprintf(dump_file, "\t%u%s\n", scale, units_names[udx]);
|
|
|
|
|
fprintf(dump_file, "$end\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
static int sys_dumpfile_calltf(char*name)
|
|
|
|
|
{
|
|
|
|
|
char*path;
|
|
|
|
|
|
|
|
|
|
vpiHandle sys = vpi_handle(vpiSysTfCall, 0);
|
|
|
|
|
vpiHandle argv = vpi_iterate(vpiArgument, sys);
|
2001-10-14 20:32:06 +02:00
|
|
|
vpiHandle item;
|
1999-11-07 21:33:30 +01:00
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
if (argv && (item = vpi_scan(argv))) {
|
1999-11-07 21:33:30 +01:00
|
|
|
s_vpi_value value;
|
|
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
if (vpi_get(vpiType, item) != vpiConstant
|
|
|
|
|
|| vpi_get(vpiConstType, item) != vpiStringConst) {
|
2003-05-15 18:51:08 +02:00
|
|
|
vpi_mcd_printf(1,
|
2001-10-14 20:32:06 +02:00
|
|
|
"VCD Error:"
|
|
|
|
|
" %s parameter must be a string constant\n",
|
|
|
|
|
name);
|
1999-11-07 21:33:30 +01:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
value.format = vpiStringVal;
|
|
|
|
|
vpi_get_value(item, &value);
|
|
|
|
|
path = strdup(value.value.str);
|
|
|
|
|
|
|
|
|
|
vpi_free_object(argv);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
path = strdup("dumpfile.vcd");
|
|
|
|
|
}
|
|
|
|
|
|
2002-11-17 23:28:42 +01:00
|
|
|
if (dump_file) {
|
|
|
|
|
fclose(dump_file);
|
|
|
|
|
dump_file = 0;
|
|
|
|
|
}
|
|
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
assert(dump_file == 0);
|
2001-01-22 21:58:31 +01:00
|
|
|
open_dumpfile(path);
|
1999-11-07 21:33:30 +01:00
|
|
|
|
|
|
|
|
free(path);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
static void scan_item(unsigned depth, vpiHandle item, int skip)
|
1999-11-07 21:33:30 +01:00
|
|
|
{
|
|
|
|
|
struct t_cb_data cb;
|
2001-10-14 20:32:06 +02:00
|
|
|
struct vcd_info* info;
|
1999-11-07 21:33:30 +01:00
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
const char* type;
|
2001-10-15 03:50:23 +02:00
|
|
|
const char* name;
|
2001-10-14 20:32:06 +02:00
|
|
|
const char* ident;
|
|
|
|
|
int nexus_id;
|
1999-11-07 21:33:30 +01:00
|
|
|
|
2002-07-12 04:08:10 +02:00
|
|
|
/* list of types to iterate upon */
|
2002-07-12 04:10:20 +02:00
|
|
|
int i;
|
|
|
|
|
static int types[] = {
|
2002-07-12 19:02:38 +02:00
|
|
|
/* Value */
|
|
|
|
|
vpiNet,
|
|
|
|
|
vpiReg,
|
2002-07-17 07:13:43 +02:00
|
|
|
vpiVariables,
|
2002-07-12 04:08:10 +02:00
|
|
|
/* Scope */
|
|
|
|
|
vpiFunction,
|
|
|
|
|
vpiModule,
|
|
|
|
|
vpiNamedBegin,
|
|
|
|
|
vpiNamedFork,
|
|
|
|
|
vpiTask,
|
|
|
|
|
-1
|
|
|
|
|
};
|
|
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
switch (vpi_get(vpiType, item)) {
|
2001-10-15 03:50:23 +02:00
|
|
|
|
2002-05-10 18:00:16 +02:00
|
|
|
case vpiMemory:
|
|
|
|
|
/* don't know how to watch memories. */
|
|
|
|
|
break;
|
|
|
|
|
|
2002-05-23 03:07:26 +02:00
|
|
|
case vpiNamedEvent:
|
|
|
|
|
/* There is nothing in named events to dump. */
|
|
|
|
|
break;
|
|
|
|
|
|
2001-10-15 03:50:23 +02:00
|
|
|
case vpiNet: type = "wire"; if(0){
|
2002-06-21 06:59:35 +02:00
|
|
|
case vpiIntegerVar:
|
2002-07-17 07:13:43 +02:00
|
|
|
case vpiTimeVar:
|
2001-10-15 03:50:23 +02:00
|
|
|
case vpiReg: type = "reg"; }
|
|
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
if (skip)
|
|
|
|
|
break;
|
|
|
|
|
|
2001-10-15 03:50:23 +02:00
|
|
|
name = vpi_get_str(vpiName, item);
|
2001-10-14 20:32:06 +02:00
|
|
|
|
|
|
|
|
nexus_id = vpi_get(_vpiNexusId, item);
|
2001-10-15 03:50:23 +02:00
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
if (nexus_id) {
|
|
|
|
|
ident = find_nexus_ident(nexus_id);
|
|
|
|
|
} else {
|
|
|
|
|
ident = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!ident) {
|
|
|
|
|
ident = strdup(vcdid);
|
|
|
|
|
gen_new_vcd_id();
|
|
|
|
|
|
|
|
|
|
if (nexus_id)
|
|
|
|
|
set_nexus_ident(nexus_id, ident);
|
2001-09-30 07:18:46 +02:00
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
info = malloc(sizeof(*info));
|
1999-11-28 01:56:08 +01:00
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
info->time.type = vpiSimTime;
|
|
|
|
|
info->item = item;
|
|
|
|
|
info->ident = ident;
|
2003-04-27 04:22:27 +02:00
|
|
|
info->scheduled = 0;
|
2001-09-30 07:18:46 +02:00
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
cb.time = &info->time;
|
|
|
|
|
cb.user_data = (char*)info;
|
2001-10-25 06:19:53 +02:00
|
|
|
cb.value = NULL;
|
2001-10-14 20:32:06 +02:00
|
|
|
cb.obj = item;
|
|
|
|
|
cb.reason = cbValueChange;
|
2003-04-27 04:22:27 +02:00
|
|
|
cb.cb_rtn = variable_cb_1;
|
|
|
|
|
|
2001-09-30 07:18:46 +02:00
|
|
|
|
2003-04-27 04:22:27 +02:00
|
|
|
info->next = vcd_list;
|
|
|
|
|
info->dmp_next = 0;
|
2001-10-14 20:32:06 +02:00
|
|
|
vcd_list = info;
|
2001-09-30 07:18:46 +02:00
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
info->cb = vpi_register_cb(&cb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fprintf(dump_file, "$var %s %u %s %s $end\n",
|
|
|
|
|
type, vpi_get(vpiSize, item), ident,
|
2001-10-15 03:50:23 +02:00
|
|
|
name);
|
2001-10-14 20:32:06 +02:00
|
|
|
break;
|
2003-02-11 06:21:33 +01:00
|
|
|
|
|
|
|
|
case vpiRealVar:
|
|
|
|
|
|
|
|
|
|
if (skip)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
/* Declare the variable in the VCD file. */
|
|
|
|
|
name = vpi_get_str(vpiName, item);
|
|
|
|
|
ident = strdup(vcdid);
|
|
|
|
|
gen_new_vcd_id();
|
|
|
|
|
fprintf(dump_file, "$var real 1 %s %s $end\n",
|
|
|
|
|
ident, name);
|
|
|
|
|
|
|
|
|
|
/* Add a callback for the variable. */
|
|
|
|
|
info = malloc(sizeof(*info));
|
|
|
|
|
|
|
|
|
|
info->time.type = vpiSimTime;
|
|
|
|
|
info->item = item;
|
|
|
|
|
info->ident = ident;
|
2003-04-27 04:22:27 +02:00
|
|
|
info->scheduled = 0;
|
2003-02-11 06:21:33 +01:00
|
|
|
|
|
|
|
|
cb.time = &info->time;
|
|
|
|
|
cb.user_data = (char*)info;
|
|
|
|
|
cb.value = NULL;
|
|
|
|
|
cb.obj = item;
|
|
|
|
|
cb.reason = cbValueChange;
|
2003-04-27 04:22:27 +02:00
|
|
|
cb.cb_rtn = variable_cb_1;
|
2003-02-11 06:21:33 +01:00
|
|
|
|
|
|
|
|
info->next = vcd_list;
|
2003-04-27 04:22:27 +02:00
|
|
|
info->dmp_next = 0;
|
2003-02-11 06:21:33 +01:00
|
|
|
vcd_list = info;
|
|
|
|
|
|
|
|
|
|
info->cb = vpi_register_cb(&cb);
|
2003-04-27 04:22:27 +02:00
|
|
|
|
2003-02-11 06:21:33 +01:00
|
|
|
break;
|
|
|
|
|
|
2001-10-15 03:50:23 +02:00
|
|
|
case vpiModule: type = "module"; if(0){
|
|
|
|
|
case vpiNamedBegin: type = "begin"; }if(0){
|
|
|
|
|
case vpiTask: type = "task"; }if(0){
|
|
|
|
|
case vpiFunction: type = "function"; }if(0){
|
|
|
|
|
case vpiNamedFork: type = "fork"; }
|
|
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
if (depth > 0) {
|
|
|
|
|
int nskip;
|
|
|
|
|
vpiHandle argv;
|
|
|
|
|
|
|
|
|
|
const char* fullname =
|
|
|
|
|
vpi_get_str(vpiFullName, item);
|
|
|
|
|
|
2003-05-15 18:51:08 +02:00
|
|
|
#if 0
|
|
|
|
|
vpi_mcd_printf(1,
|
2001-10-14 20:32:06 +02:00
|
|
|
"VCD info:"
|
|
|
|
|
" scanning scope %s, %u levels\n",
|
|
|
|
|
fullname, depth);
|
2003-05-15 18:51:08 +02:00
|
|
|
#endif
|
2003-02-11 06:21:33 +01:00
|
|
|
nskip = 0 != vcd_names_search(&vcd_tab, fullname);
|
2001-10-14 20:32:06 +02:00
|
|
|
|
|
|
|
|
if (!nskip)
|
2003-02-11 06:21:33 +01:00
|
|
|
vcd_names_add(&vcd_tab, fullname);
|
2001-10-14 20:32:06 +02:00
|
|
|
else
|
2003-05-15 18:51:08 +02:00
|
|
|
vpi_mcd_printf(1,
|
2001-10-14 20:32:06 +02:00
|
|
|
"VCD warning:"
|
|
|
|
|
" ignoring signals"
|
|
|
|
|
" in previously scanned scope %s\n",
|
|
|
|
|
fullname);
|
2001-10-15 03:50:23 +02:00
|
|
|
|
|
|
|
|
name = vpi_get_str(vpiName, item);
|
|
|
|
|
|
|
|
|
|
fprintf(dump_file, "$scope %s %s $end\n", type, name);
|
2002-07-12 04:08:10 +02:00
|
|
|
|
|
|
|
|
for (i=0; types[i]>0; i++) {
|
|
|
|
|
vpiHandle hand;
|
|
|
|
|
argv = vpi_iterate(types[i], item);
|
|
|
|
|
while (argv && (hand = vpi_scan(argv))) {
|
|
|
|
|
scan_item(depth-1, hand, nskip);
|
2001-07-16 20:53:16 +02:00
|
|
|
}
|
2000-04-09 06:18:16 +02:00
|
|
|
}
|
2001-10-15 03:50:23 +02:00
|
|
|
|
|
|
|
|
fprintf(dump_file, "$upscope $end\n");
|
1999-11-07 21:33:30 +01:00
|
|
|
}
|
2001-10-14 20:32:06 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
2003-05-15 18:51:08 +02:00
|
|
|
vpi_mcd_printf(1,
|
2001-10-14 20:32:06 +02:00
|
|
|
"VCD Error: $dumpvars: Unsupported parameter "
|
|
|
|
|
"type (%d)\n", vpi_get(vpiType, item));
|
1999-11-07 21:33:30 +01:00
|
|
|
}
|
1999-11-28 01:56:08 +01:00
|
|
|
}
|
|
|
|
|
|
2001-10-15 03:50:23 +02:00
|
|
|
static int draw_scope(vpiHandle item)
|
|
|
|
|
{
|
|
|
|
|
int depth;
|
2001-10-26 04:29:10 +02:00
|
|
|
const char *name;
|
2001-10-15 03:50:23 +02:00
|
|
|
char *type;
|
|
|
|
|
|
|
|
|
|
vpiHandle scope = vpi_handle(vpiScope, item);
|
|
|
|
|
if (!scope)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
depth = 1 + draw_scope(scope);
|
|
|
|
|
name = vpi_get_str(vpiName, scope);
|
|
|
|
|
|
|
|
|
|
switch (vpi_get(vpiType, item)) {
|
|
|
|
|
case vpiNamedBegin: type = "begin"; break;
|
|
|
|
|
case vpiTask: type = "task"; break;
|
|
|
|
|
case vpiFunction: type = "function"; break;
|
|
|
|
|
case vpiNamedFork: type = "fork"; break;
|
|
|
|
|
default: type = "module"; break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fprintf(dump_file, "$scope %s %s $end\n", type, name);
|
|
|
|
|
|
|
|
|
|
return depth;
|
|
|
|
|
}
|
|
|
|
|
|
2002-08-15 04:12:20 +02:00
|
|
|
/*
|
|
|
|
|
* This function is also used in sys_lxt to check the arguments of the
|
|
|
|
|
* lxt variant of $dumpvars.
|
|
|
|
|
*/
|
|
|
|
|
int sys_vcd_dumpvars_compiletf(char*name)
|
|
|
|
|
{
|
|
|
|
|
vpiHandle sys = vpi_handle(vpiSysTfCall, 0);
|
|
|
|
|
vpiHandle argv = vpi_iterate(vpiArgument, sys);
|
|
|
|
|
vpiHandle tmp;
|
|
|
|
|
|
|
|
|
|
if (argv == 0)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
tmp = vpi_scan(argv);
|
|
|
|
|
assert(tmp);
|
|
|
|
|
|
|
|
|
|
switch (vpi_get(vpiType, tmp)) {
|
|
|
|
|
case vpiConstant:
|
|
|
|
|
if (vpi_get(vpiConstType, tmp) == vpiStringConst) {
|
|
|
|
|
vpi_printf("ERROR: %s argument must be "
|
|
|
|
|
"a number constant.\n", name);
|
|
|
|
|
vpi_control(vpiFinish, 1);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case vpiNet:
|
|
|
|
|
case vpiReg:
|
|
|
|
|
case vpiIntegerVar:
|
|
|
|
|
case vpiMemoryWord:
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
vpi_printf("ERROR: %s argument must be "
|
|
|
|
|
"a number constant.\n", name);
|
|
|
|
|
vpi_control(vpiFinish, 1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
vpi_free_object(argv);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
1999-11-28 01:56:08 +01:00
|
|
|
static int sys_dumpvars_calltf(char*name)
|
|
|
|
|
{
|
2000-06-03 04:22:15 +02:00
|
|
|
unsigned depth;
|
|
|
|
|
s_vpi_value value;
|
2001-10-14 20:32:06 +02:00
|
|
|
vpiHandle item = 0;
|
1999-11-28 01:56:08 +01:00
|
|
|
vpiHandle sys = vpi_handle(vpiSysTfCall, 0);
|
2001-09-30 07:18:46 +02:00
|
|
|
vpiHandle argv;
|
1999-11-28 01:56:08 +01:00
|
|
|
|
2000-07-31 05:34:31 +02:00
|
|
|
if (dump_file == 0) {
|
2001-01-22 21:58:31 +01:00
|
|
|
open_dumpfile("dumpfile.vcd");
|
2001-10-14 20:32:06 +02:00
|
|
|
if (dump_file == 0)
|
2001-01-22 21:58:31 +01:00
|
|
|
return 0;
|
2000-07-31 05:34:31 +02:00
|
|
|
}
|
|
|
|
|
|
2001-09-30 07:18:46 +02:00
|
|
|
if (install_dumpvars_callback()) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
argv = vpi_iterate(vpiArgument, sys);
|
|
|
|
|
|
2001-10-14 20:32:06 +02:00
|
|
|
depth = 0;
|
|
|
|
|
if (argv && (item = vpi_scan(argv)))
|
|
|
|
|
switch (vpi_get(vpiType, item)) {
|
|
|
|
|
case vpiConstant:
|
|
|
|
|
case vpiNet:
|
|
|
|
|
case vpiReg:
|
2002-06-21 06:59:35 +02:00
|
|
|
case vpiIntegerVar:
|
2001-10-14 20:32:06 +02:00
|
|
|
case vpiMemoryWord:
|
|
|
|
|
value.format = vpiIntVal;
|
|
|
|
|
vpi_get_value(item, &value);
|
|
|
|
|
depth = value.value.integer;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!depth)
|
|
|
|
|
depth = 10000;
|
|
|
|
|
|
|
|
|
|
if (!argv) {
|
2001-10-15 03:50:23 +02:00
|
|
|
// $dumpvars;
|
|
|
|
|
// search for the toplevel module
|
|
|
|
|
vpiHandle parent = vpi_handle(vpiScope, sys);
|
|
|
|
|
while (parent) {
|
|
|
|
|
item = parent;
|
|
|
|
|
parent = vpi_handle(vpiScope, item);
|
|
|
|
|
}
|
2000-06-03 04:22:15 +02:00
|
|
|
|
2001-10-15 03:50:23 +02:00
|
|
|
} else if (!item || !(item = vpi_scan(argv))) {
|
|
|
|
|
// $dumpvars(level);
|
|
|
|
|
// $dumpvars();
|
|
|
|
|
// dump the current scope
|
2001-10-14 20:32:06 +02:00
|
|
|
item = vpi_handle(vpiScope, sys);
|
2001-10-15 03:50:23 +02:00
|
|
|
argv = 0x0;
|
2001-10-14 20:32:06 +02:00
|
|
|
}
|
2000-01-13 05:48:50 +01:00
|
|
|
|
2001-10-15 03:50:23 +02:00
|
|
|
for ( ; item; item = argv ? vpi_scan(argv) : 0x0) {
|
|
|
|
|
|
|
|
|
|
int dep = draw_scope(item);
|
|
|
|
|
|
2003-02-11 06:21:33 +01:00
|
|
|
vcd_names_sort(&vcd_tab);
|
2001-10-14 20:32:06 +02:00
|
|
|
scan_item(depth, item, 0);
|
2001-10-15 03:50:23 +02:00
|
|
|
|
|
|
|
|
while (dep--) {
|
|
|
|
|
fprintf(dump_file, "$upscope $end\n");
|
|
|
|
|
}
|
2001-10-14 20:32:06 +02:00
|
|
|
}
|
1999-11-07 21:33:30 +01:00
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void sys_vcd_register()
|
|
|
|
|
{
|
|
|
|
|
s_vpi_systf_data tf_data;
|
|
|
|
|
|
|
|
|
|
tf_data.type = vpiSysTask;
|
|
|
|
|
tf_data.tfname = "$dumpall";
|
|
|
|
|
tf_data.calltf = sys_dumpall_calltf;
|
|
|
|
|
tf_data.compiletf = 0;
|
|
|
|
|
tf_data.sizetf = 0;
|
|
|
|
|
tf_data.user_data = "$dumpall";
|
|
|
|
|
vpi_register_systf(&tf_data);
|
|
|
|
|
|
2001-06-21 06:15:22 +02:00
|
|
|
tf_data.type = vpiSysTask;
|
|
|
|
|
tf_data.tfname = "$dumpoff";
|
|
|
|
|
tf_data.calltf = sys_dumpoff_calltf;
|
|
|
|
|
tf_data.compiletf = 0;
|
|
|
|
|
tf_data.sizetf = 0;
|
|
|
|
|
tf_data.user_data = "$dumpoff";
|
|
|
|
|
vpi_register_systf(&tf_data);
|
|
|
|
|
|
|
|
|
|
tf_data.type = vpiSysTask;
|
|
|
|
|
tf_data.tfname = "$dumpon";
|
|
|
|
|
tf_data.calltf = sys_dumpon_calltf;
|
|
|
|
|
tf_data.compiletf = 0;
|
|
|
|
|
tf_data.sizetf = 0;
|
|
|
|
|
tf_data.user_data = "$dumpon";
|
|
|
|
|
vpi_register_systf(&tf_data);
|
|
|
|
|
|
1999-11-07 21:33:30 +01:00
|
|
|
tf_data.type = vpiSysTask;
|
|
|
|
|
tf_data.tfname = "$dumpfile";
|
|
|
|
|
tf_data.calltf = sys_dumpfile_calltf;
|
|
|
|
|
tf_data.compiletf = 0;
|
|
|
|
|
tf_data.sizetf = 0;
|
|
|
|
|
tf_data.user_data = "$dumpfile";
|
|
|
|
|
vpi_register_systf(&tf_data);
|
|
|
|
|
|
|
|
|
|
tf_data.type = vpiSysTask;
|
|
|
|
|
tf_data.tfname = "$dumpvars";
|
|
|
|
|
tf_data.calltf = sys_dumpvars_calltf;
|
2002-08-15 04:12:20 +02:00
|
|
|
tf_data.compiletf = sys_vcd_dumpvars_compiletf;
|
1999-11-07 21:33:30 +01:00
|
|
|
tf_data.sizetf = 0;
|
|
|
|
|
tf_data.user_data = "$dumpvars";
|
|
|
|
|
vpi_register_systf(&tf_data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* $Log: sys_vcd.c,v $
|
2003-08-06 20:24:55 +02:00
|
|
|
* Revision 1.45 2003/08/06 18:24:55 steve
|
|
|
|
|
* Fix error truncating bitvec in output.
|
|
|
|
|
*
|
2003-05-15 18:51:08 +02:00
|
|
|
* Revision 1.44 2003/05/15 16:51:09 steve
|
|
|
|
|
* Arrange for mcd id=00_00_00_01 to go to stdout
|
|
|
|
|
* as well as a user specified log file, set log
|
|
|
|
|
* file to buffer lines.
|
|
|
|
|
*
|
|
|
|
|
* Add vpi_flush function, and clear up some cunfused
|
|
|
|
|
* return codes from other vpi functions.
|
|
|
|
|
*
|
|
|
|
|
* Adjust $display and vcd/lxt messages to use the
|
|
|
|
|
* standard output/log file.
|
|
|
|
|
*
|
2003-04-27 04:22:27 +02:00
|
|
|
* Revision 1.43 2003/04/27 02:22:28 steve
|
|
|
|
|
* Capture VCD dump value in the rosync time period.
|
|
|
|
|
*
|
2003-02-12 06:28:01 +01:00
|
|
|
* Revision 1.42 2003/02/12 05:28:01 steve
|
|
|
|
|
* Set dumpoff of real variables to NaN.
|
|
|
|
|
*
|
2003-02-11 06:21:33 +01:00
|
|
|
* Revision 1.41 2003/02/11 05:21:33 steve
|
|
|
|
|
* Support dump of vpiRealVar objects.
|
|
|
|
|
*
|
2002-12-21 01:55:57 +01:00
|
|
|
* Revision 1.40 2002/12/21 00:55:58 steve
|
|
|
|
|
* The $time system task returns the integer time
|
|
|
|
|
* scaled to the local units. Change the internal
|
|
|
|
|
* implementation of vpiSystemTime the $time functions
|
|
|
|
|
* to properly account for this. Also add $simtime
|
|
|
|
|
* to get the simulation time.
|
|
|
|
|
*
|
2002-11-17 23:28:42 +01:00
|
|
|
* Revision 1.39 2002/11/17 22:28:42 steve
|
|
|
|
|
* Close old file if $dumpfile is called again.
|
|
|
|
|
*
|
2002-11-14 23:43:58 +01:00
|
|
|
* Revision 1.38 2002/11/14 22:43:58 steve
|
|
|
|
|
* Save vpiFullName results.
|
|
|
|
|
*
|
2002-08-15 04:12:20 +02:00
|
|
|
* Revision 1.37 2002/08/15 02:12:20 steve
|
|
|
|
|
* add dumpvars_compiletf to check first argument.
|
|
|
|
|
*
|
2002-08-12 03:34:58 +02:00
|
|
|
* Revision 1.36 2002/08/12 01:35:05 steve
|
|
|
|
|
* conditional ident string using autoconfig.
|
|
|
|
|
*
|
2002-07-17 07:13:43 +02:00
|
|
|
* Revision 1.35 2002/07/17 05:13:43 steve
|
|
|
|
|
* Implementation of vpi_handle_by_name, and
|
|
|
|
|
* add the vpiVariables iterator.
|
|
|
|
|
*
|
2002-07-12 19:09:21 +02:00
|
|
|
* Revision 1.34 2002/07/12 17:09:21 steve
|
|
|
|
|
* Remember to scan IntegerVars.
|
|
|
|
|
*
|
2002-07-12 19:02:38 +02:00
|
|
|
* Revision 1.33 2002/07/12 17:02:38 steve
|
|
|
|
|
* Scan scope objects before subscopes.
|
|
|
|
|
*
|
2002-07-12 04:10:20 +02:00
|
|
|
* Revision 1.32 2002/07/12 02:10:20 steve
|
|
|
|
|
* Make types array static, not on stack.
|
|
|
|
|
*
|
2002-07-12 04:08:10 +02:00
|
|
|
* Revision 1.31 2002/07/12 02:08:10 steve
|
|
|
|
|
* Eliminate use of vpiInternalScope.
|
|
|
|
|
*
|
2002-06-21 06:59:35 +02:00
|
|
|
* Revision 1.30 2002/06/21 04:59:36 steve
|
|
|
|
|
* Carry integerness throughout the compilation.
|
|
|
|
|
*
|
2002-05-23 03:07:26 +02:00
|
|
|
* Revision 1.29 2002/05/23 01:07:26 steve
|
|
|
|
|
* Ignore Named events in vcd signal scan.
|
|
|
|
|
*
|
2002-05-10 18:00:16 +02:00
|
|
|
* Revision 1.28 2002/05/10 16:00:16 steve
|
|
|
|
|
* ignore vpiMemory objects in vcd dumper.
|
|
|
|
|
*
|
2002-04-06 22:25:45 +02:00
|
|
|
* Revision 1.27 2002/04/06 20:25:45 steve
|
|
|
|
|
* cbValueChange automatically replays.
|
|
|
|
|
*
|
2001-10-26 04:29:10 +02:00
|
|
|
* Revision 1.26 2001/10/26 02:29:10 steve
|
|
|
|
|
* const/non-const warnings. (Stephan Boettcher)
|
|
|
|
|
*
|
2001-10-25 06:19:53 +02:00
|
|
|
* Revision 1.25 2001/10/25 04:19:53 steve
|
|
|
|
|
* VPI support for callback to return values.
|
|
|
|
|
*
|
2001-10-15 03:50:23 +02:00
|
|
|
* Revision 1.24 2001/10/15 01:50:23 steve
|
|
|
|
|
* Include scope information in VCD output.
|
|
|
|
|
*
|
2001-10-14 20:32:06 +02:00
|
|
|
* Revision 1.23 2001/10/14 18:32:06 steve
|
|
|
|
|
* More coverage of $dump related commands.
|
|
|
|
|
*
|
2001-10-09 01:33:00 +02:00
|
|
|
* Revision 1.22 2001/10/08 23:33:00 steve
|
|
|
|
|
* Fix pr283: signal values before enddefinitions in vcd. (Stephan Boettcher)
|
|
|
|
|
*
|
2001-09-30 07:18:46 +02:00
|
|
|
* Revision 1.21 2001/09/30 05:18:46 steve
|
|
|
|
|
* Reduce VCD output by removing duplicates. (Stephan Boettcher)
|
|
|
|
|
*
|
2001-07-25 05:10:48 +02:00
|
|
|
* Revision 1.20 2001/07/25 03:10:50 steve
|
|
|
|
|
* Create a config.h.in file to hold all the config
|
|
|
|
|
* junk, and support gcc 3.0. (Stephan Boettcher)
|
|
|
|
|
*
|
2001-07-16 20:53:16 +02:00
|
|
|
* Revision 1.19 2001/07/16 18:53:16 steve
|
|
|
|
|
* Cut off scope iteration when depth runs out.
|
|
|
|
|
*
|
2001-06-29 02:42:39 +02:00
|
|
|
* Revision 1.18 2001/06/29 00:42:39 steve
|
|
|
|
|
* Get a private copy of the object name.
|
|
|
|
|
*
|
2001-06-21 06:15:22 +02:00
|
|
|
* Revision 1.17 2001/06/21 04:15:22 steve
|
|
|
|
|
* Add dumpon and dumpoff (Stephan Boettcher)
|
|
|
|
|
*
|
2001-01-23 19:50:26 +01:00
|
|
|
* Revision 1.16 2001/01/23 18:50:26 steve
|
|
|
|
|
* Forgot to actually *open* the VCD output.
|
|
|
|
|
*
|
2001-01-22 21:58:31 +01:00
|
|
|
* Revision 1.15 2001/01/22 20:58:31 steve
|
|
|
|
|
* Support default dumpfiles.
|
|
|
|
|
*
|
2001-01-01 09:10:35 +01:00
|
|
|
* Revision 1.14 2001/01/01 08:10:35 steve
|
|
|
|
|
* Handle function scopes in dumpvars scn (PR#95)
|
1999-11-07 21:33:30 +01:00
|
|
|
*/
|
|
|
|
|
|