Fix generating csr.csv file
authorPeter Gielda <pgielda@antmicro.com>
Sun, 12 Aug 2018 11:37:39 +0000 (13:37 +0200)
committerGitHub <noreply@github.com>
Sun, 12 Aug 2018 11:37:39 +0000 (13:37 +0200)
Fix generating csr.csv file when no absolute path is given.

litex/soc/integration/builder.py

index 7be7d4e5b941497c21a76acfd06b302407e5678c..270278fa7ba1f1aa4cd9065c46d97d1a30cf18c6 100644 (file)
@@ -106,7 +106,7 @@ class Builder:
         csr_regions = self.soc.get_csr_regions()
         constants = self.soc.get_constants()
 
-        csr_dir = os.path.dirname(self.csr_csv)
+        csr_dir = os.path.dirname(os.path.realpath(self.csr_csv))
         os.makedirs(csr_dir, exist_ok=True)
         write_to_file(
             self.csr_csv,