# wafer-compiler **Repository Path**: fenglingerr/wafer-compiler ## Basic Information - **Project Name**: wafer-compiler - **Description**: wafer-compiler - **Primary Language**: C++ - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 5 - **Created**: 2024-07-08 - **Last Updated**: 2024-07-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # sst-wafer-compiler ## build ```plaintext git clone (this project) cd sst-wafer-compiler/ ./pre-build.sh ./build.sh ``` ## test 进行测试(无论是makefile还是sh文件),需要对编译过程中的nvcc工具链参照本机进行对应修改: ```plaintext 创建一个main.cu文件,内容为: int main( int argc, char* argv[] ) { return 0; } 执行nvcc main.cu -dryrun 2> nvcc_pro.txt 从nvcc_pro.txt可以找到格式为: gcc ... ... g++ ... 的一系列内容,此内容即为本机使用nvcc工具链的详细过程,将此过程粘贴到makefile或sh文件的对应位置。 在(cicc ... -o xxx.ptx)下方添加(cp kernel.ptx xxx.ptx),同时移除过程中的一系列(rm ...),并将最后一行的(g++ ... -o a.out)改为(g++ ... -o gpu_sha1.out)。 另注意,部分工具未在系统路径下,需手动添加或引用(如cicc)。 ``` ### 模拟器所使用脚本 ```plaintext cd sst-wafer-compiler/example/sh4sst # 脚本使用方法:./wafer.sh -i input -j json -o output ./wafer.sh -j design.json -i SHA1Example.cpp -o kt_run_exe ./kt_run_exe ``` ### sha1计算 ```plaintext cd sst-wafer-compiler/example/sha1multi make ./kt_run_exe ``` ### sha1破译 ```plaintext cd sst-wafer-compiler/example/sha1crack make ./kt_run_exe ```