3 TODO: include HITAS / yagle <https://www-soc.lip6.fr/en/team-cian/softwares/tasyagle/>
7 * <https://www.youtube.com/watch?v=TN9AQgoVwDw&list=PLj2N46Uqs4huGN-redGHVEILPz17OBu37&index=11>
8 * <http://coriolis.lip6.fr/>
9 * <https://gitlab.lip6.fr/vlsi-eda>
10 * <https://www.youtube.com/watch?v=C0diiTc7_VI&list=PLBtNqZjUZB80uByfZVm0gGYEtmTG0mZzm&index=5>
11 * <https://www.youtube.com/watch?v=e0ATrAlNzWk>
12 * <https://fosdem.org/2022/schedule/event/coriolis2/>
13 * <https://archive.fosdem.org/2021/schedule/event/alliance/>
14 * <https://www.youtube.com/watch?v=TN9AQgoVwDw>
16 ## Automated Installation - One-liner
18 The new automated method of installing/setting up Coriolis2 is as follows:
20 1. Clone the repo "dev-env-setup".
21 <https://git.libre-soc.org/?p=dev-env-setup.git;a=summary>
22 Tutorial assumes the directory is located under user's home.
23 2. Run the script "coriolis2-chroot" to create a new chroot environment,
25 3. Once cgt window appears, go to File, Open Cell, and type chip_r.
26 4. You should now have a working Coriolis chroot!
28 In a terminal (of course you checked what this does before running
29 it because it is "commands downloaded off the internet", and you
30 of course take absolute and complete and full responsibility):
32 $ git clone https://git.libre-soc.org/git/dev-env-setup.git
37 And now you wait... (about 30-45min, depends on your CPU).
38 I suggest occasionallly checking the status messages,
39 especially after apt finished updating the packages and the script moves on
40 to compiling yosys, coriolis2, alliance, as well as when
41 alliance-check-toolkit generates the floorplan for you.
43 This is what the chip floorplan should look like:
45 [[!img chip_r_floorplan.png ]]
47 ## Automated Installation - Separated Steps
48 The steps performed by "coriolis2-chroot" can be done manually and are:
50 1. Run the script "mk-deb-chroot" to create a chroot environment.
51 Tutorial assumes the name is "coriolis"
52 1. Run the script "cp-scripts-to-chroot" to copy the dev-env-setup directory
53 over to your new chroot environment.
54 1. Login into the new scroot environment as a normal user
55 (should be the same as your current user).
56 1. Run the script "coriolis-install"
62 # ./mk-deb-chroot coriolis
63 # ./cp-scripts-to-chroot coriolis
65 In a separate terminal as normal user:
68 (coriolis)$ cd ~/dev-env-setup
69 (coriolis)$ ./coriolis-install
73 ## Python3 Coriolis Support
75 A separate script will be written to use the latest development version of Coriolis2.
76 For now however, a stable version is pulled in, which still uses Python2.
78 ## Chroot/Jail Environment
80 See [[devscripts]] for explanation of the "mk-deb-chroot" script.
84 These are nominally taken from
85 <https://www-soc.lip6.fr/equipe-cian/logiciels/coriolis/>
86 however there are errors in the original at the moment.
87 Do not try qt5, it will not work.
89 In ~/.bash\_profile add the following so that builds (rebuilds) if you need
90 them will be quicker, and you can run the GUI from the chroot:
92 export PATH=/usr/lib/ccache:"$PATH"
95 Second (or at a new terminal / xterm), log in as root on the host (not the chroot) then do schroot -c coriolis to get to be root in the chroot (or, you can install sudo in the chroot and then do "sudo bash" in the chroot).
97 Then run the following commands, as root, *in* the chroot:
100 apt-get install -y automake binutils-dev bison build-essential \
101 ccache clang cmake doxygen dvipng flex gcc git graphviz \
102 imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
103 libmpfr-dev libgmp-dev libmotif-dev libreadline-dev \
104 libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev \
105 libxpm-dev libxt-dev python3.7 python3-jinja2 python3-pip \
106 python3-setuptools python-dev python-qt4 python-sphinx \
107 qt4-dev-tools rapidjson-dev tcl tcl-dev tcl-tclreadline \
108 texlive texlive-fonts-extra texlive-lang-french \
109 texlive-latex-extra texlive-pictures xfig yosys zlib1g-dev
111 Then, as the ordinary (non-root) user in the schroot:
113 mkdir -p ~/coriolis-2.x/src
114 cd ~/coriolis-2.x/src
115 git clone https://gitlab.lip6.fr/vlsi-eda/coriolis.git
117 git checkout LS180_RC7_FINAL
118 ./bootstrap/ccb.py --project=coriolis --make="-j$(nproc) install"
120 Note: Instead of "devel", "LS180_RC7_FINAL" is used as it is more stable.
121 Once Python3 support is added, can switch to using "devel".
123 To set up the coriolis2 environment, run this:
125 eval `~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`
127 For convenience that may be placed in a file and "sourced", to avoid
128 having to look this page up every time
131 /home/$USER/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py > /home/$USER/coriolisenv
135 For now a workaround must be used for coriolisEnv.py to correctly detect the shell (Bash in this case).
139 To run the graphical editor go to the bin directory
141 cd ~/coriolis-2.x/Linux.MyARCH/Release.Shared/install/bin
144 Then run the following commands from the menubar
146 Tutorials / Run Demo (Python Flavour)
148 If the following window appears you have an error.
150 [[!img chicken.png ]]
152 click on the chicken several times
154 If you have the following, congratulations:
156 [[!img demo_cell.png ]]
158 # Upgrading to latest yosys in the chroot
160 yosys in debian may not be enough to work with nmigen,
161 therefore it's probably a good idea to upgrade.
163 As root, in the chroot, run the following:
166 apt-get build-dep yosys
167 apt-get install clang
170 This will remove debian/buster yosys however getting the build dependencies is quick and easy enough.
172 As the ordinary user, the following instructions can be followed
173 (<https://github.com/YosysHQ/yosys>)
176 git clone https://github.com/YosysHQ/yosys
178 git checkout 049e3abf9baf795e69b9ecb9c4f19de6131f8418
182 Note: For now a stable version of yosys is used!
190 Adapted from <https://www-soc.lip6.fr/en/team-cian/softwares/alliance/>
192 In the chroot, as the ordinary schroot user, in ~/.bash\_profile add the following so that builds (rebuilds, if you need them) will be quicker:
194 export PATH=/usr/lib/ccache:"$PATH"
196 In the chroot, as the ordinary schroot user:
198 mkdir -p alliance/build alliance/install
200 git clone https://gitlab.lip6.fr/vlsi-eda/alliance.git
201 mv alliance/alliance/src alliance
202 rm -rf alliance/alliance
206 export ALLIANCE_TOP=$HOME/alliance/install
207 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib:${LD_LIBRARY_PATH}
208 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib64:${LD_LIBRARY_PATH}
209 ../alliance/src/configure --prefix=$ALLIANCE_TOP --enable-alc-shared
212 The three exports are best added to ~/.bash_profile for later convenience
214 # Tutorials and checks
216 Install alliance-check-toolkit in the chroot:
218 * <https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git>
219 * See coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/main/PythonTutorial/index.html
221 Run the following (if not done already):
225 Git clone alliance-check-toolkit:
227 git clone https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git
229 You must create a configuration for your user in alliance-check-toolkit to define where the various tools are installed:
231 touch alliance-check-toolkit/etc/mk/users.d/user-$USERNAME.mk
232 cat <<EOF >>alliance-check-toolkit/etc/mk/users.d/user-$USERNAME.mk
233 export CORIOLIS_TOP=/home/$USERNAME/coriolis-2.x/Linux.x86_64/Release.Shared/install
234 export ALLIANCE_TOP=/home/$USERNAME/alliance/install
235 export CHECK_TOOLKIT=/home/$USERNAME/alliance-check-toolkit
236 export YOSYS_TOP=/home/$USERNAME/yosys
239 You can try the user adder benchmark in alliance-check-toolkit:
241 cd alliance-check-toolkit/benchs/adder/cmos
244 This should take about five minutes. It's symbolic, but should be a configuration compatible with 180nm. To actually see the results:
250 Select File -> Open Cell or press CTRL + o
252 Enter as the cell name (without the single quotation marks):
256 As a very rough approximation, you can say that one lambda equals 180nm.
258 It depends on the zoom level and of the fact that you ask to see the inside of the cells.
260 To actually see the transistors:
262 Tools -> Controller -> Filter Tab -> check "Process Terminal Cells"
264 You can also tweak the layer display by selecting:
266 Tools -> Controller -> Layers & Go
268 You can quicly hide/show the Controller with:
272 The up-to-date documentation is supplied directly in the Coriolis repository:
274 coriolis/documentation/output/index.html
276 The links toward the doxygen doc will be invalid a this point, but everything else works.
278 After installation, it is put in:
280 coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/index.html
282 ## More Information from Jean-Paul
284 There is a WIP documentation website for Alliance/Coriolis at <http://coriolis.lip6.fr/>.
286 There are also very cursory informations about installing Alliance here:
287 https://www-soc.lip6.fr/en/team-cian/softwares/alliance/
289 You also have a third repository for various blocks/chip/examples here:
290 https://gitlab.lip6.fr/jpc/alliance-check-toolkit
292 (with a basic doc under "doc/"...)
294 # Clone "soclayout" repository and place and route a layout experiment
296 In order to do the physical layout of the logical
297 netlists generated by yosys we use coriolis and
298 alliace installed above by doing the following
299 (using experiment9 as an example):
301 $ source ~/coriolisenv # if not done already
303 $ git clone https://git.libre-soc.org/git/soclayout.git
305 $ git submodule update --init --recursive
306 $ find . -type f -exec sed -i 's/'lkcl'/'"$USER"'/g' {} \;
311 yosys> read_ilang test_issuer.il
312 yosys> heirarchy -check -top test_issuer
313 yosys> synth -top test_issuer
314 yosys> dfflibmap -liberty /home/USERNAME/alliance/install/cells/sxlib/sxlib.lib
315 yosys> abc -liberty /home/USERNAME/alliance/install/cells/sxlib/sxlib.lib
317 yosys> write_blif test_issuer.blif
320 $ make layout (will take between 20min and 2 hours depending on your hardware)
323 A window should open with with contents that look like this (pretty isn't it?)
325 [[!img 180nm_Oct2020/2020-07-03_11-04.png size="825x" ]]
327 # Issues running from (e.g.) archlinux as host and debian as a chroot
329 You may run into difficulties firing up GUI applications from the chroot.
330 Try installing Xnest <https://box.matto.nl/xnest.html> which you should
331 do in the *host* system. Also remember to install a "basic" window manager
334 On the *host*, run Xnest and a window manager:
339 Then, in the chroot, change DISPLAY environment variable (permanently
340 in ~/.bash_profile if desired)
344 Then, in the chroot, follow the cgt instructions above, or use "make view"
345 in any of the soclayout experiments or alliance-check-toolkit bench tests
347 # Libre-SOC 180nm ASIC reproducible build<a name="ls180_repro_build"></a>
351 * machine with debian/10 (or if you absolutely must, ubuntu)
353 * minimum XEON processor or Intel i9 or IBM POWER9
354 * enough time to complete the build in full
355 * around 50 GB free space (this is more than enough)
357 **WARNING! DO NOT TRY RUNNING CORIOLIS2 IN QEMU OR OTHER VM!**
358 VLSI builds are far too CPU and memory intensive.
360 Follow these instructions to build the ls180 GDS-II files
362 * clone the dev-env-setup repository
363 * run the coriolis2-chroot script as root
364 * drop into the schroot
365 * navigate to the soclayout/experiments9 directory
366 * check out the final tag
367 <https://git.libre-soc.org/?p=soclayout.git;a=tag;h=refs/tags/LS180_RC7_FINAL>
368 * run the ./build_full_4k_sram.sh script
369 * run "make view" to see the results.
371 The FreePDK45 Chips4Makers FlexLib variant is slightly
372 different, in that it builds GDS-II rather than Alliance Symbolic
373 and so requires klayout to view the GDS-II. We do not yet
374 have a build script for klayout, it will be in dev-env-setup
375 when it is. In the meantime you can follow instructions
376 on the website <https://klayout.de/>
378 Please check these scripts before running them.
379 **This is your responsibility**. Also as explained in
380 the [[HDL_workflow]] the standard OS for reproducible
381 builds is debian/10. It is just about possible to use
382 ubuntu to run the debootstrap chroot setup but it is
388 $ git clone https://git.libre-soc.org/git/dev-env-setup.git
393 $ schroot -c coriolis
394 $ source ~/coriolisenv
395 $ cd soclayout/experiments9
396 $ git checkout LS180_RC7_FINAL
397 $ ./build_full_4k_sram.sh
399 (now do something else for the next 90 minutes)