diff --git a/verinum.cc b/verinum.cc index 7e50f5a1d..d651aaf1d 100644 --- a/verinum.cc +++ b/verinum.cc @@ -947,7 +947,7 @@ verinum operator / (const verinum&left, const verinum&right) result is signed or not. */ if (result.has_sign()) { - if (use_len <= 8*sizeof(long)) { + if (use_len <= (8*sizeof(long) - 1)) { long l = left.as_long(); long r = right.as_long(); long v = l / r; diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index 6270bb782..70217ef2d 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -549,7 +549,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip) */ if (vpi_get(vpiSize, item) > 1 || vpi_get(vpiLeftRange, item) != 0) { - fprintf(dump_file, "[%i:%i]", vpi_get(vpiLeftRange, item), + fprintf(dump_file, " [%i:%i]", vpi_get(vpiLeftRange, item), vpi_get(vpiRightRange, item)); } fprintf(dump_file, " $end\n"); @@ -833,48 +833,3 @@ void sys_vcd_register() vpi_register_systf(&tf_data); } -/* - * $Log: sys_vcd.c,v $ - * Revision 1.58 2007/03/14 04:05:51 steve - * VPI tasks take PLI_BYTE* by the standard. - * - * Revision 1.57 2006/10/30 22:45:38 steve - * Updates for Cygwin portability (pr1585922) - * - * Revision 1.56 2004/10/04 01:10:58 steve - * Clean up spurious trailing white space. - * - * Revision 1.55 2004/02/15 20:46:01 steve - * Add the $dumpflush function - * - * Revision 1.54 2004/02/15 03:17:15 steve - * dumpfile selects file at compiletf time. - * - * Revision 1.53 2004/01/21 01:22:53 steve - * Give the vip directory its own configure and vpi_config.h - * - * Revision 1.52 2003/12/19 01:27:10 steve - * Fix various unsigned compare warnings. - * - * Revision 1.51 2003/10/29 03:28:27 steve - * Add the PLU_UINT64_FMT string for formatting output. - * - * Revision 1.50 2003/10/29 03:23:12 steve - * Portably handle time format of VCD prints. - * - * Revision 1.49 2003/10/08 23:14:29 steve - * TIME_FMT does not include the % character. - * - * Revision 1.48 2003/10/02 21:30:06 steve - * Use configured TIME_FMT in vcd dump printf. - * - * Revision 1.47 2003/09/30 01:33:39 steve - * dumpers must be aware of 64bit time. - * - * Revision 1.46 2003/08/22 23:14:27 steve - * Preserve variable ranges all the way to the vpi. - * - * Revision 1.45 2003/08/06 18:24:55 steve - * Fix error truncating bitvec in output. - */ - diff --git a/vvp/vpi_scope.cc b/vvp/vpi_scope.cc index b9203118d..4eaf21060 100644 --- a/vvp/vpi_scope.cc +++ b/vvp/vpi_scope.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2003 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2007 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -328,9 +328,7 @@ compile_scope_decl(char*label, char*type, char*name, char*tname, char*parent) else if (strcmp(type,"begin") == 0) scope->base.vpi_type = &vpip_scope_begin_rt; else if (strcmp(type,"generate") == 0) - // Generate blocks are not really modules, but this is a - // hack that will work for now. - scope->base.vpi_type = &vpip_scope_module_rt; + scope->base.vpi_type = &vpip_scope_begin_rt; else { scope->base.vpi_type = &vpip_scope_module_rt; assert(0);