Fix same file error and enable passing tests

This commit is contained in:
Eren Dogan
2024-01-20 08:38:18 -08:00
parent 14c219d9f1
commit 55e5c425e9
2 changed files with 11 additions and 13 deletions
+4 -1
View File
@@ -45,7 +45,10 @@ class functional(simulation):
sram.sp_write(self.sp_file, trim=OPTS.trim_netlist)
# Copy sp file to temp dir
self.temp_spice = path.join(OPTS.openram_temp, "sram.sp")
shutil.copy(self.sp_file, self.temp_spice)
try:
shutil.copy(self.sp_file, self.temp_spice)
except shutil.SameFileError: # skip if the same
pass
if not corner:
corner = (OPTS.process_corners[0], OPTS.supply_voltages[0], OPTS.temperatures[0])