Vasilis
Newbie level 6
verilog ripple counter
I have a problem.Here is a verilog description of a 4 bit ripple counter:
module D_FF(D,Q,CLK,RST);
output Q;
input D,CLK,RST;
reg Q;
always @ (posedge CLK or negedge RST)
if(~RST) Q=1'b0;
else Q=D;
endmodule
module Ripple_Counter(Count,RST,A0,A1,A2,A3);
output A0,A1,A2,A3;
input Count,RST;
reg A0,A1,A2,A3;
D_FF(~A0,A0,Count,RST);
D_FF(~A1,A1,A0,RST);
D_FF(~A2,A2,A1,RST);
D_FF(~A3,A3,A2,RST);
endmodule
module Test_Ripple_Counter;
.
.
.
endmodule
When i try to load the design the following errors appear :
# ERROR: .../simulations/ripleCounter/new.vhd(17): Illegal output port connection (2nd connection).
# Region: /Test_Ripple_Counter/CUT/#D_FF#17
# ERROR: .../simulations/ripleCounter/new.vhd(18): Illegal output port connection (2nd connection).
# Region: /Test_Ripple_Counter/CUT/#D_FF#18
# ERROR: .../simulations/ripleCounter/new.vhd(19): Illegal output port connection (2nd connection).
# Region: /Test_Ripple_Counter/CUT/#D_FF#19
# ERROR:.../simulations/ripleCounter/new.vhd(20): Illegal output port connection (2nd connection).
# Region: /Test_Ripple_Counter/CUT/#D_FF#20
# Error loading design
Does anyone know what's wrong :?:
I have a problem.Here is a verilog description of a 4 bit ripple counter:
module D_FF(D,Q,CLK,RST);
output Q;
input D,CLK,RST;
reg Q;
always @ (posedge CLK or negedge RST)
if(~RST) Q=1'b0;
else Q=D;
endmodule
module Ripple_Counter(Count,RST,A0,A1,A2,A3);
output A0,A1,A2,A3;
input Count,RST;
reg A0,A1,A2,A3;
D_FF(~A0,A0,Count,RST);
D_FF(~A1,A1,A0,RST);
D_FF(~A2,A2,A1,RST);
D_FF(~A3,A3,A2,RST);
endmodule
module Test_Ripple_Counter;
.
.
.
endmodule
When i try to load the design the following errors appear :
# ERROR: .../simulations/ripleCounter/new.vhd(17): Illegal output port connection (2nd connection).
# Region: /Test_Ripple_Counter/CUT/#D_FF#17
# ERROR: .../simulations/ripleCounter/new.vhd(18): Illegal output port connection (2nd connection).
# Region: /Test_Ripple_Counter/CUT/#D_FF#18
# ERROR: .../simulations/ripleCounter/new.vhd(19): Illegal output port connection (2nd connection).
# Region: /Test_Ripple_Counter/CUT/#D_FF#19
# ERROR:.../simulations/ripleCounter/new.vhd(20): Illegal output port connection (2nd connection).
# Region: /Test_Ripple_Counter/CUT/#D_FF#20
# Error loading design
Does anyone know what's wrong :?: