Parth Adroja
Newbie level 3
Code dot - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 module assignment(Q,clk,rst); input clk,rst; output [2:0]Q; always @(posedge clk) begin if(rst); begin Q<=3'b000; end else() begin case(Q) 3'b000: Q<=3'b001; 3'b001: Q<=3'b010; 3'b010: Q<=3'b100; 3'b100: Q<=3'b110; default: Q<=3'b000; endcase end end endmodule
i'm getting this error in above program.
"near "else": syntax error, unexpected else"
can anyone help me?
thanks in advance
Last edited by a moderator: