Just a record to remind myself of what I did to install qflow.
As done on an Ubuntu 18.04 system.
—
It's always better to read the README file first (though I'm sometimes too lazy for that and read it a bit too late).
Dependencies of qflow that must be installed separately include:
- Yosys
- graywolf
- Qrouter
- Magic
- netgen
- python3
The following are also among the dependencies of qflow. But for me, installing the above dependencies had somehow caused these to be installed as well. Or may be it was just because it was already there on my computer.
- tclsh
- wish
- tcsh
Yosys
Does Verilog RTL synthesis (Verilog parser/synthesis).
Download the required file from http://www.clifford.at/yosys/download.html.
I used v0.9.
tar -xf yosys-yosys-0.9.tar.gz
cd yosys-yosys-0.9/Install the prerequisites as mentioned in the README.md file with
sudo apt-get install build-essential clang bison flex \
libreadline-dev gawk tcl-dev libffi-dev git \
graphviz xdot pkg-config python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-devand then build it with
makeNow we may run the tests to be sure that everything is all right.
Testing the build
We need gawk and a recent version of iverilog to run the tests.
The iverilog in the Ubuntu repos is likely to be a bit old and using that could lead to problems like this. Better build from source.
Installing iverilog
Download the file from http://iverilog.icarus.com/. I used version 11.0.
tar -xf verilog-11.0.tar.gz
cd verilog-11.0/
./configure
make
make check # Optional but good to do. To check if all works fine.
sudo make installNote: If this iverilog ever needs to uninstalled, run make uninstall.
Running tests and installing
make testAnd if tests pass, install the build with
sudo make installNote: To uninstall this installation of yosys, run make uninstall.
Make some symlinks
To let qflow see the yosys installation create a couple of symlink with
sudo ln -s /usr/local/bin/yosys /usr/local/share/qflow/tech/bin/yosys
sudo ln -s /usr/local/bin/yosys-abc /usr/local/share/qflow/tech/bin/yosys-abcgraywolf
For placement in VLSI design (cell and pin placement).
Go to https://github.com/rubund/graywolf/releases and download the files.
I used v0.1.6.
tar -xf graywolf-0.1.6.tar.gz
cd graywolf-0.1.6
mkdir build
cd buildIf we use gcc (I was on 7.0), it would give the error mentioned in https://github.com/rubund/graywolf/issues/32 for which I couldn't find a workaround.
So I asked cmake to use clang by passing a couple of options.
cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ ..
makeIf make shows errors related to missing packages install them and run make again. I needed
sudo apt install libgsl-dev # GNU Scientific libraryNow we can run the tests and install with
make test # Optional, but good to do.
sudo make installCreate a symlink in qflow's bin/ directory with
sudo ln -s /usr/local/bin/graywolf /usr/local/share/qflow/bin/graywolfQrouter
Detail router.
Download latest stable version from http://opencircuitdesign.com/qrouter/download.html
I used v1.4.84.
tar -xf qrouter-1.4.84.tgz
cd qrouter-1.4.84/
./configure # Creates the Makefile
makeIn case of missing library errors, install them. I needed
sudo apt install tk-dev tcl-devI also had to edit the Makefile to add flags for the compiler to find the tk header file. There are probably better ways to fix that but this one did work for me.
Edit CFLAGS variable from
CFLAGS += -g -O2to
CFLAGS += -g -O2 -I /usr/include/tcl/where /usr/include/tcl/ is the path to the header file.
You can then install qrouter if you like with
sudo make installThen create symlinks in qflow's bin/ directory with
sudo ln -s /usr/local/bin/qrouter /usr/local/share/qflow/bin/qrouterMagic
Layout viewer.
It's better to use a recent version of magic instead of the old one from the Ubuntu repo. Otherwise problems like https://github.com/RTimothyEdwards/qflow/issues/1 could pop up.
Go to http://opencircuitdesign.com/magic/download.html and get the file.
I used v8.3.153.
tar -xf magic-8.3.153.tgz
cd magic-8.3.153/
./configure
make
sudo make installBy default, magic would be installed at /usr/local. In order for qflow to find it, create a symlink like
sudo ln -s /usr/local/bin/magic /usr/local/share/qflow/bin/magicNetgen
Does LVS (Layout-vs-Schematic) to verify whether the IC layout corresponds to the original schematic (circuit diagram) of the design.
Go to http://opencircuitdesign.com/netgen/download.html and download the stable version.
I used v1.5
tar -xf netgen-1.5.173.tgz
cd netgen-1.5.173/
./configure
make
sudo make installand create symlink for qflow to see it with
sudo ln -s /usr/local/bin/netgen /usr/local/share/qflow/bin/netgenqflow
Once all its dependencies are met, we can install qflow itself.
Download the file from http://opencircuitdesign.com/qflow/download.html#Download.
I got v1.4.95
tar -xf qflow-1.4.95.tgz
cd qflow-1.4.95/
./configure
make
sudo make installAnd install the python3-tk package which would be needed by the qflow GUI.
sudo apt install python3-tkSome hacking
I also did some random stuff which somehow made qflow to work okay.
Copy tech/ directory
Copy the tech/ directory from the extracted qflow-1.4.95/ directory to /usr/local/share/qflow.
sudo cp -r tech/ /usr/local/share/qflow/Copy the executables
Copy some executables that qflow would need to use to the bin/ directory that qflow uses.
sudo cp src/vlogFanout /usr/local/share/qflow/bin
sudo cp src/vlog2Verilog /usr/local/share/qflow/bin
sudo cp src/vlog2Spice /usr/local/share/qflow/bin
sudo cp src/vlog2Cel /usr/local/share/qflow/bin
sudo cp src/DEF2Verilog /usr/local/share/qflow/bin
sudo cp src/rc2dly /usr/local/share/qflow/binModify a few tcsh scripts
As mentioned in https://github.com/RTimothyEdwards/qflow/issues/22, we need to modify some tcsh scripts at /usr/local/share/qflow/scripts/.
This seems to be applicable for v1.4.95 but probably not for later releases.
The modification to be made is same for all the files, which is to change the line
set techfile ${techdir}/${techfile}to
set techfile = ${techdir}/${techfile}The line number of the line to be modified and the files are as follows:
- L169:
magic_db.sh - L150:
magic_drc.sh - L122:
magic_gds.sh - L202:
magic_view.sh
Done!
Now the qflow GUI can be launched with
qflow guiReferences
- http://opencircuitdesign.com/qflow/download.html
- http://opencircuitdesign.com/qflow/install.html
- http://www.clifford.at/yosys/download.html
- https://github.com/rubund/graywolf
- http://opencircuitdesign.com/qrouter/download.html
- http://opencircuitdesign.com/magic/download.html
- http://opencircuitdesign.com/netgen/
- https://en.wikipedia.org/wiki/Layout\_Versus\_Schematic
- https://en.wikipedia.org/wiki/Register-transfer\_level
- http://iverilog.icarus.com/
- https://github.com/YosysHQ/yosys/issues/840
- https://github.com/rubund/graywolf/issues/32
- https://github.com/RTimothyEdwards/qflow/issues/1
- https://github.com/RTimothyEdwards/qflow/issues/22