3 TODO: include tasyagle <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>
11 ## Automated Installation - One-liner
12 The new automated method of installing/setting up Coriolis2 is as follows:
14 1. Clone the repo "dev-env-setup".
15 Tutorial assumes the directory is located under user's home.
16 1. Run the script "coriolis2-chroot" to create a new chroot environment,
18 1. Once cgt window appears, go to File, Open Cell, and type chip_r.
19 1. You should now have a working Coriolis chroot!
27 And now you wait... (about 30-45min, depends on your CPU).
28 I suggest occasionallly checking the status messages,
29 especially after apt finished updating the packages and the script moves on
30 to compiling yosys, coriolis2, alliance, as well as when
31 alliance-check-toolkit generates the floorplan for you.
33 This is what the chip floorplan should look like:
35 [[!img chip_r_floorplan.png ]]
37 ## Automated Installation - Separated Steps
38 The steps performed by "coriolis2-chroot" can be done manually and are:
40 1. Run the script "mk-deb-chroot" to create a chroot environment.
41 Tutorial assumes the name is "coriolis"
42 1. Run the script "cp-scripts-to-chroot" to copy the dev-env-setup directory
43 over to your new chroot environment.
44 1. Login into the new scroot environment as a normal user
45 (should be the same as your current user).
46 1. Run the script "coriolis-install"
52 # ./mk-deb-chroot coriolis
53 # ./cp-scripts-to-chroot coriolis
55 In a separate terminal as normal user:
58 (coriolis)$ cd ~/dev-env-setup
59 (coriolis)$ ./coriolis-install
63 ## Python3 Coriolis Support
65 A separate script will be written to use the latest development version of Coriolis2.
66 For now however, a stable version is pulled in, which still uses Python2.
68 ## Chroot/Jail Environment
70 See [[devscripts]] for explanation of the "mk-deb-chroot" script.
74 These are nominally taken from
75 <https://www-soc.lip6.fr/equipe-cian/logiciels/coriolis/>
76 however there are errors in the original at the moment.
77 Do not try qt5, it will not work.
79 In ~/.bash\_profile add the following so that builds (rebuilds) if you need
80 them will be quicker, and you can run the GUI from the chroot:
82 export PATH=/usr/lib/ccache:"$PATH"
85 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).
87 Then run the following commands, as root, *in* the chroot:
90 apt-get install -y automake binutils-dev bison build-essential \
91 ccache clang cmake doxygen dvipng flex gcc git graphviz \
92 imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
93 libmpfr-dev libgmp-dev libmotif-dev libreadline-dev \
94 libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev \
95 libxpm-dev libxt-dev python3.7 python3-jinja2 python3-pip \
96 python3-setuptools python-dev python-qt4 python-sphinx \
97 qt4-dev-tools rapidjson-dev tcl tcl-dev tcl-tclreadline \
98 texlive texlive-fonts-extra texlive-lang-french \
99 texlive-latex-extra texlive-pictures xfig yosys zlib1g-dev
101 Then, as the ordinary (non-root) user in the schroot:
103 mkdir -p ~/coriolis-2.x/src
104 cd ~/coriolis-2.x/src
105 git clone https://gitlab.lip6.fr/vlsi-eda/coriolis.git
107 git checkout LS180_RC7_FINAL
108 ./bootstrap/ccb.py --project=coriolis --make="-j$(nproc) install"
110 Note: Instead of "devel", "LS180_RC7_FINAL" is used as it is more stable.
111 Once Python3 support is added, can switch to using "devel".
113 To set up the coriolis2 environment, run this:
115 eval `~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`
117 For convenience that may be placed in a file and "sourced", to avoid
118 having to look this page up every time
121 /home/$USER/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py > /home/$USER/coriolisenv
125 For now a workaround must be used for coriolisEnv.py to correctly detect the shell (Bash in this case).
129 To run the graphical editor go to the bin directory
131 cd ~/coriolis-2.x/Linux.MyARCH/Release.Shared/install/bin
134 Then run the following commands from the menubar
136 Tutorials / Run Demo (Python Flavour)
138 If the following window appears you have an error.
140 [[!img chicken.png ]]
142 click on the chicken several times
144 If you have the following, congratulations:
146 [[!img demo_cell.png ]]
148 # Upgrading to latest yosys in the chroot
150 yosys in debian may not be enough to work with nmigen,
151 therefore it's probably a good idea to upgrade.
153 As root, in the chroot, run the following:
156 apt-get build-dep yosys
157 apt-get install clang
160 This will remove debian/buster yosys however getting the build dependencies is quick and easy enough.
162 As the ordinary user, the following instructions can be followed
163 (<https://github.com/YosysHQ/yosys>)
166 git clone https://github.com/YosysHQ/yosys
168 git checkout 049e3abf9baf795e69b9ecb9c4f19de6131f8418
172 Note: For now a stable version of yosys is used!
180 Adapted from <https://www-soc.lip6.fr/en/team-cian/softwares/alliance/>
182 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:
184 export PATH=/usr/lib/ccache:"$PATH"
186 In the chroot, as the ordinary schroot user:
188 mkdir -p alliance/build alliance/install
190 git clone https://gitlab.lip6.fr/vlsi-eda/alliance.git
191 mv alliance/alliance/src alliance
192 rm -rf alliance/alliance
196 export ALLIANCE_TOP=$HOME/alliance/install
197 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib:${LD_LIBRARY_PATH}
198 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib64:${LD_LIBRARY_PATH}
199 ../alliance/src/configure --prefix=$ALLIANCE_TOP --enable-alc-shared
202 The three exports are best added to ~/.bash_profile for later convenience
204 # Tutorials and checks
206 Install alliance-check-toolkit in the chroot:
208 * <https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git>
209 * See coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/main/PythonTutorial/index.html
211 Run the following (if not done already):
215 Git clone alliance-check-toolkit:
217 git clone https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git
219 You must create a configuration for your user in alliance-check-toolkit to define where the various tools are installed:
221 touch alliance-check-toolkit/etc/mk/users.d/user-$USERNAME.mk
222 cat <<EOF >>alliance-check-toolkit/etc/mk/users.d/user-$USERNAME.mk
223 export CORIOLIS_TOP=/home/$USERNAME/coriolis-2.x/Linux.x86_64/Release.Shared/install
224 export ALLIANCE_TOP=/home/$USERNAME/alliance/install
225 export CHECK_TOOLKIT=/home/$USERNAME/alliance-check-toolkit
226 export YOSYS_TOP=/home/$USERNAME/yosys
229 You can try the user adder benchmark in alliance-check-toolkit:
231 cd alliance-check-toolkit/benchs/adder/cmos
234 This should take about five minutes. It's symbolic, but should be a configuration compatible with 180nm. To actually see the results:
240 Select File -> Open Cell or press CTRL + o
242 Enter as the cell name (without the single quotation marks):
246 As a very rough approximation, you can say that one lambda equals 180nm.
248 It depends on the zoom level and of the fact that you ask to see the inside of the cells.
250 To actually see the transistors:
252 Tools -> Controller -> Filter Tab -> check "Process Terminal Cells"
254 You can also tweak the layer display by selecting:
256 Tools -> Controller -> Layers & Go
258 You can quicly hide/show the Controller with:
262 The up-to-date documentation is supplied directly in the Coriolis repository:
264 coriolis/documentation/output/index.html
266 The links toward the doxygen doc will be invalid a this point, but everything else works.
268 After installation, it is put in:
270 coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/index.html
272 ## More Information from Jean-Paul
274 There is a WIP documentation website for Alliance/Coriolis at <http://coriolis.lip6.fr/>.
276 There are also very cursory informations about installing Alliance here:
277 https://www-soc.lip6.fr/en/team-cian/softwares/alliance/
279 You also have a third repository for various blocks/chip/examples here:
280 https://gitlab.lip6.fr/jpc/alliance-check-toolkit
282 (with a basic doc under "doc/"...)
284 # Clone "soclayout" repository and place and route a layout experiment
286 In order to do the physical layout of the logical
287 netlists generated by yosys we use coriolis and
288 alliace installed above by doing the following
289 (using experiment9 as an example):
292 $ git clone https://git.libre-soc.org/git/soclayout.git
294 $ git submodule update --init --recursive
295 $ find . -type f -exec sed -i 's/'lkcl'/'"$USER"'/g' {} \;
300 yosys> read_ilang test_issuer.il
301 yosys> heirarchy -check -top test_issuer
302 yosys> synth -top test_issuer
303 yosys> dfflibmap -liberty /home/USERNAME/alliance/install/cells/sxlib/sxlib.lib
304 yosys> abc -liberty /home/USERNAME/alliance/install/cells/sxlib/sxlib.lib
306 yosys> write_blif test_issuer.blif
309 $ make layout (will take between 20min and 2 hours depending on your hardware)
312 A window should open with with contents that look like this (pretty isn't it?)
314 [[!img 180nm_Oct2020/2020-07-03_11-04.png size="825x" ]]
316 # Issues running from (e.g.) archlinux as host and debian as a chroot
318 You may run into difficulties firing up GUI applications from the chroot.
319 Try installing Xnest <https://box.matto.nl/xnest.html> which you should
320 do in the *host* system. Also remember to install a "basic" window manager
323 On the *host*, run Xnest and a window manager:
328 Then, in the chroot, change DISPLAY environment variable (permanently
329 in ~/.bash_profile if desired)
333 Then, in the chroot, follow the cgt instructions above, or use "make view"
334 in any of the soclayout experiments or alliance-check-toolkit bench tests
336 # Libre-SOC 180nm ASIC reproducible build<a name="ls180_repro_build"></a>
340 * machine with debian/10 (or if you absolutely must, ubuntu)
342 * minimum XEON processor or Intel i9 or IBM POWER9
343 * enough time to complete the build in full
344 * around 50 GB free space (this is more than enough)
346 **WARNING! DO NOT TRY RUNNING CORIOLIS2 IN QEMU OR OTHER VM!**
347 VLSI builds are far too CPU and memory intensive.
349 Follow these instructions to build the ls180 GDS-II files
351 * clone the dev-env-setup repository
352 * run the coriolis2-chroot script as root
353 * drop into the schroot
354 * navigate to the soclayout/experiments9 directory
355 * run the ./build_full_4k_sram.sh script
356 * run "make view" to see the results.
358 The FreePDK45 Chips4Makers FlexLib variant is slightly
359 different, in that it builds GDS-II rather than Alliance Symbolic
360 and so requires klayout to view the GDS-II. We do not yet
361 have a build script for klayout, it will be in dev-env-setup
362 when it is. In the meantime you can follow instructions
363 on the website <https://klayout.de/>
365 Please check these scripts before running them.
366 **This is your responsibility**. Also as explained in
367 the [[HDL_workflow]] the standard OS for reproducible
368 builds is debian/10. It is just about possible to use
369 ubuntu to run the debootstrap chroot setup but it is
375 $ git clone https://git.libre-soc.org/git/dev-env-setup.git
380 $ schroot -c cotiolis
381 $ cd soclayout/experiments9
382 $ ./build_full_4k_sram.sh
384 (now do something else for the next 90 minutes)