Fix property argument retaining type of the previous variable (#7582)
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
This commit is contained in:
parent
8312e9d901
commit
1ffa6b277d
|
|
@ -6564,9 +6564,11 @@ property_port_itemFront: // IEEE: part of property_port_item/sequence_port_item
|
|||
|
||||
property_port_itemAssignment<nodep>: // IEEE: part of property_port_item/sequence_port_item
|
||||
id variable_dimensionListE
|
||||
{ $$ = VARDONEA($<fl>1, *$1, $2, nullptr); }
|
||||
{ VARDECL(VAR);
|
||||
$$ = VARDONEA($<fl>1, *$1, $2, nullptr); }
|
||||
| id variable_dimensionListE '=' property_actual_arg
|
||||
{ $$ = VARDONEA($<fl>1, *$1, $2, $4);
|
||||
{ VARDECL(VAR);
|
||||
$$ = VARDONEA($<fl>1, *$1, $2, $4);
|
||||
BBUNSUP($3, "Unsupported: property variable default value"); }
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# 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-FileCopyrightText: 2026 Wilson Snyder
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
import vltest_bootstrap
|
||||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile()
|
||||
|
||||
test.passes()
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed under the Creative Commons Public Domain.
|
||||
// SPDX-FileCopyrightText: 2026 Antmicro
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
// Test to assert that property argument type is not retained from
|
||||
// the previous variable and is not causing errors
|
||||
|
||||
module t(input clk);
|
||||
genvar i;
|
||||
property prop(prop_arg);
|
||||
@(posedge clk)
|
||||
(prop_arg |-> prop_arg);
|
||||
endproperty
|
||||
|
||||
wire w;
|
||||
property prop2(prop_arg);
|
||||
@(posedge clk)
|
||||
(prop_arg |-> prop_arg);
|
||||
endproperty
|
||||
|
||||
initial begin
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
||||
Loading…
Reference in New Issue