forked from Github_Repos/cvw
changed default freqs for synth sweeps
updated plotting to not overlap labels
This commit is contained in:
parent
ed7e2e4ace
commit
36cef9fff2
@ -8,6 +8,7 @@ from matplotlib.cbook import flatten
|
|||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import matplotlib.lines as lines
|
import matplotlib.lines as lines
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
from adjustText import adjust_text
|
||||||
from ppa.ppaAnalyze import noOutliers
|
from ppa.ppaAnalyze import noOutliers
|
||||||
from matplotlib import ticker
|
from matplotlib import ticker
|
||||||
import argparse
|
import argparse
|
||||||
@ -149,9 +150,8 @@ def areaDelay(tech, delays, areas, labels, fig, ax, norm=False):
|
|||||||
|
|
||||||
ax.yaxis.set_major_formatter(ticker.StrMethodFormatter('{x:,.0f}'))
|
ax.yaxis.set_major_formatter(ticker.StrMethodFormatter('{x:,.0f}'))
|
||||||
|
|
||||||
for i in range(len(labels)):
|
texts = [plt.text(delays[i], areas[i], labels[i], ha='center', va='center') for i in range(len(labels))]
|
||||||
plt.annotate(labels[i], (delays[i], areas[i]), textcoords="offset points", xytext=(0,10), ha='center')
|
adjust_text(texts)
|
||||||
|
|
||||||
return fig
|
return fig
|
||||||
|
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ def plotFeatures(tech, width, config):
|
|||||||
|
|
||||||
fig = areaDelay(tech, delays, areas, labels, fig, ax)
|
fig = areaDelay(tech, delays, areas, labels, fig, ax)
|
||||||
|
|
||||||
titlestr = tech+'_'+width+config
|
titlestr = tech+'_'+width+config+'_'+str(freq)+'MHz'
|
||||||
plt.title(titlestr)
|
plt.title(titlestr)
|
||||||
plt.savefig(final_directory + '/features_'+titlestr+'.png')
|
plt.savefig(final_directory + '/features_'+titlestr+'.png')
|
||||||
|
|
||||||
@ -240,8 +240,8 @@ def addFO4axis(fig, ax, tech):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("-s", "--skyfreq", type=int, default=3000, help = "Target frequency used for sky90 syntheses")
|
parser.add_argument("-s", "--skyfreq", type=int, default=1500, help = "Target frequency used for sky90 syntheses")
|
||||||
parser.add_argument("-t", "--tsmcfreq", type=int, default=10000, help = "Target frequency used for tsmc28 syntheses")
|
parser.add_argument("-t", "--tsmcfreq", type=int, default=5000, help = "Target frequency used for tsmc28 syntheses")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
TechSpec = namedtuple("TechSpec", "color shape targfreq fo4 add32area add32lpower add32denergy")
|
TechSpec = namedtuple("TechSpec", "color shape targfreq fo4 add32area add32lpower add32denergy")
|
||||||
|
@ -37,8 +37,6 @@ if __name__ == '__main__':
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
tech = args.tech if args.tech else 'sky90'
|
tech = args.tech if args.tech else 'sky90'
|
||||||
defaultfreq = 3000 if tech == 'sky90' else 10000
|
|
||||||
freq = args.targetfreq if args.targetfreq else defaultfreq
|
|
||||||
maxopt = int(args.maxopt)
|
maxopt = int(args.maxopt)
|
||||||
usesram = int(args.usesram)
|
usesram = int(args.usesram)
|
||||||
mod = 'orig'
|
mod = 'orig'
|
||||||
@ -49,12 +47,18 @@ if __name__ == '__main__':
|
|||||||
for freq in [round(sc+sc*x/100) for x in freqVaryPct]: # rv32e freq sweep
|
for freq in [round(sc+sc*x/100) for x in freqVaryPct]: # rv32e freq sweep
|
||||||
runSynth(config, mod, tech, freq, maxopt, usesram)
|
runSynth(config, mod, tech, freq, maxopt, usesram)
|
||||||
if args.configsweep:
|
if args.configsweep:
|
||||||
|
defaultfreq = 1500 if tech == 'sky90' else 5000
|
||||||
|
freq = args.targetfreq if args.targetfreq else defaultfreq
|
||||||
for config in ['rv32i', 'rv64gc', 'rv64i', 'rv32gc', 'rv32imc', 'rv32e']: #configs
|
for config in ['rv32i', 'rv64gc', 'rv64i', 'rv32gc', 'rv32imc', 'rv32e']: #configs
|
||||||
runSynth(config, mod, tech, freq, maxopt, usesram)
|
runSynth(config, mod, tech, freq, maxopt, usesram)
|
||||||
if args.featuresweep:
|
if args.featuresweep:
|
||||||
|
defaultfreq = 500 if tech == 'sky90' else 1500
|
||||||
|
freq = args.targetfreq if args.targetfreq else defaultfreq
|
||||||
config = args.version if args.version else 'rv64gc'
|
config = args.version if args.version else 'rv64gc'
|
||||||
for mod in ['FPUoff', 'noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations 'orig',
|
for mod in ['noFPU', 'noMulDiv', 'noPriv', 'PMP0', 'orig']:
|
||||||
runSynth(config, mod, tech, freq, maxopt, usesram)
|
runSynth(config, mod, tech, freq, maxopt, usesram)
|
||||||
else:
|
else:
|
||||||
|
defaultfreq = 500 if tech == 'sky90' else 1500
|
||||||
|
freq = args.targetfreq if args.targetfreq else defaultfreq
|
||||||
config = args.version if args.version else 'rv64gc'
|
config = args.version if args.version else 'rv64gc'
|
||||||
runSynth(config, mod, tech, freq, maxopt, usesram)
|
runSynth(config, mod, tech, freq, maxopt, usesram)
|
Loading…
Reference in New Issue
Block a user