+def setSliversVref (data):
+ '''
+ Tweak the 'vref' attribute in all slivers based on the 'GetSliceFamily' key
+ '''
+ # GetSlivers exposes the result of GetSliceFamily() as an separate key in data
+ # It is safe to override the attributes with this, as this method has the right logic
+ for sliver in data.get('slivers'):
+ try:
+ slicefamily=sliver.get('GetSliceFamily')
+ for att in sliver['attributes']:
+ if att['tagname']=='vref':
+ att['value']=slicefamily
+ continue
+ sliver['attributes'].append({ 'tagname':'vref','value':slicefamily})
+ except:
+ logger.log_exc("nm: Could not overwrite 'vref' attribute from 'GetSliceFamily'",name=sliver['name'])
+
+