30 July 2021

SPRAM on iCE40 FPGA

The iCE40 UltraPlus distinguishes itself from the rest of the iCE40 FPGA family by including a relatively generous 1 Mb (128 KiB) of single port synchronous SRAM known as SPRAM. SPRAM blocks are much larger than BRAM but are limited to a single port and 16-bit data bus. In this quick FPGA recipe, we learn how to use SPRAM with Yosys and contrast it with Block RAM. If you want to learn more about other FPGA memory, see FPGA Memory Types. Read more

24 August 2020

FPGA Memory Types

Designing with FPGAs involves many types of memory, some familiar from other devices, but some that are specific to FPGAs. This FPGA recipe gives a quick overview of the different flavours, together with their strengths and weaknesses, and some sample designs. This guide includes external memory types, such as SRAM and HBM, that are used in CPUs and GPUs, so much of what is said here is generally applicable, but the focus is on FPGAs. Read more

16 April 2020

Initialize Memory in Verilog

It’s common for a simulation or firmware to need data loading into a memory array, ram, or rom. Fortunately, Verilog provides the $readmemh and $readmemb functions for this very purpose. Unfortunately, there is a dearth of good Verilog documentation online, so using them can be harder than it should be. This FPGA recipe explains the syntax and provides plenty of examples, including how to do this in Yosys and Xilinx Vivado. Read more

©2021 Will Green, Project F