Adding get method
feels cleaner than going through the cfg['sc_design']['values']
using a default attr values and still allowing fetching other values is powerful!
@@ -69,6 +69,10 @@ class Chip:
else:
self.cfg[key]['values'] = val
+ #################################
+ def get(self,key,attr='values'):
+ return self.cfg[key][attr]
+
#################################
def add(self,key,val):
if self.cfg[key]['type'] == "file":
@@ -294,13 +298,16 @@ class Chip:
file2_args[key]['values'].sort()
if file1_args[key]['values'] != file2_args[key]['values']:
same = False
+ self.logger.error('File difference found for key %s', key)
if self.cfg[key]['type'] in {"file"}:
file1_args[key]['hash'].sort()
file2_args[key]['hash'].sort()
if file1_args[key]['hash'] != file2_args[key]['hash']:
same = False
+ self.logger.error('Comparison difference found for key %s', key)
elif file1_args[key]['values'] != file2_args[key]['values']:
same = False
+ self.logger.error('Comparison difference found for key %s', key)
else:
same = False
