Add CPLD flash loader for automatic FPGA bitstream configuration from serial flash#3
Draft
Add CPLD flash loader for automatic FPGA bitstream configuration from serial flash#3
Conversation
Co-authored-by: gzalo <538127+gzalo@users.noreply.github.com>
Co-authored-by: gzalo <538127+gzalo@users.noreply.github.com>
Co-authored-by: gzalo <538127+gzalo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Support persisting FPGA bitstream in serial flash
Add CPLD flash loader for automatic FPGA bitstream configuration from serial flash
Oct 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements support for persisting the FPGA bitstream in the onboard AT45DB041B serial flash memory, enabling automatic FPGA configuration on power-up without requiring an external JTAG programmer.
Problem
The NComputing L130 board currently requires external JTAG programming of the FPGA on every power cycle. While the
cpld_passthroughproject enables JTAG programming, it's not suitable for standalone/production deployments where the board needs to operate autonomously.Solution
A new CPLD project
cpld_flash_loaderthat:Implementation Details
Architecture
The design consists of four main VHDL modules:
spi_master.vhd (100 lines) - SPI Mode 0 master controller
flash_reader.vhd (165 lines) - AT45DB041B flash reader
fpga_config.vhd (172 lines) - FPGA Passive Serial configuration controller
cpld_flash_loader.vhd (201 lines) - Top-level integration
Pin Assignments
The CPLD (EPM3128ATC100-10) uses 12 pins:
Technical Specifications
LED Behavior
Design Considerations
nSTATUS Signal
FPGA pin 146 (nSTATUS) is not connected to the CPLD. The configuration sequence uses fixed timing delays based on the Cyclone datasheet specifications:
Flash Memory
The AT45DB041B operates in default 264-byte page mode. The continuous array read command (0xE8) works regardless of page size configuration, simplifying the design.
Development vs Production
cpld_passthroughfor JTAG programmingcpld_flash_loaderfor autonomous operationDocumentation
Comprehensive documentation provided:
Testing
Usage Workflow
Requirements Compliance
All requirements from the issue are met:
Files Changed
Future Enhancements
Possible extensions (not included in this PR):
References
Closes #[issue_number] (if applicable)
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.