.
├── kernels (the dir storing kernels)
│ └──mm2 (the dir to build kernel)
│ ├── build
│ │ ├── kernel.bc
│ │ └── kernel.ll
│ ├── mm2.c
│ ├── Makefile
│ └── param.json
├── Makefile
├── outputs (the outputs of the HIT-CGRA-Mapper)
│ └── mm2_0 (NAME_SUFFIX)
│ ├── dfg.json
│ ├── mm2(cp the workbench/kernels/NAME here to save)
│ │ ├── build
│ │ │ ├── kernel.bc
│ │ │ └── kernel.ll
│ │ ├── mm2.c
│ │ ├── Makefile
│ │ └── param.json
│ ├── mm2_0.png
│ ├── kernel.dot
│ └── param.json
├── README.md
└── scripts (scripts to help build)
├── dot.sh
├── gdb.sh
└── run.sh
- make sure you have build HIT-CGRA-Mapper,If you haven't completed it yet, please read README of HIT-CGRA-Mapper
- add CGRA_WORKBENCH to ~/.bashrc
- vim ~/.bashrc then add at the last line,for example "export CGRA_WORKBENCH=/home/user/workbench"
- source ~/.bashrc
- cd $CGRA_WORKBENCH,run "make KERNEL=conv3" to run the default kernel "conv3"
- mkdir for your kernel, you can name the folder according to your preferences. the name of the folder is the kernel's NAME
- write the Makefile for your kernel,Reference ./kernels/mm2/Makefile.Make sure if your run “make” in ./kernels/yourkernel, build dir is generated and kernel.bc is in it. and run "make clean" rm the build dir.
- make cmd include
- run: build your kernel in ./kernels/NAME,and run the HIT-CGRA-Mapper to generate the result. default run mm2
- gdb: build your kernel in ./kernel/NAME,and run HIT-CGRA-Mapper through GDB to find bugs in the HIT-CGRA-Mapper
- clean: rm the ./kernel/NAME/build
- make param
- KERNEL : the kernel you want to build,run or clean
- SUFFIX : give a suffix to your kernel, to diff the different output of the same kernel.the default suffix is _0
- example
make KERNEL=NAME SUFFIX=test gdb
make KERNEL=NAME clean