-
Notifications
You must be signed in to change notification settings - Fork 541
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In Windows, export VPI functions from vvp.exe (GitHub issue #395)
This is to support cocotb, who don't use our vpi_user.h and libvpi.a, instead building their own import library to directly link to vvp.
- Loading branch information
1 parent
b0b44fd
commit 159af4d
Showing
3 changed files
with
68 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2001-2019 Stephen Williams ([email protected]) | ||
* Copyright (c) 2001-2020 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -221,16 +221,13 @@ void vpip_load_module(const char*name) | |
|
||
#if defined(__MINGW32__) || defined (__CYGWIN__) | ||
void*function = ivl_dlsym(dll, "vpip_set_callback"); | ||
if (function == 0) { | ||
fprintf(stderr, "%s: no vpip_set_callback()\n", name); | ||
ivl_dlclose(dll); | ||
return; | ||
} | ||
vpip_set_callback_t set_callback = (vpip_set_callback_t)function; | ||
if (!set_callback(&vpi_routines, vpip_routines_version)) { | ||
fprintf(stderr, "Failed to link VPI module %s. Try rebuilding it with iverilog-vpi.\n", name); | ||
ivl_dlclose(dll); | ||
return; | ||
if (function) { | ||
vpip_set_callback_t set_callback = (vpip_set_callback_t)function; | ||
if (!set_callback(&vpi_routines, vpip_routines_version)) { | ||
fprintf(stderr, "Failed to link VPI module %s. Try rebuilding it with iverilog-vpi.\n", name); | ||
ivl_dlclose(dll); | ||
return; | ||
} | ||
} | ||
#endif | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
EXPORTS | ||
|
||
vpi_chk_error | ||
vpi_compare_objects | ||
vpi_control | ||
vpi_flush | ||
vpi_fopen | ||
vpi_free_object | ||
vpi_get | ||
vpi_get_delays | ||
vpi_get_file | ||
vpi_get_str | ||
vpi_get_systf_info | ||
vpi_get_time | ||
vpi_get_userdata | ||
vpi_get_value | ||
vpi_get_vlog_info | ||
vpi_handle | ||
vpi_handle_by_index | ||
vpi_handle_by_name | ||
vpi_iterate | ||
vpi_mcd_close | ||
vpi_mcd_flush | ||
vpi_mcd_name | ||
vpi_mcd_open | ||
vpi_mcd_printf | ||
vpi_mcd_vprintf | ||
vpi_printf | ||
vpi_put_delays | ||
vpi_put_userdata | ||
vpi_put_value | ||
vpi_register_cb | ||
vpi_register_systf | ||
vpi_remove_cb | ||
vpi_scan | ||
vpi_sim_control | ||
vpi_sim_vcontrol | ||
vpi_vprintf | ||
|
||
vpip_calc_clog2 | ||
vpip_count_drivers | ||
vpip_format_strength | ||
vpip_make_systf_system_defined | ||
vpip_mcd_rawwrite | ||
vpip_set_return_value |