Commit 52ced6de by Eddie Hung

Update area calc

parent 03961e2a
...@@ -7,32 +7,29 @@ import os ...@@ -7,32 +7,29 @@ import os
re_mux = re.compile(r'mux_(index|case|if_bal|if_unbal)_(\d+)_(\d+)\.v') re_mux = re.compile(r'mux_(index|case|if_bal|if_unbal)_(\d+)_(\d+)\.v')
area = {} area = {}
# 1 2 3 4 5 6 F7 F8 # 1 2 3 4 5 6 F7 F8
area[2] = ([ 0, 0, 1, 0, 0, 0, 0, 0 ],) area[2] = [ 0, 0, 1, 0, 0, 0, 0, 0 ]
area[3] = ([ 0, 0, 0, 0, 1, 0, 0, 0 ],) area[3] = [ 0, 0, 0, 0, 1, 0, 0, 0 ]
area[4] = ([ 0, 0, 0, 0, 0, 1, 0, 0 ],) area[4] = [ 0, 0, 0, 0, 0, 1, 0, 0 ]
area[5] = ([ 0, 0, 0, 0, 0, 0, 1, 0 ], *area[4]) area[5] = [ 0, 0, 2, 0, 0, 0, 1, 1 ]
area[7] = ([ 0, 0, 0, 0, 0, 0, 1, 0 ], *area[4], *area[3]) area[7] = [ 0, 0, 3, 0, 0, 0, 2, 1 ]
area[8] = ([ 0, 0, 0, 0, 0, 0, 1, 0 ], *area[4], *area[4]) area[8] = [ 0, 0, 4, 0, 0, 0, 2, 1 ]
area[9] = ([ 0, 0, 0, 0, 0, 0, 0, 1 ], *area[8]) area[9] = [ 0, 0, 0, 0, 0, 2, 1, 1 ]
area[15] = ([ 0, 0, 0, 0, 0, 0, 0, 1 ], *area[8], *area[7]) area[15] = [ 0, 0, 0, 0, 1, 3, 2, 1 ]
area[16] = ([ 0, 0, 0, 0, 0, 0, 0, 1 ], *area[8], *area[8]) area[16] = [ 0, 0, 0, 0, 0, 4, 2, 1 ]
area[17] = (*area[16], *area[2]) area[17] = [ 0, 0, 1, 0, 0, 4, 2, 1 ]
area[31] = (*area[16], *area[15], *area[2]) area[31] = [ 0, 0, 1, 0, 1, 7, 4, 2 ]
area[32] = (*area[16], *area[16], *area[2]) area[32] = [ 0, 0, 1, 0, 0, 8, 4, 2 ]
area[33] = (*area[16], *area[16], *area[3]) area[33] = [ 0, 0, 0, 0, 1, 8, 4, 2 ]
area[63] = (*area[15], *(area[16] * 3), *area[4]) area[63] = [ 0, 0, 0, 0, 1,16, 8, 4 ]
area[64] = (*(area[16] * 4), *area[4]) area[64] = [ 0, 0, 0, 0, 0,17, 8, 4 ]
area[65] = (*(area[16] * 4), *area[5]) area[65] = [ 0, 0, 2, 0, 0,16, 9, 5 ]
area[127] = ([ 0, 0, 0, 0, 0, 0, 1, 0 ], *area[63], *area[64]) area[127] = [ 0, 0, 4, 0, 1,31,18, 9 ]
area[128] = ([ 0, 0, 0, 0, 0, 0, 1, 0 ], *area[64], *area[64]) area[128] = [ 0, 0, 4, 0, 0,32,18, 9 ]
area[129] = ([ 0, 0, 0, 0, 0, 0, 0, 1 ], *area[64], *area[65]) area[129] = [ 0, 0, 0, 0, 0,34,17, 9 ]
area[255] = (*area[15], *(area[16] * 15), *area[16]) area[255] = [ 0, 0, 0, 0, 1,67,34,17 ]
area[256] = (*(area[16] * 16), *area[16]) area[256] = [ 0, 0, 0, 0, 0,68,34,17 ]
area[257] = ([ 0, 0, 1, 0, 0,68,34,17 ],) area[257] = [ 0, 0, 1, 0, 0,68,34,17 ]
for N in area:
area[N] = [sum(i) for i in zip(*area[N])]
for fn in glob.glob('*.v'): for fn in glob.glob('*.v'):
m = re_mux.match(fn) m = re_mux.match(fn)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment