Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
module top (clk, clear, count);
input clk, clear;
output reg [7:0] count=0;
always @ (posedge clk)
count <= clear ? 0 : count + 1;
endmodule
module top (clk, clear, count);
input clk, clear;
output [7:0] count;
COUNTER #(.WIDTH(8)) u1 (.CLK(clk), .CLEAR(clear), .OUT(count));
endmodule