Skip to content

Commit

Permalink
made controller async again
Browse files Browse the repository at this point in the history
  • Loading branch information
faramire committed Apr 19, 2024
1 parent 959ee81 commit 5938624
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/stopwatch_top.v
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,19 @@ module controller (
output reg display_enable //
);

always @(posedge clk) begin
always @(posedge start_stop) begin
if (!res) begin
counter_enable <= 1'b0;
display_enable <= 1'b1;
end else begin
counter_enable <= ~counter_enable;
display_enable <= ~display_enable;
end
end

always @(posedge lap_time) begin
if (!res) begin
display_enable <= 1'b1;
end else begin
display_enable <= ~display_enable;
end
end

Expand Down

0 comments on commit 5938624

Please sign in to comment.