For UNUSED, skip primitive tables

This commit is contained in:
Wilson Snyder 2010-12-29 20:24:31 -05:00
parent f85c1a995a
commit acc4490370
3 changed files with 21 additions and 2 deletions

View File

@ -123,6 +123,7 @@ private:
virtual void visit(AstUdpTable* nodep, AstNUser*) {
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.");
}
}

View File

@ -256,6 +256,9 @@ private:
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
virtual void visit(AstCoverDecl* nodep, AstNUser*) {}
virtual void visit(AstCoverInc* nodep, AstNUser*) {}

View File

@ -13,10 +13,11 @@ module t (/*AUTOARG*/
input in; // inputs don't get flagged as undriven
output out; // outputs don't get flagged as unused
wire out = in;
sub sub ();
// Check we don't warn about unused UDP signals
udp_mux2 udpsub (out, in, in, in);
endmodule
module sub;
@ -46,3 +47,17 @@ module sub;
if (0 && mixed[1:0] != 0) begin end
end
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