Sat, 11 Mar 2017, 21:46

A student writes:

> Hello Dr. Patt,
> I have an idea on how I would like to test my project 3 simulator solution,
> but I would like to run it by you since it uses an external program for
> checking values.
> Essentially, I want to download one of the simulators that can be found on
> the web, and compare my project's state to the state of the downloaded
> simulator each cycle.
> I understand the university's and your policies on plagiarism which is why
> I will not be using (or looking at) any source code. I have already written
> my control store and project 3 c code, I only wish to expose bugs.
> My motivation behind this: my testing plan includes the use of a random
> assembly code generator that I will write. I would like to create around
> 1000 one-hundred-line programs using this generator and to check all latch
> values during each step of the simulation. By hand, this will get tedious
> quickly.
> Ideally, I would use my project 2 solution instead of the downloaded one,
> but since I did not make 100% on project 2, I am afraid of hiding any bugs.
> Actually a three-way comparison between project 2, 3, and the downloaded
> simulator would be best.
> Regardless, I will most likely attempt to write the assembly code generator
> and checker as an exercise. This is a testing strategy I learned from
> working at Intel last year and I am excited to give it a try on my own.
> Thank you for your time,

Thanks for asking.  I prefer you not download other Simulators on the web.
For one thing, testing against a standard that you do not know is correct
is never a good idea.  My favorite horror story about that involved one of 
my students on a summer internship at Intel Hillsboro who was given the task
of testing/validating the FDIV microcode for the Pentium Pro chip under 
development at the time.  He decided to generate random numbers (sources) 
and test the results against the Pentium chip which was well into production
at the time.  The results did not match.  So the engineers looked again and
again at the Pentium Pro microcode and could not find an error.  Finally,
an engineer got a bright idea.  Maybe the Pentium chip was at fault!  Voila!
Success.  One of the most embarrassing moments for Intel to find out that
the millions of Pentium chips in laptops all over the world was giving the
wrong answer on FDIV. 

Making it okay for you to use things you pull off the web can easily produce 
a situation I can not manage effectively.
I would rather you tested your control signals by single stepping LC-3b 
instructions and checking what each microcycle produces.  There are not that
many opcodes or that many choices for addressing modes to make this task too

Thanks for the email.  Good luck finishing Lab 3 in time.

See you after Spring break.

Yale Patt