From 12c5879467aeb8bfcf214d30e7aadfde0e6422f7 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 27 Apr 2024 17:06:44 -0700 Subject: [PATCH] Synthesis with derived configs --- config/derivlist.txt | 20 ++++++++++---------- synthDC/Makefile | 4 ++++ synthDC/extractSummary.py | 5 +++++ synthDC/wallySynth.py | 4 +--- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/config/derivlist.txt b/config/derivlist.txt index 86b80310b..da3bae5cb 100644 --- a/config/derivlist.txt +++ b/config/derivlist.txt @@ -89,29 +89,29 @@ deriv syn_sram_rv64i rv64i syn_sram_rv32e deriv syn_sram_rv64gc rv64gc syn_sram_rv32e # The following syn configurations gradually turn off features -deriv syn_pmp0_rv64gc syn_rv64gc +deriv syn_rv64gc_pmp0 syn_rv64gc PMP_ENTRIES 32'd0 -deriv syn_sram_pmp0_rv64gc syn_sram_rv64gc +deriv syn_sram_rv64gc_pmp0 syn_sram_rv64gc PMP_ENTRIES 32'd0 -deriv syn_noPriv_rv64gc syn_pmp0_rv64gc +deriv syn_rv64gc_noPriv syn_rv64gc_pmp0 ZICSR_SUPPORTED 0 -deriv syn_sram_noPriv_rv64gc syn_sram_pmp0_rv64gc +deriv syn_sram_rv64gc_noPriv syn_sram_rv64gc_pmp0 ZICSR_SUPPORTED 0 -deriv syn_noFPU_rv64gc syn_noPriv_rv64gc +deriv syn_rv64gc_noFPU syn_rv64gc_noPriv MISA (32'h00000104 | 1 << 18 | 1 << 20 | 1 << 12 | 1 << 0) -deriv syn_sram_noFPU_rv64gc syn_sram_noPriv_rv64gc +deriv syn_sram_rv64gc_noFPU syn_sram_rv64gc_noPriv MISA (32'h00000104 | 1 << 18 | 1 << 20 | 1 << 12 | 1 << 0) -deriv syn_noMulDiv_rv64gc syn_noFPU_rv64gc +deriv syn_rv64gc_noMulDiv syn_rv64gc_noFPU MISA (32'h00000104 | 1 << 18 | 1 << 20 | 1 << 0) -deriv syn_sram_noMulDiv_rv64gc syn_sram_noFPU_rv64gc +deriv syn_sram_rv64gc_noMulDiv syn_sram_rv64gc_noFPU MISA (32'h00000104 | 1 << 18 | 1 << 20 | 1 << 0) -deriv syn_noAtomic_rv64gc syn_noMulDiv_rv64gc +deriv syn_rv64gc_noAtomic syn_rv64gc_noMulDiv MISA (32'h00000104 | 1 << 18 | 1 << 20) -deriv syn_sram_noAtomic_rv64gc syn_sram_noMulDiv_rv64gc +deriv syn_sram_rv64gc_noAtomic syn_sram_rv64gc_noMulDiv MISA (32'h00000104 | 1 << 18 | 1 << 20) # Divider variants to check logical correctness diff --git a/synthDC/Makefile b/synthDC/Makefile index 068df0c70..513d54dba 100755 --- a/synthDC/Makefile +++ b/synthDC/Makefile @@ -44,7 +44,11 @@ configs: $(CONFIG) $(CONFIG): @echo $(CONFIG) cp -r $(OLDCONFIGDIR)/shared/*.vh $(CONFIGDIR) +ifeq ($(MOD), orig) cp -rf $(OLDCONFIGDIR)/deriv/$(CONFIG)/config.vh $(CONFIGDIR) | true +else + cp -rf $(OLDCONFIGDIR)/deriv/$(CONFIG)_$(MOD)/config.vh $(CONFIGDIR) | true +endif ifeq ($(SAIFPOWER), 1) cp -f ../sim/power.saif . diff --git a/synthDC/extractSummary.py b/synthDC/extractSummary.py index 7c3848b9c..150f20efb 100755 --- a/synthDC/extractSummary.py +++ b/synthDC/extractSummary.py @@ -33,6 +33,9 @@ def synthsintocsv(): for oneSynth in allSynths: descrip = specReg.findall(oneSynth) + print("From " + oneSynth + " Find ") + for d in descrip: + print(d) if (descrip[3] == "sram"): base = 4 else: @@ -46,10 +49,12 @@ def synthsintocsv(): descrip = descrip[1:] tech = descrip[base+1][:-2] freq = descrip[base+2] +# print(width, config, mod, tech, freq) metrics = [] for phrase in ['Path Slack', 'Design Area']: bashCommand = 'grep "{}" '+ oneSynth[2:]+'/reports/*qor*' bashCommand = bashCommand.format(phrase) + print(bashCommand) try: output = subprocess.check_output(['bash','-c', bashCommand]) nums = metricReg.findall(str(output)) diff --git a/synthDC/wallySynth.py b/synthDC/wallySynth.py index a4d9fc2f5..a5e8b5d6b 100755 --- a/synthDC/wallySynth.py +++ b/synthDC/wallySynth.py @@ -11,8 +11,6 @@ def runSynth(config, mod, tech, freq, maxopt, usesram): prefix = "syn_sram_" else: prefix = "syn_" - if (mod != "orig"): - prefix = prefix+mod+"_" cfg = prefix + config command = "make synth DESIGN=wallypipelinedcore CONFIG={} MOD={} TECH={} DRIVE=FLOP FREQ={} MAXOPT={} USESRAM={} MAXCORES=1".format(cfg, mod, tech, freq, maxopt, usesram) pool.map(mask, [command]) @@ -63,7 +61,7 @@ if __name__ == '__main__': defaultfreq = 500 if tech == 'sky90' else 1500 freq = args.targetfreq if args.targetfreq else defaultfreq config = args.version if args.version else 'rv64gc' - for mod in ['noAtomic', 'noFPU', 'noMulDiv', 'noPriv', 'PMP0']: + for mod in ['noAtomic', 'noFPU', 'noMulDiv', 'noPriv', 'pmp0']: runSynth(config, mod, tech, freq, maxopt, usesram) else: defaultfreq = 500 if tech == 'sky90' else 1500