Added unittest for unsupported arguments
This commit is contained in:
parent
37151820c4
commit
2207217df3
|
|
@ -0,0 +1,5 @@
|
|||
%Error: Internal Error: t/t_enum_type_methods_bad.v:24: ../V3Width.cpp:#: Unsupported: enum next/prev with non-const argument
|
||||
: ... In instance t
|
||||
e.next(increment);
|
||||
^~~~
|
||||
... See the manual and https://verilator.org for more assistance.
|
||||
|
|
@ -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 2003 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(simulator => 1);
|
||||
|
||||
compile(
|
||||
fails => 1,
|
||||
expect_filename => $Self->{golden_filename}
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2014 by Wilson Snyder.
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk,
|
||||
increment
|
||||
);
|
||||
input clk;
|
||||
input [1:0] increment;
|
||||
|
||||
typedef enum [3:0] {
|
||||
E01 = 1,
|
||||
E03 = 3,
|
||||
E04 = 4,
|
||||
E05 = 5
|
||||
} my_t;
|
||||
|
||||
my_t e;
|
||||
|
||||
always @ (posedge clk) begin
|
||||
e.next(increment);
|
||||
$finish;
|
||||
end
|
||||
|
||||
endmodule
|
||||
Loading…
Reference in New Issue