leonardt / fault

A Python package for testing hardware (part of the magma ecosystem)
BSD 3-Clause "New" or "Revised" License
40 stars 13 forks source link

Fault not aware of top circuit uniquification #338

Open leonardt opened 3 months ago

leonardt commented 3 months ago

Remove this line to reproduce: https://github.com/phanrahan/magma/blob/master/examples/odd_even_sort.py#L92-L93

Fault will assume the top circuit has the non-uniquified name, which causes issues when the top circuit doesn't receive the original name (i.e. when _unq{n} is appended). Ideally fault refers to the post uniquification name (perhaps we can allow fault to run the compiler passes earlier?), alternatively we might have fault force/pin the name of the top circuit (at least in this case, other circuits will still receive a unique name, but it may not map 1-1 with the default RTL generation)