anchor.diff:      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];
  
positive.code:         let fd = frame_delay+1;
          let fr = frame_run;
          let fstemp = 0;
          if (sframe_wire == 1)
              begin
              fr = 1;
              fd = 0;
              end
          if (frame_run == 1 && frame_delay == host.syncgen_delay() + 1 )
              begin
              fr = 0;
              fstemp = 1;
  
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;
  