All .cpp files of this project;
All .h files of this project;
Download jsoncpp library (https://github.com/open-source-parsers/jsoncpp)
Contains all verilog files (bit_width/OPACT1(2).v, MultiDesignComparison/OPACTDesign1(2,3...).v) synthesized by OPACT in the experimental section of the paper.
-
Install the Gurobi 9.5;
-
Download EDA tool yosys (https://yosyshq.net/yosys/download.html) and put the yosys executable file into the same folder of this project's source files;
-
Install Python HDL library MyHDL:
Download this lib in python
pip install Myhdl
-
Install the verilog generator:
Download the source codes of ApproxMult_Myhdl:
git clone https://github.com/FCHXWH/ApproxMULT_MyHDL.git
-
Install the simulator (option):
Download the source codes of simulator
git clone https://github.com/changmg/simulator.git
Compile
cd simulator/ mkdir build cd build cmake .. make -j16 cd ..
How to use this simulator (simulation.out -h):
simulation.out -a exact_multiplier.blif -b approximate_multiplier.blif -f error_report_file_path
- your_directory/jsoncpp-1.9.4/include;
- your_directory/Gurobi/win64/include.
- your_directory/Gurobi/win64/lib;
- your_directory/jsoncpp-1.9.4/jsonlib.
- gurobi_c++mdd2019.lib;
- gurobi91.lib;
- jsoncpp.lib.
- Opt_Mode: 0=>AreaOpt; 1=>ErrOpt; 2=>CoOpt;
- bounds: set the constraint of different metrics under different modes (for example, in AreaOpt mode, set the bound of error);
- path: set the directory of the downloaded verilog generator.