1
0
mirror of https://github.com/olofk/serv.git synced 2026-02-02 06:20:46 +00:00

xilinx PLL: allows to specify PLL output frequency (16 or 32 MHz)

This commit is contained in:
Gwenhael Goavec-Merou
2019-11-10 17:32:38 +01:00
committed by Olof Kindgren
parent 1f6d215d19
commit d90030b955
3 changed files with 13 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ module servix
input wire i_clk,
output wire q);
parameter frequency = 32;
parameter memfile = "zephyr_hello.hex";
parameter memsize = 8192;
parameter PLL = "NONE";
@@ -11,7 +12,9 @@ module servix
wire wb_clk;
wire wb_rst;
servix_clock_gen clock_gen
servix_clock_gen
#(.frequency (frequency))
clock_gen
(.i_clk (i_clk),
.o_clk (wb_clk),
.o_rst (wb_rst));

View File

@@ -4,6 +4,8 @@ module servix_clock_gen
output wire o_clk,
output reg o_rst);
parameter frequency = 32;
wire clkfb;
wire locked;
reg locked_r;
@@ -12,7 +14,7 @@ module servix_clock_gen
#(.BANDWIDTH("OPTIMIZED"),
.CLKFBOUT_MULT(16),
.CLKIN1_PERIOD(10.0), //100MHz
.CLKOUT0_DIVIDE(50),
.CLKOUT0_DIVIDE((frequency == 32) ? 50 : 100),
.DIVCLK_DIVIDE(1),
.STARTUP_WAIT("FALSE"))
PLLE2_BASE_inst