diff --git a/vpi/sys_display.c b/vpi/sys_display.c index 7d07c44b0..a9d10a800 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -1615,6 +1615,12 @@ static PLI_INT32 sys_end_of_compile(p_cb_data cb_data) return 0; } +static PLI_INT32 sys_end_of_simulation(p_cb_data cb_data) +{ + free(timeformat_info.suff); + return 0; +} + static PLI_INT32 sys_timeformat_compiletf(PLI_BYTE8*name) { vpiHandle callh = vpi_handle(vpiSysTfCall, 0); @@ -2166,7 +2172,13 @@ void sys_display_register() vpi_register_systf(&tf_data); cb_data.reason = cbEndOfCompile; + cb_data.time = 0; cb_data.cb_rtn = sys_end_of_compile; cb_data.user_data = "system"; vpi_register_cb(&cb_data); + + cb_data.reason = cbEndOfSimulation; + cb_data.cb_rtn = sys_end_of_simulation; + cb_data.user_data = "system"; + vpi_register_cb(&cb_data); } diff --git a/vvp/compile.cc b/vvp/compile.cc index df0d9d16b..8fdbb5401 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -660,6 +660,7 @@ void compile_cleanup(void) sym_functors = 0; compile_island_cleanup(); + compile_array_cleanup(); if (verbose_flag) { fprintf(stderr, " ... Compiletf functions\n"); diff --git a/vvp/parse.y b/vvp/parse.y index ee8228f5c..d2a296b74 100644 --- a/vvp/parse.y +++ b/vvp/parse.y @@ -1,7 +1,7 @@ %{ /* - * Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2009 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 @@ -1015,5 +1015,6 @@ int compile_design(const char*path) } int rc = yyparse(); + fclose(yyin); return rc; }