def run_from_src_files(self): kwargs = self.create_dev_for_kwargs() if not self.project_name: self.project_name = "PrjName" if not self.impl_name: self.impl_name = "Impl" _project_name = "%s_%s" % (self.project_name, self.impl_name) sts, lpf_file = self.check_exists(self.lpf_file, "lpf file") if sts: #return 1 pass # Peter need run LSE only. DO NOT NEED LPF FILE kd = self.create_default_kwargs(_project_name) xTools.dict_none_to_new(kwargs, kd) kwargs["lpf_file"] = lpf_file if self.run_synthesis_flow(kwargs): return 1 if self.run_translate_flow(kwargs): return 1 run_type_name_list = [(self.run_map, "map"), (self.run_map_trce, "map_trce"), (self.run_par, "par"), (self.run_trce, "par_trce")] sts = self.run_it(run_type_name_list, kwargs) return sts
def run_cmd_line_parser(self): self.parser = optparse.OptionParser() self.add_public_options() if self.run_vendor == "lattice": self.add_lattice_options() opts, args = self.parser.parse_args() _cmd_opts = eval(str(opts)) xTools.dict_none_to_new(self.scripts_options, _cmd_opts) self.debug = self.scripts_options.get("debug") xTools.say_it(self.scripts_options, "Command Options", self.debug)
def run_from_ngd_file(self): sts, ngd_file = self.check_exists(self.ngd_file, "ngd file") if not sts: sts, lpf_file = self.check_exists(self.lpf_file, "lpf file") else: lpf_file = "" if sts: return 1 kwargs = self.create_dev_for_kwargs() _project_name = self.update_project_name(ngd_file) kd = self.create_default_kwargs(_project_name) xTools.dict_none_to_new(kwargs, kd) kwargs["ngd_file"] = ngd_file kwargs["lpf_file"] = lpf_file run_type_name_list = ((self.run_map, "map"), (self.run_map_trce, "map_trce"), (self.run_par, "par"), (self.run_trce, "par_trce")) sts = self.run_it(run_type_name_list, kwargs) return sts
def run_from_edf_file(self): sts, edf_file = self.check_exists(self.edf_file, "edf file") if not sts: sts, lpf_file = self.check_exists(self.lpf_file, "lpf file") else: lpf_file = "" if sts: return 1 kwargs = self.create_dev_for_kwargs() _project_name = self.update_project_name(edf_file) kd = self.create_default_kwargs(_project_name) xTools.dict_none_to_new(kwargs, kd) kwargs["edf_file"] = edf_file kwargs["lpf_file"] = lpf_file run_type_name_list = [(self.run_map, "map"), (self.run_map_trce, "map_trce"), (self.run_par, "par"), (self.run_trce, "par_trce")] if self.run_translate: run_type_name_list.insert(0, (1, "ngdbuild")) run_type_name_list.insert(0, (1, "edif2ngd")) sts = self.run_it(run_type_name_list, kwargs) return sts
def _merge_options(self, new_options): for section, options in new_options.items(): if section not in ("qa", "environment", "command", "cmd_flow", "sim"): pass # xTools.say_it("-Warning. Found unknown section name: %s" % section) if section == self.section_qa: xTools.dict_none_to_new(self.scripts_options, options) elif section == self.section_command: old_cmd = self.scripts_options.get(self.section_command, dict()) new_cmd = copy.copy(options) xTools.dict_none_to_new(new_cmd, old_cmd) self.scripts_options[self.section_command] = new_cmd else: old_cmd = self.scripts_options.get(section, dict()) xTools.dict_none_to_new(old_cmd, options) self.scripts_options[section] = old_cmd
def merge_run_options(self): xTools.dict_none_to_new(self.run_options, self.cmd_options) xTools.dict_none_to_new(self.run_options, self.conf_options.get("qa", dict())) if self.debug: xTools.say_it(self.run_options, "Final Options:")