Move tests pr2509349a/b to the new test format.
This removes the regress-msys2.list file, fixes the output from the pr2509349a.v test to not be different on different systems, and documents the $readmempath task.
This commit is contained in:
parent
ed7cac914c
commit
71b9c551df
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
Icarus Verilog Quirks
|
||||
=====================
|
||||
|
||||
This is a list of known quirks that are presented by Icarus Verilog. The idea
|
||||
of this chapter is to call out ways that Icarus Verilog differs from the
|
||||
standard, or from other implementations.
|
||||
|
||||
This is NOT AN EXHAUSTIVE LIST. If something is missing from this list, let us
|
||||
know and we can add documentation.
|
||||
|
||||
System Tasks - Unique to Icarus Verilog
|
||||
---------------------------------------
|
||||
|
||||
These are system tasks that are unique to Icarus Verilog. Don't use any of
|
||||
these if you want to keep your code portable across other Verilog compilers.
|
||||
|
||||
$readmempath
|
||||
^^^^^^^^^^^^
|
||||
The "$readmemb" and "$readmemh" system tasks read text files that contain data
|
||||
values to populate memories. Normally, those files are found in a current work
|
||||
directory. The "$readmempath()" system task can be used to create a search
|
||||
path for those files. For example:
|
||||
|
||||
.. code-block:: verilog
|
||||
|
||||
reg [7:0] mem [0:7];
|
||||
initial begin
|
||||
$readmemh("datafile.txt", mem);
|
||||
end
|
||||
|
||||
This assumes that the "datafile.txt" is in the current working directory where
|
||||
the vvp command is running. But with the "$readmempath", one can specify a
|
||||
search path:
|
||||
|
||||
.. code-block:: verilog
|
||||
|
||||
reg [7:0] mem [0:7];
|
||||
initial begin
|
||||
$readmempath(".:alternative:/global/defaults");
|
||||
$readmemh("datafile.txt", mem);
|
||||
end
|
||||
|
||||
In this example, the "datafile.txt" is searched for in each of the directories
|
||||
in the above list (separated by ":" characters). The first located instance
|
||||
is the one that is used. So for example, if "./datafile.txt" exists, then it
|
||||
is read instead of "/global/defaults/datafile.txt" even if the latter exists.
|
||||
|
|
@ -20,4 +20,5 @@ Icarus Verilog.
|
|||
vhdlpp_flags
|
||||
gtkwave
|
||||
vpi
|
||||
icarus_verilog_quirks
|
||||
reporting_issues
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
WARNING: ./ivltests/pr2509349a.v:10: $readmempath could not find directory "/tmp"!
|
||||
WARNING: ./ivltests/pr2509349a.v:10: $readmempath could not find directory "/no_dir"!
|
||||
WARNING: ./ivltests/pr2509349a.v:10: $readmempath could not find directory "no_dir2"!
|
||||
WARNING: ./ivltests/pr2509349a.v:10: $readmempath's path element "vsim" is not a directory!
|
||||
PASSED
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
WARNING: work/a.out.v:17: $readmempath could not find directory "/no_dir"!
|
||||
WARNING: work/a.out.v:17: $readmempath could not find directory "no_dir2"!
|
||||
WARNING: work/a.out.v:17: $readmempath could not find directory "vsim"!
|
||||
PASSED
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
WARNING: vlog95.v:17: $readmempath could not find directory "/no_dir"!
|
||||
WARNING: vlog95.v:17: $readmempath could not find directory "no_dir2"!
|
||||
WARNING: vlog95.v:17: $readmempath's path element "vsim" is not a directory!
|
||||
PASSED
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
WARNING: ivltests/pr2509349a.v:11: $readmempath could not find directory "/no_dir"!
|
||||
WARNING: ivltests/pr2509349a.v:11: $readmempath could not find directory "no_dir2"!
|
||||
WARNING: ivltests/pr2509349a.v:11: $readmempath could not find directory "vsim"!
|
||||
PASSED
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
WARNING: ./ivltests/pr2509349a.v:10: $readmempath could not find directory "/no_dir"!
|
||||
WARNING: ./ivltests/pr2509349a.v:10: $readmempath could not find directory "no_dir2"!
|
||||
WARNING: ./ivltests/pr2509349a.v:10: $readmempath's path element "vsim" is not a directory!
|
||||
PASSED
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
WARNING: work/a.out.v:14: $readmempath's argument (vpiReg) is not a valid string.
|
||||
WARNING: work/a.out.v:17: $readmempath's argument contains non-printable characters.
|
||||
"tes\002"
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
WARNING: vlog95.v:14: $readmempath's argument (vpiReg) is not a valid string.
|
||||
WARNING: vlog95.v:17: $readmempath's argument contains non-printable characters.
|
||||
"tes\002"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
WARNING: ivltests/pr2509349b.v:5: $readmempath's argument (vpiReg) is not a valid string.
|
||||
WARNING: ivltests/pr2509349b.v:8: $readmempath's argument contains non-printable characters.
|
||||
"tes\002"
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
WARNING: ./ivltests/pr2509349b.v:5: $readmempath's argument (vpiReg) is not a valid string.
|
||||
WARNING: ./ivltests/pr2509349b.v:8: $readmempath's argument contains non-printable characters.
|
||||
"tes\002"
|
||||
|
|
@ -7,7 +7,8 @@ module top;
|
|||
pass = 1'b1;
|
||||
|
||||
// Neither no_dir or no_dir2 should exist and vsim should be a file.
|
||||
$readmempath("/tmp:/no_dir:no_dir2:vsim:ivltests");
|
||||
// The ivltests directory should exist.
|
||||
$readmempath("/no_dir:no_dir2:vsim:ivltests");
|
||||
|
||||
$readmemh("pr2509349.txt", mem);
|
||||
|
||||
|
|
|
|||
|
|
@ -163,10 +163,6 @@ sv_cast_darray normal,-g2005-sv ivltests
|
|||
br978 normal ivltests
|
||||
br_ml20150424 normal ivltests
|
||||
|
||||
# $readmempath
|
||||
pr2509349a normal ivltests gold=pr2509349a.gold
|
||||
pr2509349b normal ivltests gold=pr2509349b.gold
|
||||
|
||||
# $simparam
|
||||
simparam normal ivltests
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
# This test list is used to override other test lists when running
|
||||
# on Windows using MSYS2.
|
||||
|
||||
#
|
||||
# Copyright (c) 1999-2015 Guy Hutchison (ghutchis@pacbell.net)
|
||||
#
|
||||
# This source code is free software; you can redistribute it
|
||||
# and/or modify it in source code form under the terms of the GNU
|
||||
# General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
#
|
||||
# Format of the file
|
||||
#
|
||||
# testname testtype directory
|
||||
#
|
||||
# The <testname> is the verilog file name minus an extension.
|
||||
#
|
||||
# The <testtype> can be one of the following:
|
||||
#
|
||||
# normal: Normal results expected, i.e it should compile and execute
|
||||
# producing at least a single line with PASSED.
|
||||
#
|
||||
# CO: Compile Only - Compile the file to the default output type.
|
||||
#
|
||||
# CN: Compile Null - Compile with the null target. Similar to CO.
|
||||
#
|
||||
# CE: Compile with Errors - We EXPECT errors - we're checking
|
||||
# illegal syntax
|
||||
#
|
||||
# RE: Runtime with Errors - We EXPECT errors - we're checking
|
||||
# illegal syntax
|
||||
#
|
||||
# EF: Expected Fail - We EXPECT this test to fail - only use
|
||||
# with older versions of Icarus.
|
||||
#
|
||||
# TE: Translation Error - We EXPECT the translated code to fail -
|
||||
# only supported in the vlog95 checker.
|
||||
#
|
||||
# NI: Not implemented. Only use for version specific tests.
|
||||
#
|
||||
# <directory> is where the <testname>.v file is located.
|
||||
#
|
||||
# An optional fourth and fifth argument can be supplied.
|
||||
#
|
||||
# The fourth argument may be one of the following.
|
||||
#
|
||||
# modulename - Defines the top level module
|
||||
# gold=filename - Compare a gold file against the
|
||||
# generated log file.
|
||||
# unordered=filename - Compare a gold file against the
|
||||
# generated log file, allowing for lines
|
||||
# to appear in any order
|
||||
# diff=filename1:filename2:skip_ln - Compare the two files for equality.
|
||||
# Skip the first <skip_ln> lines or none.
|
||||
#
|
||||
# If a <modulename> is given you can supply a fifth argument for the
|
||||
# gold or diff commands.
|
||||
#
|
||||
|
||||
# Warning about non-existent /tmp directory
|
||||
pr2509349a normal ivltests gold=pr2509349a-msys2.gold
|
||||
|
|
@ -804,8 +804,6 @@ pic normal contrib gold=pic-vlog95.gold
|
|||
pr910 normal ivltests gold=pr910-vlog95.gold
|
||||
pr1698820 normal ivltests gold=pr1698820-vlog95.gold
|
||||
pr1819452 normal ivltests gold=pr1819452-vlog95.gold
|
||||
pr2509349a normal ivltests gold=pr2509349a-vlog95.gold
|
||||
pr2509349b normal ivltests gold=pr2509349b-vlog95.gold
|
||||
# Because the lower module has a parameter it is given a unique name that
|
||||
# does not match what the code is looking for. If we can verify that there
|
||||
# is only a single instance or that the instance has the original or at
|
||||
|
|
|
|||
|
|
@ -120,6 +120,10 @@ pr1864110b vvp_tests/pr1864110b.json
|
|||
pr1864115 vvp_tests/pr1864115.json
|
||||
pr1916261a vvp_tests/pr1916261a.json
|
||||
pr1916261a vvp_tests/pr1916261a.json
|
||||
pr2509349a vvp_tests/pr2509349a.json
|
||||
pr2509349a-vlog95 vvp_tests/pr2509349a-vlog95.json
|
||||
pr2509349b vvp_tests/pr2509349b.json
|
||||
pr2509349b-vlog95 vvp_tests/pr2509349b-vlog95.json
|
||||
pr2800985b vvp_tests/pr2800985b.json
|
||||
pr3270320_ams vvp_tests/pr3270320_ams.json
|
||||
pr903 vvp_tests/pr903.json
|
||||
|
|
|
|||
|
|
@ -45,9 +45,6 @@ if ($#ARGV != -1) {
|
|||
my $regress_fn = &get_regress_fn;
|
||||
&read_regression_list($regress_fn, $ver, $force_sv, "");
|
||||
} else {
|
||||
if ($ENV{MSYSTEM}) {
|
||||
&read_regression_list("regress-msys2.list", $ver, $force_sv, "");
|
||||
}
|
||||
if ($force_sv) {
|
||||
&read_regression_list("regress-fsv.list", $ver, $force_sv, "");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"type" : "normal-vlog95",
|
||||
"source" : "pr2509349a.v",
|
||||
"gold" : "pr2509349a-vlog95"
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"type" : "normal",
|
||||
"source" : "pr2509349a.v",
|
||||
"gold" : "pr2509349a"
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"type" : "normal-vlog95",
|
||||
"source" : "pr2509349b.v",
|
||||
"gold" : "pr2509349b-vlog95"
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"type" : "normal",
|
||||
"source" : "pr2509349b.v",
|
||||
"gold" : "pr2509349b"
|
||||
}
|
||||
Loading…
Reference in New Issue