24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

UM-554 C - Error <strong>and</strong> warning messages<br />

Too few port connections<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong><br />

Message text<br />

# ** Warning (vsim-3017): foo.v(1422): [TFMPC] - Too few port connections.<br />

Expected 2, found 1.<br />

# Region: /foo/tb<br />

Meaning<br />

This warning occurs when an instantiation has fewer port connections than the<br />

corresponding module definition. The warning doesn’t necessarily mean anything is<br />

wrong; it is legal in Verilog to have an instantiation that doesn’t connect all of the pins.<br />

However, someone that expects all pins to be connected would like to see such a warning.<br />

Here are some examples of legal instantiations that will <strong>and</strong> will not cause the warning<br />

message.<br />

Module definition:<br />

module foo (a, b, c, d);<br />

Instantiation that does not connect all pins but will not produce the warning:<br />

foo inst1(e, f, g, ); – positional association<br />

foo inst1(.a(e), .b(f), .c(g), .d()); – named association<br />

Instantiation that does not connect all pins but will produce the warning:<br />

foo inst1(e, f, g); – positional association<br />

foo inst1(.a(e), .b(f), .c(g)); – named association<br />

Any instantiation above will leave pin d unconnected but the first example has a<br />

placeholder for the connection. Here’s another example:<br />

foo inst1(e, , g, h);<br />

foo inst1(.a(e), .b(), .c(g), .d(h));<br />

Suggested actions<br />

Check that there is not an extra comma at th e end of the port list. (e.g., model(a,b,) ). The<br />

extra comma is legal Verilog <strong>and</strong> implies that there is a third port connection that is<br />

unnamed.<br />

If you are purposefully leaving pins unco nnected, you can disable these messages using<br />

the +nowarnTFMPC argument to vsim.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!