![图片[1]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171253386-wxsync-2025-06-4a4302b01267ed20d999395a8a7a4a36.png?v=1750497173)
用FPGA创建SoC如此容易
项目地址
❝
https://github.com/enjoy-digital/litex/wiki
LiteX 框架为创建 FPGA 内核/SoC、探索各种数字设计架构和创建完整的基于 FPGA 的系统提供了方便高效的基础架构。
简介
LiteX 提供了轻松创建 FPGA 内核/SoC 所需的所有常用组件:
-
总线(Wishbone、AXI、Avalon-ST)及其互连。 -
简单内核:RAM、ROM、定时器、UART、JTAG 等。 -
通过内核生态系统的复杂内核:LiteDRAM、LitePCIe、LiteEth、LiteSATA等…… -
各种 CPU 和 ISA:RISC-V、OpenRISC、LM32、Zynq、X86(通过 PCIe)等… -
混合语言支持 VHDL/Verilog/(n)Migen/Spinal-HDL/etc… -
通过各种桥接器和Litescope进行强大的调试基础设施。 -
通过Verilator直接/快速仿真。 -
为开源和供应商工具链构建后端。
通过将 LiteX 与内核生态系统相结合,创建复杂的 SoC 变得比使用传统方法容易得多,同时提供更好的可移植性和灵活性:例如,基于 VexRiscv-SMP CPU、LiteDRAM、LiteSATA 构建的多核 Linux SoC与 LiteX 集成,在廉价的改造Acorn CLE215+ Mining Board上运行:
![图片[2]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171254242-wxsync-2025-06-9ca9c04edda19823024027c1b95bd681.png?v=1750497174)
支持的硬件
❝
https://github.com/litex-hub/litex-boards/tree/master/litex_boards/targets
![图片[3]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171254389-wxsync-2025-06-6ba02fc3389d8b6b3ca3bcaeba3884cb.png?v=1750497176)
![图片[4]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171256927-wxsync-2025-06-19b67921e40fc4dbcbf93c9f2c982412.png?v=1750497179)
典型的 LiteX 设计流程:
+---------------+
|FPGA toolchains|
+----^-----+----+
| |
+--+-----v--+
+-------+ | |
| Migen +--------> |
+-------+ | | Your design
| LiteX +---> ready to be used!
| |
+----------------------+ | |
|LiteX Cores Ecosystem +--> |
+----------------------+ +-^-------^-+
(Eth, SATA, DRAM, USB, | |
PCIe, Video, etc...) + +
board target
file file
LiteX 已经支持各种软核 CPU:VexRiscv、Rocket、LM32、Mor1kx、PicoRV32、BlackParrot,并且与 LiteX 的核心生态系统兼容:
名称 | 描述 |
---|---|
LiteX-Boards | 板支持 |
精简版DRAM | 动态随机存取存储器 |
LiteEth | 以太网 |
精简版PCIe | PCIe |
LiteSATA | SATA |
LiteSD卡 | SD卡 |
LiteICLink | 芯片间通信 |
LiteJESD204B | JESD204B |
LiteSPI | SPI/SPIFlah |
LiteHyperBus | HyperBus/HyperRam |
LiteScope | 逻辑分析仪 |
使用 LiteX 构建的设计示例:
围绕 LitePCIe 构建并与 LiteX 集成的定制 PCIe SDI 采集/播放板,允许完全控制 SDI 流和极低的延迟。
![图片[5]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171259908-wxsync-2025-06-85a5def9ebc20bec543a088fb12ce3e9.png?v=1750497179)
SDS1104X-E 范围的替代固件/网关:
![图片[6]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171300716-wxsync-2025-06-e73a82c5bc9fc1f7b085b2c640f8d5dd.png?v=1750497181)
Forest Kitten 33 上的 HBM2 测试基础设施:
![图片[7]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171301398-wxsync-2025-06-288dcfc0760f410de72b5cf033c282ff.png?v=1750497183)
快速入门指南
安装 Python 3.6+ 和 FPGA 供应商的开发工具和Verilator(仿真器,可以不安装)。
安装 Migen/LiteX 和 LiteX 的核心:
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
chmod +x litex_setup.py
./litex_setup.py --init --install --user (--user 安装到用户目录) --config=(minimal, standard, full)
需要更新所有存储库:
./litex_setup.py --update
注意:在 MacOS 上,确保您已安装HomeBrew。然后做,brew install wget。
注意:在 Windows 上,您可能必须将SHELL环境变量设置为SHELL=cmd.exe.
安装 RISC-V 工具链(仅当您想使用 CPU 测试/创建 SoC 时):
pip3 install meson ninja
./litex_setup.py --gcc=riscv
建立目标……:
转到 litex-boards/litex_boards/targets 并执行您要构建的目标。
直接在您的计算机上安装Verilator并测试 LiteX,无需任何 FPGA 板:
在 Linux (Ubuntu) 上:
sudo apt install libevent-dev libjson-c-dev verilator
litex_sim --cpu-type=vexriscv
在 MacOS 上:
brew install json-c verilator libevent
brew cask install tuntap
litex_sim --cpu-type=vexriscv
在板上的串行端口 115200 8-N-1 上运行终端程序。
应该得到如下所示的 BIOS 提示。
![图片[8]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171303736-wxsync-2025-06-3cb75757a17ae4af2b7da21c770bca6e.png?v=1750497184)
![图片[9]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171304225-wxsync-2025-06-78c72b0609bb57b942137c482e23afbf.jpeg?v=1750497184)
在FPGA上完美复刻Windows 95
![图片[10]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171304664-wxsync-2025-06-b29dd2dcb0017f94afe95e935732ac3a.jpeg?v=1750497184)
优秀的 Verilog/FPGA开源项目介绍(十七)- AXI
![图片[11]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171304178-wxsync-2025-06-087aace9776583efe0edb09fc7c05bea.jpeg?v=1750497184)
优秀的 Verilog/FPGA开源项目介绍(十六)- 数字频率合成器DDS
![图片[12]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171305267-wxsync-2025-06-ef1f8b48dfaddb867c022eb105aeaeae.jpeg?v=1750497185)
想用FPGA加速神经网络,这两个开源项目你必须要了解
![图片[13]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171305500-wxsync-2025-06-0208283fa591ae39536e7de0d46bf7de.jpeg?v=1750497185)
优秀的 Verilog/FPGA开源项目介绍(十四)- 使用FPGA实现LeNet-5 深度神经网络模型
![图片[14]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171305239-wxsync-2025-06-9ec346e99e4b9fc25d55b14f0105c497.jpeg?v=1750497185)
优秀的 Verilog/FPGA开源项目介绍(十三)- I2C
![图片[15]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171305860-wxsync-2025-06-4db1e60c33e56cb1163c671095ecc52c.jpeg?v=1750497186)
优秀的 Verilog/FPGA开源项目介绍(十二)- 玩FPGA不乏味
![图片[16]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171306581-wxsync-2025-06-f53c47aad197bc1f20ea23c300c033be.jpeg?v=1750497186)
优秀的 Verilog/FPGA开源项目介绍(十一)- SPI/SPI FLASH/SD卡
![图片[17]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171306617-wxsync-2025-06-25e0043d4ee865a31d31bf56759b5d12.jpeg?v=1750497186)
优秀的 Verilog/FPGA开源项目介绍(十)- H.264和H.265
![图片[18]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171306457-wxsync-2025-06-a7c219bc132e5b9d9db1b17a61c767d3.jpeg?v=1750497186)
优秀的 Verilog/FPGA开源项目介绍(九)- DP(增改版)
![图片[19]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171306300-wxsync-2025-06-3580cae11858966a07b4b5e54c84a078.jpeg?v=1750497186)
优秀的 Verilog/FPGA开源项目介绍(八)- HDMI
![图片[20]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171306748-wxsync-2025-06-3569f317dffa52c8ca0d1c357c92d7f7.jpeg?v=1750497187)
优秀的 Verilog/FPGA开源项目介绍(七)- CAN通信
![图片[21]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171307800-wxsync-2025-06-410b3037d27752c024ed67f6ab193b48.jpeg?v=1750497187)
优秀的 Verilog/FPGA开源项目介绍(六)- MIPI
![图片[22]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171307664-wxsync-2025-06-f823cbd1e28ae9f33df8cc6df847c72f.jpeg?v=1750497187)
优秀的 Verilog/FPGA开源项目介绍(五)- USB通信
![图片[23]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171307200-wxsync-2025-06-6f2d268b0fb854dd1b411a05a126d265.jpeg?v=1750497187)
优秀的 Verilog/FPGA开源项目介绍(四)- Ethernet
![图片[24]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171308984-wxsync-2025-06-0c37dcdf44522f0f2fffd77a0620f20e.jpeg?v=1750497188)
优秀的 Verilog/FPGA开源项目介绍(三)- 大厂的项目
![图片[25]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171308775-wxsync-2025-06-2b0754e9e8c1d94c00dd0e1245450172.jpeg?v=1750497188)
优秀的 Verilog/FPGA开源项目介绍(二)-RISC-V
![图片[26]-用FPGA创建SoC如此容易-LiteX社区-FPGA CPLD-ChipDebug](https://chipdebug.com/wp-content/uploads/2025/06/20250621171308424-wxsync-2025-06-a7bd158e6163088b0096f347b158a177.jpeg?v=1750497188)
优秀的 Verilog/FPGA开源项目介绍(一)-PCIe通信