libopenfpga/libarchopenfpga/src/check_circuit_library.cpp
/************************************************************************
 * A function to check the port map of FF circuit model
 ***********************************************************************/
A function to check the port map of FF circuit model
A function to check the port map of FF circuit model
size_t check_ff_circuit_model_ports(const CircuitLibrary& circuit_lib,
                                    const CircuitModelId& circuit_model) {
  size_t num_err = 0;
  VTR_ASSERT(CIRCUIT_MODEL_FF == circuit_lib.model_type(circuit_model));
  num_err += check_one_circuit_model_port_type_and_size_required(circuit_lib, circuit_model, 
                                                                 CIRCUIT_MODEL_PORT_INPUT,
                                                                 3, 1, false);
  num_err += check_one_circuit_model_port_type_and_size_required(circuit_lib, circuit_model, 
                                                                 CIRCUIT_MODEL_PORT_CLOCK,
                                                                 1, 1, false);
  num_err += check_one_circuit_model_port_type_and_size_required(circuit_lib, circuit_model, 
                                                                 CIRCUIT_MODEL_PORT_OUTPUT,
                                                                 1, 1, false);
  return num_err;
}
size_t check_ff_circuit_model_ports ( const CircuitLibrary & circuit_lib , const CircuitModelId & circuit_model ) { size_t num_err = 0 ; VTR_ASSERT ( CIRCUIT_MODEL_FF == circuit_lib . model_type ( circuit_model ) ) ; num_err += check_one_circuit_model_port_type_and_size_required ( circuit_lib , circuit_model , CIRCUIT_MODEL_PORT_INPUT , 3 , 1 , false ) ; num_err += check_one_circuit_model_port_type_and_size_required ( circuit_lib , circuit_model , CIRCUIT_MODEL_PORT_CLOCK , 1 , 1 , false ) ; num_err += check_one_circuit_model_port_type_and_size_required ( circuit_lib , circuit_model , CIRCUIT_MODEL_PORT_OUTPUT , 1 , 1 , false ) ; return num_err ; }
A function to check the port map of FF circuit model
A function to check the port map of FF circuit model
/* Check the type of circuit model */ /* Check if we have D, Set and Reset */ /* Check if we have a clock */ /* Check if we have output */