def _generate_csr_map(self): if self.csr_json is not None: csr_dir = os.path.dirname(os.path.realpath(self.csr_json)) os.makedirs(csr_dir, exist_ok=True) write_to_file(self.csr_json, export.get_csr_json(self.soc.csr_regions, self.soc.constants, self.soc.mem_regions)) if self.csr_csv is not None: csr_dir = os.path.dirname(os.path.realpath(self.csr_csv)) os.makedirs(csr_dir, exist_ok=True) write_to_file(self.csr_csv, export.get_csr_csv(self.soc.csr_regions, self.soc.constants, self.soc.mem_regions)) if self.csr_svd is not None: svd_dir = os.path.dirname(os.path.realpath(self.csr_svd)) os.makedirs(svd_dir, exist_ok=True) write_to_file(self.csr_svd, export.get_csr_svd(self.soc))
def _generate_csr_map(self): # JSON Export. if self.csr_json is not None: csr_json_contents = export.get_csr_json( csr_regions=self.soc.csr_regions, constants=self.soc.constants, mem_regions=self.soc.mem_regions) write_to_file(os.path.realpath(self.csr_json), csr_json_contents) # CSV Export. if self.csr_csv is not None: csr_csv_contents = export.get_csr_csv( csr_regions=self.soc.csr_regions, constants=self.soc.constants, mem_regions=self.soc.mem_regions) write_to_file(os.path.realpath(self.csr_csv), csr_csv_contents) # SVD Export. if self.csr_svd is not None: csr_svd_contents = export.get_csr_svd(self.soc) write_to_file(os.path.realpath(self.csr_svd), csr_svd_contents)