Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21592 ディスカッション

Can't resolve multiple constant drivers ERROR

Altera_Forum
名誉コントリビューター II
1,463件の閲覧回数

Hi, 

 

i can't figure out what the problem is.  

 

i am getting the error: 

 

Error (10028): Can't resolve multiple constant drivers for net "BCLK_count.0000" at i2c.v(163) 

 

and others for the other BCLK_count array variables. 

 

i tried many other ways of writing the same thing, this is the latest: 

 

always @(negedge BCLK) begin case (BCLK_count) 4'd0: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd1; end 4'd1: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd2; end 4'd2: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd3; end 4'd3: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd4; end 4'd4: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd5; end 4'd5: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd6; end 4'd6: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd7; end 4'd7: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd0; end default: begin LEDS_VAR = AUD_ADC; BCLK_count = 4'd0; end //default: LEDS_VAR = AUD_ADC; BCLK_count = 0; endcase end  

 

Thanks and Best Regards, 

Ran Cohen.
0 件の賞賛
3 返答(返信)
Altera_Forum
名誉コントリビューター II
634件の閲覧回数

Where else in your code are you altering the value of BCLK_count? The section you have posted looks OK in isolation.

Altera_Forum
名誉コントリビューター II
634件の閲覧回数

A variable set in the present always block isn't allowed to be set anywhere else in your design.

Altera_Forum
名誉コントリビューター II
634件の閲覧回数

oh!!! 

 

now i understand :o  

 

i made a reset for the var elsewhere. 

 

Thanks alot, it is working now.
返信