5 First set up an schroot debootstrap jail with debian 10.
6 These instructions are based on information taken from here:
7 <https://www.debian.org/releases/stretch/amd64/apds03.html.en>
9 In advance, on the host system, edit /etc/fstab and add mount points:
11 (edit: personally I prefer using mount --bind points. however if doing
12 that then after a reboot the chroot will lose the bind mountpoints
13 and the commands need to be re-run, without which the chroot is
16 /dev /home/chroot/coriolis/dev none bind 0 0
17 /dev/pts /home/chroot/coriolis/dev/pts none bind 0 0
18 /proc /home/chroot/coriolis/proc none bind 0 0
19 /sys /home/chroot/coriolis/sys none bind 0 0
20 /tmp /home/chroot/coriolis/tmp none bind 0 0
22 Then run these commands:
25 apt-get install debootstrap schroot
26 mkdir /opt/chroot/coriolis
27 /usr/sbin/debootstrap buster !$ http://ftp.us.debian.org/debian
28 mount /home/chroot/coriolis/dev
29 mount /home/chroot/coriolis/dev/pts
30 mount /home/chroot/coriolis/proc
31 mount /home/chroot/coriolis/sys
32 mount /home/chroot/coriolis/tmp
33 echo "coriolis2" > /home/chroot/coriolis/etc/debian_chroot
35 To do some preparation (users):
37 chroot /home/chroot/coriolis2 /bin/bash
38 adduser {yourpreferredusername}
40 It is best to make the username the same as the first user that
41 was added during the *main* (non-chroot) debian install, so that
42 uid 1000 matches between both main and chroot. You can check
43 this by looking at /etc/passwd as root, or by typing "id".
46 uid=1000(lkcl) gid=1000(lkcl) groups=1000(lkcl),5(tty),....
48 Alternatively, /etc/passwd and /etc/group may
49 be mount-bound as well as /home however if you later forget you did
50 this and decide to delete the chroot, you will delete the entire /home
51 of your main system, as well as /etc/passwd.
53 You may wish to follow some of the other things such as configuring apt,
54 locales and keyboard, from the above-linked debian-admin HOWTO.
56 bootloader, kernel, ssh access, are unnecessary. Do run "apt clean" to clear out /var/cache/apt/archives in the chroot.
60 Create an schroot file section for the coriolis chroot by
61 editing /etc/schroot/schroot.conf:
64 description=Debian Buster for Coriolis
65 directory=/home/chroot/coriolis
66 groups=sbuild-security,lkcl,users
68 Now as an *ordinary* user - not as root - you may type:
70 lkcl@fizzy:~$ schroot -c coriolis
72 and, due to the contents of /etc/debian\_chroot, and that you were in
73 fact logged in as uid 1000 and did in fact add a user to the chroot
74 as uid 1000, the prompt should become:
76 (coriolis2)lkcl@fizzy:~$
78 If however you need to run as root, then from outside the chroot,
79 as *root*, you run this:
81 lkcl@fizzy:~# schroot -c coriolis
83 and you will see this as a result:
85 (coriolis2)lkcl@fizzy:~#
89 These are nominally taken from
90 <https://www-soc.lip6.fr/equipe-cian/logiciels/coriolis/>
91 however there are errors in the original at the moment.
92 Do not try qt5, it will not work.
94 In ~/.bash\_profile add the following so that builds (rebuilds) if you need
95 them will be quicker, and you can run the GUI from the chroot:
97 export PATH=/usr/lib/ccache:"$PATH"
100 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).
102 Then run the following commands, as root, *in* the chroot:
105 apt-get install -y automake binutils-dev bison build-essential \
106 ccache clang cmake doxygen dvipng flex gcc git graphviz \
107 imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
108 libmpfr-dev libgmp-dev libmotif-dev libreadline-dev \
109 libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev \
110 libxpm-dev libxt-dev python3.7 python3-jinja2 python3-pip \
111 python3-setuptools python-dev python-qt4 python-sphinx \
112 qt4-dev-tools rapidjson-dev tcl tcl-dev tcl-tclreadline \
113 texlive texlive-fonts-extra texlive-lang-french \
114 texlive-latex-extra texlive-pictures xfig yosys zlib1g-dev
116 Then, as the ordinary (non-root) user in the schroot:
118 mkdir -p ~/coriolis-2.x/src
119 cd ~/coriolis-2.x/src
120 git clone https://gitlab.lip6.fr/vlsi-eda/coriolis.git
123 ./bootstrap/ccb.py --project=coriolis --make="-j$(nproc) install"
125 To set up the coriolis2 environment, run this:
127 eval `~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`
129 For convenience that may be placed in a file and "sourced", to avoid
130 having to look this page up every time
132 echo "`~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`" > \
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 (<http://www.clifford.at/yosys/download.html>)
175 git clone https://github.com/cliffordwolf/yosys.git
184 ## Check out alliance
186 Adapted from <https://www-soc.lip6.fr/en/team-cian/softwares/alliance/>
188 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:
190 export PATH=/usr/lib/ccache:"$PATH"
192 In the chroot, as the ordinary schroot user:
194 mkdir -p alliance/build alliance/install
196 git clone https://gitlab.lip6.fr/vlsi-eda/alliance.git
197 mv alliance/alliance/src alliance
198 rm -rf alliance/alliance
202 export ALLIANCE_TOP=$HOME/alliance/install
203 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib:${LD_LIBRARY_PATH}
204 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib64:${LD_LIBRARY_PATH}
205 ../alliance/src/configure --prefix=$ALLIANCE_TOP --enable-alc-shared
208 The three exports are best added to ~/.bash_profile for later convenience
210 # Tutorials and checks
212 Install alliance-check-toolkit in the chroot:
214 * <https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git>
215 * See coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/main/PythonTutorial/index.html
217 Run the following (if not done already):
221 Git clone alliance-check-toolkit:
223 git clone https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git
225 You must create a configuration for your user in alliance-check-toolkit to define where the various tools are installed:
227 touch alliance-check-toolkit/etc/mk/users.d/user-$USERNAME.mk
228 cat <<EOF >>alliance-check-toolkit/etc/mk/users.d/user-$USERNAME.mk
229 export CORIOLIS_TOP=/home/$USERNAME/coriolis-2.x/Linux.x86_64/Release.Shared/install
230 export ALLIANCE_TOP=/home/$USERNAME/alliance/install
231 export CHECK_TOOLKIT=/home/$USERNAME/alliance-check-toolkit
232 export YOSYS_TOP=/home/$USERNAME/yosys
235 You can try the ARM in alliance-check-toolkit:
237 cd alliance-check-toolkit/benchs/ARM/cmos/
240 This should take about five minutes. It's symbolic, but should be a configuration compatible with 180nm. To actually see the results:
246 Select File -> Open Cell or press CTRL + o
248 Enter as the cell name (without the single quotation marks):
252 As a very rough approximation, you can say that one lambda equals 180nm.
254 It depends on the zoom level and of the fact that you ask to see the inside of the cells.
256 To actually see the transistors:
258 Tools -> Controller -> Filter Tab -> check "Process Terminal Cells"
260 You can also tweak the layer display by selecting:
262 Tools -> Controller -> Layers & Go
264 You can quicly hide/show the Controller with:
268 The up-to-date documentation is supplied directly in the Coriolis repository:
270 coriolis/documentation/output/index.html
272 The links toward the doxygen doc will be invalid a this point, but everything else works.
274 After installation, it is put in:
276 coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/index.html
278 ## More Information from Jean-Paul
280 There is a WIP documentation website for Alliance/Coriolis at <http://coriolis.lip6.fr/>.
282 There are also very cursory informations about installing Alliance here:
283 https://www-soc.lip6.fr/en/team-cian/softwares/alliance/
285 You also have a third repository for various blocks/chip/examples here:
286 https://gitlab.lip6.fr/jpc/alliance-check-toolkit
288 (with a basic doc under "doc/"...)
290 # Clone "soclayout" repository and place and route a layout experiment
292 In order to do the physical layout of the logical
293 netlists generated by yosys we use coriolis and
294 alliace installed above by doing the following
295 (using experiment9 as an example):
298 $ git clone https://git.libre-soc.org/git/soclayout.git
300 $ git submodule update --init --recursive
301 $ find . -type f -exec sed -i 's/'lkcl'/'"$USER"'/g' {} \;
306 yosys> read_ilang test_issuer.il
307 yosys> heirarchy -check -top test_issuer
308 yosys> synth -top test_issuer
309 yosys> dfflibmap -liberty /home/USERNAME/alliance/install/cells/sxlib/sxlib.lib
310 yosys> abc -liberty /home/USERNAME/alliance/install/cells/sxlib/sxlib.lib
312 yosys> write_blif test_issuer.blif
315 $ make layout (will take between 20min and 2 hours depending on your hardware)
318 A window should open with with contents that look like this (pretty isn't it?)
320 [[!img 180nm_Oct2020/2020-07-03_11-04.png size="825x" ]]
322 # Issues running from (e.g.) archlinux as host and debian as a chroot
324 You may run into difficulties firing up GUI applications from the chroot.
325 Try installing Xnest <https://box.matto.nl/xnest.html> which you should
326 do in the *host* system. Also remember to install a "basic" window manager
329 On the *host*, run Xnest and a window manager:
334 Then, in the chroot, change DISPLAY environment variable (permanently
335 in ~/.bash_profile if desired)
339 Then, in the chroot, follow the cgt instructions above, or use "make view"
340 in any of the soclayout experiments or alliance-check-toolkit bench tests