This commit is contained in:
Daniel Torres 2022-06-17 15:50:10 -07:00
commit 6f381171de
9 changed files with 1530 additions and 1426 deletions

@ -1 +1 @@
Subproject commit be67c99bd461742aa1c100bcc0732657faae2230
Subproject commit 307c77b26e070ae85ffea665ad9b642b40e33c86

View file

@ -29,7 +29,7 @@ k = 3 6
ifeq ($(TECH), sky130)
FREQS = 25 50 100 150 200 250 300 350 400
else
else ifeq ($(TECH), sky90)
FREQS = 500 550 600 650 700 750 800 850 900 950 1000
endif

View file

@ -1,101 +1,101 @@
Module,Tech,Width,Target Freq,Delay,Area,L Power (nW),D energy (fJ)
priorityencoder,sky90,8,7683,0.12508649056358195,50.960001,24.761,1.0685929975270078e-05
priorityencoder,sky90,16,5773,0.16977016282695304,136.220003,77.243,2.1773774467348e-05
priorityencoder,sky90,32,4500,0.2218912222222222,372.400007,189.626,4.371111111111111e-05
priorityencoder,sky90,64,4098,0.2439914738897023,797.720015,382.205,7.393850658857981e-05
priorityencoder,sky90,128,3409,0.2933331557641537,1602.300031,610.009,0.0001261366969785861
add,sky90,8,3658,0.27337042810278844,253.820005,154.438,0.00010825587752870422
add,sky90,16,2942,0.3393218266485384,722.260013,485.109,0.00032460910944935416
add,sky90,32,2468,0.40496338573743923,1440.600027,714.057,0.0006580226904376014
add,sky90,64,2139,0.4674681813931744,2781.240054,1050.0,0.0009392239364188873
add,sky90,128,1885,0.5304949787798409,6186.740118,2230.0,0.0021480106100795755
csa,sky90,8,5758,0.16536141368530738,266.560005,154.202,0.00013650573115665162
csa,sky90,16,5931,0.1654056314280897,533.12001,308.404,0.00027263530601922105
csa,sky90,32,5758,0.16536141368530738,1066.240021,616.808,0.0005448072247308093
csa,sky90,64,5931,0.1654056314280897,2132.480042,1230.0,0.0010905412240768842
csa,sky90,128,5931,0.1654056314280897,4264.960083,2470.0,0.002178553363682347
shiftleft,sky90,8,4327,0.23025600254217704,259.700005,196.451,7.534088282874971e-05
shiftleft,sky90,16,3355,0.29803959314456036,666.400006,558.433,0.00019552906110283157
shiftleft,sky90,32,2503,0.39951757530962845,1475.880027,768.262,0.0003807431082700759
shiftleft,sky90,64,2203,0.45385946391284615,3914.120062,2680.0,0.001144802541988198
shiftleft,sky90,128,1907,0.5242938489774515,9192.400136,6080.0,0.0029008914525432616
comparator,sky90,8,4839,0.20629126741062204,200.900004,136.6,5.001033271337053e-05
comparator,sky90,16,4018,0.24806303982080635,358.680007,189.253,6.321553011448482e-05
comparator,sky90,32,3602,0.276293542476402,690.900013,315.709,0.00010771793448084398
comparator,sky90,64,3129,0.31954192361776923,1372.980026,508.393,0.0002048577820389901
comparator,sky90,128,2791,0.35824651809387315,2744.980052,796.047,0.0003439627373701182
flop,sky90,8,10,0.1143419999999935,133.279999,64.8145,0.000193835
flop,sky90,16,10,0.1143419999999935,266.5599975,129.629,0.00038715000000000006
flop,sky90,32,10,0.1143419999999935,533.119995,259.258,0.0007723000000000001
flop,sky90,64,10,0.1143419999999935,1066.23999,520.0,0.00154955
flop,sky90,128,10,0.1143419999999935,2132.4799805,1035.0,0.003094
mux2,sky90,8,5299,0.1883518518588413,63.700001,21.541,1.932440083034535e-05
mux2,sky90,16,4850,0.20207356701030926,119.560002,32.354,3.884536082474227e-05
mux2,sky90,32,5003,0.19908807195682593,375.340008,259.372,0.00013671796921846892
mux2,sky90,64,3989,0.24961239583855604,479.220007,148.175,0.00016570569064928555
mux2,sky90,128,4004,0.24974824975024976,1302.420025,767.078,0.0004665334665334665
mux4,sky90,8,4661,0.21448923471358078,164.640002,88.494,4.31452478009011e-05
mux4,sky90,16,4392,0.22421770309653916,359.659999,419.855,0.0001006375227686703
mux4,sky90,32,4118,0.24283532831471588,594.860011,331.197,0.00013161728994657602
mux4,sky90,64,3710,0.26931477897574124,899.640016,344.331,0.00028625336927223723
mux4,sky90,128,3167,0.31575023618566467,2016.840039,722.109,0.0005917271866119355
mux8,sky90,8,3585,0.2789170278940028,287.140006,116.648,6.089260808926081e-05
mux8,sky90,16,3362,0.295237998810232,582.120003,282.366,0.00014455681142177274
mux8,sky90,32,3178,0.3140553102580239,1319.079995,670.683,0.0003577721837633732
mux8,sky90,64,2906,0.3440756228492774,2132.48004,808.482,0.0004428768066070199
mux8,sky90,128,2667,0.3749401308586427,4575.620089,1830.0,0.0009786276715410573
mult,sky90,8,1310,0.7631557786259543,2194.220041,1440.0,0.0014213740458015268
mult,sky90,16,997,1.0029260270812437,7519.540137,4940.0,0.0063761283851554666
mult,sky90,32,763,1.3106129895150722,25200.700446,14900.0,0.024931847968545216
mult,sky90,64,632,1.5822664810126583,86011.661365,42600.0,0.08884651898734176
mult,sky90,128,524,1.9083759465648855,296198.144128,114000.0,0.2733148854961832
priorityencoder,tsmc28,8,31335,0.031912196106590074,8.316,34.836,1.716929950534546e-06
priorityencoder,tsmc28,16,21253,0.04703118086858326,21.672,78.026,4.008845810003294e-06
priorityencoder,tsmc28,32,16464,0.06071258114674442,61.614,207.499,9.323372206025267e-06
priorityencoder,tsmc28,64,13804,0.07239877021153289,137.466,425.592,1.847290640394089e-05
priorityencoder,tsmc28,128,11440,0.0874065874125874,317.646,973.649,4.117132867132867e-05
add,tsmc28,8,13838,0.07207477814713109,34.272,187.089,1.3311172134701546e-05
add,tsmc28,16,11521,0.08678002100512108,90.972001,475.207,3.367763214998698e-05
add,tsmc28,32,9812,0.1018860211985324,209.286002,1060.0,8.153281695882594e-05
add,tsmc28,64,8206,0.12185605215695831,388.836003,1770.0,0.0001409943943456008
add,tsmc28,128,7354,0.13597341881968997,907.452008,4360.0,0.00034511830296437315
csa,tsmc28,8,24524,0.040663382319360626,52.416,482.462,2.173381177621921e-05
csa,tsmc28,16,24524,0.040663382319360626,104.832,964.99,4.346762355243842e-05
csa,tsmc28,32,24524,0.040663382319360626,209.664,1930.0,8.677214157559942e-05
csa,tsmc28,64,24524,0.040663382319360626,419.327999,3860.0,0.00017342195400424075
csa,tsmc28,128,24524,0.040663382319360626,838.655998,7720.0,0.00034717011906703634
shiftleft,tsmc28,8,15202,0.0656078183133798,50.652,367.074,1.6991185370346006e-05
shiftleft,tsmc28,16,11804,0.08465604506946797,127.511999,602.29,3.388681802778719e-05
shiftleft,tsmc28,32,9587,0.10430391697089808,384.803997,1940.0,0.00010180452696359654
shiftleft,tsmc28,64,8272,0.12086674854932303,1041.263998,5460.0,0.0002895309477756286
shiftleft,tsmc28,128,7023,0.14238329232521713,1836.953994,8670.0,0.000566566994162039
comparator,tsmc28,8,17422,0.05733769130983814,35.784,170.595,9.488003673516243e-06
comparator,tsmc28,16,13736,0.07273839778683751,54.558,250.167,1.4349155503785673e-05
comparator,tsmc28,32,12139,0.08236710865804432,145.782,622.975,3.567015404893319e-05
comparator,tsmc28,64,11080,0.09024670758122744,294.21,1250.0,6.84115523465704e-05
comparator,tsmc28,128,9371,0.10671119720414043,558.432,2400.0,0.00012794792444776438
flop,tsmc28,8,10,0.048889000000002625,15.12,78.6345,2.7246000000000003e-05
flop,tsmc28,16,10,0.048889000000002625,30.24,157.29,5.4290000000000004e-05
flop,tsmc28,32,10,0.048889000000002625,60.4799995,314.5805,0.00010908
flop,tsmc28,64,10,0.048889000000002625,120.959999,630.0,0.00021765500000000003
flop,tsmc28,128,10,0.048889000000002625,241.919998,1260.0,0.00043579999999999997
mux2,tsmc28,8,29614,0.03374481252110488,16.758,114.564,5.436617815897886e-06
mux2,tsmc28,16,18767,0.053046021580433735,15.75,88.025,5.142004582511856e-06
mux2,tsmc28,32,17903,0.05585556035301346,32.130001,171.146,9.897782494553986e-06
mux2,tsmc28,64,18568,0.05371109651012495,91.35,523.884,2.757432141318397e-05
mux2,tsmc28,128,16637,0.05991099044298852,176.525999,941.106,5.012923002945243e-05
mux4,tsmc28,8,18151,0.055092383284667513,27.971999,133.963,8.032615282904523e-06
mux4,tsmc28,16,16486,0.06057952759917506,39.438,186.231,1.2556108213029237e-05
mux4,tsmc28,32,15196,0.06580579126085812,69.174,324.969,2.3229797315082915e-05
mux4,tsmc28,64,13926,0.07180612868016659,137.465999,648.086,4.5741777969266124e-05
mux4,tsmc28,128,13090,0.07636619404125286,294.335997,1420.0,9.358288770053477e-05
mux8,tsmc28,8,12902,0.07750336319950395,44.604,214.286,1.17501162610448e-05
mux8,tsmc28,16,12264,0.08147446510110894,128.771998,548.714,2.666340508806262e-05
mux8,tsmc28,32,11713,0.08517122410996329,172.115999,823.633,4.695637326047981e-05
mux8,tsmc28,64,11014,0.09067453550027238,304.163999,1460.0,8.498274922825495e-05
mux8,tsmc28,128,10474,0.09542350830628223,683.045996,2820.0,0.00015705556616383426
mult,tsmc28,8,5200,0.1922996923076923,577.206,4340.0,0.00037769230769230767
mult,tsmc28,16,3819,0.26184265147944485,1634.472002,11800.0,0.0014553548049227546
mult,tsmc28,32,3033,0.3295775611605671,6343.721998,47200.0,0.0063033300362677225
mult,tsmc28,64,2390,0.4184090418410042,16045.092071,109000.0,0.01854602510460251
mult,tsmc28,128,1868,0.5353279057815846,44272.49428,262000.0,0.05001177730192719
Module,Tech,Width,Target Freq,Delay,Area,L Power (nW),D energy (nJ)
priorityencoder,sky90,8,7683,0.12508649056358195,50.960001,24.761,0.010685929975270078
priorityencoder,sky90,16,5773,0.16977016282695304,136.220003,77.243,0.021773774467348
priorityencoder,sky90,32,4500,0.2218912222222222,372.400007,189.626,0.04371111111111111
priorityencoder,sky90,64,4098,0.2439914738897023,797.720015,382.205,0.07393850658857981
priorityencoder,sky90,128,3409,0.2933331557641537,1602.300031,610.009,0.1261366969785861
add,sky90,8,3658,0.27337042810278844,253.820005,154.438,0.10825587752870422
add,sky90,16,2942,0.3393218266485384,722.260013,485.109,0.32460910944935417
add,sky90,32,2468,0.40496338573743923,1440.600027,714.057,0.6580226904376014
add,sky90,64,2139,0.4674681813931744,2781.240054,1050.0,0.9392239364188874
add,sky90,128,1885,0.5304949787798409,6186.740118,2230.0,2.1480106100795755
csa,sky90,8,5758,0.16536141368530738,266.560005,154.202,0.13650573115665163
csa,sky90,16,5931,0.1654056314280897,533.12001,308.404,0.27263530601922104
csa,sky90,32,5758,0.16536141368530738,1066.240021,616.808,0.5448072247308093
csa,sky90,64,5931,0.1654056314280897,2132.480042,1230.0,1.0905412240768841
csa,sky90,128,5931,0.1654056314280897,4264.960083,2470.0,2.178553363682347
shiftleft,sky90,8,4327,0.23025600254217704,259.700005,196.451,0.07534088282874972
shiftleft,sky90,16,3355,0.29803959314456036,666.400006,558.433,0.19552906110283155
shiftleft,sky90,32,2503,0.39951757530962845,1475.880027,768.262,0.3807431082700759
shiftleft,sky90,64,2203,0.45385946391284615,3914.120062,2680.0,1.144802541988198
shiftleft,sky90,128,1907,0.5242938489774515,9192.400136,6080.0,2.9008914525432616
comparator,sky90,8,4839,0.20629126741062204,200.900004,136.6,0.05001033271337053
comparator,sky90,16,4018,0.24806303982080635,358.680007,189.253,0.06321553011448482
comparator,sky90,32,3602,0.276293542476402,690.900013,315.709,0.10771793448084398
comparator,sky90,64,3129,0.31954192361776923,1372.980026,508.393,0.2048577820389901
comparator,sky90,128,2791,0.35824651809387315,2744.980052,796.047,0.34396273737011823
flop,sky90,8,10,0.1143419999999935,133.279999,64.8145,0.193835
flop,sky90,16,10,0.1143419999999935,266.5599975,129.629,0.38715000000000005
flop,sky90,32,10,0.1143419999999935,533.119995,259.258,0.7723000000000001
flop,sky90,64,10,0.1143419999999935,1066.23999,520.0,1.54955
flop,sky90,128,10,0.1143419999999935,2132.4799805,1035.0,3.094
mux2,sky90,8,5299,0.1883518518588413,63.700001,21.541,0.01932440083034535
mux2,sky90,16,4850,0.20207356701030926,119.560002,32.354,0.03884536082474227
mux2,sky90,32,5003,0.19908807195682593,375.340008,259.372,0.13671796921846893
mux2,sky90,64,4073,0.24517727326295113,479.220009,115.22,0.15148539160324087
mux2,sky90,128,4004,0.24974824975024976,1302.420025,767.078,0.4665334665334665
mux4,sky90,8,4726,0.21123742953872196,148.960002,66.984,0.04026661024121879
mux4,sky90,16,4455,0.2231388911335578,392.0,398.313,0.1037037037037037
mux4,sky90,32,4118,0.24283532831471588,594.860011,331.197,0.131617289946576
mux4,sky90,64,3710,0.26931477897574124,899.640016,344.331,0.2862533692722372
mux4,sky90,128,3249,0.3077210113881194,2013.900038,818.249,0.6094182825484764
mux8,sky90,8,3585,0.2789170278940028,287.140006,116.648,0.06089260808926081
mux8,sky90,16,3362,0.295237998810232,582.120003,282.366,0.14455681142177274
mux8,sky90,32,3178,0.3140553102580239,1319.079995,670.683,0.35777218376337316
mux8,sky90,64,2906,0.3440756228492774,2132.48004,808.482,0.44287680660701995
mux8,sky90,128,2667,0.3749401308586427,4575.620089,1830.0,0.9786276715410572
mult,sky90,8,1310,0.7631557786259543,2194.220041,1440.0,1.421374045801527
mult,sky90,16,997,1.0029260270812437,7519.540137,4940.0,6.376128385155466
mult,sky90,32,763,1.3106129895150722,25200.700446,14900.0,24.931847968545217
mult,sky90,64,632,1.5822664810126583,86011.661365,42600.0,88.84651898734177
mult,sky90,128,524,1.9083759465648855,296198.144128,114000.0,273.3148854961832
priorityencoder,tsmc28,8,31335,0.031912196106590074,8.316,34.836,0.001716929950534546
priorityencoder,tsmc28,16,21253,0.04703118086858326,21.672,78.026,0.004008845810003294
priorityencoder,tsmc28,32,16464,0.06071258114674442,61.614,207.499,0.009323372206025266
priorityencoder,tsmc28,64,13804,0.07239877021153289,137.466,425.592,0.01847290640394089
priorityencoder,tsmc28,128,11440,0.0874065874125874,317.646,973.649,0.041171328671328666
add,tsmc28,8,13838,0.07207477814713109,34.272,187.089,0.013311172134701546
add,tsmc28,16,11521,0.08678002100512108,90.972001,475.207,0.03367763214998698
add,tsmc28,32,9812,0.1018860211985324,209.286002,1060.0,0.08153281695882594
add,tsmc28,64,8206,0.12185605215695831,388.836003,1770.0,0.1409943943456008
add,tsmc28,128,7354,0.13597341881968997,907.452008,4360.0,0.3451183029643731
csa,tsmc28,8,24524,0.040663382319360626,52.416,482.462,0.02173381177621921
csa,tsmc28,16,24524,0.040663382319360626,104.832,964.99,0.04346762355243842
csa,tsmc28,32,24524,0.040663382319360626,209.664,1930.0,0.08677214157559941
csa,tsmc28,64,24524,0.040663382319360626,419.327999,3860.0,0.17342195400424076
csa,tsmc28,128,24524,0.040663382319360626,838.655998,7720.0,0.3471701190670363
shiftleft,tsmc28,8,15202,0.0656078183133798,50.652,367.074,0.016991185370346006
shiftleft,tsmc28,16,11804,0.08465604506946797,127.511999,602.29,0.03388681802778719
shiftleft,tsmc28,32,9587,0.10430391697089808,384.803997,1940.0,0.10180452696359654
shiftleft,tsmc28,64,8272,0.12086674854932303,1041.263998,5460.0,0.2895309477756286
shiftleft,tsmc28,128,7023,0.14238329232521713,1836.953994,8670.0,0.566566994162039
comparator,tsmc28,8,17422,0.05733769130983814,35.784,170.595,0.009488003673516243
comparator,tsmc28,16,13736,0.07273839778683751,54.558,250.167,0.014349155503785673
comparator,tsmc28,32,12139,0.08236710865804432,145.782,622.975,0.03567015404893319
comparator,tsmc28,64,11080,0.09024670758122744,294.21,1250.0,0.0684115523465704
comparator,tsmc28,128,9371,0.10671119720414043,558.432,2400.0,0.12794792444776437
flop,tsmc28,8,10,0.048889000000002625,15.12,78.6345,0.027246000000000003
flop,tsmc28,16,10,0.048889000000002625,30.24,157.29,0.054290000000000005
flop,tsmc28,32,10,0.048889000000002625,60.4799995,314.5805,0.10908000000000001
flop,tsmc28,64,10,0.048889000000002625,120.959999,630.0,0.21765500000000004
flop,tsmc28,128,10,0.048889000000002625,241.919998,1260.0,0.43579999999999997
mux2,tsmc28,8,29614,0.03374481252110488,16.758,114.564,0.005436617815897886
mux2,tsmc28,16,18767,0.053046021580433735,15.75,88.025,0.005142004582511856
mux2,tsmc28,32,17903,0.05585556035301346,32.130001,171.146,0.009897782494553985
mux2,tsmc28,64,18568,0.05371109651012495,91.35,523.884,0.027574321413183972
mux2,tsmc28,128,16637,0.05991099044298852,176.525999,941.106,0.05012923002945243
mux4,tsmc28,8,18151,0.055092383284667513,27.971999,133.963,0.008032615282904523
mux4,tsmc28,16,16486,0.06057952759917506,39.438,186.231,0.012556108213029236
mux4,tsmc28,32,15196,0.06580579126085812,69.174,324.969,0.023229797315082915
mux4,tsmc28,64,13926,0.07180612868016659,137.465999,648.086,0.04574177796926612
mux4,tsmc28,128,13090,0.07636619404125286,294.335997,1420.0,0.09358288770053477
mux8,tsmc28,8,12902,0.07750336319950395,44.604,214.286,0.0117501162610448
mux8,tsmc28,16,12264,0.08147446510110894,128.771998,548.714,0.02666340508806262
mux8,tsmc28,32,11713,0.08517122410996329,172.115999,823.633,0.046956373260479814
mux8,tsmc28,64,11014,0.09067453550027238,304.163999,1460.0,0.08498274922825495
mux8,tsmc28,128,10474,0.09542350830628223,683.045996,2820.0,0.15705556616383426
mult,tsmc28,8,5200,0.1922996923076923,577.206,4340.0,0.37769230769230766
mult,tsmc28,16,3819,0.26184265147944485,1634.472002,11800.0,1.4553548049227547
mult,tsmc28,32,3033,0.3295775611605671,6343.721998,47200.0,6.303330036267723
mult,tsmc28,64,2390,0.4184090418410042,16045.092071,109000.0,18.54602510460251
mult,tsmc28,128,1868,0.5353279057815846,44272.49428,262000.0,50.01177730192719

1 Module Tech Width Target Freq Delay Area L Power (nW) D energy (fJ) D energy (nJ)
2 priorityencoder sky90 8 7683 0.12508649056358195 50.960001 24.761 1.0685929975270078e-05 0.010685929975270078
3 priorityencoder sky90 16 5773 0.16977016282695304 136.220003 77.243 2.1773774467348e-05 0.021773774467348
4 priorityencoder sky90 32 4500 0.2218912222222222 372.400007 189.626 4.371111111111111e-05 0.04371111111111111
5 priorityencoder sky90 64 4098 0.2439914738897023 797.720015 382.205 7.393850658857981e-05 0.07393850658857981
6 priorityencoder sky90 128 3409 0.2933331557641537 1602.300031 610.009 0.0001261366969785861 0.1261366969785861
7 add sky90 8 3658 0.27337042810278844 253.820005 154.438 0.00010825587752870422 0.10825587752870422
8 add sky90 16 2942 0.3393218266485384 722.260013 485.109 0.00032460910944935416 0.32460910944935417
9 add sky90 32 2468 0.40496338573743923 1440.600027 714.057 0.0006580226904376014 0.6580226904376014
10 add sky90 64 2139 0.4674681813931744 2781.240054 1050.0 0.0009392239364188873 0.9392239364188874
11 add sky90 128 1885 0.5304949787798409 6186.740118 2230.0 0.0021480106100795755 2.1480106100795755
12 csa sky90 8 5758 0.16536141368530738 266.560005 154.202 0.00013650573115665162 0.13650573115665163
13 csa sky90 16 5931 0.1654056314280897 533.12001 308.404 0.00027263530601922105 0.27263530601922104
14 csa sky90 32 5758 0.16536141368530738 1066.240021 616.808 0.0005448072247308093 0.5448072247308093
15 csa sky90 64 5931 0.1654056314280897 2132.480042 1230.0 0.0010905412240768842 1.0905412240768841
16 csa sky90 128 5931 0.1654056314280897 4264.960083 2470.0 0.002178553363682347 2.178553363682347
17 shiftleft sky90 8 4327 0.23025600254217704 259.700005 196.451 7.534088282874971e-05 0.07534088282874972
18 shiftleft sky90 16 3355 0.29803959314456036 666.400006 558.433 0.00019552906110283157 0.19552906110283155
19 shiftleft sky90 32 2503 0.39951757530962845 1475.880027 768.262 0.0003807431082700759 0.3807431082700759
20 shiftleft sky90 64 2203 0.45385946391284615 3914.120062 2680.0 0.001144802541988198 1.144802541988198
21 shiftleft sky90 128 1907 0.5242938489774515 9192.400136 6080.0 0.0029008914525432616 2.9008914525432616
22 comparator sky90 8 4839 0.20629126741062204 200.900004 136.6 5.001033271337053e-05 0.05001033271337053
23 comparator sky90 16 4018 0.24806303982080635 358.680007 189.253 6.321553011448482e-05 0.06321553011448482
24 comparator sky90 32 3602 0.276293542476402 690.900013 315.709 0.00010771793448084398 0.10771793448084398
25 comparator sky90 64 3129 0.31954192361776923 1372.980026 508.393 0.0002048577820389901 0.2048577820389901
26 comparator sky90 128 2791 0.35824651809387315 2744.980052 796.047 0.0003439627373701182 0.34396273737011823
27 flop sky90 8 10 0.1143419999999935 133.279999 64.8145 0.000193835 0.193835
28 flop sky90 16 10 0.1143419999999935 266.5599975 129.629 0.00038715000000000006 0.38715000000000005
29 flop sky90 32 10 0.1143419999999935 533.119995 259.258 0.0007723000000000001 0.7723000000000001
30 flop sky90 64 10 0.1143419999999935 1066.23999 520.0 0.00154955 1.54955
31 flop sky90 128 10 0.1143419999999935 2132.4799805 1035.0 0.003094 3.094
32 mux2 sky90 8 5299 0.1883518518588413 63.700001 21.541 1.932440083034535e-05 0.01932440083034535
33 mux2 sky90 16 4850 0.20207356701030926 119.560002 32.354 3.884536082474227e-05 0.03884536082474227
34 mux2 sky90 32 5003 0.19908807195682593 375.340008 259.372 0.00013671796921846892 0.13671796921846893
35 mux2 sky90 64 3989 4073 0.24961239583855604 0.24517727326295113 479.220007 479.220009 148.175 115.22 0.00016570569064928555 0.15148539160324087
36 mux2 sky90 128 4004 0.24974824975024976 1302.420025 767.078 0.0004665334665334665 0.4665334665334665
37 mux4 sky90 8 4661 4726 0.21448923471358078 0.21123742953872196 164.640002 148.960002 88.494 66.984 4.31452478009011e-05 0.04026661024121879
38 mux4 sky90 16 4392 4455 0.22421770309653916 0.2231388911335578 359.659999 392.0 419.855 398.313 0.0001006375227686703 0.1037037037037037
39 mux4 sky90 32 4118 0.24283532831471588 594.860011 331.197 0.00013161728994657602 0.131617289946576
40 mux4 sky90 64 3710 0.26931477897574124 899.640016 344.331 0.00028625336927223723 0.2862533692722372
41 mux4 sky90 128 3167 3249 0.31575023618566467 0.3077210113881194 2016.840039 2013.900038 722.109 818.249 0.0005917271866119355 0.6094182825484764
42 mux8 sky90 8 3585 0.2789170278940028 287.140006 116.648 6.089260808926081e-05 0.06089260808926081
43 mux8 sky90 16 3362 0.295237998810232 582.120003 282.366 0.00014455681142177274 0.14455681142177274
44 mux8 sky90 32 3178 0.3140553102580239 1319.079995 670.683 0.0003577721837633732 0.35777218376337316
45 mux8 sky90 64 2906 0.3440756228492774 2132.48004 808.482 0.0004428768066070199 0.44287680660701995
46 mux8 sky90 128 2667 0.3749401308586427 4575.620089 1830.0 0.0009786276715410573 0.9786276715410572
47 mult sky90 8 1310 0.7631557786259543 2194.220041 1440.0 0.0014213740458015268 1.421374045801527
48 mult sky90 16 997 1.0029260270812437 7519.540137 4940.0 0.0063761283851554666 6.376128385155466
49 mult sky90 32 763 1.3106129895150722 25200.700446 14900.0 0.024931847968545216 24.931847968545217
50 mult sky90 64 632 1.5822664810126583 86011.661365 42600.0 0.08884651898734176 88.84651898734177
51 mult sky90 128 524 1.9083759465648855 296198.144128 114000.0 0.2733148854961832 273.3148854961832
52 priorityencoder tsmc28 8 31335 0.031912196106590074 8.316 34.836 1.716929950534546e-06 0.001716929950534546
53 priorityencoder tsmc28 16 21253 0.04703118086858326 21.672 78.026 4.008845810003294e-06 0.004008845810003294
54 priorityencoder tsmc28 32 16464 0.06071258114674442 61.614 207.499 9.323372206025267e-06 0.009323372206025266
55 priorityencoder tsmc28 64 13804 0.07239877021153289 137.466 425.592 1.847290640394089e-05 0.01847290640394089
56 priorityencoder tsmc28 128 11440 0.0874065874125874 317.646 973.649 4.117132867132867e-05 0.041171328671328666
57 add tsmc28 8 13838 0.07207477814713109 34.272 187.089 1.3311172134701546e-05 0.013311172134701546
58 add tsmc28 16 11521 0.08678002100512108 90.972001 475.207 3.367763214998698e-05 0.03367763214998698
59 add tsmc28 32 9812 0.1018860211985324 209.286002 1060.0 8.153281695882594e-05 0.08153281695882594
60 add tsmc28 64 8206 0.12185605215695831 388.836003 1770.0 0.0001409943943456008 0.1409943943456008
61 add tsmc28 128 7354 0.13597341881968997 907.452008 4360.0 0.00034511830296437315 0.3451183029643731
62 csa tsmc28 8 24524 0.040663382319360626 52.416 482.462 2.173381177621921e-05 0.02173381177621921
63 csa tsmc28 16 24524 0.040663382319360626 104.832 964.99 4.346762355243842e-05 0.04346762355243842
64 csa tsmc28 32 24524 0.040663382319360626 209.664 1930.0 8.677214157559942e-05 0.08677214157559941
65 csa tsmc28 64 24524 0.040663382319360626 419.327999 3860.0 0.00017342195400424075 0.17342195400424076
66 csa tsmc28 128 24524 0.040663382319360626 838.655998 7720.0 0.00034717011906703634 0.3471701190670363
67 shiftleft tsmc28 8 15202 0.0656078183133798 50.652 367.074 1.6991185370346006e-05 0.016991185370346006
68 shiftleft tsmc28 16 11804 0.08465604506946797 127.511999 602.29 3.388681802778719e-05 0.03388681802778719
69 shiftleft tsmc28 32 9587 0.10430391697089808 384.803997 1940.0 0.00010180452696359654 0.10180452696359654
70 shiftleft tsmc28 64 8272 0.12086674854932303 1041.263998 5460.0 0.0002895309477756286 0.2895309477756286
71 shiftleft tsmc28 128 7023 0.14238329232521713 1836.953994 8670.0 0.000566566994162039 0.566566994162039
72 comparator tsmc28 8 17422 0.05733769130983814 35.784 170.595 9.488003673516243e-06 0.009488003673516243
73 comparator tsmc28 16 13736 0.07273839778683751 54.558 250.167 1.4349155503785673e-05 0.014349155503785673
74 comparator tsmc28 32 12139 0.08236710865804432 145.782 622.975 3.567015404893319e-05 0.03567015404893319
75 comparator tsmc28 64 11080 0.09024670758122744 294.21 1250.0 6.84115523465704e-05 0.0684115523465704
76 comparator tsmc28 128 9371 0.10671119720414043 558.432 2400.0 0.00012794792444776438 0.12794792444776437
77 flop tsmc28 8 10 0.048889000000002625 15.12 78.6345 2.7246000000000003e-05 0.027246000000000003
78 flop tsmc28 16 10 0.048889000000002625 30.24 157.29 5.4290000000000004e-05 0.054290000000000005
79 flop tsmc28 32 10 0.048889000000002625 60.4799995 314.5805 0.00010908 0.10908000000000001
80 flop tsmc28 64 10 0.048889000000002625 120.959999 630.0 0.00021765500000000003 0.21765500000000004
81 flop tsmc28 128 10 0.048889000000002625 241.919998 1260.0 0.00043579999999999997 0.43579999999999997
82 mux2 tsmc28 8 29614 0.03374481252110488 16.758 114.564 5.436617815897886e-06 0.005436617815897886
83 mux2 tsmc28 16 18767 0.053046021580433735 15.75 88.025 5.142004582511856e-06 0.005142004582511856
84 mux2 tsmc28 32 17903 0.05585556035301346 32.130001 171.146 9.897782494553986e-06 0.009897782494553985
85 mux2 tsmc28 64 18568 0.05371109651012495 91.35 523.884 2.757432141318397e-05 0.027574321413183972
86 mux2 tsmc28 128 16637 0.05991099044298852 176.525999 941.106 5.012923002945243e-05 0.05012923002945243
87 mux4 tsmc28 8 18151 0.055092383284667513 27.971999 133.963 8.032615282904523e-06 0.008032615282904523
88 mux4 tsmc28 16 16486 0.06057952759917506 39.438 186.231 1.2556108213029237e-05 0.012556108213029236
89 mux4 tsmc28 32 15196 0.06580579126085812 69.174 324.969 2.3229797315082915e-05 0.023229797315082915
90 mux4 tsmc28 64 13926 0.07180612868016659 137.465999 648.086 4.5741777969266124e-05 0.04574177796926612
91 mux4 tsmc28 128 13090 0.07636619404125286 294.335997 1420.0 9.358288770053477e-05 0.09358288770053477
92 mux8 tsmc28 8 12902 0.07750336319950395 44.604 214.286 1.17501162610448e-05 0.0117501162610448
93 mux8 tsmc28 16 12264 0.08147446510110894 128.771998 548.714 2.666340508806262e-05 0.02666340508806262
94 mux8 tsmc28 32 11713 0.08517122410996329 172.115999 823.633 4.695637326047981e-05 0.046956373260479814
95 mux8 tsmc28 64 11014 0.09067453550027238 304.163999 1460.0 8.498274922825495e-05 0.08498274922825495
96 mux8 tsmc28 128 10474 0.09542350830628223 683.045996 2820.0 0.00015705556616383426 0.15705556616383426
97 mult tsmc28 8 5200 0.1922996923076923 577.206 4340.0 0.00037769230769230767 0.37769230769230766
98 mult tsmc28 16 3819 0.26184265147944485 1634.472002 11800.0 0.0014553548049227546 1.4553548049227547
99 mult tsmc28 32 3033 0.3295775611605671 6343.721998 47200.0 0.0063033300362677225 6.303330036267723
100 mult tsmc28 64 2390 0.4184090418410042 16045.092071 109000.0 0.01854602510460251 18.54602510460251
101 mult tsmc28 128 1868 0.5353279057815846 44272.49428 262000.0 0.05001177730192719 50.01177730192719

View file

@ -41,7 +41,7 @@ def synthsintocsv():
file = open("ppaData.csv", "w")
writer = csv.writer(file)
writer.writerow(['Module', 'Tech', 'Width', 'Target Freq', 'Delay', 'Area', 'L Power (nW)', 'D energy (fJ)'])
writer.writerow(['Module', 'Tech', 'Width', 'Target Freq', 'Delay', 'Area', 'L Power (nW)', 'D energy (nJ)'])
for oneSynth in allSynths:
module, width, risc, tech, freq = specReg.findall(oneSynth)[2:7]
@ -60,7 +60,7 @@ def synthsintocsv():
delay = 1000/int(freq) - metrics[0]
area = metrics[1]
lpower = metrics[4]
denergy = (metrics[2] + metrics[3])/int(freq) # (switching + internal powers)*delay, more practical units for regression coefs
denergy = (metrics[2] + metrics[3])/int(freq)*1000 # (switching + internal powers)*delay, more practical units for regression coefs
if ('flop' in module): # since two flops in each module
[area, lpower, denergy] = [n/2 for n in [area, lpower, denergy]]
@ -85,7 +85,7 @@ def cleanup():
output = subprocess.check_output(['bash','-c', bashCommand])
allSynths = output.decode("utf-8").split('\n')[:-1]
for oneSynth in allSynths:
for phrase in [['Path Length', 'qor']]: #, ['Design Area', 'qor'], ['100', 'power']]:
for phrase in [['Path Length', 'qor']]:
bashCommand = 'grep "{}" '+ oneSynth[2:]+'/reports/*{}*'
bashCommand = bashCommand.format(*phrase)
try: output = subprocess.check_output(['bash','-c', bashCommand])
@ -131,54 +131,18 @@ def csvOfBest(filename):
for w in widths:
m = np.Inf # large number to start
best = None
if ([mod, tech, w] in leftblue):
for oneSynth in allSynths: # leftmost blue
if (oneSynth.width == w) & (oneSynth.tech == tech) & (oneSynth.module == mod):
if (oneSynth.freq < m) & (1000/oneSynth.delay < oneSynth.freq):
# if ([mod, tech, w] != ['mux2', 'sky90', 128]) or (oneSynth.area < 1100):
m = oneSynth.freq
best = oneSynth
else:
for oneSynth in allSynths: # best achievable, rightmost green
if (oneSynth.width == w) & (oneSynth.tech == tech) & (oneSynth.module == mod):
if (oneSynth.delay < m) & (1000/oneSynth.delay > oneSynth.freq):
m = oneSynth.delay
best = oneSynth
# contenders = []
# delays = []
# for oneSynth in allSynths: # choose synth w minimal delay
# if (oneSynth.width == w) & (oneSynth.tech == tech) & (oneSynth.module == mod):
# contenders += [oneSynth]
# delays += [oneSynth.delay]
# if oneSynth.delay < m:
# m = oneSynth.delay
# best = oneSynth
# for oneSynth in contenders: # if m is min delay, choose best area within s as percent of m
# s = oneSynth.delay/m - 1
# if s < 0.1:
# if oneSynth.area < best.area:
# best = oneSynth
# bestval = 1.9 # score algorithm
# for oneSynth in contenders:
# delaydif = abs(1 - oneSynth.delay/best.delay)
# areadif = 1 - oneSynth.area/best.area
# try: val = areadif/delaydif
# except: val = 1
# # if (oneSynth.width == 64) & (oneSynth.tech == 'sky90') & (oneSynth.module == 'comparator'):
# # print(oneSynth.freq, ' ', delaydif, ' ', areadif, ' ', val)
# if val > bestval:
# bestval = val
# best = oneSynth
for oneSynth in allSynths: # best achievable, rightmost green
if (oneSynth.width == w) & (oneSynth.tech == tech) & (oneSynth.module == mod):
if (oneSynth.delay < m) & (1000/oneSynth.delay > oneSynth.freq):
m = oneSynth.delay
best = oneSynth
if (best != None) & (best not in bestSynths):
bestSynths += [best]
file = open(filename, "w")
writer = csv.writer(file)
writer.writerow(['Module', 'Tech', 'Width', 'Target Freq', 'Delay', 'Area', 'L Power (nW)', 'D energy (fJ)'])
writer.writerow(['Module', 'Tech', 'Width', 'Target Freq', 'Delay', 'Area', 'L Power (nW)', 'D energy (nJ)'])
for synth in bestSynths:
writer.writerow(list(synth))
file.close()
@ -265,7 +229,7 @@ def oneMetricPlot(module, var, freq=None, ax=None, fits='clsgn', norm=True, colo
if norm:
ylabeldic = {"lpower": "Leakage Power (add32)", "denergy": "Energy/Op (add32)", "area": "Area (add32)", "delay": "Delay (FO4)"}
else:
ylabeldic = {"lpower": "Leakage Power (nW)", "denergy": "Dynamic Energy (fJ)", "area": "Area (sq microns)", "delay": "Delay (ns)"}
ylabeldic = {"lpower": "Leakage Power (nW)", "denergy": "Dynamic Energy (nJ)", "area": "Area (sq microns)", "delay": "Delay (ns)"}
ax.set_ylabel(ylabeldic[var])
ax.set_xticks(widths)
@ -549,13 +513,12 @@ def squarify(fig):
l = (1.-axs/h)/2
fig.subplots_adjust(bottom=l, top=1-l)
def plotPPA(mod, freq=None, norm=True, aleOpt=False):
''' for the module specified, plots width vs delay, area, leakage power, and dynamic energy with fits
if no freq specified, uses the synthesis with best achievable delay for each width
overlays data from both techs
'''
plt.rcParams["figure.figsize"] = (7,3.6)
plt.rcParams["figure.figsize"] = (7,3.46)
fig, axs = plt.subplots(2, 2)
arr = [['delay', 'area'], ['lpower', 'denergy']]
@ -591,13 +554,7 @@ def plotPPA(mod, freq=None, norm=True, aleOpt=False):
plt.savefig(saveStr)
# plt.show()
def plotBestAreas(mod):
fig, axs = plt.subplots(1, 1)
oneMetricPlot(mod, 'area', freq=10)
plt.title(mod + ' Optimized Areas (target freq 10MHz)')
plt.savefig('./plots/bestAreas/' + mod + '.png')
def makeDaLegend():
def makeLineLegend():
plt.rcParams["figure.figsize"] = (5.5,0.3)
fig = plt.figure()
fullLeg = [lines.Line2D([0], [0], color='black', label='fastest', linestyle='-')]
@ -609,25 +566,6 @@ def makeDaLegend():
saveStr = './plots/PPA/legend.png'
plt.savefig(saveStr)
def calcAvgRsq():
with open('ppaFitting.csv', newline='') as csvfile:
csvreader = csv.reader(csvfile)
allSynths = list(csvreader)[1:]
csvfile.close()
others = []
muxes = []
for synth in allSynths:
if ('easy' not in synth) or ('delay' not in synth):
if 'mux' in synth[0]:
muxes += [float(synth[8])]
elif '0.0' != synth[8]:
others += [float(synth[8])]
print('Others: ', np.mean(others))
print('Muxes: ', np.mean(muxes))
def muxPlot(fits='clsgn', norm=True):
''' module: string module name
freq: int freq (MHz)
@ -660,6 +598,7 @@ def muxPlot(fits='clsgn', norm=True):
techdict = spec._asdict()
norm = techdict['delay']
metric = [m/norm for m in metric]
# print(spec.tech, ' ', metric)
if len(metric) == 3: # don't include the spec if we don't have points for all
xp, pred, coefs, r2 = regress(inputs, metric, fits, ale=False)
@ -679,23 +618,71 @@ def muxPlot(fits='clsgn', norm=True):
ax.legend(handles = fullLeg)
plt.savefig('./plots/PPA/mux.png')
def stdDevError():
for var in ['delay', 'area', 'lpower', 'denergy']:
errlist = []
for module in modules:
ale = (var != 'delay')
metL = []
modFit = fitDict[module]
fits = modFit[ale]
funcArr = genFuncs(fits)
for spec in techSpecs:
metric = getVals(spec.tech, module, var)
techdict = spec._asdict()
norm = techdict[var]
metL += [m/norm for m in metric]
if ale:
ws = [w/normAddWidth for w in widths]
else:
ws = widths
ws = ws*2
mat = []
for w in ws:
row = []
for func in funcArr:
row += [func(w)]
mat += [row]
y = np.array(metL, dtype=np.float)
coefs = opt.nnls(mat, y)[0]
yp = []
for w in ws:
n = [func(w) for func in funcArr]
yp += [sum(np.multiply(coefs, n))]
if (var == 'delay') & (module == 'flop'):
pass
elif (module == 'mult') & ale:
pass
else:
for i in range(len(y)):
errlist += [abs(y[i]/yp[i]-1)]
# print(module, ' ', var, ' ', np.mean(errlist[-10:]))
avgErr = np.mean(errlist)
stdv = np.std(errlist)
print(var, ' ', avgErr, ' ', stdv)
if __name__ == '__main__':
##############################
# set up stuff, global variables
widths = [8, 16, 32, 64, 128]
modules = ['priorityencoder', 'add', 'csa', 'shiftleft', 'comparator', 'flop', 'mux2', 'mux4', 'mux8', 'mult'] # 'mux2d', 'mux4d', 'mux8d']
modules = ['priorityencoder', 'add', 'csa', 'shiftleft', 'comparator', 'flop', 'mux2', 'mux4', 'mux8', 'mult'] #, 'mux2d', 'mux4d', 'mux8d']
normAddWidth = 32 # divisor to use with N since normalizing to add_32
fitDict = {'add': ['cg', 'l', 'l'], 'mult': ['cg', 'ls', 'ls'], 'comparator': ['cg', 'l', 'l'], 'csa': ['c', 'l', 'l'], 'shiftleft': ['cg', 'l', 'ln'], 'flop': ['c', 'l', 'l'], 'priorityencoder': ['cg', 'l', 'l']}
fitDict = {'add': ['cg', 'l', 'l'], 'mult': ['cg', 's', 's'], 'comparator': ['cg', 'l', 'l'], 'csa': ['c', 'l', 'l'], 'shiftleft': ['cg', 'l', 'ln'], 'flop': ['c', 'l', 'l'], 'priorityencoder': ['cg', 'l', 'l']}
fitDict.update(dict.fromkeys(['mux2', 'mux4', 'mux8'], ['cg', 'l', 'l']))
leftblue = [] #[['mux2', 'tsmc28', 8], ['mux4', 'sky90', 16]]
TechSpec = namedtuple("TechSpec", "tech color shape delay area lpower denergy")
techSpecs = [['sky90', 'green', 'o', 43.2e-3, 1330.84, 582.81, 520.66], ['tsmc28', 'blue', '^', 12.2e-3, 209.29, 1060, 81.43]]
techSpecs = [['sky90', 'green', 'o', 43.2e-3, 1440.600027, 714.057, 0.658022690438], ['tsmc28', 'blue', '^', 12.2e-3, 209.286002, 1060.0, .08153281695882594]]
techSpecs = [TechSpec(*t) for t in techSpecs]
combined = TechSpec('combined fit', 'red', '_', 0, 0, 0, 0)
# invz1arealeakage = [['sky90', 1.96, 1.98], ['gf32', .351, .3116], ['tsmc28', .252, 1.09]] #['gf32', 'purple', 's', 15e-3]
##############################
# cleanup() # run to remove garbage synth runs
@ -704,21 +691,21 @@ if __name__ == '__main__':
allSynths = synthsfromcsv('ppaData.csv') # your csv here!
bestSynths = csvOfBest('bestSynths.csv')
# ### plotting examples
# ### function examples
# squareAreaDelay('sky90', 'add', 32)
# oneMetricPlot('add', 'area')
# oneMetricPlot('mult', 'lpower')
# freqPlot('sky90', 'mux4', 16)
# plotBestAreas('add')
# makeCoefTable()
# calcAvgRsq()
# makeEqTable()
# makeDaLegend()
# makeLineLegend()
# muxPlot()
# stdDevError()
# for mod in modules:
# # plotPPA(mod, norm=False)
# # plotPPA(mod, aleOpt=True)
# for w in widths:
# freqPlot('sky90', mod, w)
# freqPlot('tsmc28', mod, w)
# plt.close('all')
for mod in modules:
plotPPA(mod, norm=False)
plotPPA(mod, aleOpt=True)
for w in widths:
freqPlot('sky90', mod, w)
freqPlot('tsmc28', mod, w)
plt.close('all')

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
Element,Best delay,Fast area,Fast leakage,Fast energy,Small area,Small leakage,Small energy
priorityencoder,0.98$log_2$(N),0.33S,0.25S,0.093S,0.15S,0.046S,0.00046S
add,1.8 + 1.4$log_2$(N),1.1S,0.95S,1S,0.34S,0.16S,0.025S
csa,3.6,0.93S,1.5S,1.1S,0.34S,0.16S,0.00055S
shiftleft,0.48 + 1.6$log_2$(N),1.9S,2.3S,1.5S,0.8S,0.29S,0.0059S
comparator,2 + 0.94$log_2$(N),0.6S,0.47S,0.31S,0.34S,0.16S,0.00089S
flop,3.3,0.34S,0.37S,0.0012S,0.34S,0.37S,0.0012S
mux2,2.8 + 0.38$log_2$(N),0.2S,0.18S,0.16S,0.15S,0.12S,0.0011S
mux4,3.1 + 0.51$log_2$(N),0.36S,0.32S,0.28S,0.28S,0.11S,0.0021S
mux8,5 + 0.45$log_2$(N),0.76S,0.66S,0.45S,0.55S,0.24S,0.0029S
mult,6$log_2$(N),13S + 10$S^2$,26S + 7.3$S^2$,42S + 25$S^2$,1.1S + 7.9$S^2$,1S + 3.4$S^2$,2.1$S^2$
priorityencoder,0.98$log_2$(N),0.32S,0.22S,0.087S,0.14S,0.044S,0.033S
add,1.9 + 1.4$log_2$(N),1S,0.89S,0.91S,0.32S,0.15S,0.33S
csa,3.6,0.87S,1.3S,0.95S,0.33S,0.15S,0.31S
shiftleft,0.46 + 1.6$log_2$(N),1.9S,2.1S,1.4S,0.77S,0.28S,0.48S
comparator,2.1 + 0.91$log_2$(N),0.58S,0.44S,0.27S,0.33S,0.15S,0.12S
flop,3.3,0.33S,0.33S,1.3S,0.33S,0.33S,1.3S
mux2,2.6 + 0.41$log_2$(N),0.21S,0.23S,0.16S,0.14S,0.11S,0.14S
mux4,3.1 + 0.5$log_2$(N),0.35S,0.31S,0.26S,0.27S,0.11S,0.19S
mux8,4.9 + 0.46$log_2$(N),0.8S,0.66S,0.43S,0.53S,0.23S,0.24S
mult,6$log_2$(N),13$S^2$,13$S^2$,33$S^2$,7.8$S^2$,3.5$S^2$,14$S^2$

1 Element Best delay Fast area Fast leakage Fast energy Small area Small leakage Small energy
2 priorityencoder 0.98$log_2$(N) 0.33S 0.32S 0.25S 0.22S 0.093S 0.087S 0.15S 0.14S 0.046S 0.044S 0.00046S 0.033S
3 add 1.8 + 1.4$log_2$(N) 1.9 + 1.4$log_2$(N) 1.1S 1S 0.95S 0.89S 1S 0.91S 0.34S 0.32S 0.16S 0.15S 0.025S 0.33S
4 csa 3.6 0.93S 0.87S 1.5S 1.3S 1.1S 0.95S 0.34S 0.33S 0.16S 0.15S 0.00055S 0.31S
5 shiftleft 0.48 + 1.6$log_2$(N) 0.46 + 1.6$log_2$(N) 1.9S 2.3S 2.1S 1.5S 1.4S 0.8S 0.77S 0.29S 0.28S 0.0059S 0.48S
6 comparator 2 + 0.94$log_2$(N) 2.1 + 0.91$log_2$(N) 0.6S 0.58S 0.47S 0.44S 0.31S 0.27S 0.34S 0.33S 0.16S 0.15S 0.00089S 0.12S
7 flop 3.3 0.34S 0.33S 0.37S 0.33S 0.0012S 1.3S 0.34S 0.33S 0.37S 0.33S 0.0012S 1.3S
8 mux2 2.8 + 0.38$log_2$(N) 2.6 + 0.41$log_2$(N) 0.2S 0.21S 0.18S 0.23S 0.16S 0.15S 0.14S 0.12S 0.11S 0.0011S 0.14S
9 mux4 3.1 + 0.51$log_2$(N) 3.1 + 0.5$log_2$(N) 0.36S 0.35S 0.32S 0.31S 0.28S 0.26S 0.28S 0.27S 0.11S 0.0021S 0.19S
10 mux8 5 + 0.45$log_2$(N) 4.9 + 0.46$log_2$(N) 0.76S 0.8S 0.66S 0.45S 0.43S 0.55S 0.53S 0.24S 0.23S 0.0029S 0.24S
11 mult 6$log_2$(N) 13S + 10$S^2$ 13$S^2$ 26S + 7.3$S^2$ 13$S^2$ 42S + 25$S^2$ 33$S^2$ 1.1S + 7.9$S^2$ 7.8$S^2$ 1S + 3.4$S^2$ 3.5$S^2$ 2.1$S^2$ 14$S^2$

View file

@ -1,41 +1,81 @@
Module,Metric,1,N,N^2,log2(N),Nlog2(N),R^2
priorityencoder,delay,4.865032478368464,,,1.0346781590203091,,0.990533246983837
priorityencoder,area,,0.3296349181169891,,,,0.9718942704677337
priorityencoder,lpower,,0.2508481588069769,,,,0.9418329012771585
priorityencoder,denergy,,0.09327161156406552,,,,0.8065924672945542
add,delay,8.961254531683414,,,1.4310340215065527,,0.9564367595740637
add,area,,1.0710989265923485,,,,0.988580182173048
add,lpower,,0.9470245397661955,,,,0.9951383820581323
add,denergy,,0.9954952282287014,,,,0.9928308616130285
csa,delay,3.590384717869601,,,,,0.0
csa,area,,0.9312877569527923,,,,0.999393942859829
csa,lpower,,1.5320774877598933,,,,0.9400384192534433
csa,denergy,,1.1454135769936609,,,,0.9735205275004183
shiftleft,delay,8.66019468793489,,,1.6351711913499432,,0.9873681453602638
shiftleft,area,,1.9102134686740575,,,,0.9466461680123697
shiftleft,lpower,,2.277088275290811,,,,0.9624044038708768
shiftleft,denergy,,1.4931073444617051,,,,0.9454881696599784
comparator,delay,6.680678539086959,,,0.9397668550976327,,0.98789326603378
comparator,area,,0.6003877936704982,,,,0.9672416909621802
comparator,lpower,,0.46756802348373877,,,,0.8609362596824635
comparator,denergy,,0.3089180049610159,,,,0.8267293340232036
flop,delay,3.3270503187614153,,,,,0.0
flop,area,,0.34478305655859876,,,,0.9433629202566682
flop,lpower,,0.3707856336608904,,,,0.9170347531086821
flop,denergy,,0.0011765517257429892,,,,0.688648230209356
mux2,delay,4.732514086885074,,,0.38138175938205005,,0.5638177354804589
mux2,area,,0.19794547955000782,,,,0.9753613114571431
mux2,lpower,,0.1881638557015794,,,,0.7572248871637561
mux2,denergy,,0.16278100836605952,,,,0.9811112115671446
mux4,delay,5.67790744523475,,,0.5081925137582493,,0.8316415055210026
mux4,area,,0.35778033738856435,,,,0.9880049722019894
mux4,lpower,,0.32236674794207065,,,,0.8279138454959137
mux4,denergy,,0.28073375091037084,,,,0.9943662618662574
mux8,delay,7.252700330388384,,,0.45254210999717837,,0.8464368692304263
mux8,area,,0.7614128432326613,,,,0.9863118376555963
mux8,lpower,,0.6570734849206145,,,,0.9855956038468652
mux8,denergy,,0.4496346388149245,,,,0.9785597135426944
mult,delay,29.562138166420393,,,6.711916207386673,,0.9833266087176287
mult,area,,,13.838943348894976,,,0.9875861886135875
mult,lpower,,,14.380577146903335,,,0.9349609233308782
mult,denergy,,,36.51397409545879,,,0.9719012952478829
Module,Metric,Target,1,N,N^2,log2(N),Nlog2(N),R^2
priorityencoder,delay,easy,0.0,,,6.815655848737334,,0.5471505976585844
priorityencoder,area,easy,,0.14996313076366272,,,,0.9751246139683207
priorityencoder,lpower,easy,,0.04628232776780845,,,,0.6646449382421588
priorityencoder,denergy,easy,,0.00046338953826781273,,,,0.8843605490100168
priorityencoder,delay,hard,0.0,,,0.9775747670327015,,0.987274834491306
priorityencoder,area,hard,,0.3296349181169891,,,,0.9718942704677337
priorityencoder,lpower,hard,,0.2508481588069769,,,,0.9418329012771585
priorityencoder,denergy,hard,,0.09327161156406552,,,,0.8065924672945542
add,delay,easy,0.0,,,27.820556626526365,,0.5330240516496716
add,area,easy,,0.33740563909904386,,,,0.9968636684818916
add,lpower,easy,,0.1559461482654009,,,,0.7403794995975848
add,denergy,easy,,0.025219887569037786,,,,0.6462978476180771
add,delay,hard,1.8060844241506506,,,1.4310340215065525,,0.9564367595740637
add,area,hard,,1.0710989265923485,,,,0.988580182173048
add,lpower,hard,,0.9470245397661955,,,,0.9951383820581323
add,denergy,hard,,0.9954952282287014,,,,0.9928308616130285
csa,delay,easy,5.827386725865409,,,,,0.0
csa,area,easy,,0.3404841239399024,,,,0.9966821820865757
csa,lpower,easy,,0.1555300133584381,,,,0.7410756093594764
csa,denergy,easy,,0.0005478126632729184,,,,0.5798854696439455
csa,delay,hard,3.590384717869601,,,,,0.0
csa,area,hard,,0.9312877569527923,,,,0.9993939428598292
csa,lpower,hard,,1.5320774877598933,,,,0.9400384192534433
csa,denergy,hard,,1.1454135769936609,,,,0.9735205275004183
shiftleft,delay,easy,0.0,,,5.744537363106859,,0.7778961884907117
shiftleft,area,easy,,0.8000093911038876,,,,0.9576897492378456
shiftleft,lpower,easy,,0.28913702096331206,,,,0.623995386847899
shiftleft,denergy,easy,,0.005924456057944899,,,,0.7200057939838627
shiftleft,delay,hard,0.48433873118517795,,,1.635171191349943,,0.9873681453602638
shiftleft,area,hard,,1.9102134686740575,,,,0.9466461680123697
shiftleft,lpower,hard,,2.277088275290811,,,,0.9624044038708768
shiftleft,denergy,hard,,1.4931073444617051,,,,0.9454881696599784
comparator,delay,easy,0.0,,,4.706704191403,,0.5450694752498024
comparator,area,easy,,0.3425601443761704,,,,0.978537426983507
comparator,lpower,easy,,0.15525826941742596,,,,0.8078417286943447
comparator,denergy,easy,,0.0008896717814426517,,,,0.9267090446396561
comparator,delay,hard,1.9818442635987938,,,0.9397668550976329,,0.9878932660337799
comparator,area,hard,,0.6003877936704982,,,,0.9672416909621802
comparator,lpower,hard,,0.46756802348373877,,,,0.8609362596824635
comparator,denergy,hard,,0.3089180049610159,,,,0.8267293340232036
flop,delay,easy,3.3270503187614153,,,,,0.0
flop,area,easy,,0.34478305655859876,,,,0.9433629202566682
flop,lpower,easy,,0.3707856336608904,,,,0.9170347531086821
flop,denergy,easy,,0.0011765517257429892,,,,0.688648230209356
flop,delay,hard,3.3270503187614153,,,,,0.0
flop,area,hard,,0.34478305655859876,,,,0.9433629202566682
flop,lpower,hard,,0.3707856336608904,,,,0.9170347531086821
flop,denergy,hard,,0.0011765517257429892,,,,0.688648230209356
mux2,delay,easy,0.0,,,3.276654474184255,,0.7130397298335213
mux2,area,easy,,0.15083561354737726,,,,0.976644158286422
mux2,lpower,easy,,0.12067626255418841,,,,0.9344813545348312
mux2,denergy,easy,,0.0011206170933885473,,,,0.5565267433319017
mux2,delay,hard,2.539326242287272,,,0.4143154417811283,,0.550540330173853
mux2,area,hard,,0.2261714754439734,,,,0.9792793539936671
mux2,lpower,hard,,0.27830936017352714,,,,0.9042661125086188
mux2,denergy,hard,,0.19333666277894856,,,,0.9525189311701613
mux4,delay,easy,0.0,,,3.934462222278399,,0.5700865267151127
mux4,area,easy,,0.2839183647889992,,,,0.9755791039549218
mux4,lpower,easy,,0.11187597259171647,,,,0.5559362399863286
mux4,denergy,easy,,0.0021483489610266407,,,,0.5348528431713737
mux4,delay,hard,3.1369448764435073,,,0.5081925137582488,,0.8316415055210026
mux4,area,hard,,0.35778033738856435,,,,0.9880049722019894
mux4,lpower,hard,,0.32236674794207065,,,,0.8279138454959137
mux4,denergy,hard,,0.28073375091037084,,,,0.9943662618662574
mux8,delay,easy,0.0,,,4.439779694843578,,0.6601108415004824
mux8,area,easy,,0.5486426664163658,,,,0.9756934275959698
mux8,lpower,easy,,0.2380559585648822,,,,0.5468728724048277
mux8,denergy,easy,,0.0029053391137917966,,,,0.5231276299250225
mux8,delay,hard,4.9490961359025585,,,0.45254210999717775,,0.8846872287553096
mux8,area,hard,,0.7645051946159651,,,,0.9834986761377894
mux8,lpower,hard,,0.6697504633436362,,,,0.9599639296705227
mux8,denergy,hard,,0.4542825975429124,,,,0.9698068520398291
mult,delay,easy,0.0,,,61.777235436483835,,0.539191885251039
mult,area,easy,,1.1322969325198273,7.852086512913157,,,0.997120506119588
mult,lpower,easy,,1.0320514230056876,3.411671281132248,,,0.7465081509218953
mult,denergy,easy,,0.0,2.146924193738219,,,0.8988257654810033
mult,delay,hard,0.0,,,5.971649009143529,,0.9704083045351518
mult,area,hard,,13.296909763669026,10.2773763878058,,,0.9969630019304513
mult,lpower,hard,,26.397088944265164,7.310137358727654,,,0.9703772416232848
mult,denergy,hard,,41.5120348723692,25.39500777044283,,,0.9849195751440497

1 Module Metric Target 1 N N^2 log2(N) Nlog2(N) R^2
2 priorityencoder delay easy 4.865032478368464 0.0 1.0346781590203091 6.815655848737334 0.990533246983837 0.5471505976585844
3 priorityencoder area easy 0.3296349181169891 0.14996313076366272 0.9718942704677337 0.9751246139683207
4 priorityencoder lpower easy 0.2508481588069769 0.04628232776780845 0.9418329012771585 0.6646449382421588
5 priorityencoder denergy easy 0.09327161156406552 0.00046338953826781273 0.8065924672945542 0.8843605490100168
6 add priorityencoder delay hard 8.961254531683414 0.0 1.4310340215065527 0.9775747670327015 0.9564367595740637 0.987274834491306
7 add priorityencoder area hard 1.0710989265923485 0.3296349181169891 0.988580182173048 0.9718942704677337
8 add priorityencoder lpower hard 0.9470245397661955 0.2508481588069769 0.9951383820581323 0.9418329012771585
9 add priorityencoder denergy hard 0.9954952282287014 0.09327161156406552 0.9928308616130285 0.8065924672945542
10 csa add delay easy 3.590384717869601 0.0 27.820556626526365 0.0 0.5330240516496716
11 csa add area easy 0.9312877569527923 0.33740563909904386 0.999393942859829 0.9968636684818916
12 csa add lpower easy 1.5320774877598933 0.1559461482654009 0.9400384192534433 0.7403794995975848
13 csa add denergy easy 1.1454135769936609 0.025219887569037786 0.9735205275004183 0.6462978476180771
14 shiftleft add delay hard 8.66019468793489 1.8060844241506506 1.6351711913499432 1.4310340215065525 0.9873681453602638 0.9564367595740637
15 shiftleft add area hard 1.9102134686740575 1.0710989265923485 0.9466461680123697 0.988580182173048
16 shiftleft add lpower hard 2.277088275290811 0.9470245397661955 0.9624044038708768 0.9951383820581323
17 shiftleft add denergy hard 1.4931073444617051 0.9954952282287014 0.9454881696599784 0.9928308616130285
18 comparator csa delay easy 6.680678539086959 5.827386725865409 0.9397668550976327 0.98789326603378 0.0
19 comparator csa area easy 0.6003877936704982 0.3404841239399024 0.9672416909621802 0.9966821820865757
20 comparator csa lpower easy 0.46756802348373877 0.1555300133584381 0.8609362596824635 0.7410756093594764
21 comparator csa denergy easy 0.3089180049610159 0.0005478126632729184 0.8267293340232036 0.5798854696439455
22 flop csa delay hard 3.3270503187614153 3.590384717869601 0.0
23 flop csa area hard 0.34478305655859876 0.9312877569527923 0.9433629202566682 0.9993939428598292
24 flop csa lpower hard 0.3707856336608904 1.5320774877598933 0.9170347531086821 0.9400384192534433
25 flop csa denergy hard 0.0011765517257429892 1.1454135769936609 0.688648230209356 0.9735205275004183
26 mux2 shiftleft delay easy 4.732514086885074 0.0 0.38138175938205005 5.744537363106859 0.5638177354804589 0.7778961884907117
27 mux2 shiftleft area easy 0.19794547955000782 0.8000093911038876 0.9753613114571431 0.9576897492378456
28 mux2 shiftleft lpower easy 0.1881638557015794 0.28913702096331206 0.7572248871637561 0.623995386847899
29 mux2 shiftleft denergy easy 0.16278100836605952 0.005924456057944899 0.9811112115671446 0.7200057939838627
30 mux4 shiftleft delay hard 5.67790744523475 0.48433873118517795 0.5081925137582493 1.635171191349943 0.8316415055210026 0.9873681453602638
31 mux4 shiftleft area hard 0.35778033738856435 1.9102134686740575 0.9880049722019894 0.9466461680123697
32 mux4 shiftleft lpower hard 0.32236674794207065 2.277088275290811 0.8279138454959137 0.9624044038708768
33 mux4 shiftleft denergy hard 0.28073375091037084 1.4931073444617051 0.9943662618662574 0.9454881696599784
34 mux8 comparator delay easy 7.252700330388384 0.0 0.45254210999717837 4.706704191403 0.8464368692304263 0.5450694752498024
35 mux8 comparator area easy 0.7614128432326613 0.3425601443761704 0.9863118376555963 0.978537426983507
36 mux8 comparator lpower easy 0.6570734849206145 0.15525826941742596 0.9855956038468652 0.8078417286943447
37 mux8 comparator denergy easy 0.4496346388149245 0.0008896717814426517 0.9785597135426944 0.9267090446396561
38 mult comparator delay hard 29.562138166420393 1.9818442635987938 6.711916207386673 0.9397668550976329 0.9833266087176287 0.9878932660337799
39 mult comparator area hard 0.6003877936704982 13.838943348894976 0.9875861886135875 0.9672416909621802
40 mult comparator lpower hard 0.46756802348373877 14.380577146903335 0.9349609233308782 0.8609362596824635
41 mult comparator denergy hard 0.3089180049610159 36.51397409545879 0.9719012952478829 0.8267293340232036
42 flop delay easy 3.3270503187614153 0.0
43 flop area easy 0.34478305655859876 0.9433629202566682
44 flop lpower easy 0.3707856336608904 0.9170347531086821
45 flop denergy easy 0.0011765517257429892 0.688648230209356
46 flop delay hard 3.3270503187614153 0.0
47 flop area hard 0.34478305655859876 0.9433629202566682
48 flop lpower hard 0.3707856336608904 0.9170347531086821
49 flop denergy hard 0.0011765517257429892 0.688648230209356
50 mux2 delay easy 0.0 3.276654474184255 0.7130397298335213
51 mux2 area easy 0.15083561354737726 0.976644158286422
52 mux2 lpower easy 0.12067626255418841 0.9344813545348312
53 mux2 denergy easy 0.0011206170933885473 0.5565267433319017
54 mux2 delay hard 2.539326242287272 0.4143154417811283 0.550540330173853
55 mux2 area hard 0.2261714754439734 0.9792793539936671
56 mux2 lpower hard 0.27830936017352714 0.9042661125086188
57 mux2 denergy hard 0.19333666277894856 0.9525189311701613
58 mux4 delay easy 0.0 3.934462222278399 0.5700865267151127
59 mux4 area easy 0.2839183647889992 0.9755791039549218
60 mux4 lpower easy 0.11187597259171647 0.5559362399863286
61 mux4 denergy easy 0.0021483489610266407 0.5348528431713737
62 mux4 delay hard 3.1369448764435073 0.5081925137582488 0.8316415055210026
63 mux4 area hard 0.35778033738856435 0.9880049722019894
64 mux4 lpower hard 0.32236674794207065 0.8279138454959137
65 mux4 denergy hard 0.28073375091037084 0.9943662618662574
66 mux8 delay easy 0.0 4.439779694843578 0.6601108415004824
67 mux8 area easy 0.5486426664163658 0.9756934275959698
68 mux8 lpower easy 0.2380559585648822 0.5468728724048277
69 mux8 denergy easy 0.0029053391137917966 0.5231276299250225
70 mux8 delay hard 4.9490961359025585 0.45254210999717775 0.8846872287553096
71 mux8 area hard 0.7645051946159651 0.9834986761377894
72 mux8 lpower hard 0.6697504633436362 0.9599639296705227
73 mux8 denergy hard 0.4542825975429124 0.9698068520398291
74 mult delay easy 0.0 61.777235436483835 0.539191885251039
75 mult area easy 1.1322969325198273 7.852086512913157 0.997120506119588
76 mult lpower easy 1.0320514230056876 3.411671281132248 0.7465081509218953
77 mult denergy easy 0.0 2.146924193738219 0.8988257654810033
78 mult delay hard 0.0 5.971649009143529 0.9704083045351518
79 mult area hard 13.296909763669026 10.2773763878058 0.9969630019304513
80 mult lpower hard 26.397088944265164 7.310137358727654 0.9703772416232848
81 mult denergy hard 41.5120348723692 25.39500777044283 0.9849195751440497

View file

@ -1,16 +1,13 @@
#!/usr/bin/python3
# Madeleine Masser-Frye mmasserfrye@hmc.edu 5/22
# Madeleine Masser-Frye mmasserfrye@hmc.edu 6/22
from collections import namedtuple
import csv
import subprocess
import re
from multiprocessing import Pool, cpu_count
from multiprocessing import Pool
from ppaAnalyze import synthsfromcsv
def runCommand(module, width, tech, freq):
command = "make synth DESIGN=ppa_{}_{} TECH={} DRIVE=INV FREQ={} MAXOPT=1".format(module, width, tech, freq)
command = "make synth DESIGN=ppa_{}_{} TECH={} DRIVE=INV FREQ={} MAXOPT=1 MAXCORES=1".format(module, width, tech, freq)
subprocess.Popen(command, shell=True)
def deleteRedundant(LoT):
@ -20,58 +17,40 @@ def deleteRedundant(LoT):
bashCommand = synthStr.format(*synth)
outputCPL = subprocess.check_output(['bash','-c', bashCommand])
def getData(filename):
Synth = namedtuple("Synth", "module tech width freq delay area lpower denergy")
with open(filename, newline='') as csvfile:
csvreader = csv.reader(csvfile)
global allSynths
allSynths = list(csvreader)
for i in range(len(allSynths)):
for j in range(len(allSynths[0])):
try: allSynths[i][j] = int(allSynths[i][j])
except:
try: allSynths[i][j] = float(allSynths[i][j])
except: pass
allSynths[i] = Synth(*allSynths[i])
if __name__ == '__main__':
LoT = []
synthsToRun = []
##### Run specific syntheses
# widths = [8]
# modules = ['mult', 'add', 'shiftleft', 'flop', 'comparator', 'priorityencoder', 'add', 'csa', 'mux2', 'mux4', 'mux8']
# techs = ['sky90']
# freqs = [5000]
# for w in widths:
# for module in modules:
# for tech in techs:
# for freq in freqs:
# LoT += [[module, str(w), tech, str(freq)]]
# arr = [-5, -3, -1, 1, 3, 5]
arr2 = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
##### Run a sweep based on best delay found in existing syntheses
arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8]
allSynths = synthsfromcsv('bestSynths.csv')
for synth in allSynths:
f = 1000/synth.delay
for freq in [round(f+f*x/100) for x in arr]:
LoT += [[synth.module, str(synth.width), synth.tech, str(freq)]]
##### Only do syntheses for which a run doesn't already exist
bashCommand = "find . -path '*runs/ppa*rv32e*' -prune"
output = subprocess.check_output(['bash','-c', bashCommand])
specReg = re.compile('[a-zA-Z0-9]+')
allSynths = output.decode("utf-8").split('\n')[:-1]
allSynths = [specReg.findall(oneSynth)[2:7] for oneSynth in allSynths]
allSynths = [oneSynth[0:2] + [oneSynth[3][:-2]] + [oneSynth[4]] for oneSynth in allSynths]
for synth in LoT:
if (synth not in allSynths):
synthsToRun += [synth]
widths = [128]
modules = ['mux2', 'mux4', 'mux8', 'shiftleft', 'flop', 'comparator', 'mult', 'priorityencoder', 'add', 'csa']
techs = ['tsmc28']
LoT = []
allSynths = synthsfromcsv('ppaData.csv')
for w in widths:
for module in modules:
for tech in techs:
m = 100000 # large number to start
for oneSynth in allSynths:
if (oneSynth.width == w) & (oneSynth.tech == tech) & (oneSynth.module == module):
if (oneSynth.delay < m):
m = oneSynth.delay
synth = oneSynth
# f = 1000/synth.delay
for freq in [10]: #[round(f+f*x/100) for x in arr2]:
LoT += [[synth.module, str(synth.width), synth.tech, str(freq)]]
bashCommand = "find . -path '*runs/ppa*rv32e*' -prune"
output = subprocess.check_output(['bash','-c', bashCommand])
specReg = re.compile('[a-zA-Z0-9]+')
allSynths = output.decode("utf-8").split('\n')[:-1]
allSynths = [specReg.findall(oneSynth)[2:7] for oneSynth in allSynths]
allSynths = [oneSynth[0:2] + [oneSynth[3][:-2]] + [oneSynth[4]] for oneSynth in allSynths]
synthsToRun = []
for synth in LoT:
if synth not in allSynths:
synthsToRun += [synth]
pool = Pool(processes=25)
pool.starmap(runCommand, synthsToRun)
pool.close()
pool = Pool(processes=25)
pool.starmap(runCommand, synthsToRun)

View file

@ -1,5 +1,5 @@
#!/usr/bin/bash
rm -r runs/*
# rm -r runs/*
make clean
make del
make freqs TECH=$1