INPUT AND OUTPUT TEXT FILES CREATED
I set up a file stream.txt to hold the words to send to my bit capture state machine, each line consisting of 20 discrete bits coded as the ASCII characters 0 or 1. I set up an initial line of all zeros to reflect the end of the preamble and then the sync word pattern as the next line. Following that I coded 321 words of input to capture the words that would be transmitted if the disk controller were writing a full 321 word sector.
Another file, got.txt, was written by the testbench under simulation, storing away each word as it is captured by my state machine. The output matched what I intended to be captured.
SOME ERROR TESTING COMPLETED SUCCESSFULLY
I set up some input words with incorrect error detection code bit patterns and these indeed led to the state machine locking into the error state. As well I attempted various lengths of preamble and ensured that the state machine still properly captured the sector's worth of data whether it was shorter or a bit longer than the target duration.
REMAINING TESTING FOR TOMORROW
I am going to verify the operation in various conditions:
- Sync word is malformed
- writegate turned off prematurely
- writegate turned off in mid word
- writegate asserted before sector starts
No comments:
Post a Comment