130 nm synthesis script improvements

This commit is contained in:
David Harris 2023-10-30 20:57:35 -07:00
parent 680fb3f30b
commit 5112bfed19
5 changed files with 19 additions and 17 deletions

View File

@ -147,4 +147,4 @@ clean:
rm -f power.saif
rm -f Synopsys_stack_trace_*.txt
rm -f crte_*.txt
rm $(WALLY)/synthDC/wrappers/*

View File

@ -149,9 +149,11 @@ def areaDelay(tech, delays, areas, labels, fig, ax, norm=False):
plt.ylim(ymin=0, ymax=1.1*ytop)
ax.yaxis.set_major_formatter(ticker.StrMethodFormatter('{x:,.0f}'))
texts = [plt.text(delays[i], areas[i], labels[i], ha='center', va='center') for i in range(len(labels))]
adjust_text(texts)
if (len(labels) > 0):
texts = [plt.text(delays[i], areas[i], labels[i], ha='center', va='center') for i in range(len(labels))]
print ("Calling adjust_text with labels " + str(len(labels)) +" ***"+ str(texts) + "***")
adjust_text(texts)
return fig
@ -166,7 +168,7 @@ def plotFeatures(tech, width, config):
labels += [oneSynth.mod]
if (delays == []):
print("No delays found for freq ", freq, ". Did you set --skyfreq and --tsmcfreq?\n")
print("No delays found for tech ", tech, " freq ", freq, ". Did you set --sky130freq, --sky90freq and --tsmcfreq?\n")
fig, (ax) = plt.subplots(1, 1)
@ -244,13 +246,15 @@ def addFO4axis(fig, ax, tech):
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("-s", "--skyfreq", type=int, default=1500, help = "Target frequency used for sky90 syntheses")
parser.add_argument("-s130", "--sky130freq", type=int, default=500, help = "Target frequency used for sky130 syntheses")
parser.add_argument("-s90", "--sky90freq", type=int, default=1500, help = "Target frequency used for sky90 syntheses")
parser.add_argument("-t", "--tsmcfreq", type=int, default=5000, help = "Target frequency used for tsmc28 syntheses")
args = parser.parse_args()
TechSpec = namedtuple("TechSpec", "color shape targfreq fo4 add32area add32lpower add32denergy")
techdict = {}
techdict['sky90'] = TechSpec('gray', 'o', args.skyfreq, 43.2e-3, 1440.600027, 714.057, 0.658023)
techdict['sky130'] = TechSpec('green', 'o', args.sky130freq, 99.5e-3, 1440.600027, 714.057, 0.658023)
techdict['sky90'] = TechSpec('gray', 'o', args.sky90freq, 43.2e-3, 1440.600027, 714.057, 0.658023)
techdict['tsmc28psyn'] = TechSpec('blue', 's', args.tsmcfreq, 12.2e-3, 209.286002, 1060.0, .081533)
current_directory = os.getcwd()
@ -262,9 +266,12 @@ if __name__ == '__main__':
synthsfromcsv('Summary.csv')
freqPlot('tsmc28psyn', 'rv32', 'e')
freqPlot('sky90', 'rv32', 'e')
freqPlot('sky130', 'rv32', 'e')
plotFeatures('sky90', 'rv64', 'gc')
plotFeatures('sky130', 'rv64', 'gc')
plotFeatures('tsmc28psyn', 'rv64', 'gc')
plotConfigs('sky90', mod='orig')
plotConfigs('sky130', mod='orig')
plotConfigs('tsmc28psyn', mod='orig')
normAreaDelay(mod='orig')
os.system("./extractArea.pl");

View File

@ -36,8 +36,8 @@ eval file copy -force [glob ${hdl_src}/*/*/*.sv] {$outputDir/hdl/}
set wrapper 0
if {[eval exec grep "cvw_t" {$outputDir/hdl/$::env(DESIGN).sv}] ne ""} {
set wrapper 1
exec python3 $::env(WALLY)/synthDC/scripts/wrapperGen.py $::env(DESIGN)
eval file copy -force [glob ${hdl_src}/../synthDC/wrappers/$::env(DESIGN)wrapper.sv] {$outputDir/hdl/}
# make the wrapper
exec python3 $::env(WALLY)/synthDC/scripts/wrapperGen.py $::env(DESIGN) $outputDir/hdl
}
# Only for FMA class project; comment out when done

View File

@ -15,6 +15,7 @@ import os
parser = argparse.ArgumentParser()
parser.add_argument("DESIGN")
parser.add_argument("HDLPATH");
args=parser.parse_args()
@ -60,11 +61,7 @@ for l in lines:
buf += f"\t{moduleName} #(P) dut(.*);\nendmodule"
# path to wrapper
wrapperPath = f"{os.getenv('WALLY')}/synthDC/wrappers/{moduleName}wrapper.sv"
# clear wrappers directory
os.system(f"rm -f {os.getenv('WALLY')}/synthDC/wrappers/*")
os.system(f"mkdir -p {os.getenv('WALLY')}/synthDC/wrappers")
wrapperPath = f"{args.HDLPATH}/{moduleName}wrapper.sv"
fout = open(wrapperPath, "w")
@ -73,6 +70,4 @@ fout.write(buf)
fin.close()
fout.close()
#print(buf)

View File

@ -16,7 +16,7 @@ def mask(command):
if __name__ == '__main__':
techs = ['sky90', 'tsmc28', 'tsmc28psyn']
techs = ['sky130', 'sky90', 'tsmc28', 'tsmc28psyn']
allConfigs = ['rv32gc', 'rv32imc', 'rv64gc', 'rv64imc', 'rv32e', 'rv32i', 'rv64i']
freqVaryPct = [-20, -12, -8, -6, -4, -2, 0, 2, 4, 6, 8, 12, 20]
# freqVaryPct = [-20, -10, 0, 10, 20]