Last active
February 25, 2023 16:06
-
-
Save tuna-f1sh/a0333d17ed95a3f08325c80ba30f4534 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reg [3:0] d0; | |
reg [3:0] d1; | |
always @(posedge clk) | |
begin | |
d0 <= ((d0 & 9) == 9) ? 4'b0 : d0 + 1; | |
if ((d0 & 9) == 9) d1 <= d1 + 1; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment