byuccl / spydrnet-tmr

TMR utilities for the SpyDrNet project
https://byuccl.github.io/spydrnet-tmr/
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Some logical doubts in find_voter_insertion_points.py #33

Open zywbjj opened 6 months ago

zywbjj commented 6 months ago

spydrnet_tmr/analysis/voter_insertion/find_voter_insertion_points.py

Line 153-158

if (has_non_redundant and not has_redundant) or 
(has_redundant and reduction_voter in reduction_and_feedback_voter):
                # has non-redundant and redundant endpoints -> normal voter insertion
                # has only redundant endpoints and is feedback voter as well -> normal voter insertion
                outer_pin = next(sub_pin.get_pins(selection="OUTSIDE"))
                insertion_points.append(outer_pin)

Line 161-166

elif (
                has_non_redundant
                and has_redundant
                and reduction_voter not in reduction_and_feedback_voter
            ):
                # has only non-redundant feedback -> insert special voters
                non_redundant_instances = set(
                    x for x in instances if x not in endpoints_to_replicate
                )
                non_redundant_pins = set()
  1. According to the meaning of the comment paragraph in the if block "# has non-redundant and redundant endpoints -> normal voter insertion # has only redundant endpoints and is feedback voter as well -> normal voter insertion", the judgment condition should be
    if (has_non_redundant and has_redundant) 
    or (has_redundant and not has_non_redundant and reduction_voter in reduction_and_feedback_voter):
  2. "# has only non-redundant feedback -> insert special voters" in the elif block means
    elif (
                has_non_redundant
                and not has_redundant
                and reduction_voter not in reduction_and_feedback_voter
            ):