mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Fix not reporting class reference with extra parameters (#5467).
This commit is contained in:
parent
d06f986b51
commit
fd9f5ab34e
1
Changes
1
Changes
@ -63,6 +63,7 @@ Verilator 5.029 devel
|
|||||||
* Fix foreach colliding index names (#5444). [Arkadiusz Kozdra, Antmicro Ltd.]
|
* Fix foreach colliding index names (#5444). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||||
* Fix fault on defparam with UNSUPPORTED ignored (#5450). [Luiza de Melo]
|
* Fix fault on defparam with UNSUPPORTED ignored (#5450). [Luiza de Melo]
|
||||||
* Fix class reference with pin that is a class reference (#5454).
|
* Fix class reference with pin that is a class reference (#5454).
|
||||||
|
* Fix not reporting class reference with extra parameters (#5467).
|
||||||
* Fix user-type parameter overlap (#5469). [Todd Strader]
|
* Fix user-type parameter overlap (#5469). [Todd Strader]
|
||||||
* Fix tracing when name() is empty (#5470). [Sam Shahrestani]
|
* Fix tracing when name() is empty (#5470). [Sam Shahrestani]
|
||||||
* Fix timing mode not exiting on empty events (#5472).
|
* Fix timing mode not exiting on empty events (#5472).
|
||||||
|
@ -3943,6 +3943,7 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
|||||||
UINFO(5, indent() << "visit " << nodep << endl);
|
UINFO(5, indent() << "visit " << nodep << endl);
|
||||||
if (AstNode* const cpackagep = nodep->classOrPackageOpp()) {
|
if (AstNode* const cpackagep = nodep->classOrPackageOpp()) {
|
||||||
if (AstClassOrPackageRef* const cpackagerefp = VN_CAST(cpackagep, ClassOrPackageRef)) {
|
if (AstClassOrPackageRef* const cpackagerefp = VN_CAST(cpackagep, ClassOrPackageRef)) {
|
||||||
|
iterate(cpackagerefp);
|
||||||
const AstClass* const clsp = VN_CAST(cpackagerefp->classOrPackageNodep(), Class);
|
const AstClass* const clsp = VN_CAST(cpackagerefp->classOrPackageNodep(), Class);
|
||||||
if (clsp && clsp->isParameterized()) {
|
if (clsp && clsp->isParameterized()) {
|
||||||
// Unable to link before the instantiation of parameter classes.
|
// Unable to link before the instantiation of parameter classes.
|
||||||
|
11
test_regress/t/t_class_param_extra_bad.out
Normal file
11
test_regress/t/t_class_param_extra_bad.out
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
%Error-PINNOTFOUND: t/t_class_param_extra_bad.v:13:21: Parameter not found: '__paramNumber1'
|
||||||
|
13 | localparam Cls1#(123, integer, "text")::bool_t PARAM = 1;
|
||||||
|
| ^~~
|
||||||
|
... For error description see https://verilator.org/warn/PINNOTFOUND?v=latest
|
||||||
|
%Error-PINNOTFOUND: t/t_class_param_extra_bad.v:13:26: Parameter not found: '__paramNumber2'
|
||||||
|
13 | localparam Cls1#(123, integer, "text")::bool_t PARAM = 1;
|
||||||
|
| ^~~~~~~
|
||||||
|
%Error-PINNOTFOUND: t/t_class_param_extra_bad.v:13:35: Parameter not found: '__paramNumber3'
|
||||||
|
13 | localparam Cls1#(123, integer, "text")::bool_t PARAM = 1;
|
||||||
|
| ^~~~~~
|
||||||
|
%Error: Exiting due to
|
16
test_regress/t/t_class_param_extra_bad.py
Executable file
16
test_regress/t/t_class_param_extra_bad.py
Executable file
@ -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('linter')
|
||||||
|
|
||||||
|
test.lint(fails=True, expect_filename=test.golden_filename)
|
||||||
|
|
||||||
|
test.passes()
|
15
test_regress/t/t_class_param_extra_bad.v
Normal file
15
test_regress/t/t_class_param_extra_bad.v
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
|
// any use, without warranty, 2024 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
module t;
|
||||||
|
|
||||||
|
class Cls1;
|
||||||
|
typedef bit bool_t;
|
||||||
|
endclass
|
||||||
|
|
||||||
|
localparam Cls1#(123, integer, "text")::bool_t PARAM = 1;
|
||||||
|
|
||||||
|
endmodule
|
Loading…
Reference in New Issue
Block a user