forked from github/verilator
Fix duplicate symbol error on generate tri, bug1347.
This commit is contained in:
parent
63a429dd64
commit
4f98f84da9
2
Changes
2
Changes
@ -37,6 +37,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
|||||||
|
|
||||||
**** Fix string ?: conditional type resolution, bug1345. [Iztok Jeras]
|
**** Fix string ?: conditional type resolution, bug1345. [Iztok Jeras]
|
||||||
|
|
||||||
|
**** Fix duplicate symbol error on generate tri, bug1347. [Tomas Dzetkulic]
|
||||||
|
|
||||||
|
|
||||||
* Verilator 3.926 2018-08-22
|
* Verilator 3.926 2018-08-22
|
||||||
|
|
||||||
|
@ -235,14 +235,14 @@ void process() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!v3Global.opt.xmlOnly()) {
|
if (!v3Global.opt.xmlOnly()) {
|
||||||
// Expand inouts, stage 2
|
|
||||||
// Also simplify pin connections to always be AssignWs in prep for V3Unknown
|
|
||||||
V3Tristate::tristateAll(v3Global.rootp());
|
|
||||||
|
|
||||||
// Task inlining & pushing BEGINs names to variables/cells
|
// Task inlining & pushing BEGINs names to variables/cells
|
||||||
// Begin processing must be after Param, before module inlining
|
// Begin processing must be after Param, before module inlining
|
||||||
V3Begin::debeginAll(v3Global.rootp()); // Flatten cell names, before inliner
|
V3Begin::debeginAll(v3Global.rootp()); // Flatten cell names, before inliner
|
||||||
|
|
||||||
|
// Expand inouts, stage 2
|
||||||
|
// Also simplify pin connections to always be AssignWs in prep for V3Unknown
|
||||||
|
V3Tristate::tristateAll(v3Global.rootp());
|
||||||
|
|
||||||
// Move assignments from X into MODULE temps.
|
// Move assignments from X into MODULE temps.
|
||||||
// (Before flattening, so each new X variable is shared between all scopes of that module.)
|
// (Before flattening, so each new X variable is shared between all scopes of that module.)
|
||||||
V3Unknown::unknownAll(v3Global.rootp());
|
V3Unknown::unknownAll(v3Global.rootp());
|
||||||
|
16
test_regress/t/t_gate_fdup.pl
Executable file
16
test_regress/t/t_gate_fdup.pl
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2004 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.
|
||||||
|
|
||||||
|
scenarios(simulator => 1);
|
||||||
|
|
||||||
|
compile(
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
32
test_regress/t/t_gate_fdup.v
Normal file
32
test_regress/t/t_gate_fdup.v
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed into the Public Domain, for any use,
|
||||||
|
// without warranty, 2005 by Thomas Dzetkulic.
|
||||||
|
|
||||||
|
module fnor2(f, a, b);
|
||||||
|
parameter W = 1;
|
||||||
|
|
||||||
|
output [W-1:0]f;
|
||||||
|
input [W-1:0] a, b;
|
||||||
|
|
||||||
|
supply0 gnd;
|
||||||
|
supply1 vcc;
|
||||||
|
|
||||||
|
generate
|
||||||
|
genvar i;
|
||||||
|
for (i = 0; i < W; i = i + 1) begin
|
||||||
|
wire w;
|
||||||
|
pmos(f[i], w, a[i]);
|
||||||
|
pmos(w, vcc, b[i]);
|
||||||
|
nmos(f[i], gnd, a[i]);
|
||||||
|
nmos(f[i], gnd, b[i]);
|
||||||
|
end
|
||||||
|
endgenerate
|
||||||
|
endmodule
|
||||||
|
|
||||||
|
module t(f, a, b);
|
||||||
|
output [1:0] f;
|
||||||
|
input [1:0] a, b;
|
||||||
|
|
||||||
|
fnor2 #(2) n(f, a, b);
|
||||||
|
endmodule
|
Loading…
Reference in New Issue
Block a user