def generate_project(self): """ copy template drivers files """ project = self.project op_sys = self.name if op_sys is None: raise PodError("Operating system must be selected", 0) for component in project.instances: if component.num == "0": driver_template = component.get_driver_template(op_sys) if driver_template is not None: if sy.dir_exist(self.project.projectpath + DRIVERSPATH + "/" + component.name): DISPLAY.msg("Driver directory for " + component.name + " allready exist. suppressing it") sy.rm_dir(self.project.projectpath + DRIVERSPATH + "/" + component.name) DISPLAY.msg("Create directory for " + component.name + " driver") # create component directory sy.mkdir(self.project.projectpath + DRIVERSPATH + "/" + component.name) else: DISPLAY.msg("No driver for " + component.name)
def generate_project(self): """ copy all hdl file in synthesis project directory """ for component in self.parent.instances: if component.num == "0": # Make directory compdir = self.parent.projectpath +\ SYNTHESISPATH + "/" +\ component.name if sy.dir_exist(compdir): DISPLAY.msg("Directory " + compdir + " exist, will be deleted") sy.rm_dir(compdir) sy.mkdir(compdir) DISPLAY.msg("Make directory for " + component.name) # copy hdl files for hdlfile in component.hdl_files: try: sy.cp_file( self.parent.projectpath + COMPONENTSPATH + "/" + component.instancename + "/hdl/" + hdlfile.filename, compdir + "/") except IOError as error: print(DISPLAY) raise PodError(str(error), 0)
def generate_project(self): """ copy all hdl file in synthesis project directory """ for component in self.parent.instances: if component.num == "0": # Make directory compdir = self.parent.projectpath +\ SYNTHESISPATH + "/" +\ component.name if sy.dir_exist(compdir): DISPLAY.msg("Directory " + compdir + " exist, will be deleted") sy.rm_dir(compdir) sy.mkdir(compdir) DISPLAY.msg("Make directory for " + component.name) # copy hdl files for hdlfile in component.hdl_files: try: sy.cp_file(self.parent.projectpath + COMPONENTSPATH + "/" + component.instancename + "/hdl/" + hdlfile.filename, compdir + "/") except IOError as error: print(DISPLAY) raise PodError(str(error), 0)
def del_instance(self): """ suppress component instance """ if not self.is_platform(): sy.rm_dir(self.parent.projectpath + COMPONENTSPATH + "/" + self.instancename)