mirror of https://github.com/VLSIDA/OpenRAM.git
Merge branch 'dev' into wlbuffer
This commit is contained in:
commit
037de96989
|
|
@ -100,9 +100,10 @@ class sram():
|
||||||
import verify
|
import verify
|
||||||
start_time = datetime.datetime.now()
|
start_time = datetime.datetime.now()
|
||||||
# Output the extracted design if requested
|
# Output the extracted design if requested
|
||||||
sp_file = OPTS.output_path + "temp_pex.sp"
|
pexname = OPTS.output_path + self.s.name + ".pex.sp"
|
||||||
spname = OPTS.output_path + self.s.name + ".sp"
|
spname = OPTS.output_path + self.s.name + ".sp"
|
||||||
verify.run_pex(self.s.name, gdsname, spname, output=sp_file)
|
verify.run_pex(self.s.name, gdsname, spname, output=pexname)
|
||||||
|
sp_file = pexname
|
||||||
print_time("Extraction", datetime.datetime.now(), start_time)
|
print_time("Extraction", datetime.datetime.now(), start_time)
|
||||||
else:
|
else:
|
||||||
# Use generated spice file for characterization
|
# Use generated spice file for characterization
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ num_lvs_runs = 0
|
||||||
num_pex_runs = 0
|
num_pex_runs = 0
|
||||||
|
|
||||||
|
|
||||||
def write_calibre_drc_script(cell_name, extract, final_verification):
|
def write_calibre_drc_script(cell_name, extract, final_verification, gds_name):
|
||||||
""" Write a Calibre runset file and script to run DRC """
|
""" Write a Calibre runset file and script to run DRC """
|
||||||
# the runset file contains all the options to run calibre
|
# the runset file contains all the options to run calibre
|
||||||
from tech import drc
|
from tech import drc
|
||||||
|
|
@ -39,7 +39,7 @@ def write_calibre_drc_script(cell_name, extract, final_verification):
|
||||||
drc_runset = {
|
drc_runset = {
|
||||||
'drcRulesFile': drc_rules,
|
'drcRulesFile': drc_rules,
|
||||||
'drcRunDir': OPTS.openram_temp,
|
'drcRunDir': OPTS.openram_temp,
|
||||||
'drcLayoutPaths': cell_name + ".gds",
|
'drcLayoutPaths': gds_name,
|
||||||
'drcLayoutPrimary': cell_name,
|
'drcLayoutPrimary': cell_name,
|
||||||
'drcLayoutSystem': 'GDSII',
|
'drcLayoutSystem': 'GDSII',
|
||||||
'drcResultsformat': 'ASCII',
|
'drcResultsformat': 'ASCII',
|
||||||
|
|
@ -68,7 +68,7 @@ def write_calibre_drc_script(cell_name, extract, final_verification):
|
||||||
return drc_runset
|
return drc_runset
|
||||||
|
|
||||||
|
|
||||||
def write_calibre_lvs_script(cell_name, final_verification):
|
def write_calibre_lvs_script(cell_name, final_verification, gds_name, sp_name):
|
||||||
""" Write a Calibre runset file and script to run LVS """
|
""" Write a Calibre runset file and script to run LVS """
|
||||||
|
|
||||||
from tech import drc
|
from tech import drc
|
||||||
|
|
@ -76,9 +76,9 @@ def write_calibre_lvs_script(cell_name, final_verification):
|
||||||
lvs_runset = {
|
lvs_runset = {
|
||||||
'lvsRulesFile': lvs_rules,
|
'lvsRulesFile': lvs_rules,
|
||||||
'lvsRunDir': OPTS.openram_temp,
|
'lvsRunDir': OPTS.openram_temp,
|
||||||
'lvsLayoutPaths': cell_name + ".gds",
|
'lvsLayoutPaths': gds_name,
|
||||||
'lvsLayoutPrimary': cell_name,
|
'lvsLayoutPrimary': cell_name,
|
||||||
'lvsSourcePath': cell_name + ".sp",
|
'lvsSourcePath': sp_name,
|
||||||
'lvsSourcePrimary': cell_name,
|
'lvsSourcePrimary': cell_name,
|
||||||
'lvsSourceSystem': 'SPICE',
|
'lvsSourceSystem': 'SPICE',
|
||||||
'lvsSpiceFile': "{}.spice".format(cell_name),
|
'lvsSpiceFile': "{}.spice".format(cell_name),
|
||||||
|
|
@ -135,11 +135,11 @@ def write_calibre_lvs_script(cell_name, final_verification):
|
||||||
def write_calibre_pex_script(cell_name, extract, output, final_verification):
|
def write_calibre_pex_script(cell_name, extract, output, final_verification):
|
||||||
""" Write a pex script that can either just extract the netlist or the netlist+parasitics """
|
""" Write a pex script that can either just extract the netlist or the netlist+parasitics """
|
||||||
if output == None:
|
if output == None:
|
||||||
output = name + ".pex.netlist"
|
output = cell_name + ".pex.sp"
|
||||||
|
|
||||||
# check if lvs report has been done
|
# check if lvs report has been done
|
||||||
# if not run drc and lvs
|
# if not run drc and lvs
|
||||||
if not os.path.isfile(cell_name + ".lvs.report"):
|
if not os.path.isfile(OPTS.openram_temp + cell_name + ".lvs.report"):
|
||||||
gds_name = OPTS.openram_temp +"/"+ cell_name + ".gds"
|
gds_name = OPTS.openram_temp +"/"+ cell_name + ".gds"
|
||||||
sp_name = OPTS.openram_temp +"/"+ cell_name + ".sp"
|
sp_name = OPTS.openram_temp +"/"+ cell_name + ".sp"
|
||||||
run_drc(cell_name, gds_name)
|
run_drc(cell_name, gds_name)
|
||||||
|
|
@ -155,7 +155,7 @@ def write_calibre_pex_script(cell_name, extract, output, final_verification):
|
||||||
'pexSourcePath': cell_name + ".sp",
|
'pexSourcePath': cell_name + ".sp",
|
||||||
'pexSourcePrimary': cell_name,
|
'pexSourcePrimary': cell_name,
|
||||||
'pexReportFile': cell_name + ".pex.report",
|
'pexReportFile': cell_name + ".pex.report",
|
||||||
'pexPexNetlistFile': cell_name + ".pex.netlist",
|
'pexPexNetlistFile': output,
|
||||||
'pexPexReportFile': cell_name + ".pex.report",
|
'pexPexReportFile': cell_name + ".pex.report",
|
||||||
'pexMaskDBFile': cell_name + ".maskdb",
|
'pexMaskDBFile': cell_name + ".maskdb",
|
||||||
'cmnFDIDEFLayoutPath': cell_name + ".def",
|
'cmnFDIDEFLayoutPath': cell_name + ".def",
|
||||||
|
|
@ -195,10 +195,13 @@ def run_drc(cell_name, gds_name, extract=False, final_verification=False):
|
||||||
filter_gds(cell_name, OPTS.openram_temp + "temp.gds", OPTS.openram_temp + cell_name + ".gds")
|
filter_gds(cell_name, OPTS.openram_temp + "temp.gds", OPTS.openram_temp + cell_name + ".gds")
|
||||||
else:
|
else:
|
||||||
# Copy file to local dir if it isn't already
|
# Copy file to local dir if it isn't already
|
||||||
if os.path.dirname(gds_name)!=OPTS.openram_temp.rstrip('/'):
|
if not os.path.isfile(OPTS.openram_temp + os.path.basename(gds_name)):
|
||||||
shutil.copy(gds_name, OPTS.openram_temp)
|
shutil.copy(gds_name, OPTS.openram_temp)
|
||||||
|
|
||||||
drc_runset = write_calibre_drc_script(cell_name, extract, final_verification)
|
drc_runset = write_calibre_drc_script(cell_name, extract, final_verification, gds_name)
|
||||||
|
|
||||||
|
if not os.path.isfile(OPTS.openram_temp + os.path.basename(gds_name)):
|
||||||
|
shutil.copy(gds_name, OPTS.openram_temp + os.path.basename(gds_name))
|
||||||
|
|
||||||
(outfile, errfile, resultsfile) = run_script(cell_name, "drc")
|
(outfile, errfile, resultsfile) = run_script(cell_name, "drc")
|
||||||
|
|
||||||
|
|
@ -238,12 +241,12 @@ def run_lvs(cell_name, gds_name, sp_name, final_verification=False):
|
||||||
global num_lvs_runs
|
global num_lvs_runs
|
||||||
num_lvs_runs += 1
|
num_lvs_runs += 1
|
||||||
|
|
||||||
lvs_runset = write_calibre_lvs_script(cell_name, final_verification)
|
lvs_runset = write_calibre_lvs_script(cell_name, final_verification, gds_name, sp_name)
|
||||||
|
|
||||||
# Copy file to local dir if it isn't already
|
# Copy file to local dir if it isn't already
|
||||||
if os.path.dirname(gds_name)!=OPTS.openram_temp.rstrip('/'):
|
if not os.path.isfile(OPTS.openram_temp + os.path.basename(gds_name)):
|
||||||
shutil.copy(gds_name, OPTS.openram_temp)
|
shutil.copy(gds_name, OPTS.openram_temp)
|
||||||
if os.path.dirname(sp_name)!=OPTS.openram_temp.rstrip('/'):
|
if not os.path.isfile(OPTS.openram_temp + os.path.basename(sp_name)):
|
||||||
shutil.copy(sp_name, OPTS.openram_temp)
|
shutil.copy(sp_name, OPTS.openram_temp)
|
||||||
|
|
||||||
(outfile, errfile, resultsfile) = run_script(cell_name, "lvs")
|
(outfile, errfile, resultsfile) = run_script(cell_name, "lvs")
|
||||||
|
|
@ -325,7 +328,13 @@ def run_pex(cell_name, gds_name, sp_name, output=None, final_verification=False)
|
||||||
global num_pex_runs
|
global num_pex_runs
|
||||||
num_pex_runs += 1
|
num_pex_runs += 1
|
||||||
|
|
||||||
write_calibre_pex_script(cell_name,True,output,final_verification)
|
write_calibre_pex_script(cell_name, True, output, final_verification)
|
||||||
|
|
||||||
|
# Copy file to local dir if it isn't already
|
||||||
|
if not os.path.isfile(OPTS.openram_temp + os.path.basename(gds_name)):
|
||||||
|
shutil.copy(gds_name, OPTS.openram_temp)
|
||||||
|
if not os.path.isfile(OPTS.openram_temp + os.path.basename(sp_name)):
|
||||||
|
shutil.copy(sp_name, OPTS.openram_temp)
|
||||||
|
|
||||||
(outfile, errfile, resultsfile) = run_script(cell_name, "pex")
|
(outfile, errfile, resultsfile) = run_script(cell_name, "pex")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue