From 08da777b33f434b8d528553124d100ceececc9eb Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 9 Dec 2017 14:44:25 -0500 Subject: [PATCH] Tests: Fix illegal dpi return types, and other cleanups --- test_regress/t/t_dpi_accessors_macros_inc.vh | 4 ++-- test_regress/t/t_dpi_sys.v | 4 ++-- test_regress/t/t_vpi_memory.cpp | 4 ++-- test_regress/t/t_vpi_unimpl.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test_regress/t/t_dpi_accessors_macros_inc.vh b/test_regress/t/t_dpi_accessors_macros_inc.vh index 2142a3c4e..18a19b885 100644 --- a/test_regress/t/t_dpi_accessors_macros_inc.vh +++ b/test_regress/t/t_dpi_accessors_macros_inc.vh @@ -11,12 +11,12 @@ // Accessor macros, to keep stuff concise `define R_ACCESS(type_spec, name, expr) \ export "DPI-C" function name``_read; \ - function type_spec name``_read; \ + function bit type_spec name``_read; \ name``_read = (expr); \ endfunction `define W_ACCESS(type_spec, name, expr) \ - export "DPI-C" function name``_write; \ + export "DPI-C" task name``_write; \ task name``_write; \ input bit type_spec in; \ expr = in; \ diff --git a/test_regress/t/t_dpi_sys.v b/test_regress/t/t_dpi_sys.v index 3321b2f8e..173d89683 100644 --- a/test_regress/t/t_dpi_sys.v +++ b/test_regress/t/t_dpi_sys.v @@ -6,8 +6,8 @@ // Version 2.0. // Global is the most likely usage scenario -import "DPI-C" dpii_sys_task = function void \$dpii_sys (integer i); -import "DPI-C" dpii_sys_func = function int \$dpii_func (integer i); +import "DPI-C" dpii_sys_task = function void \$dpii_sys (int i); +import "DPI-C" dpii_sys_func = function int \$dpii_func (int i); module t (); diff --git a/test_regress/t/t_vpi_memory.cpp b/test_regress/t/t_vpi_memory.cpp index 07b91844a..a6277a5b7 100644 --- a/test_regress/t/t_vpi_memory.cpp +++ b/test_regress/t/t_vpi_memory.cpp @@ -63,14 +63,14 @@ unsigned int main_time = false; // Use cout to avoid issues with %d/%lx etc #define CHECK_RESULT(got, exp) \ - if ((got != exp)) { \ + if ((got) != (exp)) { \ cout<