User`s manual

It did not take us too long to realize the mistake in the implementation, and
looking back we do not see any other way of correcting the mistake.
As described in the section on the acc module, taking a second pass through
the data-sheet for the accelerometer helped us to identify an issue with a violated
timing constraint (t
CS,DIS
).
7.6 USB input to flash memory issues
The most challenging issue in the audio component of the project was receiving
data over USB and storing the samples into flash memory. When we received
data over USB, we wrote it immediately to the flash memory. However, after a
data transfer, we noticed that many of the bytes were missing.
The flash memory is already difficult to work with because of its tight timing
constraints. It is also an old piece of hardware, with read and write times
considered slow at the time of manufacture of the labkit over ten years ago. We
theorized that the flash memory was too slow to be able to write data at the
rate it was being received.
To isolate the device at fault, a series of unit tests were developed. One test
took data from a look-up table coded into the device via Verilog and placed
it into the flash memory. When we analyzed the flash memory contents, we
found it was exactly the same as the look-up table. From this test we were able
to conclude that the flash memory was functional. We developed another test
that counted the number of bytes received over the USB module before writing
them to flash. We found that while the number of bytes received was exactly
the number of bytes transmitted from the computer, the number of bytes in
memory was still off by a factor between two and three. Even while buffering
the data from the USB input device, itself also a buffer, we could not improve
the performance of the system.
Despite repeatedly consulting with instructor Gim Hom, teaching assistant
Luis Fernandez (who previously implemented a working audio system), and the
author of the staff-provided flash manager module, and in spite of our best ef-
forts to understand and modify the code, we could not improve the performance
enough to record all samples. We did improve our system so that the audio was
intelligible. With Gim’s approval, we closed this issue as not resolvable in the
scope of our project and moved forward.
7.7 Integration tests
In addition to testing modules in isolation, we obviously also needed to test
whether the modules work together or not. Fortunately, the audio system could
be quite easily separated from the rest of the system, so we anticipated easy
integration here. Ironically, we faced a strange problem here, which we never
understood. The issue was with the percentage value computed by pixels kept.
Initially, pixels kept was actually named pixels lost, and was computing 100 mi-
nus the percentage of pixels kept. The audio module was written for percentage
of pixels kept however, so initially the audio module did a second subtraction
26