openfpga/src/repack/build_physical_truth_table.cpp
/***************************************************************************************
 * This function will iterate over all the physical pb that are
 * binded to clustered blocks and build the truth tables for the
 * physical Look-Up Table (LUT) implementations.
 * Note that the truth table built here is different from the atom
 * netlists in VPR context. We consider fracturable LUT features
 * and LUTs operating as wires
 ***************************************************************************************/
This function will iterate over all the physical pb that are
binded to clustered blocks and build the truth tables for the
physical Look-Up Table (LUT) implementations.
Note that the truth table built here is different from the atom
netlists in VPR context. We consider fracturable LUT features
and LUTs operating as wires
This function will iterate over all the physical pb that are binded to clustered blocks and build the truth tables for the physical Look - Up Table ( LUT ) implementations . Note that the truth table built here is different from the atom netlists in VPR context . We consider fracturable LUT features and LUTs operating as wires
void build_physical_lut_truth_tables(VprClusteringAnnotation& cluster_annotation,
                                     const AtomContext& atom_ctx,
                                     const ClusteringContext& cluster_ctx,
                                     const VprDeviceAnnotation& device_annotation,
                                     const CircuitLibrary& circuit_lib,
                                     const bool& verbose) {
  vtr::ScopedStartFinishTimer timer("Build truth tables for physical LUTs");
  for (auto blk_id : cluster_ctx.clb_nlist.blocks()) {
    PhysicalPb& physical_pb = cluster_annotation.mutable_physical_pb(blk_id);
    for (const PhysicalPbId& primitive_pb : physical_pb.primitive_pbs()) {
      CircuitModelId circuit_model = device_annotation.pb_type_circuit_model(physical_pb.pb_graph_node(primitive_pb)->pb_type);
      VTR_ASSERT(true == circuit_lib.valid_model_id(circuit_model));
      if (CIRCUIT_MODEL_LUT != circuit_lib.model_type(circuit_model)) {
        continue;
      }
      build_physical_pb_lut_truth_tables(physical_pb, primitive_pb, atom_ctx, device_annotation, circuit_lib, verbose);
    }
  }
}
void build_physical_lut_truth_tables ( VprClusteringAnnotation & cluster_annotation , const AtomContext & atom_ctx , const ClusteringContext & cluster_ctx , const VprDeviceAnnotation & device_annotation , const CircuitLibrary & circuit_lib , const bool & verbose ) { vtr :: ScopedStartFinishTimer timer ( " " ) ; for ( auto blk_id : cluster_ctx . clb_nlist . blocks ( ) ) { PhysicalPb & physical_pb = cluster_annotation . mutable_physical_pb ( blk_id ) ; for ( const PhysicalPbId & primitive_pb : physical_pb . primitive_pbs ( ) ) { CircuitModelId circuit_model = device_annotation . pb_type_circuit_model ( physical_pb . pb_graph_node ( primitive_pb ) -> pb_type ) ; VTR_ASSERT ( true == circuit_lib . valid_model_id ( circuit_model ) ) ; if ( CIRCUIT_MODEL_LUT != circuit_lib . model_type ( circuit_model ) ) { continue ; } build_physical_pb_lut_truth_tables ( physical_pb , primitive_pb , atom_ctx , device_annotation , circuit_lib , verbose ) ; } } }
This function will iterate over all the physical pb that are
 binded to clustered blocks and build the truth tables for the
 physical Look-Up Table (LUT) implementations.
This function will iterate over all the physical pb that are binded to clustered blocks and build the truth tables for the physical Look - Up Table ( LUT ) implementations .
/* Find the LUT physical pb id */ /* Reach here, we have a LUT to deal with. Find the truth tables that mapped to the LUT */