[#73220] add comparing SAIF signal parameters

This commit is contained in:
Mateusz Gancarz 2025-02-20 15:41:31 +01:00
parent 1b6f8b79fa
commit 379e91cf83
1 changed files with 11 additions and 0 deletions

View File

@ -2482,6 +2482,17 @@ class VlTest:
if signal_name not in second.nets:
self.error(f"Signal {signal_name} doesn't exist in the second object\n")
other_signal = second.nets[signal_name]
if other_signal.width != signal.width:
self.error(f"Incompatible signal width in {signal_name}!\n")
for bit_index in range(signal.width):
signal_bit = signal.bits[bit_index]
other_signal_bit = other_signal.bits[bit_index]
if signal_bit.high_time != other_signal_bit.high_time or signal_bit.low_time != other_signal_bit.low_time or signal_bit.transitions != other_signal_bit.transitions:
self.error(f"Incompatible signal bit parameters in {signal_name}[{bit_index}]!\n")
for instance_name, instance in first.child_instances.items():
if instance_name not in second.child_instances:
self.error(f"Instance {instance_name} doesn't exist in the second object\n")