Exemple #1
0
    def _generate_simulation_makefile(self, tool_object):

        tool_info = tool_object.get_keys()
        if sys.platform == 'cygwin':
            bin_name = tool_info['windows_bin']
        else:
            bin_name = tool_info['linux_bin']

        path_key = tool_info['id'] + '_path'
        version_key = tool_info['id'] + '_version'
        name = tool_info['name']
        
        if self.env[path_key] is None and self.options.force is not True:
            logging.error("Can't generate a " + name + " makefile. " + bin_name + " not found.")
            sys.exit("Exiting")
            
        logging.info("Generating " + name + " makefile for simulation.")

        pool = self.modules_pool
        top_module = pool.get_top_module()
        
        fset = pool.build_file_set()
        dep_files = fset.filter(DepFile)
        dep_solver.solve(dep_files)
        
        tool_object.generate_simulation_makefile(dep_files, top_module)
Exemple #2
0
    def _generate_iverilog_makefile(self):
        logging.info("Generating IVerilog makefile for simulation.")
        if self.env["iverilog_path"] is None:
            logging.error("Can't generate an IVerilog makefile. IVerilog not found.")
            sys.exit("Exiting")

        pool = self.modules_pool

        tm = pool.get_top_module()
        fset = pool.build_file_set()
        dep_solver.solve(fset)

        global_mod.makefile_writer.generate_iverilog_makefile(fset, tm, pool)
Exemple #3
0
    def _generate_isim_makefile(self):
        if self.env["isim_path"] is None and self.env["xilinx"] is None:
            logging.error("Can't generate an ISim makefile. ISim not found.")
            sys.exit("Exiting")

        logging.info("Generating ISE Simulation (ISim) makefile for simulation.")

        pool = self.modules_pool
        top_module = pool.get_top_module()

        fset = pool.build_file_set()
        dep_files = fset.filter(DepFile)
        dep_solver.solve(dep_files)
        global_mod.makefile_writer.generate_isim_makefile(dep_files, top_module)
Exemple #4
0
    def _generate_vsim_makefile(self):
        if self.env["modelsim_path"] is None and self.options.force is not True:
            logging.error("Can't generate a Modelsim makefile. Modelsim not found.")
            sys.exit("Exiting")

        logging.info("Generating ModelSim makefile for simulation.")

        pool = self.modules_pool
        top_module = pool.get_top_module()
        fset = pool.build_file_set()

        dep_files = fset.filter(DepFile)
        dep_solver.solve(dep_files)
        global_mod.makefile_writer.generate_vsim_makefile(dep_files, top_module)
Exemple #5
0
 def solve_dependencies(self):
     """Set dependencies for all project files"""
     if not self._deps_solved:
         dep_solver.solve(self.build_file_set())
         self._deps_solved = True