From dcfe1f0c2cf0f7d9a8e282814c4abd1e83821f56 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 27 Jul 2011 13:50:37 -0700 Subject: [PATCH] Properly define the $ivlh_attribute_event() function. Technically the sized function is not currently needed by Icarus since the SFT file handles this type of information, but lets define this so that things work correctly if we ever switch to using the standard VPI interface. Also mark this as a system defined function. --- vpi/vhdl_table.cc | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/vpi/vhdl_table.cc b/vpi/vhdl_table.cc index 7f9a79b1f..5cfb7171a 100644 --- a/vpi/vhdl_table.cc +++ b/vpi/vhdl_table.cc @@ -119,17 +119,25 @@ static PLI_INT32 ivlh_attribute_event_calltf(ICARUS_VPI_CONST PLI_BYTE8*) return 0; } +static PLI_INT32 ivlh_attribute_event_sizetf(ICARUS_VPI_CONST PLI_BYTE8*) +{ + return 1; +} + static void vhdl_register(void) { s_vpi_systf_data tf_data; + vpiHandle res; - tf_data.type = vpiSysFunc; - tf_data.tfname = "$ivlh_attribute_event"; - tf_data.calltf = ivlh_attribute_event_calltf; - tf_data.compiletf = ivlh_attribute_event_compiletf; - tf_data.sizetf = 0; - tf_data.user_data = (PLI_BYTE8 *) "$ivlh_attribute_event"; - vpi_register_systf(&tf_data); + tf_data.type = vpiSysFunc; + tf_data.sysfunctype = vpiSizedFunc; + tf_data.calltf = ivlh_attribute_event_calltf; + tf_data.compiletf = ivlh_attribute_event_compiletf; + tf_data.sizetf = ivlh_attribute_event_sizetf; + tf_data.tfname = "$ivlh_attribute_event"; + tf_data.user_data = (PLI_BYTE8 *) "$ivlh_attribute_event"; + res = vpi_register_systf(&tf_data); + vpip_make_systf_system_defined(res); } void (*vlog_startup_routines[])() = {