This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > FPGA Technical Tutorials > FPGA-Based Prototyping Methodology > Design-for-Prototyping > Clocking and architectural guidelines

TABLE OF CONTENTS

Xilinx FPGA FPGA Forum

Clocking and architectural guidelines

FONT SIZE : AAA

Clocking and architectural guidelines

The complexity of today’s SoC designs require specific attention be given to overall  RTL design architecture related to clocking and managing major synchronous  blocks in the system. FPGA technologies are more constrained in the available  resources for managing multiple clock domains than custom SoC technology. There  will typically be multiple FPGA parts needed to fully model the SoC design,  imposing some board-level clocking requirements. Our goal is to abstract some  notion of a global clock architecture that can be shared in the RTL description between both the FPGA and SoC implementations. The following guidelines will  help manage this complexity.

Keep clock logic in its own top-level block

If the clock generation logic is kept independent of the rest of the design, it will be  more adaptable. Likewise, we should strive to keep unrelated or loosely related  design logic out of the clock generation block. Moreover, the independent  functional aspects of the clock generation should also be separated into easily  recognizable modules. Frequently, there are many more options in the clockgeneration logic than are required for the FPGA or even for SoC for that matter. If a  block is well separated from other unrelated logic, the block can be replaced by a  prototype-specific block that simply drives a few clocks at constant frequencies.  

In many cases we may be importing IP with its own internal clocking structure.  There may be some value in hard-coding (or at least optionally hard coding) clock  selection logic, or otherwise simplifying the clock modules in the IP, if the  complexity is no longer required for the specific use model. It may even be possible  to completely remove certain components of the clock-generation logic and thereby  greatly simplify one of the most involved tasks associated with prototyping. 

Keep clock gating and switching in their own blocks, preferably at the top level.  This will allow easy and complete replacement by FPGA-equivalent structures.

Simplify clock networks for FPGA

SoC clock networks are often very complex. In general, an SoC has much greater  clock flexibility than does an FPGA. If possible, implement only a subset of the full  clocking options for prototyping, Use `define/`ifdef to control RTL expansion while  retaining the full complexity for SoC synthesis. 

Simplifying the clock structure is key to the adaptability of the design. Even if your  SoC clock structure is thoroughly documented, it may be difficult to implement in  the FPGA if it’s extremely complicated. One of the biggest contributors to clocking  complexity is test logic. Often automatic test pattern generation (ATPG) circuitry  inserts logic to multiplex clocks. Note that an FPGA, being reprogrammable, ships  fully tested. There is almost never a reason to include ATPG logic in the FPGA  prototype. Including it introduces unnecessary complexity to the FPGA clocking  structure. If the insertion is automated it can easily be disabled for the FPGA  implementation.  

However, some test logic may be required in the FPGA prototype. For example,  almost all microprocessor designs include some sort of serial debug interface that works through a JTAG clock. This is absolutely necessary for doing software  development on the FPGA. It is helpful to partition the test logic into that which is necessary for only the SoC and that which is necessary for the FPGA. At a  minimum include comments in the code to indicate which is which. Also indicate in  the comments how signals should be tied off to disable test logic that’s unnecessary  for the FPGA. Ideally, insert “`ifdef FPGA … `else … `endif” pre-processor  commands to separate functionality required for the FPGA prototype from that  required for the SoC. In the “`ifdef FPGA” clause, tie off unnecessary test logic  inputs to their disabled values so that this logic is pruned in FPGA synthesis.

Design synchronously

Avoid asynchronous loops, double-edge clocking and other structures that do not  map easily to FPGA. Limit the overall design to conventional synchronous design  methods. If unusual structures are required in the SoC design then isolate those  circuits to local blocks, which can be replaced with equivalent functions in the  FPGA design.  

Maximizing the use of conventional synchronous design style will greatly simplify  the effort required to develop the FPGA prototype. 

Minimize the portions of the design running on clocks required for external  interfaces, and use asynchronous FIFOs whenever possible to transfer data to and  from these interfaces to the system clock domain.

Synchronize resets

Remember that the FPGA configuration process initializes every block RAM,  distributed RAM, SRL, and FF to a defined state even if no reset is specified in  RTL, so explicit code is not required as it is in the SoC. Depending on how the  resets and presets are defined, they can have a significant impact on what can be  inferred and therefore how much of the FPGA’s special resources can be  automatically used. The key point is to spend more time earlier considering the reset  strategy, and write the reset logic in a way that is simple, consistent, and flexible. If  some of these FPGA considerations can be accommodated it will enable many  creative solutions.

Synchronize block boundaries

Use FFs at all block inputs and outputs. This practice will add latency and require  rescheduling of modified paths with respect to the rest of the design, but it  dramatically helps to apply timing constraints and to meet timing targets. It also  FPGA-Based Prototyping Methodology Manual 287  assists in chip layout and FPGA partitioning. Certainly we should already be  synchronizing at clock domain crossings. 

Often it is not practical to modify the design scheduling specifically for the FPGA.  However, if the common design practice of inserting FFs at the boundaries of each  designer’s block is observed, the likelihood of having FFs between partitions is  substantially higher. If we follow the practice of synchronizing boundaries then we  should have far fewer exceptions to handle when it comes to constraining the FPGA  prototype.

Think how the design might run if clocked slowly

Prototypes are constructed from multiple FPGAs, a printed circuit board, custom IP  core plug-ins, and other components. The design architecture of this mixedtechnology solution must allow the cores and peripherals to run at different rates.  Thought must be given to the interfaces between all of the elements and whether we  need to provide deep data buffering between slower running FPGAs and external  data that is running at full speed.  If addressed at the architectural level, the expected speed differences between SoC  and prototype implementations can be cleanly isolated and managed properly. For  example, in many cases rate adapters are required for the FPGA prototype. Often, if  considered early in the architectural phases of the design, major functional modules’  bus interfaces can be designed such that speed bridges are not required. Because of  the independence afforded by this architectural style, resultant designs tend to be  more robust, adaptable, and readable as well.

Enable bottom-up design flows

The ability to easily implement a bottom-up design flow can be very advantageous  to the implementation of the prototype. Many of the design and architectural  recommendations already mentioned will naturally enable bottom-up design flows. (The concepts of synchronicity, simplicity, and isolation all typically provide  benefits to these flows.) We can enhance bottom-up flows further by considering  how synthesis tools create automated enhancements. 

If high-level modules are kept free of parameters and generics, a bottom-up flow  will require less effort from the tools or engineers attempting to pre-process and  uniquify the modules. 288 Chapter 9: Design-for-Prototyping  

An exception to the preference of keeping clock logic in its own top-level block  may also be considered to more easily enable clock conversion in bottom-up flows.  If gated-clock conversion is being implemented, we may want to consider moving  the final on/off gating to the module which is being selectively disabled, so that this  type of conversion can be automatically handled by the synthesis tool without errorprone manual hierarchical modifications.

  • XC3S700A-4FGG400C

    Manufacturer:Xilinx

  • FPGA Spartan-3A Family 700K Gates 13248 Cells 667MHz 90nm Technology 1.2V 400-Pin FBGA
  • Product Categories: FPGAs

    Lifecycle:Active Active

    RoHS:

  • XC3S700A-4FTG256I

    Manufacturer:Xilinx

  • FPGA Spartan-3A Family 700K Gates 13248 Cells 667MHz 90nm Technology 1.2V 256-Pin FTBGA
  • Product Categories: FPGAs

    Lifecycle:Active Active

    RoHS:

  • XC2V1000-5FFG896C

    Manufacturer:Xilinx

  • FPGA Virtex-II Family 1M Gates 11520 Cells 750MHz 0.15um Technology 1.5V 896-Pin FCBGA
  • Product Categories: FPGAs

    Lifecycle:Obsolete -

    RoHS:

  • XC5406-6TQ100C

    Manufacturer:Xilinx

  • Xilinx TQFP
  • Product Categories:

    Lifecycle:Any -

    RoHS: -

  • XC3S700A-5FG484C

    Manufacturer:Xilinx

  • FPGA Spartan-3A Family 700K Gates 13248 Cells 770MHz 90nm Technology 1.2V 484-Pin FBGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Active Active

    RoHS:

Need Help?

Support

If you have any questions about the product and related issues, Please contact us.