FDRA Framework, self-hosted version, adapted for ADORA-Compiler.
=======================
FDRA Framework for a hybrid system with RISC-V and CGRA, including:
-
CGRA-MG: SoC modeling
-
App-Compiler: LLVM-based DFG generator (Another choice is MLIR based ADORA-Compiler)
-
CGRA-Compiler: CGRA mapper. (Has been integrated in ADORA-Compiler)
-
Bechmarks: C programs with target loop kernel annotated
-
copy this repo to the chipyard/generators/ directory
-
Add the following configuration in the chipyard/build.sbt file
lazy val chipyard = (project in file("generators/chipyard"))
.dependsOn(
...
fdra
)
lazy val fdra = (project in file("generators/fdra/cgra-mg"))
.dependsOn(testchipip, rocketchip)
.settings(libraryDependencies ++= rocketLibDeps.value)
.settings(chiselTestSettings)
.settings(commonSettings)
- copy config file to chipyard
cd chipyard/generators/fdra
./scripts/setup-paths.sh
- build verilog
source env.sh
cd generators/fdra
./scripts/build-verilog.sh
- build simulator based on Verilator
./scripts/build-verilator.sh
Download LLVM-10.0.0 and build
Set LLVM env
Using the script build.sh in this app-compiler directory. The internal path should be changed.
./build.sh
Using the script build.sh
cd cgra-compiler
./build.sh
Using the script run.sh
./run.sh
Change the benchmark file path as you need. The generated result files are in the same directory as the benchmark.
Automatically generate with CGRA Compiler, or
Manually replace the target loop kernel with CGRA call function and binding codes generated by CGRA Mapper
-
copy the application file to generators/fdra/software/tests
-
add the application in the Makefile
-
compile with the build.sh file.
cd generators/fdra
./scripts/run-verilator.sh app-name