libopenfpga/libarchopenfpga/src/read_xml_simulation_setting.cpp
/********************************************************************
 * Parse XML codes of a <measurement_setting> to an object of simulation setting
 *******************************************************************/
Parse XML codes of a  to an object of simulation setting
Parse XML codes of a to an object of simulation setting
static 
void read_xml_measurement_setting(pugi::xml_node& xml_measurement,
                                  const pugiutil::loc_data& loc_data,
                                  openfpga::SimulationSetting& sim_setting) {
  pugi::xml_node xml_slew = get_single_child(xml_measurement, "slew", loc_data);
  pugi::xml_node xml_slew_rise = get_single_child(xml_slew, "rise", loc_data);
  sim_setting.set_measure_slew_upper_threshold(SIM_SIGNAL_RISE, get_attribute(xml_slew_rise, "upper_thres_pct", loc_data).as_float(0.));
  sim_setting.set_measure_slew_lower_threshold(SIM_SIGNAL_RISE, get_attribute(xml_slew_rise, "lower_thres_pct", loc_data).as_float(0.));
  pugi::xml_node xml_slew_fall = get_single_child(xml_slew, "fall", loc_data);
  sim_setting.set_measure_slew_upper_threshold(SIM_SIGNAL_FALL, get_attribute(xml_slew_fall, "upper_thres_pct", loc_data).as_float(0.));
  sim_setting.set_measure_slew_lower_threshold(SIM_SIGNAL_FALL, get_attribute(xml_slew_fall, "lower_thres_pct", loc_data).as_float(0.));
  pugi::xml_node xml_delay = get_single_child(xml_measurement, "delay", loc_data);
  pugi::xml_node xml_delay_rise = get_single_child(xml_delay, "rise", loc_data);
  sim_setting.set_measure_delay_input_threshold(SIM_SIGNAL_RISE, get_attribute(xml_delay_rise, "input_thres_pct", loc_data).as_float(0.));
  sim_setting.set_measure_delay_output_threshold(SIM_SIGNAL_RISE, get_attribute(xml_delay_rise, "output_thres_pct", loc_data).as_float(0.));
  pugi::xml_node xml_delay_fall = get_single_child(xml_delay, "fall", loc_data);
  sim_setting.set_measure_delay_input_threshold(SIM_SIGNAL_FALL, get_attribute(xml_delay_fall, "input_thres_pct", loc_data).as_float(0.));
  sim_setting.set_measure_delay_output_threshold(SIM_SIGNAL_FALL, get_attribute(xml_delay_fall, "output_thres_pct", loc_data).as_float(0.));
}
static void read_xml_measurement_setting ( pugi :: xml_node & xml_measurement , const pugiutil :: loc_data & loc_data , openfpga :: SimulationSetting & sim_setting ) { pugi :: xml_node xml_slew = get_single_child ( xml_measurement , " " , loc_data ) ; pugi :: xml_node xml_slew_rise = get_single_child ( xml_slew , " " , loc_data ) ; sim_setting . set_measure_slew_upper_threshold ( SIM_SIGNAL_RISE , get_attribute ( xml_slew_rise , " " , loc_data ) . as_float ( 0. ) ) ; sim_setting . set_measure_slew_lower_threshold ( SIM_SIGNAL_RISE , get_attribute ( xml_slew_rise , " " , loc_data ) . as_float ( 0. ) ) ; pugi :: xml_node xml_slew_fall = get_single_child ( xml_slew , " " , loc_data ) ; sim_setting . set_measure_slew_upper_threshold ( SIM_SIGNAL_FALL , get_attribute ( xml_slew_fall , " " , loc_data ) . as_float ( 0. ) ) ; sim_setting . set_measure_slew_lower_threshold ( SIM_SIGNAL_FALL , get_attribute ( xml_slew_fall , " " , loc_data ) . as_float ( 0. ) ) ; pugi :: xml_node xml_delay = get_single_child ( xml_measurement , " " , loc_data ) ; pugi :: xml_node xml_delay_rise = get_single_child ( xml_delay , " " , loc_data ) ; sim_setting . set_measure_delay_input_threshold ( SIM_SIGNAL_RISE , get_attribute ( xml_delay_rise , " " , loc_data ) . as_float ( 0. ) ) ; sim_setting . set_measure_delay_output_threshold ( SIM_SIGNAL_RISE , get_attribute ( xml_delay_rise , " " , loc_data ) . as_float ( 0. ) ) ; pugi :: xml_node xml_delay_fall = get_single_child ( xml_delay , " " , loc_data ) ; sim_setting . set_measure_delay_input_threshold ( SIM_SIGNAL_FALL , get_attribute ( xml_delay_fall , " " , loc_data ) . as_float ( 0. ) ) ; sim_setting . set_measure_delay_output_threshold ( SIM_SIGNAL_FALL , get_attribute ( xml_delay_fall , " " , loc_data ) . as_float ( 0. ) ) ; }
Parse XML codes of a <measurement_setting> to an object of simulation setting
Parse XML codes of a <measurement_setting > to an object of simulation setting