anchor.diff:          vstate <= vs;
           hsync_count <= hc;
           vsync_count <= vc;
  -
  -        let nh = pack(hstate == Sync);
  -        let nv = pack(vstate == Sync);
  -        if (nh != xsvi_hsync_wire)
  -            hdiff <= hdiff + 1;
  -        if (nv != xsvi_vsync_wire)
  -            vdiff <= vdiff + 1;
  -        new_hsync <= nh;
  -        new_vsync <= nv;
       endrule
   
       interface ImageonSensorData in;
  
positive.code:     Reg#(Bit#(1)) hsync_reg <- mkReg(0);
      Reg#(Bit#(1)) active_video_reg <- mkReg(0);
      Wire#(Bit#(1))  xsvi_framestart_old_wire <- mkDWire(0);
      Wire#(Bit#(1))  xsvi_hsync_wire <- mkDWire(0);
      Wire#(Bit#(1))  xsvi_vsync_wire <- mkDWire(0);
      Wire#(Bit#(1))  xsvi_active_video_wire <- mkDWire(0);
      Wire#(Bit#(10)) xsvi_video_data_wire <- mkDWire(0);
      Wire#(Bit#(1)) new_vsync <- mkDWire(0);
      Wire#(Bit#(1)) new_hsync <- mkDWire(0);
  
      Reg#(Bit#(1))     framestart <- mkReg(0);
      Reg#(State)       hstate <- mkReg(Idle);
  
negative.code: 	    xsvi_framestart_old_wire <= v;
  	endmethod
          method Action hsync(Bit#(1) v);
  	endmethod
          method Action vsync(Bit#(1) v);
  	endmethod
          method Action active_video(Bit#(1) v);
              xsvi_active_video_wire <= v;
  