Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ebc2b7a
Create Adder_Tree_Optimization.cpp
FCHXWH Feb 5, 2021
3c7b096
Create Multiplier_Tree_Optimization.cpp
FCHXWH Feb 5, 2021
e7bd261
Create Adder_Tree_Optimization.h
FCHXWH Feb 5, 2021
813ab66
Create Multiplier_Tree_Optimization.h
FCHXWH Feb 5, 2021
7c8d39b
Create gurobi_c++.h
FCHXWH Feb 5, 2021
69174b0
Update main.cpp
FCHXWH Feb 5, 2021
88c0db5
Create gurobi_10_10.lp
FCHXWH Feb 5, 2021
ef38bbd
Create gurobi_10_10.sol
FCHXWH Feb 5, 2021
c451889
Create gurobi_glo_adder_10.lp
FCHXWH Feb 5, 2021
b455b67
Create gurobi_glo_adder_10.sol
FCHXWH Feb 5, 2021
c6a0a5c
Update Adder_Tree_Optimization.cpp
FCHXWH Feb 5, 2021
54404b4
Update README.md
FCHXWH Feb 5, 2021
d66df30
Update README.md
FCHXWH Feb 5, 2021
125950b
Create main.cpp
FCHXWH Feb 5, 2021
2893988
Update main.cpp
FCHXWH Feb 5, 2021
f6a2a36
Create README.md
FCHXWH Feb 5, 2021
ccb57d8
Create main.cpp
FCHXWH Feb 5, 2021
da82d0f
Create main.cpp
FCHXWH Feb 5, 2021
b489760
Update README.md
FCHXWH Feb 5, 2021
cf83a41
Update main.cpp
FCHXWH Feb 5, 2021
e2957db
Create Prefex_Tree.cpp
FCHXWH Feb 5, 2021
ad956f0
Create fast_mult.cpp
FCHXWH Feb 5, 2021
7f695ad
Create CSL.cpp
FCHXWH Feb 5, 2021
d4a3da6
Create Compressor_Tree.cpp
FCHXWH Feb 5, 2021
3939383
Create basic_block.cpp
FCHXWH Feb 5, 2021
ec3240f
Create basic_block.h
FCHXWH Feb 5, 2021
538c60b
Create Compressor_Tree.h
FCHXWH Feb 5, 2021
75ad1b1
Create CSL.h
FCHXWH Feb 5, 2021
79c7ab0
Create fast_mult.h
FCHXWH Feb 5, 2021
96b5aba
Create Prefix_Tree.h
FCHXWH Feb 5, 2021
054e8fb
Update README.md
FCHXWH Feb 5, 2021
1cd61e7
Update Compressor_Tree.cpp
FCHXWH Feb 5, 2021
b60b4f7
Add files via upload
FCHXWH Feb 5, 2021
bab244d
Update Compressor_Tree.cpp
FCHXWH Feb 5, 2021
14870df
Update CSL.cpp
FCHXWH Feb 5, 2021
29a281b
Create CSL.cpp
FCHXWH Feb 5, 2021
9d1325a
Update Prefex_Tree.cpp
FCHXWH Feb 5, 2021
7fcd251
Update fast_mult.cpp
FCHXWH Feb 5, 2021
6fa8d5f
Update README.md
FCHXWH Feb 5, 2021
725f288
Update README.md
qianwk Aug 25, 2021
8d61635
Update README.md
qianwk Aug 25, 2021
73b50e2
Update README.md
qianwk Aug 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 48 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# GOMIL: Global Optimization of Multiplier by Integer Linear Programming
This project proposes GOMIL, a novel global optimization technique for designing better multipliers. The main idea of GOMIL is to establish an ILP formulation to jointly optimize the compressor tree and the prefix structure in a multiplier [1].

## Reference paper(s):
- [1]: GOMIL: Global Optimization of Multiplier by Integer Linear Programming (Weihua Xiao, Weikang Qian, Weiqiang Liu, DATE 2021)
## Reference paper:
[1] Weihua Xiao, Weikang Qian, and Weiqiang Liu, "[GOMIL: global optimization of multiplier by integer linear programming](https://umji.sjtu.edu.cn/~wkqian/papers/Xiao_Qian_Liu_GOMIL_Global_Optimization_of_Multiplier_by_Integer_Linear_Programming.pdf)," in *Proceedings of the 2021 Design, Automation, and Test in Europe Conference (DATE)*, virtual event, Grenoble, France, 2021, pp. 374-379.

## Requirements
- OS: 64-bit Windows/Linux
Expand All @@ -23,15 +23,57 @@ Note that this project uses C++ interface of Gurobi optimizer 9.0, a mixed ILP s
Project->Property->
- VC++ directory->Include directory->Edit->New line: `Gurobi_Path\win64\include`;
- VC++ directory->Library directory->Edit->New line: `Gurobi_Path\win64\lib`;
- Liner->Input->Additional dependencies->Edit->New line: `gurobi_c++mdd2017.lib`;
- Liner->Input->Additional dependencies->Edit->New line: `gurobi90.lib`.
- Linker->Input->Additional dependencies->Edit->New line: `gurobi_c++mdd2017.lib`;
- Linker->Input->Additional dependencies->Edit->New line: `gurobi90.lib`.

### Configuration in Code
- `PARAMETER_W` : parameter to control the weight between adder tree's delay and area, e.g., area+ `PARAMETER_W` * delay;
- `PARAMETER_L` : speedup technique that control the optimized bits of adder tree;
- `MULT_SIZE` : size of optimized multiplier;
- `stages_num` : number of compressor tree's stages, which us consistent with wallace tree's.
- `Time_Bound_s` : runtime upper bound of optimization;
- `filename` : the file path of generated solution file ***.sol.
- `Time_Bound_s` : runtime upper bound of optimization;

### Example
Optimize a 10 * 10 multiplier, set:
- MULT_SIZE = 10;
- stages_num = 5;
- PARAMETER_W = 10;
- PARAMETER_L = 8;

In this case, the results of this GOMIL multiplier are saved into `Tune_WL/gurobi_10_10.sol` (compression tree) and `Tune_WL/gurobi_glo_adder_10.sol` (adder tree part).

## Post-Processing
### Generate the result file of optimized Compressor tree
- Set up a C++ project in Visio Studio;
- Add the source file `script_for_Compressor_tree/main.cpp`;
- Configuration in code:
- `filename0` : path of optimization solution file, e.g., `Tune_WL/gurobi_10_10.sol`;
- `filename1` : path of generated compressor result file, e.g., `Tune_WL/10_10.txt`;
- `stage_num` : number of compressor tree's stages;
- `num_of_elements` : 2 * MULT_SIZE -1;
- Run this code and the result file .txt is saved in `Tune_WL/`.

### Generate verilog files for GOMIL multipliers
- Set up a C++ project in Visio Studio;
- Add the source files and header files in the folder `script_Verilog_Generator/`;
- Configuration in code:

`Compressor_Tree.cpp`:
- `wordlength` : MULT_SIZE;
- `stage_number` : number of compressor tree's stages;
- `filename1` : path of generated compressor result file, e.g., `Tune_WL/10_10.txt`;

`fast_mult.cpp`:
- `splits_num` : number of segments in the optimized prefix tree;

`CSL.cpp`:
- `splits` : the segments of the optimized prefix tree;
- `cssa_skip_points` : indicate where to use a carry select skip adder (cssa) in one segment;

`Prefix_Tree.cpp`
- `splits`& `carry_bit_index` : the connection order of internal nodes in the optimized prefix tree, which can be achieved from `Tune_WL/gurobi_glo_adder_10.sol`;
- `cssa_skip_point` & `compensated_nodes` : the inserted cssa in one segment.

Note that all the above configurations about optimized prefix tree can be achieved from adder tree's optimization solution file, e.g., `Tune_WL/gurobi_glo_adder_10.sol`, and we will modify the code to generate these configurations automatically!

- Run this code and all related verilog files .v are generated in `script_Verilog_Generator/`.
Loading