Skip to content

Commit

Permalink
Add unsup test
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Dec 12, 2024
1 parent 9baeb2e commit 508e18d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test_regress/t/t_eq_wild_unsup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
%Error-UNSUPPORTED: t/t_eq_wild_unsup.v:13:13: Unsupported: RHS of ==? or !=? is fourstate but not a constant
: ... note: In instance 't'
13 | if (1 ==? get_x_or_0(0)) $stop;
| ^~~
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
%Error: Exiting due to
16 changes: 16 additions & 0 deletions test_regress/t/t_eq_wild_unsup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2024 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

import vltest_bootstrap

test.scenarios('vlt')

test.lint(fails=True, expect_filename=test.golden_filename)

test.passes()
19 changes: 19 additions & 0 deletions test_regress/t/t_eq_wild_unsup.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2024 by Antmicro Ltd.
// SPDX-License-Identifier: CC0-1.0

function logic get_x_or_0(logic get_x);
return get_x ? 1'bx : 1'b0;
endfunction

module t;
initial begin
if (1 ==? get_x_or_0(0)) $stop;

$write("*-* All Finished *-*\n");
$finish;
end

endmodule

0 comments on commit 508e18d

Please sign in to comment.