Commit dc1a2f63 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

wrc_core: set g_ref_clock_rate based on pcs 8/16bit width

parent 2da09bd3
......@@ -500,7 +500,7 @@ begin
generic map(
g_interface_mode => PIPELINED,
g_address_granularity => BYTE,
g_ref_clock_rate => 125000000,
g_ref_clock_rate => f_refclk_rate(g_pcs_16bit),
g_ext_clock_rate => 10000000,
g_with_ext_clock_input => g_with_external_clock_input)
port map(
......@@ -540,7 +540,7 @@ begin
g_address_granularity => BYTE,
g_num_ref_inputs => 1,
g_num_outputs => 1 + g_aux_clks,
g_ref_clock_rate => 125000000,
g_ref_clock_rate => f_refclk_rate(g_pcs_16bit),
g_ext_clock_rate => 10000000)
port map(
clk_sys_i => clk_sys_i,
......
......@@ -11,6 +11,8 @@ use work.softpll_pkg.all;
package wrcore_pkg is
function f_refclk_rate(pcs_16 : boolean) return integer;
-----------------------------------------------------------------------------
--PPS generator
-----------------------------------------------------------------------------
......@@ -631,3 +633,17 @@ package wrcore_pkg is
end component;
end wrcore_pkg;
package body wrcore_pkg is
function f_refclk_rate(pcs_16 : boolean)
return integer is
begin
if (pcs_16) then
return 62500000;
else
return 125000000;
end if;
end function;
end package body wrcore_pkg;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment