5 * <https://www.youtube.com/watch?v=TN9AQgoVwDw&list=PLj2N46Uqs4huGN-redGHVEILPz17OBu37&index=11>
6 * <http://coriolis.lip6.fr/>
7 * <https://gitlab.lip6.fr/vlsi-eda>
8 * <https://www.youtube.com/watch?v=C0diiTc7_VI&list=PLBtNqZjUZB80uByfZVm0gGYEtmTG0mZzm&index=5>
9 * <https://www.youtube.com/watch?v=e0ATrAlNzWk>
10 * <https://fosdem.org/2022/schedule/event/coriolis2/>
11 * <https://archive.fosdem.org/2021/schedule/event/alliance/>
12 * <https://www.youtube.com/watch?v=TN9AQgoVwDw>
13 * HiTas (tasyagle) page: [[tasyagle]]
15 ## Automated Installation - One-liner
17 The new automated method of installing/setting up Coriolis2 is as follows:
19 1. Clone the repo "dev-env-setup".
20 <https://git.libre-soc.org/?p=dev-env-setup.git;a=summary>
21 Tutorial assumes the directory is located under user's home.
22 2. Run the script "coriolis2-chroot" to create a new chroot environment,
24 3. Once cgt window appears, go to File, Open Cell, and type chip_r.
25 4. You should now have a working Coriolis chroot!
27 In a terminal (of course you checked what this does before running
28 it because it is "commands downloaded off the internet", and you
29 of course take absolute and complete and full responsibility):
31 $ git clone https://git.libre-soc.org/git/dev-env-setup.git
36 And now you wait... (about 30-45min, depends on your CPU).
37 I suggest occasionallly checking the status messages,
38 especially after apt finished updating the packages and the script moves on
39 to compiling yosys, coriolis2, alliance, as well as when
40 alliance-check-toolkit generates the floorplan for you.
42 This is what the chip floorplan should look like:
44 [[!img chip_r_floorplan.png ]]
46 ## Automated Installation - Separated Steps
47 The steps performed by "coriolis2-chroot" can be done manually and are:
49 1. Run the script "mk-deb-chroot" to create a chroot environment.
50 Tutorial assumes the name is "coriolis"
51 1. Run the script "cp-scripts-to-chroot" to copy the dev-env-setup directory
52 over to your new chroot environment.
53 1. Login into the new scroot environment as a normal user
54 (should be the same as your current user).
55 1. Run the script "coriolis-install"
61 # ./mk-deb-chroot coriolis
62 # ./cp-scripts-to-chroot coriolis
64 In a separate terminal as normal user:
67 (coriolis)$ cd ~/dev-env-setup
68 (coriolis)$ ./coriolis-install
72 ## Python3 Coriolis Support
74 A separate script will be written to use the latest development version of Coriolis2.
75 For now however, a stable version is pulled in, which still uses Python2.
77 ## Chroot/Jail Environment
79 See [[devscripts]] for explanation of the "mk-deb-chroot" script.
83 These are nominally taken from
84 <https://www-soc.lip6.fr/equipe-cian/logiciels/coriolis/>
85 however there are errors in the original at the moment.
86 Do not try qt5, it will not work.
88 In ~/.bash\_profile add the following so that builds (rebuilds) if you need
89 them will be quicker, and you can run the GUI from the chroot:
91 export PATH=/usr/lib/ccache:"$PATH"
94 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).
96 Then run the following commands, as root, *in* the chroot:
99 apt-get install -y automake binutils-dev bison build-essential \
100 ccache clang cmake doxygen dvipng flex gcc git graphviz \
101 imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
102 libmpfr-dev libgmp-dev libmotif-dev libreadline-dev \
103 libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev \
104 libxpm-dev libxt-dev python3.7 python3-jinja2 python3-pip \
105 python3-setuptools python-dev python-qt4 python-sphinx \
106 qt4-dev-tools rapidjson-dev tcl tcl-dev tcl-tclreadline \
107 texlive texlive-fonts-extra texlive-lang-french \
108 texlive-latex-extra texlive-pictures xfig yosys zlib1g-dev
110 Then, as the ordinary (non-root) user in the schroot:
112 mkdir -p ~/coriolis-2.x/src
113 cd ~/coriolis-2.x/src
114 git clone https://gitlab.lip6.fr/vlsi-eda/coriolis.git
116 git checkout LS180_RC7_FINAL
117 ./bootstrap/ccb.py --project=coriolis --make="-j$(nproc) install"
119 Note: Instead of "devel", "LS180_RC7_FINAL" is used as it is more stable.
120 Once Python3 support is added, can switch to using "devel".
122 To set up the coriolis2 environment, run this:
124 eval `~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`
126 For convenience that may be placed in a file and "sourced", to avoid
127 having to look this page up every time
130 /home/$USER/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py > /home/$USER/coriolisenv
134 For now a workaround must be used for coriolisEnv.py to correctly detect the shell (Bash in this case).
138 To run the graphical editor go to the bin directory
140 cd ~/coriolis-2.x/Linux.MyARCH/Release.Shared/install/bin
143 Then run the following commands from the menubar
145 Tutorials / Run Demo (Python Flavour)
147 If the following window appears you have an error.
149 [[!img chicken.png ]]
151 click on the chicken several times
153 If you have the following, congratulations:
155 [[!img demo_cell.png ]]
157 # Upgrading to latest yosys in the chroot
159 yosys in debian may not be enough to work with nmigen,
160 therefore it's probably a good idea to upgrade.
162 As root, in the chroot, run the following:
165 apt-get build-dep yosys
166 apt-get install clang
169 This will remove debian/buster yosys however getting the build dependencies is quick and easy enough.
171 As the ordinary user, the following instructions can be followed
172 (<https://github.com/YosysHQ/yosys>)
175 git clone https://github.com/YosysHQ/yosys
177 git checkout 049e3abf9baf795e69b9ecb9c4f19de6131f8418
181 Note: For now a stable version of yosys is used!
189 Adapted from <https://www-soc.lip6.fr/en/team-cian/softwares/alliance/>
191 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:
193 export PATH=/usr/lib/ccache:"$PATH"
195 In the chroot, as the ordinary schroot user:
197 mkdir -p alliance/build alliance/install
199 git clone https://gitlab.lip6.fr/vlsi-eda/alliance.git
200 mv alliance/alliance/src alliance
201 rm -rf alliance/alliance
205 export ALLIANCE_TOP=$HOME/alliance/install
206 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib:${LD_LIBRARY_PATH}
207 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib64:${LD_LIBRARY_PATH}
208 ../alliance/src/configure --prefix=$ALLIANCE_TOP --enable-alc-shared
211 The three exports are best added to ~/.bash_profile for later convenience
213 # Tutorials and checks
215 Install alliance-check-toolkit in the chroot:
217 * <https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git>
218 * See coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/main/PythonTutorial/index.html
220 Run the following (if not done already):
224 Git clone alliance-check-toolkit:
226 git clone https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git
228 You must create a configuration for your user in alliance-check-toolkit to define where the various tools are installed:
230 touch alliance-check-toolkit/etc/mk/users.d/user-$USERNAME.mk
231 cat <<EOF >>alliance-check-toolkit/etc/mk/users.d/user-$USERNAME.mk
232 export CORIOLIS_TOP=/home/$USERNAME/coriolis-2.x/Linux.x86_64/Release.Shared/install
233 export ALLIANCE_TOP=/home/$USERNAME/alliance/install
234 export CHECK_TOOLKIT=/home/$USERNAME/alliance-check-toolkit
235 export YOSYS_TOP=/home/$USERNAME/yosys
238 You can try the user adder benchmark in alliance-check-toolkit:
240 cd alliance-check-toolkit/benchs/adder/cmos
243 This should take about five minutes. It's symbolic, but should be a configuration compatible with 180nm. To actually see the results:
249 Select File -> Open Cell or press CTRL + o
251 Enter as the cell name (without the single quotation marks):
255 As a very rough approximation, you can say that one lambda equals 180nm.
257 It depends on the zoom level and of the fact that you ask to see the inside of the cells.
259 To actually see the transistors:
261 Tools -> Controller -> Filter Tab -> check "Process Terminal Cells"
263 You can also tweak the layer display by selecting:
265 Tools -> Controller -> Layers & Go
267 You can quicly hide/show the Controller with:
271 The up-to-date documentation is supplied directly in the Coriolis repository:
273 coriolis/documentation/output/index.html
275 The links toward the doxygen doc will be invalid a this point, but everything else works.
277 After installation, it is put in:
279 coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/index.html
281 ## More Information from Jean-Paul
283 There is a WIP documentation website for Alliance/Coriolis at <http://coriolis.lip6.fr/>.
285 There are also very cursory informations about installing Alliance here:
286 https://www-soc.lip6.fr/en/team-cian/softwares/alliance/
288 You also have a third repository for various blocks/chip/examples here:
289 https://gitlab.lip6.fr/jpc/alliance-check-toolkit
291 (with a basic doc under "doc/"...)
293 # Clone "soclayout" repository and place and route a layout experiment
295 In order to do the physical layout of the logical
296 netlists generated by yosys we use coriolis and
297 alliace installed above by doing the following
298 (using experiment9 as an example):
300 $ source ~/coriolisenv # if not done already
302 $ git clone https://git.libre-soc.org/git/soclayout.git
304 $ git submodule update --init --recursive
305 $ find . -type f -exec sed -i 's/'lkcl'/'"$USER"'/g' {} \;
310 yosys> read_ilang test_issuer.il
311 yosys> heirarchy -check -top test_issuer
312 yosys> synth -top test_issuer
313 yosys> dfflibmap -liberty /home/USERNAME/alliance/install/cells/sxlib/sxlib.lib
314 yosys> abc -liberty /home/USERNAME/alliance/install/cells/sxlib/sxlib.lib
316 yosys> write_blif test_issuer.blif
319 $ make layout (will take between 20min and 2 hours depending on your hardware)
322 A window should open with with contents that look like this (pretty isn't it?)
324 [[!img 180nm_Oct2020/2020-07-03_11-04.png size="825x" ]]
326 # Issues running from (e.g.) archlinux as host and debian as a chroot
328 You may run into difficulties firing up GUI applications from the chroot.
329 Try installing Xnest <https://box.matto.nl/xnest.html> which you should
330 do in the *host* system. Also remember to install a "basic" window manager
333 On the *host*, run Xnest and a window manager:
338 Then, in the chroot, change DISPLAY environment variable (permanently
339 in ~/.bash_profile if desired)
343 Then, in the chroot, follow the cgt instructions above, or use "make view"
344 in any of the soclayout experiments or alliance-check-toolkit bench tests
346 # Libre-SOC 180nm ASIC reproducible build<a name="ls180_repro_build"></a>
350 * machine with debian/10 (or if you absolutely must, ubuntu)
352 * minimum XEON processor or Intel i9 or IBM POWER9
353 * enough time to complete the build in full
354 * around 50 GB free space (this is more than enough)
356 **WARNING! DO NOT TRY RUNNING CORIOLIS2 IN QEMU OR OTHER VM!**
357 VLSI builds are far too CPU and memory intensive.
359 Follow these instructions to build the ls180 GDS-II files
361 * clone the dev-env-setup repository
362 * run the coriolis2-chroot script as root
363 * drop into the schroot
364 * navigate to the soclayout/experiments9 directory
365 * check out the final tag
366 <https://git.libre-soc.org/?p=soclayout.git;a=tag;h=refs/tags/LS180_RC7_FINAL>
367 * run the ./build_full_4k_sram.sh script
368 * run "make view" to see the results.
370 The FreePDK45 Chips4Makers FlexLib variant is slightly
371 different, in that it builds GDS-II rather than Alliance Symbolic
372 and so requires klayout to view the GDS-II. We do not yet
373 have a build script for klayout, it will be in dev-env-setup
374 when it is. In the meantime you can follow instructions
375 on the website <https://klayout.de/>
377 Please check these scripts before running them.
378 **This is your responsibility**. Also as explained in
379 the [[HDL_workflow]] the standard OS for reproducible
380 builds is debian/10. It is just about possible to use
381 ubuntu to run the debootstrap chroot setup but it is
387 $ git clone https://git.libre-soc.org/git/dev-env-setup.git
392 $ schroot -c coriolis
393 $ source ~/coriolisenv
394 $ cd soclayout/experiments9
395 $ git checkout LS180_RC7_FINAL
396 $ ./build_full_4k_sram.sh
398 (now do something else for the next 90 minutes)