builder: change call to get_sdram_phy_c_header and also pass timing_settings
[litex.git] / README
1 __ _ __ _ __
2 / / (_) /____ | |/_/
3 / /__/ / __/ -_)> <
4 /____/_/\__/\__/_/|_|
5 Migen inside
6
7 Build your hardware, easily!
8 Copyright 2012-2018 / EnjoyDigital
9
10 [> Intro
11 --------
12 LiteX is an alternative to MiSoC maintained and used by Enjoy-Digital to build
13 our cores, integrate them in complete SoC and load/flash them to the hardware
14 and experiment new features. (structure is kept close to MiSoC to ease
15 collaboration)
16
17 Typical LiteX design flow:
18 --------------------------
19
20 +---------------+
21 |FPGA toolchains|
22 +----^-----+----+
23 | |
24 +--+-----v--+
25 +-------+ | |
26 | Migen +--------> |
27 +-------+ | | Your design
28 | LiteX +---> ready to be used!
29 | |
30 +----------------------+ | |
31 |LiteX Cores Ecosystem +--> |
32 +----------------------+ +-^-------^-+
33 (Eth, SATA, DRAM, USB, | |
34 PCIe, Video, etc...) + +
35 board target
36 file file
37
38
39 LiteX already supports various softcores CPUs: LM32, Mor1kx, PicoRV32, VexRiscv
40 and is compatible with the LiteX's Cores Ecosystem:
41
42 - LiteDRAM: https://github.com/enjoy-digital/litedram
43 - LiteEth: https://github.com/enjoy-digital/liteeth
44 - LitePCIe: https://github.com/enjoy-digital/litepcie
45 - LiteSATA: https://github.com/enjoy-digital/litesata
46 - LiteUSB: https://github.com/enjoy-digital/litesata
47 - LiteSDCard: https://github.com/enjoy-digital/litesdcard
48 - LiteICLink: https://github.com/enjoy-digital/liteiclink
49 - LiteJESD204B: https://github.com/enjoy-digital/litejesd204b
50 - LiteVideo: https://github.com/enjoy-digital/litevideo
51 - LiteScope: https://github.com/enjoy-digital/litescope
52
53
54 [> Sub-packages
55 ---------------
56 gen:
57 Provides specific or experimental modules to generate HDL that are not integrated
58 in Migen.
59
60 build:
61 Provides tools to build FPGA bitstreams (interface to vendor toolchains) and to
62 simulate HDL code or full SoCs.
63
64 soc:
65 Provides definitions/modules to build cores (bus, bank, flow), cores and tools
66 to build a SoC from such cores.
67
68 boards:
69 Provides platforms and targets for the supported boards. All Migen's platforms
70 can also be used in LiteX.
71
72 [> Very Quick start guide (for newcomers)
73 -----------------------------------------
74 TimVideos.us has done an awesome job for setting up a LiteX environment easily in
75 the litex-buildenv repo: https://github.com/timvideos/litex-buildenv
76
77 It's recommended for newcomers to go this way. Various FPGA boards are supported
78 and multiple examples provided! You can even run Linux on your FPGA using LiteX
79 very easily!
80
81 Migen documentation can be found here: https://m-labs.hk/migen/manual
82
83 FPGA lessons/tutorials can be found at: https://github.com/enjoy-digital/fpga_101
84
85 [> Medium Quick start guide with Conda
86 -----------------------------------------
87
88 0. Get miniconda by following instructions at https://conda.io/miniconda.html
89
90 1. Clone LiteX
91 git clone --recurse-submodules https://github.com/enjoy-digital/litex.git
92
93 2. Create a LiteX environment from environment.yml
94 conda env create -f environment.yml
95
96 3. Enter conda environment
97 conda activate litex
98
99 4. Build the target of your board...:
100 Go to boards/targets and execute the target you want to build
101
102
103 [> Quick start guide (for advanced users)
104 -----------------------------------------
105 0. Install Python 3.5+ and FPGA vendor's development tools.
106
107 1. Get litex_setup.py script and execute:
108 ./litex_setup.py init install
109 This will clone and install Migen, LiteX and LiteX's cores.
110 To update all repositories execute:
111 ./litex_setup.py update
112
113 2. Compile and install binutils. Take the latest version from GNU.
114 mkdir build && cd build
115 ../configure --target=lm32-elf
116 make
117 make install
118
119 3. (Optional, only if you want to use a lm32 CPU in you SoC)
120 Compile and install GCC. Take gcc-core and gcc-g++ from GNU
121 (version 4.5 or >=4.9).
122 rm -rf libstdc++-v3
123 mkdir build && cd build
124 ../configure --target=lm32-elf --enable-languages="c,c++" --disable-libgcc \
125 --disable-libssp
126 make
127 make install
128
129 4. Build the target of your board...:
130 Go to boards/targets and execute the target you want to build
131
132 5. ... and/or install Verilator and test LiteX on your computer:
133 Download and install Verilator: http://www.veripool.org/
134 Install libevent-devel / json-c-devel packages
135 Go to boards/targets
136 ./sim.py
137
138 6. Run a terminal program on the board's serial port at 115200 8-N-1.
139 You should get the BIOS prompt.
140
141 [> Contact
142 ----------
143 E-mail: florent [AT] enjoy-digital.fr