[#73220] add timescale comparison
This commit is contained in:
parent
08f6f36bb0
commit
cf838ae96f
|
|
@ -116,6 +116,7 @@ class SAIFParser:
|
||||||
self.traversing_nets = False
|
self.traversing_nets = False
|
||||||
self.duration = 0
|
self.duration = 0
|
||||||
self.divider = ''
|
self.divider = ''
|
||||||
|
self.timescale = ''
|
||||||
|
|
||||||
def parse(self, saif_filename):
|
def parse(self, saif_filename):
|
||||||
with open(saif_filename, 'r') as saif_file:
|
with open(saif_filename, 'r') as saif_file:
|
||||||
|
|
@ -128,6 +129,10 @@ class SAIFParser:
|
||||||
if match:
|
if match:
|
||||||
self.divider = match.groups()[0]
|
self.divider = match.groups()[0]
|
||||||
|
|
||||||
|
match = re.search(r'\(TIMESCALE\s+(\d+\s*\w+)', line)
|
||||||
|
if match:
|
||||||
|
self.timescale = match.groups()[0]
|
||||||
|
|
||||||
match = re.search(r'\s*\(DURATION\s+(\d+)', line)
|
match = re.search(r'\s*\(DURATION\s+(\d+)', line)
|
||||||
if match:
|
if match:
|
||||||
self.duration = int(match.groups()[0])
|
self.duration = int(match.groups()[0])
|
||||||
|
|
@ -2527,6 +2532,9 @@ class VlTest:
|
||||||
if first.divider != second.divider:
|
if first.divider != second.divider:
|
||||||
self.error(f"Dividers don't match: {first.divider} != {second.divider}")
|
self.error(f"Dividers don't match: {first.divider} != {second.divider}")
|
||||||
|
|
||||||
|
if first.timescale != second.timescale:
|
||||||
|
self.error(f"Timescale doesn't match: {first.timescale} != {second.timescale}")
|
||||||
|
|
||||||
for top_instance_name, top_instance in first.top_instances.items():
|
for top_instance_name, top_instance in first.top_instances.items():
|
||||||
if top_instance_name not in second.top_instances:
|
if top_instance_name not in second.top_instances:
|
||||||
self.error(f"Top instance {top_instance_name} missing in other SAIF")
|
self.error(f"Top instance {top_instance_name} missing in other SAIF")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue