Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

verilog .. warning problem.

Status
Not open for further replies.

smileysam

Member level 4
Joined
Feb 19, 2006
Messages
76
Helped
12
Reputation
24
Reaction score
3
Trophy points
1,288
Activity points
1,830
Iam getting the following warning in simulation:
# ** Warning: (vsim-3015) F:/verilog/up_down.vl(7): [PCDPC] - Port size (1 or 1) does not match connection size (3) for port 'count'.

Code is as Follows:


//up_down counter
module main_module(data,up_down,load,reset,enable,clock,count);
input[2] data;
input up_down,load,reset,enable;
inout clock;
output[2] count;
clock_gen i2(clock);
up_down i1 (data,up_down,load,reset,enable,clock,count);
endmodule


module up_down(data,up_down,load,reset,enable,clock,count);
input[2] data;
input up_down,load,reset,enable,clock;
output[2] count;
reg count;
always @(posedge clock or reset)
begin
if(reset) count <=3'b000;
else
if(enable)
begin
if(load) count<=data;
else
begin
if(up_down) count<= count+1;
else count<= count -1;
end
end
end
endmodule


module clock_gen(clock);
output clock;
reg clock;
initial
begin
clock =1;
forever
begin
#50 clock = 0;
#50 clock = 1;
end
end
endmodule

Added after 1 hours 7 minutes:

prob solved..

reg count; --> reg[2:0] count;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top