Fix assertion on streaming from queues
This commit is contained in:
parent
af54a26b43
commit
9af8e76e87
|
|
@ -2274,8 +2274,6 @@ class ConstVisitor final : public VNVisitor {
|
||||||
if (VN_IS(dstDTypep, UnpackArrayDType)) {
|
if (VN_IS(dstDTypep, UnpackArrayDType)) {
|
||||||
streamp = new AstCvtPackedToArray{nodep->fileline(), streamp, dstDTypep};
|
streamp = new AstCvtPackedToArray{nodep->fileline(), streamp, dstDTypep};
|
||||||
} else {
|
} else {
|
||||||
UASSERT_OBJ(sWidth >= dWidth, nodep,
|
|
||||||
"sWidth >= dWidth should have caused an error earlier");
|
|
||||||
if (dWidth == 0) {
|
if (dWidth == 0) {
|
||||||
streamp = new AstCvtPackedToArray{nodep->fileline(), streamp, dstDTypep};
|
streamp = new AstCvtPackedToArray{nodep->fileline(), streamp, dstDTypep};
|
||||||
} else if (sWidth >= dWidth) {
|
} else if (sWidth >= dWidth) {
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
||||||
|
test.execute()
|
||||||
|
|
||||||
|
test.passes()
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
module t;
|
||||||
|
|
||||||
|
int i_header;
|
||||||
|
int i_len;
|
||||||
|
byte i_data[];
|
||||||
|
int i_crc;
|
||||||
|
|
||||||
|
int o_header;
|
||||||
|
int o_len;
|
||||||
|
byte o_data[];
|
||||||
|
int o_crc;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
byte pkt[$];
|
||||||
|
|
||||||
|
i_header = 12;
|
||||||
|
i_len = 5;
|
||||||
|
i_data = new[5];
|
||||||
|
i_crc = 42;
|
||||||
|
|
||||||
|
pkt = {<<8{i_header, i_len, i_data, i_crc}};
|
||||||
|
|
||||||
|
{<<8{o_header, o_len, o_data, o_crc}} = pkt;
|
||||||
|
|
||||||
|
$finish;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
Loading…
Reference in New Issue