Test class parsing (intended as part of last commit).
This commit is contained in:
parent
2cbfe99ad5
commit
4afde8b478
|
|
@ -0,0 +1,31 @@
|
||||||
|
%Error: t/t_class_unsup_bad.v:6: Unsupported: virtual interface
|
||||||
|
virtual interface vi_t vi;
|
||||||
|
^~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:7: Unsupported: virtual data type
|
||||||
|
virtual vi_t vi2;
|
||||||
|
^~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:12: Unsupported: classes
|
||||||
|
class C #(parameter P=1);
|
||||||
|
^~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:13: Unsupported: class parameters
|
||||||
|
localparam LOCPAR = 10;
|
||||||
|
^
|
||||||
|
%Error: t/t_class_unsup_bad.v:16: Unsupported: 'local' class item
|
||||||
|
local int loc;
|
||||||
|
^~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:24: Unsupported: virtual class member qualifier
|
||||||
|
virtual function void func_virtual; endfunction
|
||||||
|
^~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:25: Unsupported: pure virtual class method
|
||||||
|
pure virtual function void func_pure_virtual; endfunction
|
||||||
|
^~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:25: syntax error, unexpected endfunction
|
||||||
|
pure virtual function void func_pure_virtual; endfunction
|
||||||
|
^~~~~~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:31: Unsupported: virtual classes
|
||||||
|
virtual class VC;
|
||||||
|
^~~~~~~
|
||||||
|
%Error: t/t_class_unsup_bad.v:31: Unsupported: classes
|
||||||
|
virtual class VC;
|
||||||
|
^~~~~
|
||||||
|
%Error: Exiting due to
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/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.
|
||||||
|
|
||||||
|
scenarios(vlt => 1);
|
||||||
|
|
||||||
|
lint(
|
||||||
|
fails => 1,
|
||||||
|
expect_filename => $Self->{golden_filename},
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed into the Public Domain, for any use,
|
||||||
|
// without warranty, 2019 by Wilson Snyder.
|
||||||
|
|
||||||
|
virtual interface vi_t vi;
|
||||||
|
virtual vi_t vi2;
|
||||||
|
|
||||||
|
typedef class c;
|
||||||
|
typedef interface class ic;
|
||||||
|
|
||||||
|
class C #(parameter P=1);
|
||||||
|
localparam LOCPAR = 10;
|
||||||
|
int imember;
|
||||||
|
|
||||||
|
local int loc;
|
||||||
|
protected int prot;
|
||||||
|
|
||||||
|
rand int irand;
|
||||||
|
randc int icrand;
|
||||||
|
|
||||||
|
task classtask; endtask
|
||||||
|
function int classfunc; endfunction
|
||||||
|
virtual function void func_virtual; endfunction
|
||||||
|
pure virtual function void func_pure_virtual; endfunction
|
||||||
|
automatic function void func_automatic; endfunction
|
||||||
|
const function void func_const; endfunction
|
||||||
|
extern task exttask;
|
||||||
|
endclass
|
||||||
|
|
||||||
|
virtual class VC;
|
||||||
|
endclass
|
||||||
|
|
||||||
|
module t (/*AUTOARG*/);
|
||||||
|
endmodule
|
||||||
Loading…
Reference in New Issue