vl2mv issue

From: Dhammika Kurumbalapitiya (dkurumba@yahoo.com)
Date: Tue Oct 28 2003 - 08:37:40 MST


Hi VIS Support Group,
 
I am trying to build and execute vl2mv on a machine with:
 
 Red Hat Linux 8.0
 Kernel 2.4.18-14
 gcc version - 3.3
 
I downloaded vis-2.0, glu-2.0 & vl2mv-2.0 source. Both vis and glu got compiled without issues but I am having trouble with vl2mv.
 
I did the following changes to get rid of compiler warnings.
 
1. Replaced <varargs.h> using <stdarg.h>
 
2. src/parser/vl_traverse.c file has the following function.
 
void vl_fprintf_stmt(va_alist)
va_dcl
{
    FILE *file;
    char *fmt;
    va_list args;
    va_start(args);
    file = va_arg(args, FILE*);
    fmt = va_arg(args, char*);
    if (PrtEnable) (void)vfprintf(file, fmt, args);
    va_end(args);
}
 
This uses K&R style and gcc 3.3 does not like it. I made the following changes.
 
void vl_fprintf_stmt(FILE *argtypeP, ...)
{
     FILE *file;
     char *fmt;
      va_list args;
      va_start(args, argtypeP);
      file = va_arg(args, FILE*);
      fmt = va_arg(args, char*);
      if (PrtEnable) (void)vfprintf(file, fmt, args);
      va_end(args);
}
 
It got built BUT when I ran it on vis/examples vl2mv crashed (i.e. Segmentation Faults). I used gdb and observed the place of crash and that was at
 
if (PrtEnable) (void)vfprintf(file, fmt, args);
 
line in the above routine. I observed that vl2mv reads the entire Verilog source file before running into this behavior. When I remove all the instantiations from the top module and all the sub modules THEN it worked. I hope this info is useful for you.
 
3. vl_write.c has a K&R style function.
void vl_put_lib(va_alist)
va_dcl
 
Converting it to ISO C is more difficult than the one in (2).
 
Could you please help me to resolve these problems.
 
Thank you very much for your time.
 
Regards
Dhammika Kurumbalapitiya

---------------------------------
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears



This archive was generated by hypermail 2.1.7 : Tue Oct 28 2003 - 08:39:26 MST