Fix tracing empty sc module (#2729).

This commit is contained in:
Wilson Snyder 2020-12-28 11:13:58 -05:00
parent d6c5d31dcd
commit 72b2df30f8
4 changed files with 36 additions and 1 deletions

View File

@ -29,6 +29,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix vpi_release_handle to be called implicitly per IEEE (#2706).
**** Fix tracing empty sc module (#2729).
* Verilator 4.106 2020-12-02

View File

@ -604,7 +604,8 @@ private:
AstCFunc* topFuncp = nullptr;
AstCFunc* subFuncp = nullptr;
int subStmts = 0;
const uint32_t maxCodes = (nAllCodes + parallelism - 1) / parallelism;
uint32_t maxCodes = (nAllCodes + parallelism - 1) / parallelism;
if (maxCodes < 1) maxCodes = 1;
uint32_t nCodes = 0;
const ActCodeSet* prevActSet = nullptr;
AstIf* ifp = nullptr;

View File

@ -0,0 +1,18 @@
#!/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(simulator => 1);
compile(
verilator_flags2 => ['-sc', '--trace'],
);
ok(1);
1;

View File

@ -0,0 +1,14 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2020 by Wilsn Snyder.
// SPDX-License-Identifier: CC0-1.0
module t
(
output id0
);
assign id0 = 0;
endmodule