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.

Multiple driver error

Status
Not open for further replies.

madalin1990

Full Member level 2
Full Member level 2
Joined
Apr 4, 2012
Messages
124
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Visit site
Activity points
2,090
I can't find the source of this error:
"Signal int_sum[0][0] in unit multiplier is connected to following multiple drivers:"

Here's the code:
Code:
module multiplier(A ,B , P);

parameter BIT_WIDTH = 4;

input [BIT_WIDTH-1 : 0] A;
input [BIT_WIDTH-1 : 0] B;
output  [2*BIT_WIDTH-1 : 0] P;

wire [BIT_WIDTH-1 : 0] int_sum  [BIT_WIDTH-1 : 0];
wire [BIT_WIDTH-1 : 0] int_cout [BIT_WIDTH-1 : 0];

genvar i,j;
generate
   for(i=0;i<=BIT_WIDTH-1;i=i+1)				// B corresponds to i
		for(j=0;j<=BIT_WIDTH-1;j=j+1)			// A corespond to j
			if(i==0)
				if(j <= BIT_WIDTH-1 )
					begin:FIRST_ROW
							mul_unit(
								.in_x(A[j]), 
								.in_y(B[0]), 
								.cin(), 
								.sin(), 
								.cout(int_cout[i][0]), 
								.sout(int_sum[i][0])
										);
					end
			
			else
					if(i == BIT_WIDTH-1)
						begin:LAST_ROW
								mul_unit(
									.in_x(), 
									.in_y(B[i]), 
									.cin(int_cout[i-1][j]), 
									.sin(int_sum[i-1][j+1]), 
									.cout(int_cout[i][j]), 
									.sout(int_sum[i][j])
											);
						end
					else
							begin:OTHER_ROW
							mul_unit(
								.in_x(), 
								.in_y(B[i]), 
								.cin(int_cout[i-1][j]), 
								.sin(int_sum[i-1][j+1]), 
								.cout(int_cout[i][j]), 
								.sout(int_sum[i][j])
								);
							end
endgenerate;

	for(i=0;i<=BIT_WIDTH-1;i=i+1)			// B corresponds to i
		for(j=0;j<=BIT_WIDTH-1;j=j+1)		// A corespond to j
			if(i< BIT_WIDTH -1 )
				assign P[i] = int_sum[i][0]	;
			else
				if(j< BIT_WIDTH-1)
					assign P[BIT_WIDTH+j] = int_sum[i][j];
				else
					assign P[BIT_WIDTH+j] = int_cout[i][j]; 
		

endmodule
 

Probably, because 'else' at line 29 corresponds to 'if' at line 17 (not 16).
Use additional begin-end for each if-else.
 

Now while i^2 = j^2, i != j. :p

I think you may have put an i where you intended a j.

This bit

Code:
generate
   for(i=0;i<=BIT_WIDTH-1;i=i+1)				// B corresponds to i
		for(j=0;j<=BIT_WIDTH-1;j=j+1)			// A corespond to j
			if(i==0)
				if(j <= BIT_WIDTH-1 ) // <== are you sure about this? (*)
					begin:FIRST_ROW
							mul_unit(
								.in_x(A[j]), 
								.in_y(B[0]), 
								.cin(), 
								.sin(), 
								.cout(int_cout[i][0]), 
								.sout(int_sum[i][0]) // <== That one!
										);

First iteration, i=0. And j will iterate over 0 to BIT_WIDTH-1. for j=0 everything is fine (no conflict). And the next round j = 1 ... Then you still have i=0, so you try to assign the .sout of your mul_unit twice to int_sum[0][0]. And same for j=2 etc etc.

The thing marked "are you sure about this" ... how is that statement ever NOT going to be true in that loop? So what are the "else" statements after it going to do?
 
"You didnt list the multiple drivers..." ---- Well this is the message xilinx ise webpack returned

As always you're right mr.flibble, that line is useless.regarding the error I think i solved it.I have tangled i with j in several places
 

Yeah, mixing up your loop variables is always a fun way to generate some head scratching moments. Anyways, glad you managed to solve it. :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top