3 git remote set-url origin https://gitlab.lip6.fr/vlsi-eda/alliance-check-toolkit.git
4 git remote set-url origin https://gitlab.lip6.fr/vlsi-eda/alliance.git
5 git remote set-url origin https://gitlab.lip6.fr/vlsi-eda/coriolis.git
11 First set up an schroot debootstrap jail with debian 10.
12 These instructions are based on information taken from here:
13 <https://www.debian.org/releases/stretch/amd64/apds03.html.en>
15 In advance, on the host system, edit /etc/fstab and add mount points:
17 (edit: personally I prefer using mount --bind points. however if doing
18 that then after a reboot the chroot will lose the bind mountpoints
19 and the commands need to be re-run, without which the chroot is
22 /dev /home/chroot/coriolis/dev none bind 0 0
23 /dev/pts /home/chroot/coriolis/dev/pts none bind 0 0
24 /proc /home/chroot/coriolis/proc none bind 0 0
25 /sys /home/chroot/coriolis/sys none bind 0 0
26 /tmp /home/chroot/coriolis/tmp none bind 0 0
28 Then run these commands:
31 apt-get install debootstrap schroot
32 mkdir /opt/chroot/coriolis
33 /usr/sbin/debootstrap buster !$ http://ftp.us.debian.org/debian
34 mount /home/chroot/coriolis/dev
35 mount /home/chroot/coriolis/dev/pts
36 mount /home/chroot/coriolis/proc
37 mount /home/chroot/coriolis/sys
38 mount /home/chroot/coriolis/tmp
39 echo "coriolis2" > /home/chroot/coriolis/etc/debian_chroot
41 To do some preparation (users):
43 chroot /home/chroot/coriolis2 /bin/bash
44 adduser {yourpreferredusername}
46 It is best to make the username the same as the first user that
47 was added during the *main* (non-chroot) debian install, so that
48 uid 1000 matches between both main and chroot. You can check
49 this by looking at /etc/passwd as root, or by typing "id".
52 uid=1000(lkcl) gid=1000(lkcl) groups=1000(lkcl),5(tty),....
54 Alternatively, /etc/passwd and /etc/group may
55 be mount-bound as well as /home however if you later forget you did
56 this and decide to delete the chroot, you will delete the entire /home
57 of your main system, as well as /etc/passwd.
59 You may wish to follow some of the other things such as configuring apt,
60 locales and keyboard, from the above-linked debian-admin HOWTO.
61 bootloader, kernel, ssh access, all these are
62 unnecessary. do run "apt clean" to clear out /var/cache/apt/archives
67 Create an schroot file section:
70 description=Debian Stable for Coriolis
71 directory=/home/chroot/coriolis
72 groups=sbuild-security,lkcl,users
74 Now as an *ordinary* user - not as root - you may type:
76 lkcl@fizzy:~$ schroot -c coriolis
78 and, due to the contents of /etc/debian\_chroot, and that you were in
79 fact logged in as uid 1000 and did in fact add a user to the chroot
80 as uid 1000, the prompt should become:
82 (coriolis2)lkcl@fizzy:~$
84 If however you need to run as root, then from outside the chroot,
85 as *root*, you run this:
87 lkcl@fizzy:~# schroot -c coriolis
89 and you will see this as a result:
91 (coriolis2)lkcl@fizzy:~#
93 ## check out alliance and alliance-check-toolkit
95 Adapted from <https://www-soc.lip6.fr/en/team-cian/softwares/alliance/>
99 git clone https://gitlab.lip6.fr/jpc/alliance-check-toolkit.git
101 TODO: document how to build alliance, basically this:
103 In the chroot, as root:
106 apt-get install ccache git build-essential libtool automake \
107 flex bison xfig imagemagick \
108 texlive texlive-pictures texlive-latex-extra \
109 libx11-dev libxt-dev libxaw7-dev libxpm-dev libmotif-dev
111 In the chroot, as the ordinary schroot user, in ~/.bash\_profile add
112 the following so that builds (rebuilds) if you need them will be quicker:
114 export PATH=/usr/lib/ccache:"$PATH"
116 In the chroot, as the ordinary schroot user:
118 mkdir -p alliance/build alliance/install
120 git clone https://www-soc.lip6.fr/git/alliance.git
124 export ALLIANCE_TOP=$HOME/alliance/install
125 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib:${LD_LIBRARY_PATH}
126 export LD_LIBRARY_PATH=${ALLIANCE_TOP}/lib64:${LD_LIBRARY_PATH}
127 ../alliance/alliance/src/configure --prefix=$ALLIANCE_TOP --enable-alc-shared
130 the two exports are best added to ~/.bash_profile for later convenience
134 These are nominally taken from
135 <https://www-soc.lip6.fr/equipe-cian/logiciels/coriolis/>
136 however there are errors in the original at the moment.
137 Do not try qt5, it will not work.
139 In ~/.bash\_profile add the following so that builds (rebuilds) if you need
140 them will be quicker, and you can run the GUI from the chroot:
142 export PATH=/usr/lib/ccache:"$PATH"
145 Second (or at a new terminal / xterm), log in as root on the host (not
146 the chroot) then do schroot -c coriolis to get to be root in the chroot
147 (or, you can install sudo in the chroot and then do "sudo bash" in the
150 Then run the following commands, as root, *in* the chroot:
153 apt-get install -y ccache build-essential binutils-dev \
154 git cmake bison flex gcc python-dev \
155 libboost-all-dev libboost-python-dev \
157 libbz2-dev libxml2-dev rapidjson-dev libbz2-dev \
158 doxygen dvipng graphviz python-sphinx \
159 texlive-fonts-extra texlive-lang-french \
160 libqwt-dev qt4-dev-tools python-qt4 \
161 libxt-dev libxpm-dev libmotif-dev \
164 Then, as the ordinary (non-root) user in the schroot:
166 mkdir -p ~/coriolis-2.x/src
167 cd ~/coriolis-2.x/src
168 git clone https://www-soc.lip6.fr/git/coriolis.git
172 ./bootstrap/ccb.py --project=coriolis --make="-j4 install"
174 In debian/buster at the moment, this will fail half-way through, due to
175 libraries not being found. When that happens run this:
177 ln -s ~/coriolis-2.x/Linux.x86_64/Release.Shared/install/lib64 \
178 ~/coriolis-2.x/Linux.x86_64/Release.Shared/install/lib
180 Then carry on with the build.
182 To set up the coriolis2 environment, run this:
184 eval `~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`
186 For convenience that may be placed in a file and "sourced", to avoid
187 having to look this page up every time
189 echo "eval `~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`" > \
195 To run the graphical editor go to the bin directory
197 cd ~/coriolis-2.x/Linux.MyARCH/Release.Shared/install/bin
200 Then run the following commands from the menubar
202 Tutorials / Run Demo (Python Flavour)
204 If the following window appears you have an error.
206 [[!img chicken.png ]]
208 click on the chicken several times
210 If you have the following, congratulations:
212 [[!img demo_cell.png ]]
214 # Tutorials and checks
216 Install alliance-check-toolkit in the chroot:
218 * <https://gitlab.com/Chips4Makers/alliance-check-toolkit>
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 Then, picking a random example:
227 cd alliance-check-toolkit/benchs/AM2901/standart_cells/cmos
231 A nice view of a chip should appear
233 ## Information from Jean-Paul
235 There should be very soon a website at https://coriolis.lip6.fr (it is not yet
236 online). Where I intend to put all the documentation about Alliance/Coriolis.
238 In the meantime did you find the doc shipped with Coriolis ?
240 There are also very cursory informations about installing Alliance here:
241 https://www-soc.lip6.fr/en/team-cian/softwares/alliance/
243 You also have a third repository for various blocks/chip/examples here:
244 https://gitlab.lip6.fr/jpc/alliance-check-toolkit
246 (with a basic doc under "doc/"...)
250 You must create a configuration for alliance-check-toolkit:
252 alliance-check-toolkit/etc/mk/users.d/user-LOGIN.mk
254 where you define where the various tools are installed
255 (look in other ones to have an idea).
257 You can try the ARM in alliance-check-toolkit:
259 > cd alliance-check-toolkit/benchsARM/cmos/
262 Should take about five minutes. It's symbolic, but should be
263 a configuration compatible with 180nm. To actually see the
268 Then "File -> Open", "arm_chip_cts_r"
270 To have a very rough approximation, you can say that one lambda
273 Depends on the zoom level and of the fact that you ask to see
274 the inside of the cells.
276 To actually see the transistors:
277 Tools -> Controller -> Filter Tab -> check "Process Terminal Cells"
279 You can also tweak the layer display:
280 Tools -> Controller -> Layers & Go
282 You can quicly hide/show the Controller with CTRL+I.
284 You may also toy with Controller -> Look, try the other ones.
285 If you want a new one, to mimic something you're better
286 familiar with, it's in configurations files all written
287 in Python so easy to do, if a little tedious.
289 > i'd expect such a chip to be in the alliance-check-toolkit however we
290 > don't even know what we're looking at in order to know which bits we
291 > need, let alone know what to do or how to run them.
293 > we're *literally* completely in the dark, here, having never done this
294 > before - at all - so unless there's a specific tutorial which says, to
295 > make a chip layout do this: "step 1: install these tools. step 2: get
296 > this project repo. step 3: cd to this directory. step 4: run make or
297 > ./compile-place-and-route.sh" we're absolutely lost.
299 > thx jean-paul, and apologies for not knowing where to begin, here.
301 No problem. You're welcome.
303 The doc is mostly for people who already have a background in ASICs,
304 I will try to patch something from my lecture in VLSI to help people
305 to orient themselves.
307 The up-to-date documentation is supplied directly in the Coriolis
310 coriolis/documentation/output/index.html
312 The links toward the doxygen doc will be invalid a this point,
313 but everython else works.
315 After installation, it is put in:
317 coriolis-2.x/Linux.x86_64/Release.Shared/install/share/doc/coriolis2/en/html/index.html
319 # Installing python3.7 into debian/buster chroot
321 as root, in the chroot:
323 apt-get install python3.7 python3-setuptools \
324 python3-jinja2 python3-pip
326 At this point it becomes possible to follow the main
327 instructions in [[HDL_workflow]] for installing nmigen,
328 ieee754fpu, soc and nmutil.
330 # Upgrading to latest yosys in the chroot
332 yosys in debian may not be enough to work with nmigen,
333 therefore it's probably a good idea to upgrade.
334 To install from source, add the following to
335 /etc/apt/sources.list:
337 deb-src http://ftp.uk.debian.org/debian buster main
339 then as root, in the chroot, run the following:
342 apt-get build-dep yosys
343 apt-get install clang
346 this will remove debian/buster yosys however getting the build
347 dependencies is quick and easy enough.
349 then, as the ordinary user, the following instructions can be followed
350 (<http://www.clifford.at/yosys/download.html>)
353 git clone https://github.com/cliffordwolf/yosys.git
362 # Check out the libresoc "soclayout" repository
364 See [[HDL_workflow]] for git clone instructions
366 $ git clone ssh://gitolite3@git.libre-riscv.org:922/libresoc.git
370 # Issues running from (e.g.) archlinux as host and debian as a chroot
372 You may run into difficulties firing up GUI applications from the chroot.
373 Try installing Xnest <https://box.matto.nl/xnest.html> which you should
374 do in the *host* system. Also remember to install a "basic" window manager
377 On the *host*, run Xnest and a window manager:
382 Then, in the chroot, change DISPLAY environment variable (permanently
383 in ~/.bash_profile if desired)
387 Then, in the chroot, follow the cgt instructions above, or use "make view"
388 in any of the soclayout experiments or alliance-check-toolkit bench tests