anchor.diff:                 lineCount <= 0;
                  patternIndex1 <= 0;
                  lineVisible <= False;
  +               if (verbose)
  +                   $display("HDMI: lineVisible off");
                  testPatternEnabled <= shadowTestPatternEnabled;
                  if (waitingForVsync)
   	          sendVsyncIndication.send();
              end
              else begin
  -               if (lineCount == deLineStartVisible)
  +               if (lineCount == deLineStartVisible) begin
                      lineVisible <= True;
  +                   if (verbose)
  +                       $display("HDMI: lineVisible on");
  +               end
                  lineCount <= lineCount+1;
                  if (lineCount >= deLineMid)
                      patternIndex1 <= 1;
              end
           end
           else begin
  -           if (lineCount == deLineStartPorch) begin
  +           if (lineCount == deLineStartSync) begin
                 vsync <= 1;
                 if (pixelCount == 0 && testPatternEnabled == 0) begin
                     vsyncCounter <= vsyncCounter+1;
                     startDMA.send();
  +                  $display("HDMI:vsync %d", lineCount);
                 end
              end
  -           else if (lineCount == deLineEndPorch)
  +           else if (lineCount == deLineEndSync)
                 vsync <= 0;
  -           if (pixelCount == dePixelStartPorch)
  +           if (pixelCount == dePixelStartSync)
                 hsync <= 1;
  -           else if (pixelCount == dePixelEndPorch)
  +           else if (pixelCount == dePixelEndSync)
                 hsync <= 0;
              if (pixelCount == dePixelStartVisible)
                  dataEnable <= lineVisible;
  
positive.code: 
      rule inc_counters;
          if (pixelCount == dePixelEnd) begin
             pixelCount <= 0; 
             dataEnable <= False;
             patternIndex0 <= 0;
  
negative.code: 
  module mkHdmiGenerator#(Clock axi_clock, Reset axi_reset,
     SyncPulseIfc startDMA, HdmiGeneratorIndication indication)(HdmiGenerator#(Rgb888));
      let verbose = False;
      Clock defaultClock <- exposeCurrentClock();
      Reset defaultReset <- exposeCurrentReset();
      // 1920 * 1080
      // horiz: frontPorch:87, sync: 44, backPorch:148, pixel:1920
      // vert: frontPorch:3, sync:5, backPorch:36, lines:1080
      Reg#(Bit#(12)) dePixelStartSync <- mkSyncReg(              87, axi_clock, axi_reset, defaultClock);
      Reg#(Bit#(12)) dePixelEndSync <- mkSyncReg(           44 + 87, axi_clock, axi_reset, defaultClock);
      Reg#(Bit#(12)) dePixelStartVisible <- mkSyncReg(148 + 44 + 87, axi_clock, axi_reset, defaultClock);
      Reg#(Bit#(12)) dePixelEnd <- mkSyncReg(  1920 + 148 + 44 + 87, axi_clock, axi_reset, defaultClock);
      Reg#(Bit#(12)) dePixelMid <- mkSyncReg((1920/2) + 148 + 44, axi_clock, axi_reset, defaultClock);
  
      Reg#(Bit#(11)) deLineStartSync <- mkSyncReg(              3, axi_clock, axi_reset, defaultClock);
      Reg#(Bit#(11)) deLineEndSync <- mkSyncReg(            5 + 3, axi_clock, axi_reset, defaultClock);
      Reg#(Bit#(11)) deLineStartVisible <- mkSyncReg(  36 + 5 + 3, axi_clock, axi_reset, defaultClock);
      Reg#(Bit#(11)) deLineEnd <- mkSyncReg(    1080 + 36 + 5 + 3, axi_clock, axi_reset, defaultClock);
      Reg#(Bit#(11)) deLineMid <- mkSyncReg((1080/2) + 41, axi_clock, axi_reset, defaultClock);
  
      Vector#(4, Reg#(Bit#(24))) patternRegs <- replicateM(mkSyncReg(24'h00FFFFFF, axi_clock, axi_reset, defaultClock));
  