Eletronics

Custom FPGA Design: An Overview

Field Programmable Gate Arrays (FPGAs) are integrated circuits that can be programmed and reconfigured by the user after manufacturing, making them a flexible and powerful option for digital circuit implementation. While hobbyists typically use commercial FPGAs from vendors like Xilinx and Intel (Altera), it is possible to design your own FPGA as well. This article provides an overview of the key steps involved in custom FPGA design.

Overview of FPGA Architecture

To understand how to design an FPGA, it is essential to understand the high-level architecture. A basic FPGA consists of the following key components:

  1. Configurable Logic Blocks (CLBs): These are the basic logic units whose functions can be programmed. CLBs include lookup tables (LUTs) and flip-flops.
  2. Programmable Interconnects: Routing channels between CLBs can be programmed to connect them in different ways. This includes connection boxes and switch matrices.
  3. I/O Blocks: Provide the interface between the I/O pins and internal programmable logic, supporting various I/O standards.
  4. Clock Circuitry: Includes clock buffers, PLLs, and DLLs to drive clock networks across the FPGA.
  5. Memory and DSP Blocks: Some FPGAs include dedicated blocks of RAM, ROM, and DSP slices.
  6. Configuration Memory: Stores the programming that defines the FPGA functionality, which can be volatile or non-volatile.
  7. Hard Cores for Interfaces: Some FPGAs have hard cores for various interfaces like PCIe and Ethernet integrated on-chip.
  8. Processor Cores: Modern FPGAs may include embedded ARM cores for SoC applications.

This architecture, with its flexible programmable logic, routing, and I/O, provides the foundation for an FPGA that can be customized by designers.

FPGA Design Flow Overview

FPGA Design Overview
FPGA Design Overview

Designing an FPGA from scratch involves several steps grouped into two main phases:

  1. Design and Verification
  2. Physical Implementation

1. Design and Verification

This phase involves using Hardware Description Languages (HDLs) like VHDL or Verilog to design, simulate, and verify the functionality of the various FPGA blocks at the register-transfer level (RTL). Electronic Design Automation (EDA) tools like Quartus from Intel or Vivado from Xilinx are leveraged for synthesis and simulation. Reusable IP cores may be purchased for some functions.

Once RTL models of the FPGA fabric are finalized, gate-level netlists are generated, checked for logical equivalence against RTL, and timing analysis is done to meet speed goals.

2. Physical Implementation

The gate-level netlist is then taken through the physical design stages of floorplanning, place-and-route, timing closure, and tapeout. EDA tools automate mapping the netlist to actual gates and transistors on silicon, but manual optimization is required.

The final tapeout is the complete database (GDSII stream format) defining the photolithographic masks to manufacture the FPGA. This is sent to a silicon foundry like TSMC for fabrication.

This overall flow requires expertise in digital logic design, HDL modeling, ASIC/FPGA architecture, and semiconductor fabrication. Let’s look at each major step in more detail.

Detailed FPGA Design Steps

Here are the specifics of designing and implementing an FPGA from concept to final silicon:

1. Concept Development

  • Define target device capabilities and applications. Factors like logic cells, speed, power, cost, and features impact architecture decisions.
  • Specify high-level functional requirements. Example: “The FPGA should support 250K logic cells, 200 MHz speed, and DDR3 memory interface.”
  • Plan top-level architecture – logic blocks, routing channels, I/O count, clocking, embedded IP cores, etc.
  • Evaluate commercial IP cores that can be licensed to reduce design effort for standard functions.

2. Feasibility Study

  • Research existing open literature and patents around similar architectures.
  • Create silicon area and power rough estimates for the planned architecture.
  • Estimate expected timing performance based on the planned process node.
  • Assess if performance targets can realistically be met within area and power budgets.
  • Refine architecture if needed based on feasibility study results.

3. RTL Functional Design

  • Use HDLs like VHDL or Verilog to model the following FPGA modules at the RTL level:
    • Configurable Logic Blocks (CLBs)
    • Input/Output Blocks (IOBs)
    • Programmable Interconnect
    • Clocking resources
    • Memory/DSP blocks
    • Configuration memory
    • Any other logic blocks
  • Verify functionality by simulating RTL modules/subsystems. Develop testbenches to validate operation.
  • Iterate modules as needed until functionally correct.

4. Synthesis and Gate-Level Simulations

  • Perform logic synthesis to convert RTL models into technology-mapped gate-level netlists.
  • Verify netlists match RTL functional behavior via gate-level simulation.
  • Run equivalency checking to formally verify logical equivalence of netlists vs RTL code.
  • Iterate until netlists match RTL functionality and are logically equivalent.

5. Static Timing Analysis

  • Perform static timing analysis on the gate-level netlist using timing constraints.
  • Identify critical timing paths that need optimization to meet clock frequency targets.
  • Modify RTL and re-synthesize to close timing if needed.
  • Sign-off on timing closure when all paths meet timing goals with margin.

6. Floorplanning

  • Determine the relative placement of FPGA blocks on the die based on connectivity and shape.
  • Decide aspect ratio and pin locations.
  • Allocate space for routing channels between blocks.
  • Ensure a good floorplan to optimize timing, routability, and die area.

7. Power Planning

  • Estimate power consumption of logic blocks and I/Os.
  • Plan power grid distribution across the die to provide clean power to cells.
  • Insert power gating cells or switches if needed to control power.
  • Add voltage islands if required for low power modes.

8. Place and Route

  • Automatically place logic gates and cells within each FPGA functional block.
  • Route interconnect wires between cells following electrical and timing constraints.
  • Verify all connections meet physical design rules for width/spacing.
  • Iterate optimizations to meet timing closure and minimize wire length.

9. Physical Verification

  • Run design rule checks for errors like minimum spacing or overlaps between shapes and layers.
  • Verify layout versus schematic matching.
  • Extract parasitics and redo timing analysis to validate performance.
  • Perform formal verification on the final routed layout.
  • Sign-off physical verification when the tapeout database passes all checks.

10. Tapeout

  • Generate the final GDSII layout database containing mask layers to send for fabrication.
  • Include other deliverables like LEF, Liberty timing models, CDL netlist, etc.
  • Perform manufacturability checks like DFM analysis.
  • Submit tapeout data to a foundry like TSMC for mass production.

With these steps complete, the FPGA design is fabricated into actual silicon chips that can be programmed by designers.

Challenges in Custom FPGA Design

Achronix FPGA
Achronix FPGA

While the design flow seems straightforward, creating a custom FPGA from scratch poses several tough challenges:

  • Achieving timing closure across place-and-route, synthesis, and physical optimization is extremely difficult given the complexity.
  • The router has to implement programmable interconnects with an enormous solution space.
  • Strict silicon area targets for optimal transistor density and die yield.
  • The power grid has to provide very clean power across the die.
  • Thorough simulation and verification require exhaustive testbenches.
  • Fabrication process tolerances can affect performance.
  • Requires large, experienced, multi-disciplinary engineering teams.
  • Total design costs can easily reach tens of millions of dollars.

Because of these challenges, custom FPGA startups require substantial financial backing to design competitive products. Leveraging existing FPGA vendor solutions or licensing their IP can help mitigate technical risks and costs.

When Does Custom FPGA Design Make Sense?

Given the high costs, effort, and risks involved, developing a custom FPGA device from scratch is only justified for a few specific applications:

  • Building differentiated FPGA products for a niche application space not served well by existing vendors. Example: radiation-hardened FPGAs.
  • Merging an FPGA with other silicon IPs like processors, SerDes, analog, etc., to create a highly integrated system-on-chip solution.
  • Implementing novel FPGA architectures for research purposes to push new ideas in academia.
  • Developing a strategic advantage in critical domains like aerospace, defense, or high-end computing where a competitive edge in programmable chips is valued.

For most commercial applications, licensing proven FPGA technology from Xilinx, Intel, or others and customizing the design on top offers a faster time-to-market with lower risk.

Options for FPGA Design Without Fabricating Silicon

For hobbyists, researchers, or smaller teams with limited budgets, there are options to design and validate custom FPGA architectures without having to actually fabricate the chip, which requires millions of dollars:

FPGA Prototyping Boards

Prototyping boards like the Xilinx Virtex-7 or Intel (Altera) Stratix-10 allow implementing and testing FPGA architectures using their programmable fabric.

FPGA Emulation on FPGAs

Using HLS or HDLs, the architecture of a novel FPGA can be modeled and functionally verified by mapping it onto an existing physical FPGA.

FPGA Simulation Environments

Computer-based simulations of FPGA fabrics using HDL testbenches and tools like ModelSim can be created to evaluate new architectures.

Rapid Prototyping Using CPLDs

For limited logic capacity testing, Complex Programmable Logic Devices (CPLDs) provide an easier and cheaper alternative to prototype concepts.

Cloud-based FPGA Resources

Xilinx and Intel provide cloud-based access to FPGAs that can be leveraged for experiments before committing to silicon fabrication.

While not exactly the same as taping out real custom silicon, these options allow flexibility for innovators and startups to validate their ideas without prohibitive fab costs.

Open Source FPGA Projects

For reference, there are some open-source projects that aim to provide free and customizable FPGA platforms:

  • Symbiflow: Toolchain for developing open-source FPGAs.
  • LiteX: Migen and LiteX ecosystem for building FPGA-based systems.
  • OpenFPGA: Open-source framework for developing FPGA architectures.
  • GreenArrays: Ultra low-power open FPGA architecture.
  • Kiwi: Educational miniature FPGA board designed in New Zealand.

While full-custom FPGA design requires substantial expertise and effort, these open initiatives help democratize access to FPGA technology for hobbyists.

Conclusion

In conclusion, Designing a custom FPGA device from the ground up is a complex process requiring advanced engineering expertise across RTL design, EDA tools, architecture, physical implementation, and fabrication. While challenging, for specific applications like IP differentiation, research, or vertical integration, a custom-designed FPGA can provide strategic benefits. For most purposes, however, leveraging existing proven FPGA technology and IP from vendors like Xilinx and Intel provide the best trade-offs. The emergence of open-source FPGA tooling and platforms is also making FPGA customization more accessible to innovators.

Anshul Pal

Hey there, I'm Anshul Pal, a tech blogger and Computer Science graduate. I'm passionate about exploring tech-related topics and sharing the knowledge I've acquired. Thanks for reading my blog – Happy Learning

Leave a Reply

Your email address will not be published. Required fields are marked *