zarakhan
Member level 2
verilog testbench
Hi.
I write a code for Full Adder simulation in verilog.I write a code for test it(Testbench).bbut when I run the code the following Error appears.(I am working with MaxPlusII)
Can you solve it?
module fa
(x,y,sum,carry);
input x;
input y;
output sum;
output carry;
//-----------------
wire x;
wire y;
reg sum;
reg carry;
//------------------
always @(x or y)
begin
carry=x & y;
sum=x ^ y;
end
endmodule
The following code is for test:
//‘timescale 10000 us / 10000 us
`include "fa.v"
module fa_tb();
reg x,y;
wire sum,carry;
//------
initial
begin
$monitor("%b,%b,%b,%b",x,y,sum,carry);
$dumpfile("fa.vcd");
x=0;
y=0;
#5 x=1;
#10 y=1;
#15 x=1;
#30 y=0;
end
endmodule
This Error Message Appears:
Errorroject has no output or bidirectional pins in top-level design file.
Hi.
I write a code for Full Adder simulation in verilog.I write a code for test it(Testbench).bbut when I run the code the following Error appears.(I am working with MaxPlusII)
Can you solve it?
module fa
(x,y,sum,carry);
input x;
input y;
output sum;
output carry;
//-----------------
wire x;
wire y;
reg sum;
reg carry;
//------------------
always @(x or y)
begin
carry=x & y;
sum=x ^ y;
end
endmodule
The following code is for test:
//‘timescale 10000 us / 10000 us
`include "fa.v"
module fa_tb();
reg x,y;
wire sum,carry;
//------
initial
begin
$monitor("%b,%b,%b,%b",x,y,sum,carry);
$dumpfile("fa.vcd");
x=0;
y=0;
#5 x=1;
#10 y=1;
#15 x=1;
#30 y=0;
end
endmodule
This Error Message Appears:
Errorroject has no output or bidirectional pins in top-level design file.