anchor.diff:  	method ActionValue#(XsviData) get();
   	    dataGearbox.deq;
   	    syncGearbox.deq;
  +            let new_hsync = pack(hstate == Sync);
  +            let new_vsync = pack(vstate == Sync);
  +            active_video_reg <= pack(hstate == Active && vstate == Active);
   	    //jca framestart <= syncGearbox.first[0];
  -            debugind_value <= { 4'ha, xsvi_hsync_wire, xsvi_vsync_wire, vdiff, hdiff, hsync_count[7:0], vsync_count[7:0] } ;
  +            if (active_video_reg != xsvi_active_video_wire)
  +                hdiff <= hdiff + 1;
  +            debugind_value <= { 4'ha, new_hsync, new_vsync, vdiff, hdiff, hsync_count[7:0], vsync_count[7:0] } ;
   	    return XsviData {
   		fsync: xsvi_framestart_old_wire, //syncGearbox.first[0],
  -		vsync: xsvi_vsync_wire,
  -		hsync: xsvi_hsync_wire,
  +		vsync: new_vsync,
  +		hsync: new_hsync,
   		active_video: xsvi_active_video_wire,
   		video_data: xsvi_video_data_wire //dataGearbox.first[0]
   	    };
  
positive.code: 	    xsvi_framestart_old_wire <= v;
  	endmethod
          method Action hsync(Bit#(1) v);
  	    xsvi_hsync_wire <= v;
  	endmethod
          method Action vsync(Bit#(1) v);
  	    xsvi_vsync_wire <= v;
  	endmethod
          method Action active_video(Bit#(1) v);
              xsvi_active_video_wire <= v;
  
negative.code:         vstate <= vs;
          hsync_count <= hc;
          vsync_count <= vc;
      endrule
  
      interface ImageonSensorData in;
  