For UNUSED, skip primitive tables
This commit is contained in:
parent
f85c1a995a
commit
acc4490370
|
|
@ -123,6 +123,7 @@ private:
|
||||||
|
|
||||||
virtual void visit(AstUdpTable* nodep, AstNUser*) {
|
virtual void visit(AstUdpTable* nodep, AstNUser*) {
|
||||||
if (!v3Global.opt.bboxUnsup()) {
|
if (!v3Global.opt.bboxUnsup()) {
|
||||||
|
// If we support primitives, update V3Undriven to remove special case
|
||||||
nodep->v3error("Unsupported: Verilog 1995 UDP Tables. Use --bbox-unsup to ignore tables.");
|
nodep->v3error("Unsupported: Verilog 1995 UDP Tables. Use --bbox-unsup to ignore tables.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -256,6 +256,9 @@ private:
|
||||||
else entryp->usedWhole();
|
else entryp->usedWhole();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Until we support tables, primitives will have undriven and unused I/Os
|
||||||
|
virtual void visit(AstPrimitive* nodep, AstNUser*) {}
|
||||||
|
|
||||||
// Coverage artifacts etc shouldn't count as a sink
|
// Coverage artifacts etc shouldn't count as a sink
|
||||||
virtual void visit(AstCoverDecl* nodep, AstNUser*) {}
|
virtual void visit(AstCoverDecl* nodep, AstNUser*) {}
|
||||||
virtual void visit(AstCoverInc* nodep, AstNUser*) {}
|
virtual void visit(AstCoverInc* nodep, AstNUser*) {}
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,11 @@ module t (/*AUTOARG*/
|
||||||
input in; // inputs don't get flagged as undriven
|
input in; // inputs don't get flagged as undriven
|
||||||
output out; // outputs don't get flagged as unused
|
output out; // outputs don't get flagged as unused
|
||||||
|
|
||||||
wire out = in;
|
|
||||||
|
|
||||||
sub sub ();
|
sub sub ();
|
||||||
|
|
||||||
|
// Check we don't warn about unused UDP signals
|
||||||
|
udp_mux2 udpsub (out, in, in, in);
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module sub;
|
module sub;
|
||||||
|
|
@ -46,3 +47,17 @@ module sub;
|
||||||
if (0 && mixed[1:0] != 0) begin end
|
if (0 && mixed[1:0] != 0) begin end
|
||||||
end
|
end
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
primitive udp_mux2 (q, a, b, s);
|
||||||
|
output q;
|
||||||
|
input a, b, s;
|
||||||
|
table
|
||||||
|
//a b s : out
|
||||||
|
1 ? 0 : 1 ;
|
||||||
|
0 ? 0 : 0 ;
|
||||||
|
? 1 1 : 1 ;
|
||||||
|
? 0 1 : 0 ;
|
||||||
|
0 0 x : 0 ;
|
||||||
|
1 1 x : 1 ;
|
||||||
|
endtable
|
||||||
|
endprimitive
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue