7 Build your hardware, easily!
8 Copyright 2012-2018 / EnjoyDigital
12 LiteX is a FPGA design/SoC builder that can be used to build cores, create
13 SoCs and full FPGA designs.
15 LiteX is based on Migen and provides specific building/debugging tools for
16 a higher level of abstraction and compatibily with the LiteX core ecosystem.
18 Think of Migen as a toolbox to create FPGA designs in Python and LiteX as a
19 toolbox to create/develop/debug FPGA SoCs in Python.
22 Typical LiteX design flow:
23 --------------------------
32 +-------+ | | Your design
33 | LiteX +---> ready to be used!
35 +----------------------+ | |
36 |LiteX Cores Ecosystem +--> |
37 +----------------------+ +-^-------^-+
38 (Eth, SATA, DRAM, USB, | |
39 PCIe, Video, etc...) + +
44 LiteX already supports various softcores CPUs: LM32, Mor1kx, PicoRV32, VexRiscv
45 and is compatible with the LiteX's Cores Ecosystem:
47 - LiteDRAM: https://github.com/enjoy-digital/litedram
48 - LiteEth: https://github.com/enjoy-digital/liteeth
49 - LitePCIe: https://github.com/enjoy-digital/litepcie
50 - LiteSATA: https://github.com/enjoy-digital/litesata
51 - LiteUSB: https://github.com/enjoy-digital/liteusb
52 - LiteSDCard: https://github.com/enjoy-digital/litesdcard
53 - LiteICLink: https://github.com/enjoy-digital/liteiclink
54 - LiteJESD204B: https://github.com/enjoy-digital/litejesd204b
55 - LiteVideo: https://github.com/enjoy-digital/litevideo
56 - LiteScope: https://github.com/enjoy-digital/litescope
62 Provides specific or experimental modules to generate HDL that are not integrated
66 Provides tools to build FPGA bitstreams (interface to vendor toolchains) and to
67 simulate HDL code or full SoCs.
70 Provides definitions/modules to build cores (bus, bank, flow), cores and tools
71 to build a SoC from such cores.
74 Provides platforms and targets for the supported boards. All Migen's platforms
75 can also be used in LiteX.
77 [> Very Quick start guide (for newcomers)
78 -----------------------------------------
79 TimVideos.us has done an awesome job for setting up a LiteX environment easily in
80 the litex-buildenv repo: https://github.com/timvideos/litex-buildenv
82 It's recommended for newcomers to go this way. Various FPGA boards are supported
83 and multiple examples provided! You can even run Linux on your FPGA using LiteX
86 Migen documentation can be found here: https://m-labs.hk/migen/manual
88 FPGA lessons/tutorials can be found at: https://github.com/enjoy-digital/fpga_101
90 [> Medium Quick start guide with Conda
91 -----------------------------------------
93 0. Get miniconda by following instructions at https://conda.io/miniconda.html
96 git clone --recurse-submodules https://github.com/enjoy-digital/litex.git
98 2. Create a LiteX environment from environment.yml
99 conda env create -f environment.yml
101 3. Enter conda environment
104 4. Build the target of your board...:
105 Go to boards/targets and execute the target you want to build
108 [> Quick start guide (for advanced users)
109 -----------------------------------------
110 0. Install Python 3.5+ and FPGA vendor's development tools.
112 1. Get litex_setup.py script and execute:
113 ./litex_setup.py init install
114 This will clone and install Migen, LiteX and LiteX's cores.
115 To update all repositories execute:
116 ./litex_setup.py update
118 2. Compile and install binutils. Take the latest version from GNU.
119 mkdir build && cd build
120 ../configure --target=lm32-elf
124 3. (Optional, only if you want to use a lm32 CPU in you SoC)
125 Compile and install GCC. Take gcc-core and gcc-g++ from GNU
126 (version 4.5 or >=4.9).
128 mkdir build && cd build
129 ../configure --target=lm32-elf --enable-languages="c,c++" --disable-libgcc \
134 4. Build the target of your board...:
135 Go to boards/targets and execute the target you want to build
137 5. ... and/or install Verilator and test LiteX on your computer:
138 Download and install Verilator: http://www.veripool.org/
140 sudo dnf install libevent-devel json-c-devel
142 sudo apt install libevent-dev libjson-c-dev
145 6. Run a terminal program on the board's serial port at 115200 8-N-1.
146 You should get the BIOS prompt.
150 E-mail: florent [AT] enjoy-digital.fr