Forum Discussion
Altera_Forum
Honored Contributor
13 years agothanks.. I thought that updating registers at the end of an always block was only with non blocking assignments..
However I tried putting it in a more controlled format, such as a case like below, but its still not working.. Should I make it as an FSM? The thinking behind this is that the register click count will change its value every 0.1 second, and every 0.1 the value is changed using the case statement. However when put on the board only the fourth and second display show the square and its not rotating.. =/reg clickcount;
assign click = ((ticker == 5000000)?1'b1:1'b0);
always @ (click)
begin
if(clickcount == 7)
clickcount <= 0;
else
clickcount <= clickcount + 1;
end
always @(*)
begin
case(clickcount)
0: fourth = 4'd1;
1: third = 4'd1;
2: second = 4'd1;
3: first = 4'd1;
4: first = 4'd2;
5: second = 4'd2;
6: third = 4'd2;
7: fourth = 4'd2;
endcase
end