[sv-bc] non-existent ports or parameters

From: Geoffrey.Coram <Geoffrey.Coram_at_.....>
Date: Fri Dec 15 2006 - 09:24:20 PST
Hi -
I'm looking at the 1364-2005 LRM, trying to decide what happens
if an instance:

a) specifies a parameter override for an identifier that doesn't
correspond to a parameter declaration of the module being
instantiated

b) specifies more values in an ordered list of parameters
than the number of parameters declared for the module

c) specifies a port connection for a non-existent port

d) specifies more connections in an ordered list than
there are ports of the module

Eg, for this module:
  module driver (net_r);
    output net_r;
    parameter real r = 5.0;
    wire [64:1] net_r = $realtobits(r);
  endmodule

are any of these instantiations legal:

  driver #(5.0, 6.0) dr1(.net_r(net1); // too many parameters
  driver #(.s(6.0))  dr2(.net_r(net2); // "s" is not a parameter of "driver"
  driver #(5.0)      dr3(.net_s(net3); // "net_s" is not a port of "driver"
  driver #(5.0)      dr4(net4, net5);  // too many port connections

I would think not, but the LRM doesn't actually seem to say so.

In some analog simulators, one gets only a warning for
specifying a parameter that is not valid for a model.

-Geoffrey
Received on Fri Dec 15 09:24:27 2006

This archive was generated by hypermail 2.1.8 : Fri Dec 15 2006 - 09:24:52 PST