NOTE:
$ git clone https://github.com/microdynamics-cpu/tree-core-sim.git $ cd tree-core-sim $ mkdir dependency && cd dependency
Then, adding extra swap sapce to avoid the exhaustion of heap memory.
NOTE: Below steps is not essential. If your embedded platform have more that 4GB memory space, you can just skip these steps.
$ mkdir -p ~/Desktop/swap $ cd ~/Desktop/swap $ sudo swapoff -a $ sudo dd if=/dev/zero of=swapfile bs=1024 count=4000000 # 4GB swap file size $ sudo mkswap swapfile $ sudo swapon swapfile
NOTE: The installation sequence of libraries is not arbitrary, some libraries have dependency relation. So you should install libraries one by one in order that's been exhibited here.
$ sudo apt-get install build-essential clang bison flex libreadline-dev gawk tcl-dev libffi-dev git mercurial graphviz xdot pkg-config python python3 libftdi-dev qt5-default python3-dev libboost-all-dev cmake libeigen3-dev
$ git clone https://github.com/YosysHQ/icestorm.git icestorm $ cd icestorm $ make -j$(nproc) $ sudo make install
If your embedded platform is short of memory, you can decrease the number of jobs by switch -j$(nproc) into -j1.
$ git clone https://github.com/cseed/arachne-pnr.git arachne-pnr $ cd arachne-pnr $ make -j$(nproc) $ sudo make install
$ git clone https://github.com/YosysHQ/nextpnr nextpnr $ cd nextpnr $ cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . $ make -j$(nproc) $ sudo make install
NOTE: After
nextpnrcompiled done, if you encouter error in link phase likeerror: lto-wrapper failed collect2: error: ld returned 1 exit status, that possible means the compiler of your embedded platform cannot support the IPO perfactly. You need to switchUSE_IPOoption fromONtoOFFin CMakefile.txt.
$ git clone https://github.com/YosysHQ/yosys.git yosys $ cd yosys $ make -j$(nproc) $ sudo make install
All of the TreeCore codes are release under the GPL-3.0 License.