anchor.diff:                  end
           imgdatavalid_reg <= idv;
           dataout_reg <= dor;
  +        sframe_new_wire <= pack(raw_data_delay_reg[9:0] == host.decoder.code_fs() && raw_data_reg[9:0] == 10'h0);
       endrule
   
       interface ImageonSensorControl in;
  
positive.code:     endrule
  
      rule calculate_framedata;
          let startframe_wire     = pack(raw_data_delay_reg[9:0] == host.decoder.code_fs() && raw_data_reg[9:0] == 10'h0);
          let startimageline_wire = pack(raw_data_delay_reg[9:0] == host.decoder.code_ls());
          let endimageline_wire   = pack(raw_data_delay_reg[9:0] == host.decoder.code_le());
          let datain_temp = raw_data_reg[49:10];
  
negative.code:     endrule
  
      rule update_debug;
          //let startframe_wire     = pack(raw_data_delay_reg[9:0] == host.decoder.code_fs() && raw_data_reg[9:0] == 10'h0);
          let dval = diff;
          dval = {dcount, diff[21:0], sframe_wire, sframe_new_wire};
          if (sframe_wire != sframe_new_wire)
              begin
              dcount <= dcount + 1;
              end
          if (diff[17] == 1)
              begin
              debugind_value <= diff;
  