Пример #1
0
    def execute(self):

        test_passed = True

        try:
            self.build_cmd()

            self.copy_waves_fsdb_do_file()
            self.output_rerun_script()

            # report the command line
            Msg.info("RTLCommand = " + str({"rtl-command": self.rtl_cmd}))

            # execute the simulation
            my_result = SysUtils.exec_process(
                self.rtl_cmd,
                self.rtl_log,
                self.rtl_log,
                self.ctrl_item.timeout,
                True,
            )

            Msg.user("Results: %s" % (str(my_result)), "RTLEX-RESULT")
            my_extract_results = self.extract_results(my_result,
                                                      "./" + self.rtl_log,
                                                      None)

            # report the results
            Msg.info("RTLResult = " + str(my_extract_results))

        except Exception as arg_ex:
            Msg.error_trace("RTL Process Failure")
            Msg.err("RTL did not properly execute, Reason: %s" % (str(arg_ex)))
            return False

        return test_passed
Пример #2
0
    def execute(self):
        my_result = None
        try:
            if self.ctrl_item.suffix is not None:
                my_task_name = self.task_name.replace(
                    "_force", "_%s_force" % (str(self.ctrl_item.suffix)))
            else:
                my_task_name = self.task_name

            my_elf = self.locate_test_case("*.Default.ELF", my_task_name)

            my_log = self.sim_log
            my_elog = self.sim_log

            if "cfg" not in self.ctrl_item.fpix_riscv.keys():
                Msg.err("Fpix_ISS did not properly execute, "
                        "Reason: Fpix config was not specified")
                return False

            if "fpix_path" not in self.ctrl_item.fpix_riscv.keys():
                Msg.err(
                    "FpixExecutor::execute: did not recieve a path to Fpix "
                    "application fpix_path.")
                raise
            else:
                self.mFpixPath = self.ctrl_item.fpix_riscv["fpix_path"]

            # build the sim_cmd now that we have full information available
            self.sim_cmd = ("%s --railhouse %s --cluster_num %d "
                            "--core_num %d --threads_per_cpu %d -i %d "
                            "--cfg %s" % (
                                self.mFpixPath,
                                self.MY_RAILHOUSE_LOG,
                                self.ctrl_item.num_chips,
                                self.ctrl_item.num_cores,
                                self.ctrl_item.num_threads,
                                self.ctrl_item.max_instr,
                                self.ctrl_item.fpix_riscv["cfg"],
                            ))

            self.sim_cmd += " %s"

            # initalize the iss summary
            my_cmd = self.sim_cmd % my_elf

            # report the command line
            Msg.info("ISSCommand = " + str({"command": my_cmd}))
            # execute the simulation
            my_result = SysUtils.exec_process(my_cmd, my_log, my_elog,
                                              self.ctrl_item.timeout, True)

            my_extract_results = self.extract_results(my_result, my_log,
                                                      my_elog)

            # report the results
            Msg.info("ISSResult = " + str(my_extract_results))

            # Fpix riscv is not made to provide the sort of information that
            # the message system expects. Almost anything here will cause the
            # next app not to run.

        except Exception as arg_ex:
            Msg.error_trace("Fpix_ISS Execute Failure")
            Msg.err("Fpix_ISS did not properly execute, Reason: %s" %
                    (str(arg_ex)))
            return False

        return SysUtils.success(int(my_result[IssResult.process_retcode]))