Guest
I was writting a little testbench for my verilog module in verilog.
The module under test is
module test1 ( clock_in, data_in, data_out );
input clock_in;
input [31:0] data_in;
output [31:0] data_out;
The testbench is
module Test_test1;
wire [31:0] data_out;
reg [31:0] data_in;
reg clock_in;
test1 u1(clock_in,data_in,data_out);
initial begin
clock_in=1;
data_in=32'HAAAAAAAA;
end
$display(" clock_in=%b data_in=%h data_out=%h
",clock_in,data_in,data_out);
endmodule
The problem is when I was trying to simulate it under modelsim, I got
warning like
** Warning: (vsim-3015) /home/elyl3/examples_f/addone/testbench.v(5):
[PCDPC] - Port size (32 or 32) does not match connection size (1) for
port 'data_in'.
Region: /test1_tb/u1
** Warning: (vsim-3015) /home/elyl3/examples_f/addone/testbench.v(5):
[PCDPC] - Port size (32 or 32) does not match connection size (1) for
port 'data_out'.
Region: /test1_tb/u1
Have no ideas why I cann't assign a 32bits value to my module port?
very confused.
Any tips will be appreciated.
Thanks a lot
Andy
The module under test is
module test1 ( clock_in, data_in, data_out );
input clock_in;
input [31:0] data_in;
output [31:0] data_out;
The testbench is
module Test_test1;
wire [31:0] data_out;
reg [31:0] data_in;
reg clock_in;
test1 u1(clock_in,data_in,data_out);
initial begin
clock_in=1;
data_in=32'HAAAAAAAA;
end
$display(" clock_in=%b data_in=%h data_out=%h
",clock_in,data_in,data_out);
endmodule
The problem is when I was trying to simulate it under modelsim, I got
warning like
** Warning: (vsim-3015) /home/elyl3/examples_f/addone/testbench.v(5):
[PCDPC] - Port size (32 or 32) does not match connection size (1) for
port 'data_in'.
Region: /test1_tb/u1
** Warning: (vsim-3015) /home/elyl3/examples_f/addone/testbench.v(5):
[PCDPC] - Port size (32 or 32) does not match connection size (1) for
port 'data_out'.
Region: /test1_tb/u1
Have no ideas why I cann't assign a 32bits value to my module port?
very confused.
Any tips will be appreciated.
Thanks a lot
Andy