Official supported environment for building and running muIR is ubuntu 18.04. You have to run these commands to install required packages from ubuntu package repositories :
sudo apt-get install build-essential cmake libjsoncpp-dev libncurses5-dev graphviz binutils-dev
sudo apt-get install gcc-8-multilib g++-8-multilib
To build muIR dependencies, we have scripted installing the dependencies. To install the dependencies you need only to run the following commands:
cd muir
source ./scripts/dandelion.sh
cd ..
mkdir build
cd build
cmake -DLLVM_DIR=<your repository>/Tapir-Meta/tapir/build/lib/cmake/llvm/ -DTAPIR=ON ..
make
source ./scripts/setup-env.sh
Inside test directory there are set of test example which show the generality of dandelion-generator. To get the generated accelerator files for test cases you can run:
# in your code repository
cd build/test/c/
make all
For each test case there is going to be one Scala file which has the detailed implementation of dandelion-generator.
muIR-Generator is a tool to generator hardware accelerator from software programs. muIR-Generator uses muIR as an intermediate representation (IR) to design hardware accelerators. Currently, muIR-Generator supports C/C++ and Cilk programs.
Official supported environment for building and running muIR-Generator is ubuntu 18.04.
Step One: Building LLVM/TAPIR-6: muIR-Generator uses LLVM/TAPIR compiler (LLVM compiler with parallel instruction extension to support Cilk programs). The following link contains a forked version of of LLVM/TAPIR-6 with a minor changes which muIR is compatible with. To ease of building TAPIR, we have scripted the build process of TAPIR:
git clone https://github.com/sfu-arch/muir.git
cd muir
./scripts/dandelion.sh
Step Two: Building muIR-Generator: Now we have installed and built all the muIR-Generator dependencies we can build the project:
mkdir build
cd build
cmake -DLLVM_DIR=<your_repository_path>/dependencies/Tapir-Meta/tapir/build/lib/cmake/llvm/ -DTAPIR=ON ..
make -jN
Step Three: Setting your PATH: To set your PATH
variable you can use the following script which is under build directory:
source ./scripts/setup-env.sh
After sourcing the script you should see the following message;
Dandelion is installed in:<your_repository_path>/build/bin
Your PATH is set!
Under muir/tests directory there are muir examples and the application examples which muIR framework is tested with. To keep the build process integrated and simple, muIR cmake file copy all these test cases under build/tests and make sure all the environment variables under this directory is properly set:
cd <your_repository>/build/tests/c/
make
NOTE: Currently, for simplicity of the Makefile in each example the target function's name needs to be the same name as the source file's name, hence, the Makefile can pick the right values for the compilation process.
To run a debug test:
debug-helper debugtest3.final.bc --node-id 4 --fn-name=debugtest3
After running the make
command for each test case there should be one Scala file. This Scala file is the target function accelerator description id muIR.
muIR-Generator uses muIR-Lib chisel library to describe hardware accelerator.
To be able to run and test the hardware accelerator, currently, we support the following back-ends:
Each project, separately has tutorial on how to connect the generated hardware accelerator design and run the full-system application.
In the following repo, Dandelion-Tutorial, we are documenting all the Dandelion project pieces, muIR is one of the subprojects of Dandelion. To have more information on the design details and other project you can follow the documentation.
This section is not complete yet
./bin/dandelion -help
dandelion options:
-aa-trace - Alias analysis trace
-config=<config_file> - Target function name
-fn-name=<Function name> - Target function name
-l-ex - Extracting loops
-o=<filename> - tapas output file
-test-file - Printing Test file
Generic Options:
-help - Display available options (-help-hidden for more)
-help-list - Display list of available options (-help-list-hidden for more)
-version - Display the version of this program
For more information you can look at the wiki. https://github.com/sfu-arch/dandelion-lib/wiki
- Amirali Sharifian (am.sharifian@gmail.com)