direction and start stop now working

This commit is contained in:
Imants Pulkstenis
2020-04-13 19:23:11 +03:00
parent 45652812e3
commit 9c73fa1193
4 changed files with 37 additions and 44 deletions
+2 -2
View File
@@ -34,10 +34,10 @@ always@(posedge clk) begin
if (r_adder >= max )begin
r_adder <= 0;
if (direction) begin
r_counter <= r_counter + 1;
r_counter <= r_counter - 1;
end
else begin
r_counter <= r_counter - 1;
r_counter <= r_counter + 1;
end
end
else begin