ForgeFPGA Configuration Guide v2.1
ForgeFPGA Configuration Guide v2.1
This document describes how to configure the ForgeFPGA core from three different configuration bitstream
sources: External SPI/QSPI Flash, Internal OTP, MCU as a host. It also discusses on how to use the
Development Board, Socket Adaptor Board, and the Evaluation Board to debug
Contents
1. Terms and Definitions ................................................................................................................................... 1
2. References...................................................................................................................................................... 2
3. Introduction .................................................................................................................................................... 2
4. General SPI Interface..................................................................................................................................... 2
4.1 SPI Modes with Clock Polarity and Clock Phase .................................................................................. 3
5. Development Board ....................................................................................................................................... 4
6. Evaluation Board ........................................................................................................................................... 7
6.1 MCU Block Description .......................................................................................................................... 9
6.2 Additional Board Features ................................................................................................................... 10
6.3 Pin Description..................................................................................................................................... 10
7. OTP Read/Write ............................................................................................................................................ 11
7.1 Writing the OTP Block ......................................................................................................................... 12
7.2 Reading the OTP Block ....................................................................................................................... 13
7.3 Read Command Structure ................................................................................................................... 14
8. QSPI Programming (Master Mode) ............................................................................................................ 15
8.1 Configure ForgeFPGA from External Flash Memory .......................................................................... 16
9. MCU Programming (Slave Mode) ............................................................................................................... 18
10. Conclusion ................................................................................................................................................... 19
11. Revision History .......................................................................................................................................... 20
2. References
[1] SLG47910, Datasheet, Renesas Electronics Corporation
[2] ForgeFPGA Designer Software, Software Download and User Guide, Renesas Electronics Corporation
[3] ForgeFPGA Dev. Board R1.1 User Guide
[4] ForgeFPGA Socket Adapter Quick Start Guide R1.0
3. Introduction
An internal Configuration Wrapper is used to configure the ForgeFPGA core. The configuration can be done
from three different configuration bitstream sources:
– External SPI/QSPI Flash
– Internal OTP
– MCU as a host
The ForgeFPGA Designer Software is used to generate bitstreams. The schematic in Figure 1 shows a block
diagram of the SLG47910 configuration block and the external MCU Host and QSPI Flash interface. The four
Configuration pins are GPIO3 (SPI_CLK), GPIO4(SPI_SS, Chip Select), GPIO5(SPI_SI, serial input) and
GPIO6(SPI_SO, serial output). GPIO9 is used as a Config Done signal. Table 1 shows which modes activate the
SPI Master and SPI Slave blocks during configuration.
MCU
Host
Configuration Wrapper
4 tx_data
QSPI SPI SPI tx_data
Flash Master ctrl
SPI tx_data
conf
Slave ctrl Config Loader FPGA Core
otp_data_rd
Q
ctrl
otp_ctrl
OTP
ctrl
OTP
op_data_wr Programmer
D
slave will only receive the clock, so the slave has no control over the serial clock, which is produced by the
master.
2. MOSI: Master-Out Slave-In (data output from master). MOSI is a data pin. This pin is used to transmit data
from the Master to the Slave device. Whenever the master sends data, that data will be collected over the MOSI
pin by the slave.
3. MISO: Master-In Slave-Out (data output from slave). MISO is a data pin. This pin is used to transmit data
from the slave to the master. Whenever the slave sends data, that data will be collected over the MISO pin by
the master.
4. SS: Slave-Select (often active low, the output from master). Depending on the SPI and slave select setting, the
SS pin used to select an individual slave device for communication. When there is one master and one slave
device, then the SS pin is not required. This slave select pin will make sense only when the master is
communicating with the different slaves. So, the master can select the slave to which the master wants to convey.
For choosing the slave, the SS pin dedicated.
Figure 3 shows the data on the MOSI and MISO line. The green dotted lines show, the end and the beginning of
the transmission. Also, the data sampling is shown with orange line which corresponds to the rising or falling edge
depending on SPI Mode. The shifting edge of the data is depicted using the blue doted lines. Figure 3 depicts the
SPI Mode 0 with CPOL = 0 and CPHA = 0 with the clk idle state = 0 and hence the data is sampled on rising edge
and the shifted on falling edge according to Table 2.
5. Development Board
There are two pre-requisite steps that need to be performed before the design is sent to the device and can be
further configured with the development board.
a. RTL Synthesis: After creating your desired Verilog Code in the HDL Editor Window of the ForgeFPGA
Workshop, the next step is to create a Netlist of your design. This can be done with the help of the built-in
Synthesis tool that takes input design and produces a Netlist out of it. While performing synthesis, the input
design is analyzed and converted into gate-level representation.
b. Generating Bitstream: To prepare your design to be sent to the device you need to perform the Place-
and-Route procedure, that takes the elements of the synthesized netlist and maps its primitives to FPGA
physical resources. You can do this after successfully generating netlist and pressing Generate Bitstream
button on the control panel. Completing these two steps would have successfully sent the design to the
device.
To enter the debug controls of the development board, we need to select the correct platform on which we need
to configure our device. Under the "Debug" button on the toolbar, select the ForgeFPGA Development Board as
the platform (see Figure 4)
The FPGA Development Board (see Figure 5) is a multi-functional tool that allows the user to develop their FPGA
designs with ease by providing on board power source, digital and analog signal generation, and logic analysis
capabilities. The FPGA Development Board can connect additional external boards called socket adapters (see
Figure 7). The function of the socket adapter board is to implement a stable electrical connection between the pins
of the chip under test and the FPGA Development Board. To implement this, the FPGA Development Board has
a Dual PCIe connector. This connector has 40 differential pairs (80 digital channels), 32 analog pins, service pins,
and power pins. Dual PCIe connector is universal and can be applied to multiple socket adapter boards.
Driven by the free software, the FPGA Development Board can be configured to work as any one of several
traditional instruments, which include:
– Logic Analyzer
– Digital pattern generator
– 8-channel analog Arbitrary Waveform Generator (AWG)
– Precision ADC
– Three programmable power supplies (+0.6 V…+3.3 V). The maximum available output current 2 A. The
same voltage is supplied to the GPIO, for keeping the logic level compatibility with the circuit under test.
Also, the board can be used as an independent unit. The chip can be powered through the EXT PWR connector
and signals can be read through the through-hole 12-pin connectors (Pmod connectors).
To configure the development board and read the desired output, connect the Development Board with the Socket
Adapter through the PCIe connectors. Put the SLG47910 part in the socket. Then connect the USB cable from the
laptop to the USB Type-C Connector (see Figure 8). Connect the power cord that was supplied with the
development board to the power supply connection on the development board. If all the connections are correct,
then the RED LED(PWR) and BLUE LED(STS) should light up and the software would have recognized the
SLG47910 part in the socket.
The user can now either program the chip with the design by clicking on the "Program" button else, the user can
use the "Emulation" button under the Debugging Controls Panel (see Figure 6) to observe the output and
manipulate it by connecting the Development Board to Oscilloscope, or any PMOD if required.
6. Evaluation Board
To enter the debug controls of the Evaluation Board, we need to select the correct platform on which we need to
configure our device. Under the "Debug" button on the toolbar, select the ForgeFPGA Evaluation Board as the
platform (see Figure 9)
ForgeFPGA Evaluation board provides SLG47910 IC hardware support for design emulation and real time testing.
The board consists of 2 main blocks – Programmer and SLG47910 IC with external connectors.
ForgeFPGA Evaluation board is a standalone USB powered and USB controlled system. The design emulation
and peripheral control are provided by ATMEGA32U4 MCU, that woks as USBSPI/ I2C/UART/GPIO Bridge. Below
is the table specifying the voltage range for which the board operates.
SPI Transfer functionality is required for ForgeFPGA programming. MCU performs full programming sequence via
SPI and checks configuration status using Config Done Pin pulse detection. After successful configuration MCU
will turn “DONE” LED on.
UART transfer is option that have a place if user will configure UART block inside of ForgeFPGA. It’s possible to
debug UART block by sending and receiving data from UART terminal inside GoConfigure software.
Self-Test feature is provided by MCUs internal ADC. Measurements are available on VUSB, VDDIO and VDDC
power nets. All power lines attenuators have the same resistor values, so regarding that ADC Vref is 2560mV and
resolution - 10b conversion formula is:
Vpower = ADC_code * 2.5 * 3.55 (mV)
7. OTP Read/Write
The configuration for the FPGA is stored in the Configuration RAM. The Configuration RAM is a volatile memory
that stores the FPGA design. The OTP memory loads the Configuration RAM. The SLG47910 contains three
blocks of 4k x 32-bit One-Time Programmable (OTP) Non-Volatile Memory (NVM), which are interfaced via the
dedicated SPI Slave circuit block (Figure 16).
The user can read or write the OTP block through the SPI interface pins on the SLG47910. If the OTP block of the
SLG47910 has been programmed, upon POR, the contents of the NVM will be loaded into the device’s internal
configuration RAM.
The loading of the data through different bitstream sources follow a particular flow and different values of the
signal help in determining the mode of operation. The Figure 17 below showcases a part of that flow.
3. In the last write packet Byte8[6] =1 which indicates the last write.
4. When done writing OTP bring PWR =L which resets the device, then at S5 chk_otp_en will be one.
Byte 1 of the packet will remain the same across all read operations and contains only the read command bit
(Byte1[0]). Byte1 Bits[7:2] are reserved (R) bits. A read address is then provided across Bytes 2 and 3, before a
parity bit (P) is provided at the MSB of Byte 3. This read address is separated into two sections. A[18:17]
determines which of the three 4 k x32 NVM blocks to read from (named OTP1, OTP2, and OTP3) and A[16:10]
A[4:0] determines the address within the specified NVM block to read. The parity bit to be provided is calculated
by performing an AND operation of all incoming bytes, excluding the parity bit = (^Byte1)^(^Byte2)^(^[Byte3[0:6]]).
3 x OTP
CSB = L, CLK = H, 3.49 4.64 7.37
SAP = [10]
3 x OTP
CSB = L, CLK = H, 3.47 4.61 7.35
SAP = [11]
16 GPIO3 SPI_CLK
17 GPIO4 SPI_SS
After the 10 us is up, the SPI Master sends a Fast Read Command with 24-Address on the SPI_SO pin and
receives the data on the SPI_SI port as shown (see Figure 21). The first data byte (Data Byte 0) read from the
QSPI flash is the lowest byte of a 32-bit data word.
After transferring the required number of configuration data bits, the wrapper ends the Fast Read command by
de-asserting its SPI_SS select output. To conserve power, the wrapper then issues a final Deep Power-down
command, 0xB9.
Figure 21: SPI Read Fast Command & Deep Power-Down Command
Figure 24: Jumpers and External Power Connection Points on the board
Method 2:
From the Debugging controls Panel in the software, choose the Test Mode option. Under the Test Mode option,
the user needs to choose the Test Mode (*) option to upload the bitstream from the external flash memory to
ForgeFPGA (see Figure 25)
A 32-bit synchronization word will be inserted in the beginning of the bitstream by the ForgeFPGA Compiler. The
SLG47910 will check this synchronization word to determine if the transfer is targeting this device. If the
synchronization word does not match this device, then the configuration bitstream will be discarded. This
synchronization word is checked on both SPI slave and SPI master.
The following steps are used to program the SLG47910 in MCU mode.
1. Set CONFIG pin to INPUT PULL-DOWN
2. Set PWR and EN pins to "1"
10. Conclusion
This configuration manual focus on three configuration options: OTP, MCU and QSPI/SPI Flash. The document
explains how if the part is configured using OTP, then other configuration options will be disabled. It also explains
the designing and the operation of the Development Board and the Evaluation Board to test & debug designs. If
interested, please contact the ForgeFPGA Business Support Team