Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icenvcm: Program the iCE40 NVCM #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

osresearch
Copy link
Contributor

@osresearch osresearch commented Oct 19, 2021

programming jig for the nvcm testing

icenvcm will write a bitstream into an iCE40 device with one-time-programmable non-volatile configuration memory (NVCM) and optionally set the security lock bits to prevent read out.

This is a dangerous operation and can result in bricked devices. Since it is OTP, you must be sure that your design is good enough to permanently burn into the chip. It is still possible to use the iceprog -S to reconfigure the SRAM, although the FPGA will no longer boot from an attached SPI flash.

Note that the NVCM requires a 2.5V power supply, which the Lattice devboard (and many other third party boards) do not include. A schematic is included for a ZIF programming jig to burn the chips before they are soldered to their final boards.

This implements #268 and obsoletes or replaces #271 and #272, both of which were very helpful in figuring out how to format the NVCM programming commands.

Signed-off-by: Trammell Hudson hudson@trmm.net
Co-authored-by: Matt Mets matt@blinkinlabs.com
Co-authored-by: Peter Lawrence 12226419+majbthrd@users.noreply.github.com

icenvcm will write a bitstream into an iCE40 device with
one-time-programmable non-volatile configuration memory (NVCM)
and optionally set the security lock bits to prevent read out.

This is a dangerous operation and can result in bricked devices.
Since it is OTP, you must be sure that your design is good enough to
permanently burn into the chip.  It is still possible to use the iceprog
-S to reconfigure the SRAM, although the FPGA will no longer boot from
an attached SPI flash.

Note that the NVCM requires a 2.5V power supply, which the Lattice
devboard (and many other third party boards) do not include.
A schematic is included for a ZIF programming jig to burn the chips
before they are soldered to their final boards.

Signed-off-by: Trammell Hudson <hudson@trmm.net>
Co-authored-by: Matt Mets <matt@blinkinlabs.com>
Co-authored-by: Peter Lawrence <12226419+majbthrd@users.noreply.github.com>
@Mecrisp
Copy link

Mecrisp commented Sep 21, 2022

That is interesting! How does the SB_WARMBOOT primitive behave after writing a permanent bitstream into the OTP area? Is it still possible to trigger loading a bitstream out of external SPI flash from the inside? That would be very handy for a permanent USB bootloader on the FOMU and similiar boards!

@mithro
Copy link
Contributor

mithro commented Sep 21, 2022

@Mecrisp - Sadly, as far as my investigations have turned up, the SB_WARMBOOT does not allow booting from SPI flash after the NVCM has been programed.

@mithro
Copy link
Contributor

mithro commented Sep 21, 2022

BTW - I would love to be proven wrong! As you mention, it would be super awesome for things like the Fomu.

@mithro
Copy link
Contributor

mithro commented Sep 21, 2022

PS - The my sources around the SB_WARMBOOT / NVCM interactions where Lattice employees who tried to figure out a workaround and potentially even considered a new silicon revision that could potentially enable they but couldn't find a solution. The open source hardware community tends to be a little more imaginative...

@donnie-j
Copy link

@mithro is there still anyone left there from Silicon Blue? Regardless, emphatically +1 for merge, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants