libopenfpga/libarchopenfpga/src/check_circuit_library.cpp
/************************************************************************
 * A generic function to check the port size of a given circuit model
 * if the port size does not match, we give an error 
 ***********************************************************************/
A generic function to check the port size of a given circuit model
if the port size does not match, we give an error
A generic function to check the port size of a given circuit model if the port size does not match we give an error
size_t check_one_circuit_model_port_size_required(const CircuitLibrary& circuit_lib,
                                                  const CircuitModelId& circuit_model, 
                                                  const CircuitPortId& circuit_port,
                                                  const size_t& port_size_to_check) {
  size_t num_err = 0;
  if (port_size_to_check != circuit_lib.port_size(circuit_port)) {
    VTR_LOG_ERROR("Expect circuit model %s to have %d %s ports but only see %d!\n",
                  circuit_lib.model_name(circuit_model).c_str(), 
                  port_size_to_check,
                  CIRCUIT_MODEL_PORT_TYPE_STRING[size_t(circuit_lib.port_type(circuit_port))],
                  circuit_lib.port_size(circuit_port));
    num_err++;
  }
  return num_err;
}
size_t check_one_circuit_model_port_size_required ( const CircuitLibrary & circuit_lib , const CircuitModelId & circuit_model , const CircuitPortId & circuit_port , const size_t & port_size_to_check ) { size_t num_err = 0 ; if ( port_size_to_check != circuit_lib . port_size ( circuit_port ) ) { VTR_LOG_ERROR ( " \n " , circuit_lib . model_name ( circuit_model ) . c_str ( ) , port_size_to_check , CIRCUIT_MODEL_PORT_TYPE_STRING [ size_t ( circuit_lib . port_type ( circuit_port ) ) ] , circuit_lib . port_size ( circuit_port ) ) ; num_err ++ ; } return num_err ; }
A generic function to check the port size of a given circuit model
 if the port size does not match, we give an error
A generic function to check the port size of a given circuit model if the port size does not match we give an error
/* Incremental the counter for errors */