Fix sorting of wide SenItems (#5816)
This used to throw Error: Value too wide for 64-bits expected in this context
This commit is contained in:
parent
14f618b0f6
commit
fc302a5207
|
@ -2896,8 +2896,8 @@ class ConstVisitor final : public VNVisitor {
|
||||||
|
|
||||||
if (const AstConst* const aConstp = VN_CAST(ap, Const)) {
|
if (const AstConst* const aConstp = VN_CAST(ap, Const)) {
|
||||||
const AstConst* const bConstp = VN_AS(bp, Const);
|
const AstConst* const bConstp = VN_AS(bp, Const);
|
||||||
if (aConstp->toUQuad() < bConstp->toUQuad()) return -1;
|
if (aConstp->num().isLtXZ(bConstp->num())) return -1;
|
||||||
if (aConstp->toUQuad() > bConstp->toUQuad()) return 1;
|
if (bConstp->num().isLtXZ(aConstp->num())) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/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=["--timing"])
|
||||||
|
|
||||||
|
test.passes()
|
|
@ -0,0 +1,20 @@
|
||||||
|
// 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 top;
|
||||||
|
sub inst(
|
||||||
|
.a({128{1'b1}}),
|
||||||
|
.b({128{1'b1}})
|
||||||
|
);
|
||||||
|
endmodule
|
||||||
|
|
||||||
|
module sub(a, b);
|
||||||
|
input [127:0] a;
|
||||||
|
input [127:0] b;
|
||||||
|
always @(a or b) begin
|
||||||
|
$display("doesn't matter");
|
||||||
|
end
|
||||||
|
endmodule
|
Loading…
Reference in New Issue