Initial file upload

This commit is contained in:
Imants Pulkstenis
2019-07-12 12:19:06 +03:00
parent 9fa4b5ea1a
commit 37f46b5044
24 changed files with 3174 additions and 2 deletions
+31
View File
@@ -0,0 +1,31 @@
// This module devide FPGA input clock
// by DIVIDER.
//
//
module clock_enable_param #(
parameter WAIT =1,
parameter WIDTH =1
) (
input clk,
output enable);
reg state=1'b0;
reg [WIDTH-1:0] counter = 1'b0 ;
always@(posedge clk)begin
if(counter == 0)begin
if (state == 1) begin
state <= 0;
counter <= WAIT - 1;
end
else begin
state <= 1;
counter <= 0;
end
end
else counter <= counter -1;
end
assign enable = state;
endmodule