anchor.diff:  endfunction
   
   // ============================================================================
  -// Loading and storing seeds
  -// ============================================================================
  -
  -// When a counter-example is found in simulation, we can save the
  -// seeds of all LFSRs to a file or UART so that it can be replayed.
  -// Thanks to Jon Woodruff for this suggestion.
  -
  -function Action putSeed(File f, Bit#(16) data) =
  +// File I/O
  +// ============================================================================
  +
  +function Action putHalfWord(File f, Bit#(16) data) =
     action
       $fwrite(f, "%c", hexEncode(data[15:12]));
       $fwrite(f, "%c", hexEncode(data[11:8]));
  
positive.code: 
    // Store the values of the shadow LFSRs to a FIFO
  
    Reg#(Bit#(16)) tmpReg     <- mkReg(0);
    Reg#(Bit#(3)) nibbleCount <- mkReg(0);
  
    function Stmt storeToFIFO(FIFOF#(Bit#(8)) fifo) =
      seq
        action
          // Write single char: '1' if counter-example found; '0' otherwise
  
negative.code:               testNum <= testNum+1;
              endseq
  
            if (!failureFound) action
              $display("");
              currentDepth <= params.id.incDepth(currentDepth);
              iterCount <= iterCount+1;
            endaction
          endseq
  
        // Save the state of the LFSRs so we can resume testing later
        // from this point.
        storeToOutput(currentDepth);
  
        // We've reached the end of iterative deepening.  Either we
        // found a failure or performed the desired number of tests.
  