Forum Discussion

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

what is the problem with this program. only a short program!

always @ (posedge clk or negedge rst_n or posedge alarm)

if(!rst_n || alarm) cnt_s <= 7'b0;

else if (cnt_s == 7'd60 ) begin

cnt_m <= cnt_m + 1 ;

cnt_s <= 7'b0 ;

end

error : Error (10028): Can't resolve multiple constant drivers for net "cnt_m[3]" at timeinterrupt.v(42)

3 Replies

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

    Is there any othere code in the program where the cnt_m writed? I think the problem is that you change the cnt_m value in different always blocks.

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

    yes ... thanks for your answer...

    i have used it in another always blocks