Tests: Adding failing test case for source synchronous signals (#3038)

This commit is contained in:
Dan Petrisko 2021-07-07 11:00:17 -07:00 committed by GitHub
parent fd0446f481
commit c5c5f11e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,7 @@
%Error: t/t_source_sync.v:8:14: syntax error, unexpected /*verilator clocker*/, expecting ',' or ';'
8 | logic clk /*verilator clocker*/ ;
| ^~~~~~~~~~~~~~~~~~~~~
%Error: t/t_source_sync.v:10:1: syntax error, unexpected '}'
10 | } ss_s;
| ^
%Error: Exiting due to

19
test_regress/t/t_source_sync.pl Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2019 by Wilson Snyder. 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(vlt => 1);
compile(
fails => 1,
expect_filename => $Self->{golden_filename},
);
ok(1);
1;

View File

@ -0,0 +1,12 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2020 by Dan Petrisko.
// SPDX-License-Identifier: CC0-1.0
typedef struct packed {
logic clk /*verilator clocker*/;
logic data;
} ss_s;
endmodule