mirror of
https://github.com/verilator/verilator.git
synced 2025-01-08 23:57:35 +00:00
Tests: new t_lint_latch_5 test (#2997).
This commit is contained in:
parent
3f7bf3d2dc
commit
9821381059
17
test_regress/t/t_lint_latch_5.pl
Executable file
17
test_regress/t/t_lint_latch_5.pl
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2009 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);
|
||||
|
||||
lint(
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
19
test_regress/t/t_lint_latch_5.v
Normal file
19
test_regress/t/t_lint_latch_5.v
Normal file
@ -0,0 +1,19 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module for Issue#2863
|
||||
//
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2021 by Julien Margetts (Originally provided by Thomas Sailer)
|
||||
|
||||
module test
|
||||
(input logic [1:0] a,
|
||||
input logic e,
|
||||
output logic [1:0] z);
|
||||
|
||||
always_latch
|
||||
if (e)
|
||||
z[0] <= a[0];
|
||||
|
||||
always_latch
|
||||
if (e)
|
||||
z[1] <= a[1];
|
||||
|
||||
endmodule
|
Loading…
Reference in New Issue
Block a user