Fix structure select causing 'Wide Op' error (#6191).
This commit is contained in:
parent
fb1373b854
commit
87050670b4
1
Changes
1
Changes
|
@ -32,6 +32,7 @@ Verilator 5.039 devel
|
|||
* Fix param-dependent class typedef linking (#6171). [Igor Zaworski, Antmicro Ltd.]
|
||||
* Fix `--coverage-expr` null pointer dereference (#6181). [Igor Zaworski, Antmicro Ltd.]
|
||||
* Fix conflicting function/class name linking error (#6182). [Igor Zaworski, Antmicro Ltd.]
|
||||
* Fix structure select causing 'Wide Op' error (#6191). [Danny Oler]
|
||||
|
||||
|
||||
Verilator 5.038 2025-07-08
|
||||
|
|
|
@ -1110,6 +1110,9 @@ AstNode* AstArraySel::baseFromp(AstNode* nodep, bool overMembers) {
|
|||
} else if (overMembers && VN_IS(nodep, MemberSel)) {
|
||||
nodep = VN_AS(nodep, MemberSel)->fromp();
|
||||
continue;
|
||||
} else if (overMembers && VN_IS(nodep, StructSel)) {
|
||||
nodep = VN_AS(nodep, StructSel)->fromp();
|
||||
continue;
|
||||
}
|
||||
// AstNodePreSel stashes the associated variable under an ATTROF
|
||||
// of VAttrType::VAR_BASE so it isn't constified
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env python3
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2025 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('simulator')
|
||||
|
||||
test.compile(verilator_flags2=['--binary'])
|
||||
|
||||
test.execute()
|
||||
|
||||
test.passes()
|
|
@ -0,0 +1,44 @@
|
|||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||
// any use, without warranty, 2025 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
typedef struct packed {
|
||||
logic [149:0] hdr;
|
||||
logic [1:0] vc;
|
||||
} packet_t;
|
||||
|
||||
module t;
|
||||
|
||||
logic clk;
|
||||
|
||||
typedef struct {packet_t [1:0] pkt_i;} dut_if_t;
|
||||
|
||||
dut_if_t dut[2];
|
||||
|
||||
initial begin
|
||||
clk = 0;
|
||||
forever #(0.5) clk = ~clk;
|
||||
end
|
||||
|
||||
task automatic send_req_packets(int module_id, int channel);
|
||||
packet_t packet = '0;
|
||||
dut[module_id].pkt_i[channel] = packet;
|
||||
@(posedge clk); // If you comment out this line. It will build.
|
||||
endtask
|
||||
|
||||
initial begin
|
||||
for (int m = 0; m < 2; m++) begin
|
||||
for (int i = 0; i < 2; i++) begin
|
||||
automatic int mod = m;
|
||||
automatic int ch = i;
|
||||
send_req_packets(mod, ch);
|
||||
end
|
||||
end
|
||||
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
||||
endmodule
|
Loading…
Reference in New Issue