Initial commit

This commit is contained in:
Nikolay Puzanov
2021-02-28 18:59:56 +03:00
parent ff795d2b6e
commit 2fbacc0544
61 changed files with 6063 additions and 0 deletions

24
source/pll_lock_reset.sv Normal file
View File

@@ -0,0 +1,24 @@
`timescale 1ns/100ps
`default_nettype none
`include "assert.vh"
module pll_lock_reset #(parameter RESET_LEN = 8)
(input wire pll_clock,
input wire pll_lock,
output wire reset);
initial begin
`assert(RESET_LEN > 1);
end
logic [RESET_LEN:0] rst_sr;
initial rst_sr = '0;
always_ff @(posedge pll_clock, negedge pll_lock)
if (~pll_lock) rst_sr <= '0;
else rst_sr <= { 1'b1, rst_sr[RESET_LEN:1] };
assign reset = ~rst_sr[0];
endmodule // pll_lock_reset