fault
fault copied to clipboard
Provide warning/info if poked signal doesn't exist
I'd suggest providing some feedback to the user if the signal they're trying to poke doesn't actually exist. The simple example below illustrates the issue and how it could potentially mask a real bug.
import magma as m
import fault
class DefinitelyAnInverter(m.Circuit):
IO = ["a", m.In(m.Bit),
"b", m.Out(m.Bit)]
@classmethod
def definition(io):
# this line is definitely right
io.b <= io.a
tester = fault.Tester(DefinitelyAnInverter)
########## issue here
tester.circuit.aa = 1
#####################
tester.eval()
tester.circuit.b.expect(0)
tester.compile_and_run("verilator", flags=["-Wno-fatal"], directory="build")