28. Discussing MP4

Part of CS:2820 Object Oriented Software Development Notes, Fall 2017
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

 

The following test files for MP4 are worth distributing

-- a simple 1 input threshold gate
gate abby input 0 0.1 3
gate betty threshold 1 0.3
wire abby 0.3 betty

That should produce the following simulation trace

time 0.1 0->1  gate a input 0 0.1 3
time 0.2 1->-0  gate a input 0 0.1 3
time 0.3 0->1  gate a input 0 0.1 3
time 0.4 0->1 wire abby 0.3 betty
time 0.5 1->0 wire abby 0.3 betty
time 0.6 0->1 wire abby 0.3 betty
time 0.7 0->1 gate betty threshold 1 0.3
time 0.8 1->0 gate betty threshold 1 0.3
time 0.9 0->1 gate betty threshold 1 0.3

In general, note that you are responsible for designing test data.