User guide
2-37
Modeling Your Design
module top;
middle u1 (a);
endmodule
module middle(a);
input a;
wire b;
buf(b,a);
endmodule
First, there is no instance name specified for $lsi_dumpports. The
syntax for $lsi_dumpports calls for an instance name. Since the
user didn't instantiate module top in the test fixture, they are left
specifying the MODULE name top. This will produce a warning
message from VCS. Since top appears only once, that instance will
be assumed.
The second problem comes from the cross module reference (XMR)
that the force command uses. Since the module test doesn't
instantiate top, the example uses an XMR to force the desired signal.
The signal being forced is port a in instance u1. The problem here is
that this force is done on the port from within the instance u1. The
user expects this port a of u1 to be an input but when
$lsi_dumpports evaluates the ports for the drivers, it finds that port
a of instance u1 is being driven from inside and therefore returns a
code of L.
To correct these two problems, you need to instantiate top inside
test, and drive the signal a from within test. This is done in the
following way:
module test;
wire a;
initial
begin
force a = 1'b0;