Added some stuff from modem and added formal
This commit is contained in:
37
cores/primitive/clkgen/clkgen.v
Normal file
37
cores/primitive/clkgen/clkgen.v
Normal file
@@ -0,0 +1,37 @@
|
||||
`timescale 1ns/1ps
|
||||
|
||||
// =============================================================================
|
||||
// Clock generator
|
||||
// Stable public wrapper that selects the implementation.
|
||||
// =============================================================================
|
||||
module clkgen #(
|
||||
parameter integer CLK_IN_HZ = 100000000,
|
||||
parameter integer CLKFX_DIVIDE = 20,
|
||||
parameter integer CLKFX_MULTIPLY = 3,
|
||||
parameter real CLKDV_DIVIDE = 2.0
|
||||
)(
|
||||
input wire clk_in,
|
||||
output wire clk_out
|
||||
);
|
||||
`ifdef FPGA_SPARTAN6
|
||||
clkgen_spartan6_impl #(
|
||||
.CLK_IN_HZ(CLK_IN_HZ),
|
||||
.CLKFX_DIVIDE(CLKFX_DIVIDE),
|
||||
.CLKFX_MULTIPLY(CLKFX_MULTIPLY),
|
||||
.CLKDV_DIVIDE(CLKDV_DIVIDE)
|
||||
) impl_i (
|
||||
.clk_in(clk_in),
|
||||
.clk_out(clk_out)
|
||||
);
|
||||
`else
|
||||
clkgen_generic_impl #(
|
||||
.CLK_IN_HZ(CLK_IN_HZ),
|
||||
.CLKFX_DIVIDE(CLKFX_DIVIDE),
|
||||
.CLKFX_MULTIPLY(CLKFX_MULTIPLY),
|
||||
.CLKDV_DIVIDE(CLKDV_DIVIDE)
|
||||
) impl_i (
|
||||
.clk_in(clk_in),
|
||||
.clk_out(clk_out)
|
||||
);
|
||||
`endif
|
||||
endmodule
|
||||
Reference in New Issue
Block a user