working stop watch

This commit is contained in:
2020-10-26 17:35:52 -05:00
parent 4886fad4b2
commit a0b211338c
4 changed files with 47 additions and 39 deletions

View File

@@ -1,11 +1,17 @@
`default_nettype none
// dummy clock generator, should be replaced by a PLL clock gen eventually
module clk_gen(
module clk_gen #(parameter DIVISION=22)(
input wire i_clk,
output wire o_clk
);
assign o_clk = i_clk;
reg [DIVISION-1:0] counter = 0;
always @(posedge i_clk) begin
counter <= counter + 1;
end
assign o_clk = counter[DIVISION-1];
endmodule
// Local Variables: