Skip to content

Commit

Permalink
Merge pull request limbo018#7 from limbo018/cell_library
Browse files Browse the repository at this point in the history
Cell library
  • Loading branch information
limbo018 authored Apr 20, 2021
2 parents f0bedbc + 8080b4f commit e741f92
Show file tree
Hide file tree
Showing 35 changed files with 6,257 additions and 2,673 deletions.
8 changes: 8 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
"**OpenMPL: An Open Source Layout Decomposer**",
IEEE International Conference on ASIC (ASICON), Chongqing, China, Oct. 29–Nov. 1, 2019.
([preprint](https://arxiv.org/pdf/1809.07554v3.pdf)) ([slides](http://yibolin.com/publications/papers/DFM_ASICON2019_Li.slides.pdf))
### Docker Version
We provide the docker version to avoid annoying compilation.
You can pull the image by
```bash
$ docker pull wadmes/openmpl:latest
```
The OpenMPL folder locates in `/home/OpenMPL`


### How To Compile

Expand Down
137 changes: 137 additions & 0 deletions bin/bench/a~
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
.
..
a
AND2_X1.gds
AND2_X2.gds
AND2_X4.gds
AND3_X1.gds
AND3_X2.gds
AND3_X4.gds
AND4_X1.gds
AND4_X2.gds
AND4_X4.gds
ANTENNA_X1.gds
AOI211_X1.gds
AOI211_X2.gds
AOI211_X4.gds
AOI21_X1.gds
AOI21_X2.gds
AOI21_X4.gds
AOI221_X1.gds
AOI221_X2.gds
AOI221_X4.gds
AOI222_X1.gds
AOI222_X2.gds
AOI222_X4.gds
AOI22_X1.gds
AOI22_X2.gds
AOI22_X4.gds
BUF_X16.gds
BUF_X1.gds
BUF_X2.gds
BUF_X32.gds
BUF_X4.gds
BUF_X8.gds
CLKBUF_X1.gds
CLKBUF_X2.gds
CLKBUF_X3.gds
CLKGATETST_X1.gds
CLKGATETST_X2.gds
CLKGATETST_X4.gds
CLKGATETST_X8.gds
CLKGATE_X1.gds
CLKGATE_X2.gds
CLKGATE_X4.gds
CLKGATE_X8.gds
DFFRS_X1.gds
DFFRS_X2.gds
DFFR_X1.gds
DFFR_X2.gds
DFFS_X1.gds
DFFS_X2.gds
DFF_X1.gds
DFF_X2.gds
DLH_X1.gds
DLH_X2.gds
DLL_X1.gds
DLL_X2.gds
FA_X1.gds
FILLCELL_X16.gds
FILLCELL_X1.gds
FILLCELL_X2.gds
FILLCELL_X32.gds
FILLCELL_X4.gds
FILLCELL_X8.gds
HA_X1.gds
INV_X16.gds
INV_X1.gds
INV_X2.gds
INV_X32.gds
INV_X4.gds
INV_X8.gds
LOGIC0_X1.gds
LOGIC1_X1.gds
MUX2_X1.gds
MUX2_X2.gds
NAND2_X1.gds
NAND2_X2.gds
NAND2_X4.gds
NAND3_X1.gds
NAND3_X2.gds
NAND3_X4.gds
NAND4_X1.gds
NAND4_X2.gds
NAND4_X4.gds
NOR2_X1.gds
NOR2_X2.gds
NOR2_X4.gds
NOR3_X1.gds
NOR3_X2.gds
NOR3_X4.gds
NOR4_X1.gds
NOR4_X2.gds
NOR4_X4.gds
OAI211_X1.gds
OAI211_X2.gds
OAI211_X4.gds
OAI21_X1.gds
OAI21_X2.gds
OAI21_X4.gds
OAI221_X1.gds
OAI221_X2.gds
OAI221_X4.gds
OAI222_X1.gds
OAI222_X2.gds
OAI222_X4.gds
OAI22_X1.gds
OAI22_X2.gds
OAI22_X4.gds
OAI33_X1.gds
OR2_X1.gds
OR2_X2.gds
OR2_X4.gds
OR3_X1.gds
OR3_X2.gds
OR3_X4.gds
OR4_X1.gds
OR4_X2.gds
OR4_X4.gds
SDFFRS_X1.gds
SDFFRS_X2.gds
SDFFR_X1.gds
SDFFR_X2.gds
SDFFS_X1.gds
SDFFS_X2.gds
SDFF_X1.gds
SDFF_X2.gds
TBUF_X16.gds
TBUF_X1.gds
TBUF_X2.gds
TBUF_X4.gds
TBUF_X8.gds
TINV_X1.gds
TLAT_X1.gds
XNOR2_X1.gds
XNOR2_X2.gds
XOR2_X1.gds
XOR2_X2.gds
22 changes: 22 additions & 0 deletions bin/bench/tc.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@


set fileList [open "./a" r+]
puts "opened $fileList for read"

set newList [open "./out" w+]
puts "opened $newList for write"

while { [gets $fileList line] >=0 } {
set fileName [lindex $line 0]
layout create L1 $fileName
set topCell [L1 topcell]
puts $newList
puts $fileName
puts $topCell
puts $newList "$fileName $topCell"
layout delete L1
}

close $newList

exit
1 change: 0 additions & 1 deletion bin/bench/zipjson.sh

This file was deleted.

143 changes: 143 additions & 0 deletions bin/big.sh

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions bin/cell.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!

# ========================================================================
# SimpleMPL Usage
# -help (false) toggle printing help message
# -in input gds file name
# -out () output gds file name
# -coloring_distance (0) a floating point number indicating number of coloring distance in nanometer
# -color_num an integer indicating number of masks (colors) < 3|4 >
# -simplify_level (3) an integer indicating graph simplification level < 0|1|2|3 >
# -thread_num (1) an integer indicating maximum thread number
# -path_layer an integer indicating layer for conflict edges
# -precolor_layer an integer indicating layer for pre-colored patterns
# -uncolor_layer an integer indicating layer for coloring
# -algo (BACKTRACK) algorithm type < ILP|BACKTRACK|LP|SDP|DL >
# -shape (RECTANGLE) shape mode < RECTANGLE|POLYGON >
# -verbose (false) toggle controlling screen messages
# -stitch (false) toggle controlling stitch insertion
# -use_stitch
# gen_stitch
# -dbg_comp_id (4294967295) debug component id
# ========================================================================

#-uncolor_layer 100 \
#-uncolor_layer 201 \
#-uncolor_layer 202 \
#-uncolor_layer 203 \
# if the benchmark contains polygon shapes, -shape must be set to POLYGON;
# otherwise, set -shape to RECTANGLE is more memory efficient
mkdir -p benchout
./OpenMPL \
-shape POLYGON \
-in cell/SDFFRNQ_X1.gds \
-in2 cell/SDFFRNQ_X1.gds\
-in2_flip\
-out benchout/sim_c1_sti.gds \
-coloring_distance 100 \
-uncolor_layer 15 \
-uncolor_layer 16 \
-color_num 3 \
-algo BACKTRACK\
-thread_num 8\
-use_stitch \
-gen_stitch\
-record 2\
# -dbg_comp_id 10096
15 changes: 15 additions & 0 deletions bin/cmdtest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import subprocess
import os,glob
files = [f for f in glob.glob('./cell/*.gds') if os.path.isfile(f)]
for i in files:
for j in files:
for k in range(2):
print(i+" "+j+ " "+str(k))
if k == 0:
subprocess.run(["/uac/gds/wli/big_home/repository/OpenMPL/bin/OpenMPL","-shape","POLYGON","-in", i,"-in2",j ,"-out",
"benchout/sim_c1_sti.gds","-coloring_distance","100","-uncolor_layer","15","-uncolor_layer","16",
"-color_num","3","-algo","DL","-thread_num","8","-use_stitch","-gen_stitch","-record","3"])
else:
subprocess.run(["/uac/gds/wli/big_home/repository/OpenMPL/bin/OpenMPL","-shape","POLYGON","-in", i,"-in2",j ,"-in2_flip","-out",
"benchout/sim_c1_sti.gds","-coloring_distance","100","-uncolor_layer","15","-uncolor_layer","16",
"-color_num","3","-algo","DL","-thread_num","8","-use_stitch","-gen_stitch","-record","3"])
35 changes: 35 additions & 0 deletions bin/exp_generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import os

algorithms = ["ILP",
"SDP",
"DL",
"BACKTRACK"]
shape = "POLYGON"
file_path = ""
out = ""
coloring_distance = "100"
layer1 = "15"
layer2 = "16"
color_num = "3"
algo = ""
thread_num = "1"
record = "1"


input_folder = "big/"
output_folder = "benchout/"
file_names = os.listdir(input_folder)


fp = open('experiments.sh', 'w')

for file_name in file_names:
file_path = input_folder + file_name
out = output_folder + "out_" + file_name
for algo in algorithms:
sh = "./OpenMPL " + "-shape " + shape + " -in " + file_path + " -out " + out + " -coloring_distance " + coloring_distance + " -uncolor_layer " + layer1 + " -uncolor_layer " + layer2 + " -color_num " + color_num + " -algo " + algo + " -thread_num " + thread_num + " -use_stitch -gen_stitch" + " -record " + record
fp.write(sh)
fp.write("\n")
fp.write("\n")

fp.close()
6 changes: 6 additions & 0 deletions bin/experiment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir -p benchout

./OpenMPL -shape POLYGON -in big/sparc_exu_alu_85.gds -out benchout/out_sparc_exu_alu_85.gds -coloring_distance 100 -uncolor_layer 15 -uncolor_layer 16 -color_num 3 -algo ILP -thread_num 8 -use_stitch -gen_stitch -record 1
./OpenMPL -shape POLYGON -in big/sparc_exu_alu_85.gds -out benchout/out_sparc_exu_alu_85.gds -coloring_distance 100 -uncolor_layer 15 -uncolor_layer 16 -color_num 3 -algo SDP -thread_num 8 -use_stitch -gen_stitch -record 1
./OpenMPL -shape POLYGON -in big/sparc_exu_alu_85.gds -out benchout/out_sparc_exu_alu_85.gds -coloring_distance 100 -uncolor_layer 15 -uncolor_layer 16 -color_num 3 -algo DL -thread_num 8 -use_stitch -gen_stitch -record 1
./OpenMPL -shape POLYGON -in big/sparc_exu_alu_85.gds -out benchout/out_sparc_exu_alu_85.gds -coloring_distance 100 -uncolor_layer 15 -uncolor_layer 16 -color_num 3 -algo BACKTRACK -thread_num 8 -use_stitch -gen_stitch -record 1
Loading

0 comments on commit e741f92

Please sign in to comment.