Fix bugs in scripts for synthesis and tsmc28 psyn

This commit is contained in:
James Stine 2023-02-16 13:38:26 -06:00
parent a65b82b533
commit 004f8a970e
2 changed files with 15 additions and 12 deletions

View File

@ -18,20 +18,22 @@ if {$tech == "sky130"} {
set s9lib $timing_lib/sky90/sky90_sc/V1.7.4/lib set s9lib $timing_lib/sky90/sky90_sc/V1.7.4/lib
lappend search_path $s9lib lappend search_path $s9lib
} elseif {$tech == "tsmc28"} { } elseif {$tech == "tsmc28"} {
set s10lib /proj/models/tsmc28/libraries/28nmtsmc/tcbn28hpcplusbwp30p140_190a/TSMCHOME/digital/Front_End/timing_power_noise/NLDM/tcbn28hpcplusbwp30p140_180a set pdk /proj/models/tsmc28/libraries/28nmtsmc/tcbn28hpcplusbwp30p140_190a/
set s10lib $pdk/TSMCHOME/digital/Front_End/timing_power_noise/NLDM/tcbn28hpcplusbwp30p140_180a
lappend search_path $s10lib lappend search_path $s10lib
} }
elseif {$tech == "tsmc28psyn"} { elseif {$tech == "tsmc28psyn"} {
set TLU /home/jstine/TLU+ set TLU /home/jstine/TLU+
set s10lib /proj/models/tsmc28/libraries/28nmtsmc/tcbn28hpcplusbwp30p140_190a/TSMCHOME/digital/Front_End/timing_power_noise/NLDM/tcbn28hpcplusbwp30p140_180a set pdk /proj/models/tsmc28/libraries/28nmtsmc/tcbn28hpcplusbwp30p140_190a/
set s10lib $pdk/TSMCHOME/digital/Front_End/timing_power_noise/NLDM/tcbn28hpcplusbwp30p140_180a
lappend search_path $s10lib lappend search_path $s10lib
set TLUPLUS true set TLUPLUS true
set mw_logic1_net VDD set mw_logic1_net VDD
set mw_logic0_net VSS set mw_logic0_net VSS
set TLU_PDK /import/yukari1/jstine/TLU+/ set TLU_PDK /home/jstine/TLU+/
set CAPTABLE $TLU/1p8m/ set CAPTABLE $TLU/1p8m/
set MW_REFERENCE_LIBRARY /home/jstine/MW set MW_REFERENCE_LIBRARY /home/jstine/MW
set MW_TECH_FILE tcbn28hpcplusbwp7t30p140 set MW_TECH_FILE tcbn28hpcplusbwp30p140
set MAX_TLU_FILE $CAPTABLE/crn28hpc+_1p08m+ut-alrdl_5x1z1u_typical.tluplus set MAX_TLU_FILE $CAPTABLE/crn28hpc+_1p08m+ut-alrdl_5x1z1u_typical.tluplus
set MIN_TLU_FILE $CAPTABLE/crn28hpc+_1p08m+ut-alrdl_5x1z1u_rcworst.tluplus set MIN_TLU_FILE $CAPTABLE/crn28hpc+_1p08m+ut-alrdl_5x1z1u_rcworst.tluplus
set PRS_MAP_FILE $MW_REFERENCE_LIBRARY/astro_layername.map set PRS_MAP_FILE $MW_REFERENCE_LIBRARY/astro_layername.map
@ -50,11 +52,10 @@ if {$tech == "sky130"} {
lappend target_library $s9lib/scc9gena_tt_1.2v_25C.db lappend target_library $s9lib/scc9gena_tt_1.2v_25C.db
} elseif {$tech == "tsmc28"} { } elseif {$tech == "tsmc28"} {
lappend target_library $s10lib/tcbn28hpcplusbwp30p140tt0p9v25c.db lappend target_library $s10lib/tcbn28hpcplusbwp30p140tt0p9v25c.db
}
} elseif {$tech == "tsmc28psyn"} { } elseif {$tech == "tsmc28psyn"} {
set mw_reference_library [list ] set mw_reference_library [list ]
lappend target_library $s10lib/tcbn28hpcplusbwp30p140tt0p9v25c.db lappend target_library $s10lib/tcbn28hpcplusbwp30p140tt0p9v25c.db
lappend mw_reference_library $MW_REFERENCE_LIBRARY/tcbn28hpcplusbwp7t30p140 lappend mw_reference_library $MW_REFERENCE_LIBRARY/tcbn28hpcplusbwp30p140
} }
# Set Link Library # Set Link Library

View File

@ -5,9 +5,9 @@ import subprocess
from multiprocessing import Pool from multiprocessing import Pool
import argparse import argparse
def runSynth(config, mod, tech, freq, maxopt, usesram): def runSynth(config, mod, tech, freq, maxopt, usesram, usetopo):
global pool global pool
command = "make synth DESIGN=wallypipelinedcore CONFIG={} MOD={} TECH={} DRIVE=FLOP FREQ={} MAXOPT={} USESRAM={} MAXCORES=1".format(config, mod, tech, freq, maxopt, usesram) command = "make synth DESIGN=wallypipelinedcore CONFIG={} MOD={} TECH={} DRIVE=FLOP FREQ={} MAXOPT={} USESRAM={} USETOPO={} MAXCORES=1".format(config, mod, tech, freq, maxopt, usesram, usetopo)
pool.map(mask, [command]) pool.map(mask, [command])
def mask(command): def mask(command):
@ -33,32 +33,34 @@ if __name__ == '__main__':
parser.add_argument("-e", "--tech", choices=techs, help = "Technology") parser.add_argument("-e", "--tech", choices=techs, help = "Technology")
parser.add_argument("-o", "--maxopt", action='store_true', help = "Turn on MAXOPT") parser.add_argument("-o", "--maxopt", action='store_true', help = "Turn on MAXOPT")
parser.add_argument("-r", "--usesram", action='store_true', help = "Use SRAM modules") parser.add_argument("-r", "--usesram", action='store_true', help = "Use SRAM modules")
parser.add_argument("-topo", "--usetopo", action='store_true', help = "Run physical synthesis")
args = parser.parse_args() args = parser.parse_args()
tech = args.tech if args.tech else 'sky90' tech = args.tech if args.tech else 'sky90'
maxopt = int(args.maxopt) maxopt = int(args.maxopt)
usesram = int(args.usesram) usesram = int(args.usesram)
usetopo = int(args.usetopop)
mod = 'orig' mod = 'orig'
if args.freqsweep: if args.freqsweep:
sc = args.freqsweep sc = args.freqsweep
config = args.version if args.version else 'rv32e' config = args.version if args.version else 'rv32e'
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, usetopo)
if args.configsweep: if args.configsweep:
defaultfreq = 1500 if tech == 'sky90' else 5000 defaultfreq = 1500 if tech == 'sky90' else 5000
freq = args.targetfreq if args.targetfreq else defaultfreq 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, usetopo)
if args.featuresweep: if args.featuresweep:
defaultfreq = 500 if tech == 'sky90' else 1500 defaultfreq = 500 if tech == 'sky90' else 1500
freq = args.targetfreq if args.targetfreq else defaultfreq 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 ['noFPU', 'noMulDiv', 'noPriv', 'PMP0', 'orig']: for mod in ['noFPU', 'noMulDiv', 'noPriv', 'PMP0', 'orig']:
runSynth(config, mod, tech, freq, maxopt, usesram) runSynth(config, mod, tech, freq, maxopt, usesram, usetopo)
else: else:
defaultfreq = 500 if tech == 'sky90' else 1500 defaultfreq = 500 if tech == 'sky90' else 1500
freq = args.targetfreq if args.targetfreq else defaultfreq 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, usetopo)