Glossary - timvideos/litex-buildenv GitHub Wiki
Firmware verses Gateware
-
gatewareis for configuration of the FPGA. It is the "hardware description". -
firmwareis software which runs on a CPU (it can be eitherSoftCPUorHardCPU). -
The
gatewarecan include aSoftCPUwhich runsfirmware. -
Most HDMI2USB boards have two
firmwareblobs,- firmware which runs on the SoftCPU inside the gateware,
- firmware which runs on the Cypress FX2 USB interface chip attached to the FPGA.
platform verses target
platformis the board configuration (IE generally a board + expansion modules).targetis the FPGA System on Chip configuration
Migen, MiSoC, LiteX & LiteXXX
-
Migenis thePython HDLwhich allows easy creation of gateware to run on an FPGA. It includes all the primitives needed to write things for the FPGA -
MiSoCis aSoC(System on Chip) which usesMigen. It includes;- Multiple
SoftCPUimplementations, - a
CSR(Config/Control Status Registers) bus - Bunch of peripherals
- Multiple
-
LiteXis @enjoy-digital 's soft fork ofMigen+MiSoC.- LiteX combines both
Migen+MiSoCinto one repo. - LiteX includes legacy features removed from Migen+MiSoC which are still in use.
- LiteX includes more experimental features that have not made it to Migen/MiSoC (and may never make it into Migen/MiSoC).
- LiteX code should be easily portable to Migen/MiSoC if legacy/experimental features are not used and is done regularly.
- LiteX combines both
-
LiteEth, LiteDRAM, liteSATA, litePCIe are all cores which provide functionality.
- LiteEth is heavily used inside liteX
SoftCPU verses HardCPU
-
A
SoftCPUis a CPU which is defined by a HDL (like Verilog, VHDL or Migen) and is included in the gateware inside a FPGA. As the definition can be changed when creating the gateware,SoftCPUs are highly customisable. -
A
HardCPUis a CPU which is predefined piece of hardware. As it physical hardware it can't be changed. -
Most manufactures sell chips which include a FPGA fabric and a
HardCPUin one package.- These are often called
SoC(System on Chip) FPGAs. - Generally the
HardCPUis an ARM these days. (Although PowerPC was previously fairly common.) - Xilinx's range is called the
Zynq. - Altera have the Cyclone V
SoCseries.
- These are often called
-
A
SoftCPUrunsfirmware.-
Normally the first
firmwareis a small program like a "BIOS" which does initilisation (like setting up main ram, running memtest, etc) before loading a more useful firmware into "main ram" and jumping it. -
The "BIOS" is normally embedded inside the gateware. However as this takes up resources that can't be reused, on smaller boards the BIOS is executed directly from external flash (normal SPI flash).
-
The "BIOS" in MiSoC/LiteX can load the primary firmware from;
- FPGA ROM
- Memory mapped SPI flash
- Serial download (using flterm)
- TFTP (via liteEth)
-
-
There are a bunch of common 32bit
SoftCPUimplementations; ProprietarySoftCPUs are;- Xilinx's MicroBlaze
- Altera's Nios2
FOSS
SoftCPUs are;- LatticeMico32 - lm32
- OpenRisc - mor1kx
- Clifford's Pico Risc-V
- J-Core - sh4/sh2 implementation
- ZPU - ???
-
MiSoC supports
lm32andmor1kx. -
LiteX supports
lm32,mor1kxand has WIP support forpico risc-vand (maybe) soonJ-Core.
Flashing verses Loading
-
FPGAs (generally) loose their "configuration" when they loose power or are reset. When powered on they will load their configuration from a flash chip (normally SPI flash) on the FPGA board.
-
Loadingmeans to temporarily put something (gateware, firmware, etc) onto a device. After a power cycle, the device will return to the flashed configuration. -
Flashingmeans to permanently put something (gateware, firmware, etc) onto a device. After a power cycle, the device will reload the flashed configuration. -
Flashing is the process of writing a new configuration to the flash chip.
-
Flashing is generally slower than loading because it requires you to erase the contents of the flash, write the new contents and then verify the result.
-
Flashing is sometimes done by loading a "flash proxy" gateware onto the FPGA, which then allows the computer to communicate with the flash chip.
-
Some devices only support flashing and not loading (IE MimasV2)