UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor aeley
Visitor
4,139 Views
Registered: ‎03-10-2010

incorrect parameter in infrastructure.v

When generating a 533MHz DDR3 controller in Mig 3.3, the example project seems to expect an external 533.33MHz clock and a 200MHz clock for iodelay. If I change the 533.33MHz clock to a 100 MHz clock (more reasonable for actual implementation), and adjust the appropriate parameters for the mmcm_adv to generate the right clocks, it breaks. It seems to be due to a parameter being defined incorrectly located in infrastructure.v (line 132 in Verilog and line 140 in VHDL).

localparam real CLKIN1_PERIOD
= (CLKFBOUT_MULT_F * CLK_PERIOD)/
(DIVCLK_DIVIDE * CLKOUT_DIVIDE * nCK_PER_CLK * 1000.0); // in ns

Following the parameters up a level to example_top.v and simplifying, it becomes

localparam real CLKIN1_PERIOD
= (CLKFBOUT_MULT_F * tCK_f0)/
(DIVCLK_DIVIDE * CLKOUT_DIVIDE * 1000.0); // in ns

 where

CLKFBOUT_MULT_F = PLL VCO multiplier
tCK_f0 = period of the reference clock.
DIVCLK_DIVIDE = PLL VCO divisor
CLKOUT_DIVIDE = output divisor

The MMCM used in the design however takes CLKIN1_PERIOD as the reference clock period and not tCK_f0.

 

The default values generated by coregen based on a 533.33 reference clock just happen to work:

localparam real CLKIN1_PERIOD
= (4 * 1875)/
(2 * 2 * 1000.0); // in ns = 1.875

but adjusting for a 100MHz clock does not work:

localparam real CLKIN1_PERIOD
= (32 * 10000)/
(3 * 2 * 1000.0); // in ns = 53.333

The mmcm_adv primitive thinks the input clock is 18.75 MHz as shown in example_top_map.map:

 

ERROR:PhysDesignRules:2045 - The DIVCLK_DIVIDE value 3.000000 of MMCM_ADV instance c0_u_infrastructure/u_mmcm_adv is above the Fin / Fpfd value 1.875000, where Fin is the input frequency, 18.750000 MHz, and Fpfd min - max values of 10.000000 - 500.000000 MHz.

 Changing CLKIN1_PERIOD to 10.000 works.


 

 

 

 

2 Replies
Xilinx Employee
Xilinx Employee
3,947 Views
Registered: ‎04-11-2008

Re: incorrect parameter in infrastructure.v

Yep this does look wrong. You are working in a period environment, not a frequency so you need to invert some parameters.

 

I do not really see why this parameter calculation is in there, I suspect it is for some legacy reason.

What this parameter needs to be set to is the period of the input clock to  PLL. It has no dependance on CLKFBOUT_MULT_F or DIVCLK_DIVIDE or CLKOUT_DIVIDE. Therefore i would recommend changing:

 

localparam real CLKIN1_PERIOD
             = (CLKFBOUT_MULT_F * tCK_f0)/
             (DIVCLK_DIVIDE * CLKOUT_DIVIDE * 1000.0);  // in ns

 

should be changed to

 

localparam real CLKIN1_PERIOD = 10.000;

 

Thanks,

John

 

 

 

0 Kudos
Explorer
Explorer
3,859 Views
Registered: ‎08-14-2007

Re: incorrect parameter in infrastructure.v

The actual clock period is defined in the top level (ie - example_top) "TCK." 

 

This gets passed to the infrastructure module and used as the clk_period. If you want to change clock period, just change TCK value

0 Kudos