Detailed explanation of the power on process of lattice FPGA

 Here's a detailed technical breakdown of the power-on process for Lattice FPGAs (using iCE40, ECP5, or MachXO families as reference):



Lattice FPGA Power-On Sequence

The boot process involves multiple hardware and firmware-controlled stages:


1. Power Rail Stabilization

  • Required Voltage Rails (typical):

    • Core Voltage (VCC): 1.2V (ECP5) / 1.0V (iCE40)

    • I/O Voltage (VCCIO): 1.8V/2.5V/3.3V (bank-dependent)

    • Auxiliary Voltage (VCCAUX): 2.5V/3.3V (for PLLs, configuration logic)

  • Power Sequencing:

    • Option 1: Monolithic ramp (all rails together)

    • Option 2: Staggered (VCCAUX → VCC → VCCIO)

    • Critical: Must meet datasheet timing (e.g., ECP5 requires VCC within 50ms of VCCAUX)


2. Reset and Configuration Phase

A. Power-On Reset (POR) Circuit

  • Internal POR circuit monitors:

    • All voltage rails

    • Clock stability (if external oscillator used)

  • POR Timeout: Typically 100-300ms (device-specific)

  • Reset States:

    • Cold Reset: Full reconfiguration

    • Warm Reset: Partial reconfiguration (if supported)

B. Configuration Mode Selection

  • Sampled at dedicated MODE[2:0] pins:

    ModeProtocolTypical Use
    SPISerial FlashStandalone boot
    JTAGIEEE 1149.1Debug/programming
    I2CSlaveHost-controlled
    Parallel8/16-bit busLegacy systems

3. Bitstream Loading

A. Non-Volatile (Flash-Based) FPGAs (e.g., MachXO2/3)

  1. Internal Boot ROM executes

  2. Reads embedded Flash (NVM) for configuration

  3. Optional AES-256 decryption (if enabled)

  4. CRC verification (aborts on failure)

B. Volatile FPGAs (e.g., ECP5, iCE40)

  1. External Memory Interface activates:

    • SPI Flash (most common)

    • Lattice Wishbone or Slave Parallel modes

  2. Bitstream phases:

    • Header: Checks device compatibility (IDCODE check)

    • Payload: Configuration data + optional compression

    • Termination: CRC32 validation


4. Initialization and Startup

A. Clock Tree Activation

  • Primary clock selection (external/internal)

  • PLL lock wait (if used) - typically 1-10ms

  • Clock monitoring circuits enable

B. I/O Bring-Up Sequence

  1. Bank voltage stabilization

  2. Pin states transition:

    • Configuration pins release from high-Z

    • User I/O assumes default states (per bitstream)

  3. Dedicated pins (like DONE, INITN) assert:

    • INITN: Low during config, high on success

    • DONE: Final handshake signal

C. Functional Startup

  • GR (Global Reset) release

  • User logic begins operation

  • Optional POST (Power-On Self Test) if implemented


5. Error Handling

  • Common Failure Modes:

    SymptomLikely CauseDebug Steps
    Stuck in INITNBitstream CRC errorVerify flash contents
    DONE lowPower sequencing failureCheck rail timings
    Intermittent opsClock instabilityProbe PLL lock status

6. Timing Diagram (Typical)


Time        | 0ms      50ms      100ms     150ms     200ms
--------------------------------------------------------------------
VCCAUX      | __/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
VCC         | ____/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
POR         | ____________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
CONFIG      | __________________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
DONE        | ______________________________________/¯¯¯¯¯¯¯
User I/O    | __________________________________________/¯¯¯

7. Design Considerations

  1. Power Sequencing:

    • Use Lattice's recommended PMICs (e.g., XPOWER series)

    • Monitor with voltage supervisors (e.g., TPS3839)

  2. Configuration Reliability:

    • Implement dual-boot (MachXO3D feature)

    • Use golden fallback images

  3. Signal Integrity:

    • Keep configuration traces < 50mm (SPI clock)

    • Add series termination for > 25MHz clocks


Debugging Tips

  • Oscilloscope Checks:

    • Probe all power rails for noise (<5% ripple)

    • Verify INITN/DONE timing

  • Lattice Diamond/Primary Tools:

    tcl

    # Check bitstream header
    report_device -file device_check.rpt
    # Verify SPI flash connection
    verify_config -interface SPI -file design.bit

评论

此博客中的热门博文

Detailed Explanation of STM32 HAL Library Clock System

How To Connect Stm32 To PC?

How to add a GPS sensor to ESP32 for Wokwi?