Removing keeplist from write_manifest()
Only needed for TCL so we check the file extension to see if we
need to apply it.
Also removing calc_diecost() function, not important, not tied to PD.
@@ -1280,7 +1280,7 @@ class Chip:
self.merge_manifest(localcfg, clear=clear)
###########################################################################
- def write_manifest(self, filename, prune=True, keeplists=False, abspath=False):
+ def write_manifest(self, filename, prune=True, abspath=False):
'''
Writes the Chip objects manifest to a file.
@@ -1307,6 +1307,11 @@ class Chip:
if prune:
self.logger.debug('Pruning dictionary before writing file %s', filepath)
+ # Keep empty lists to simplify TCL coding
+ if filepath.endswith('.tcl'):
+ keeplists = True
+ else:
+ keeplists = False
cfgcopy = self._prune(self.cfg, keeplists=keeplists)
else:
cfgcopy = copy.deepcopy(self.cfg)
@@ -1584,8 +1589,7 @@ class Chip:
return dy
- ###########################################################################
-
+ ##########################################################################
def calc_dpw(self):
'''Calculates dies per wafer
@@ -1646,30 +1650,6 @@ class Chip:
return int(dies)
- ###########################################################################
- def calc_diecost(self, n):
- '''Calculates the per unit die cost based on volume.
-
- Calculats the raw per unit die cost based on the number of units
- produced (n), the wafer cost, and the fixed mask costs based on the f
- following calculation: die_cost = maskcost + wafercost/dpw
-
- An error is produced if cost numbers are absent from the chip manifest.
-
- Args:
- n (int): Number of units produced.
-
- Returns:
- Raw per die cost.
-
- Examples:
- >>> die_cost = chip.calc_diecost(1000)
- Calculates the per die cost in USD.
-
- '''
-
- return 0
-
###########################################################################
def summary(self):
'''
@@ -2293,7 +2273,7 @@ class Chip:
self.write_manifest("sc_manifest.json")
self.write_manifest("sc_manifest.yaml")
- self.write_manifest("sc_manifest.tcl", abspath=True, keeplists=True)
+ self.write_manifest("sc_manifest.tcl", abspath=True)
##################
# 9. Final check() before run
