mirror of
https://github.com/verilator/verilator.git
synced 2025-02-02 03:34:05 +00:00
Fix LHS is not a lvalue when using tristate with -Oi.
This commit is contained in:
parent
f2d8e45d72
commit
de931d6a97
@ -1107,6 +1107,7 @@ class TristateVisitor final : public TristateBaseVisitor {
|
|||||||
AstVar* enVarp = new AstVar(nodep->fileline(), AstVarType::MODULETEMP,
|
AstVar* enVarp = new AstVar(nodep->fileline(), AstVarType::MODULETEMP,
|
||||||
nodep->name() + "__en" + cvtToStr(m_unique++),
|
nodep->name() + "__en" + cvtToStr(m_unique++),
|
||||||
VFlagBitPacked(), enModVarp->width());
|
VFlagBitPacked(), enModVarp->width());
|
||||||
|
enModVarp->direction(VDirection::INPUT);
|
||||||
UINFO(9, " newenv " << enVarp << endl);
|
UINFO(9, " newenv " << enVarp << endl);
|
||||||
AstPin* enpinp
|
AstPin* enpinp
|
||||||
= new AstPin(nodep->fileline(), nodep->pinNum(),
|
= new AstPin(nodep->fileline(), nodep->pinNum(),
|
||||||
|
22
test_regress/t/t_altera_lpm_mult_noinl.pl
Executable file
22
test_regress/t/t_altera_lpm_mult_noinl.pl
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2003 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
|
||||||
|
|
||||||
|
scenarios(vlt_all => 1);
|
||||||
|
|
||||||
|
top_filename("t/t_altera_lpm.v");
|
||||||
|
(my $module = $Self->{name}) =~ s/.*t_altera_//;
|
||||||
|
$module =~ s/_noinl//;
|
||||||
|
|
||||||
|
compile(
|
||||||
|
verilator_flags2 => ["--top-module ${module}", "-Oi"]
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
Loading…
Reference in New Issue
Block a user