forked from github/verilator
0102efd4ea
* Add tests for unpacked array in DPI-C * Add more generic parameter generator to AstNodes * Supports multi dimensional array in DPI ( DPI argmuments <=> Verilator internal type conversion) consider typedef in V3Task fix export test fix inout for scalar support export func of time * V3Premit does not show an error for wide words nor ArraySel * Unnecessary pack func for unapcked array does not appear anymore * Support unpacked array in runtime header - Add an overload for lvalue VL_CVT_PACK_STR_NN - Allow conversion from void * * touch up tests for codacy advices * resolve free functions. no functional change intended.
45 lines
1.3 KiB
Perl
Executable File
45 lines
1.3 KiB
Perl
Executable File
#!/usr/bin/env perl
|
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
|
#
|
|
# Copyright 2020 by Geza Lore. This program is free software; you can
|
|
# redistribute it and/or modify it under the terms of either the GNU
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
# Version 2.0.
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
scenarios(simulator => 1);
|
|
|
|
if ($Self->{nc}) {
|
|
# For NC, compile twice, first just to generate DPI headers
|
|
compile(
|
|
nc_flags2 => ["+ncdpiheader+$Self->{obj_dir}/dpi-exp.h",
|
|
"+ncdpiimpheader+$Self->{obj_dir}/dpi-imp.h"]
|
|
);
|
|
}
|
|
|
|
compile(
|
|
v_flags2 => ["t/t_dpi_arg_input_unpack.cpp"],
|
|
verilator_flags2 => ["-Wall -Wno-DECLFILENAME"],
|
|
# NC: Gdd the obj_dir to the C include path
|
|
nc_flags2 => ["+ncscargs+-I$Self->{obj_dir}"],
|
|
# ModelSim: Generate DPI header, add obj_dir to the C include path
|
|
ms_flags2 => ["-dpiheader $Self->{obj_dir}/dpi.h",
|
|
"-ccflags -I$Self->{obj_dir}"],
|
|
);
|
|
|
|
if ($Self->{vlt_all}) {
|
|
files_identical(
|
|
"$Self->{obj_dir}/Vt_dpi_arg_input_unpack__Dpi.h",
|
|
"t/t_dpi_arg_input_unpack__Dpi.out"
|
|
);
|
|
}
|
|
|
|
execute(
|
|
check_finished => 1,
|
|
ms_pli => 0
|
|
);
|
|
|
|
ok(1);
|
|
1;
|