libopenfpga/libarchopenfpga/src/read_xml_technology_library.cpp
/********************************************************************
 * Parse XML codes of transistor models under a device model
 * to an object of technology library
 *******************************************************************/
Parse XML codes of transistor models under a device model
to an object of technology library
Parse XML codes of transistor models under a device model to an object of technology library
static 
void read_xml_device_transistor(pugi::xml_node& xml_device_transistor,
                                const pugiutil::loc_data& loc_data,
                                TechnologyLibrary& tech_lib,
                                TechnologyModelId& device_model,
                                const e_tech_lib_transistor_type& transistor_type) {
  tech_lib.set_transistor_model_name(device_model, transistor_type, 
                                     get_attribute(xml_device_transistor, "name", loc_data).as_string());
  tech_lib.set_transistor_model_chan_length(device_model, transistor_type, 
                                            get_attribute(xml_device_transistor, "chan_length", loc_data).as_float(0.));
  tech_lib.set_transistor_model_min_width(device_model, transistor_type, 
                                          get_attribute(xml_device_transistor, "min_width", loc_data).as_float(0.));
  tech_lib.set_transistor_model_max_width(device_model, transistor_type, 
                                          get_attribute(xml_device_transistor, "max_width", loc_data, pugiutil::ReqOpt::OPTIONAL).as_float(0.));
  if (0. == tech_lib.transistor_model_max_width(device_model, transistor_type)) {
    tech_lib.set_transistor_model_max_width(device_model, transistor_type, tech_lib.transistor_model_min_width(device_model, transistor_type));
  }
  tech_lib.set_transistor_model_variation_name(device_model, transistor_type, 
                                               get_attribute(xml_device_transistor, "variation", loc_data).as_string());
}
static void read_xml_device_transistor ( pugi :: xml_node & xml_device_transistor , const pugiutil :: loc_data & loc_data , TechnologyLibrary & tech_lib , TechnologyModelId & device_model , const e_tech_lib_transistor_type & transistor_type ) { tech_lib . set_transistor_model_name ( device_model , transistor_type , get_attribute ( xml_device_transistor , " " , loc_data ) . as_string ( ) ) ; tech_lib . set_transistor_model_chan_length ( device_model , transistor_type , get_attribute ( xml_device_transistor , " " , loc_data ) . as_float ( 0. ) ) ; tech_lib . set_transistor_model_min_width ( device_model , transistor_type , get_attribute ( xml_device_transistor , " " , loc_data ) . as_float ( 0. ) ) ; tech_lib . set_transistor_model_max_width ( device_model , transistor_type , get_attribute ( xml_device_transistor , " " , loc_data , pugiutil :: ReqOpt :: OPTIONAL ) . as_float ( 0. ) ) ; if ( 0. == tech_lib . transistor_model_max_width ( device_model , transistor_type ) ) { tech_lib . set_transistor_model_max_width ( device_model , transistor_type , tech_lib . transistor_model_min_width ( device_model , transistor_type ) ) ; } tech_lib . set_transistor_model_variation_name ( device_model , transistor_type , get_attribute ( xml_device_transistor , " " , loc_data ) . as_string ( ) ) ; }
Parse XML codes of transistor models under a device model
 to an object of technology library
Parse XML codes of transistor models under a device model to an object of technology library
/* Parse the transistor model name */ /* Parse the transistor channel length */ /* Parse the transistor minimum width */ /* Parse the transistor maximum width, by default we consider the same as minimum width */ /* If the max_width is default value, we set it to be the same as min_width */ /* Parse the transistor variation name */