Intel® FPGA SDK for OpenCL™: Stratix® V Network Reference Platform Porting Guide

ID 683645
Date 11/06/2017
Public
Document Table of Contents

3.7.1. Supply the Kernel Clock

The OpenCL™ Kernel Clock Generator component provides the kernel clock and its 2x variant. For more information, refer to the OpenCL Kernel Clock Generator section of the Intel® FPGA SDK for OpenCL™ Custom Platform Toolkit User Guide.
Figure 3. The OpenCL Kernel Clock Generator Parameter Editor GUIThis figure shows where the REF_CLK_RATE parameter specifies the frequency of the reference clock that connects to the pll_refclk. In this case, the frequency is 100 MHz.

The KERNEL_TARGET_CLOCK_RATE parameter specifies the frequency that the Intel® Quartus® Prime software attempts to achieve during compilation. The board hardware contains some logic that the kernel clock clocks; at a minimum it includes the clock crossing hardware. To prevent this logic from limiting the Fmax achievable by a kernel, the KERNEL_TARGET_CLOCK_RATE must be higher than the frequency that a simple kernel can achieve on your device. For the Stratix® V C2 device that the Stratix V Network Reference Platform targets, the KERNEL_TARGET_CLOCK_RATE is 380 MHz.

CAUTION:
When developing a Custom Platform, a high target Fmax might cause difficulty in achieving timing closure.

When developing your Custom Platform and attempting to close timing, add an overriding Synopsys Design Constraints (SDC) definition to relax the timing of the kernel. The following code example from the <path_to_s5_net>/hardware/s5_net/top_post.sdc file applies a 5 ns (200 MHz) maximum delay constraint on the OpenCL kernel during base revision compilations:

if {! [string equal $::TimeQuestInfo(nameofexecutable) "quartus_map"]}
{
  if { [get_current_revision] eq "base" }
  {
    post_message -type critical_warning "Compiling with slowed OpenCL Kernel clock."
    if {! [string equal $::TimeQuestInfo(nameofexecutable) "quartus_sta"]}
    {
      set kernel_keepers [get_keepers system_inst\|kernel_system\|*]
      set_max_delay 5 -from $kernel_keepers -to $kernel_keepers
    }
  }
}
CAUTION:
Applying this 5 ns SDC definition constrains both the kernel clock and the 2x clock to 5 ns, resulting in significantly slower kernel speeds.