Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

Can't resolve multiple constant drivers ERROR

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.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    oh!!!

    now i understand :o

    i made a reset for the var elsewhere.

    Thanks alot, it is working now.