andrew257
Member level 2
unexpected token
what is wrong with following code? i keep getting an unexpected token error message pointing to the condition statement, something to do with '=' ?????
reg count = 16;
always @ (posedge clk)
begin
if (start)
count = (count > 0) ? count-1 : count =16;
else
count = 16;
end
what is wrong with following code? i keep getting an unexpected token error message pointing to the condition statement, something to do with '=' ?????
reg count = 16;
always @ (posedge clk)
begin
if (start)
count = (count > 0) ? count-1 : count =16;
else
count = 16;
end