mirror of https://github.com/VLSIDA/OpenRAM.git
moved system call to datasheet.info generator
This commit is contained in:
parent
1dae539e1d
commit
cd0e763895
|
|
@ -506,11 +506,14 @@ class lib:
|
||||||
def parse_info(self,corner,lib_name):
|
def parse_info(self,corner,lib_name):
|
||||||
""" Copies important characterization data to datasheet.info to be added to datasheet """
|
""" Copies important characterization data to datasheet.info to be added to datasheet """
|
||||||
if OPTS.is_unit_test:
|
if OPTS.is_unit_test:
|
||||||
return
|
git_id = 'AAAAAAAAAAAAAAAAAAAA'
|
||||||
datasheet = open(OPTS.openram_temp +'/datasheet.info', 'a+')
|
else:
|
||||||
|
with open(os.devnull, 'wb') as devnull:
|
||||||
|
proc = subprocess.Popen(['git','rev-parse','HEAD'], stdout=subprocess.PIPE)
|
||||||
|
git_id = str(proc.stdout.read())
|
||||||
|
git_id = git_id[2:-3]
|
||||||
|
|
||||||
with open(os.environ.get("OPENRAM_HOME") + "/git_id", "r") as f:
|
datasheet = open(OPTS.openram_temp +'/datasheet.info', 'a+')
|
||||||
origin_id = f.readline()
|
|
||||||
|
|
||||||
datasheet.write("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},".format(
|
datasheet.write("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},".format(
|
||||||
"sram_{0}_{1}_{2}".format(OPTS.word_size, OPTS.num_words, OPTS.tech_name),
|
"sram_{0}_{1}_{2}".format(OPTS.word_size, OPTS.num_words, OPTS.tech_name),
|
||||||
|
|
@ -527,7 +530,7 @@ class lib:
|
||||||
self.out_dir,
|
self.out_dir,
|
||||||
lib_name,
|
lib_name,
|
||||||
OPTS.word_size,
|
OPTS.word_size,
|
||||||
origin_id[:-1]
|
git_id
|
||||||
))
|
))
|
||||||
|
|
||||||
for port in self.all_ports:
|
for port in self.all_ports:
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ from sram_config import sram_config
|
||||||
output_extensions = ["sp","v","lib","py"]
|
output_extensions = ["sp","v","lib","py"]
|
||||||
if OPTS.datasheet_gen:
|
if OPTS.datasheet_gen:
|
||||||
output_extensions.append("html")
|
output_extensions.append("html")
|
||||||
os.system('git rev-parse HEAD > git_id')
|
|
||||||
if not OPTS.netlist_only:
|
if not OPTS.netlist_only:
|
||||||
output_extensions.extend(["gds","lef"])
|
output_extensions.extend(["gds","lef"])
|
||||||
output_files = ["{0}.{1}".format(OPTS.output_name,x) for x in output_extensions]
|
output_files = ["{0}.{1}".format(OPTS.output_name,x) for x in output_extensions]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue