libopenfpga/libarchopenfpga/src/read_xml_technology_library.cpp
/********************************************************************
 * Parse XML codes of a <lib> under a device model definiton 
 * to an object of technology library
 *******************************************************************/
Parse XML codes of a  under a device model definiton
to an object of technology library
Parse XML codes of a under a device model definiton to an object of technology library
static 
void read_xml_device_model_lib_settings(pugi::xml_node& xml_device_model_lib,
                                        const pugiutil::loc_data& loc_data,
                                        TechnologyLibrary& tech_lib,
                                        TechnologyModelId& device_model) {
  const char* type_attr = get_attribute(xml_device_model_lib, "type", loc_data).value();
  e_tech_lib_type device_model_lib_type = string_to_tech_lib_type(std::string(type_attr));
  if (NUM_TECH_LIB_TYPES == device_model_lib_type) {
    archfpga_throw(loc_data.filename_c_str(), loc_data.line(xml_device_model_lib),
                   "Invalid 'type' attribute '%s'\n",
                   type_attr);
  }
  tech_lib.set_model_lib_type(device_model, device_model_lib_type);
  if (TECH_LIB_INDUSTRY == tech_lib.model_lib_type(device_model)) {
    tech_lib.set_model_corner(device_model, get_attribute(xml_device_model_lib, "corner", loc_data).as_string());
  }
  tech_lib.set_model_ref(device_model, get_attribute(xml_device_model_lib, "ref", loc_data).as_string());
  tech_lib.set_model_lib_path(device_model, get_attribute(xml_device_model_lib, "path", loc_data).as_string());
}
static void read_xml_device_model_lib_settings ( pugi :: xml_node & xml_device_model_lib , const pugiutil :: loc_data & loc_data , TechnologyLibrary & tech_lib , TechnologyModelId & device_model ) { const char * type_attr = get_attribute ( xml_device_model_lib , " " , loc_data ) . value ( ) ; e_tech_lib_type device_model_lib_type = string_to_tech_lib_type ( std :: string ( type_attr ) ) ; if ( NUM_TECH_LIB_TYPES == device_model_lib_type ) { archfpga_throw ( loc_data . filename_c_str ( ) , loc_data . line ( xml_device_model_lib ) , " \n " , type_attr ) ; } tech_lib . set_model_lib_type ( device_model , device_model_lib_type ) ; if ( TECH_LIB_INDUSTRY == tech_lib . model_lib_type ( device_model ) ) { tech_lib . set_model_corner ( device_model , get_attribute ( xml_device_model_lib , " " , loc_data ) . as_string ( ) ) ; } tech_lib . set_model_ref ( device_model , get_attribute ( xml_device_model_lib , " " , loc_data ) . as_string ( ) ) ; tech_lib . set_model_lib_path ( device_model , get_attribute ( xml_device_model_lib , " " , loc_data ) . as_string ( ) ) ; }
Parse XML codes of a <lib> under a device model definiton
 to an object of technology library
Parse XML codes of a <lib > under a device model definiton to an object of technology library
/* Parse the type of model library */ /* Translate the type of design technology to enumerate */ /* Parse the type of process corner, this is ONLY applicable to industry library */ /* Parse the model reference */ /* Parse the lib path */