openfpga/src/utils/fabric_bitstream_utils.cpp
/********************************************************************
 * For fast configuration, the number of bits to be skipped
 * the rule to skip any configuration bit should consider the whole data input values.
 * Only all the bits in the din port match the value to be skipped,
 * the programming cycle can be skipped!
 * For example:
 *   Address: 010101
 *     Region 0: 0
 *     Region 1: 1 
 *     Region 2: 0 
 *   This bit cannot be skipped if the bit_value_to_skip is 0
 *
 *   Address: 010101
 *     Region 0: 0
 *     Region 1: 0 
 *     Region 2: 0 
 *   This bit can be skipped if the bit_value_to_skip is 0
 *******************************************************************/
For fast configuration, the number of bits to be skipped
the rule to skip any configuration bit should consider the whole data input values.
Only all the bits in the din port match the value to be skipped,
the programming cycle can be skipped.

010101
Region 0: 0
Region 1: 0
Region 2: 0
This bit can be skipped if the bit_value_to_skip is 0
For fast configuration the number of bits to be skipped the rule to skip any configuration bit should consider the whole data input values . Only all the bits in the din port match the value to be skipped the programming cycle can be skipped . 010101 Region 0 : 0 Region 1 : 0 Region 2 : 0 This bit can be skipped if the bit_value_to_skip is 0
size_t find_frame_based_fast_configuration_fabric_bitstream_size(const FabricBitstream& fabric_bitstream,
                                                                 const bool& bit_value_to_skip) {
  std::map<std::string, std::vector<bool>> fabric_bits_by_addr = build_frame_based_fabric_bitstream_by_address(fabric_bitstream);
  size_t num_bits = 0;
  for (const auto& addr_din_pair : fabric_bits_by_addr) {
    bool skip_curr_bits = true;
    for (const bool& bit : addr_din_pair.second) {
      if (bit_value_to_skip != bit) {
        skip_curr_bits = false;
        break;
      }
    }
    if (false == skip_curr_bits) {
      num_bits++;
    }
  }
  return num_bits;
}
size_t find_frame_based_fast_configuration_fabric_bitstream_size ( const FabricBitstream & fabric_bitstream , const bool & bit_value_to_skip ) { std :: map < std :: string , std :: vector < bool > > fabric_bits_by_addr = build_frame_based_fabric_bitstream_by_address ( fabric_bitstream ) ; size_t num_bits = 0 ; for ( const auto & addr_din_pair : fabric_bits_by_addr ) { bool skip_curr_bits = true ; for ( const bool & bit : addr_din_pair . second ) { if ( bit_value_to_skip != bit ) { skip_curr_bits = false ; break ; } } if ( false == skip_curr_bits ) { num_bits ++ ; } } return num_bits ; }
For fast configuration, the number of bits to be skipped
 the rule to skip any configuration bit should consider the whole data input values.
For fast configuration the number of bits to be skipped the rule to skip any configuration bit should consider the whole data input values .