Skip to content

Commit

Permalink
make: update pcie header generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Binkowski committed Jan 23, 2020
1 parent b5f73ac commit f026f84
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,13 @@ def main():
vns = platform.build(soc, build_dir=os.path.join(builddir, "gateware"))

if hasattr(soc, 'pcie_phy'):
from targets.common import cpu_interface
csr_header = cpu_interface.get_csr_header(soc.get_csr_regions(), soc.get_constants())
from litex.soc.integration.export import get_csr_header, get_soc_header
csr_header = get_csr_header(soc.csr_regions, soc.constants, with_access_functions=False)
soc_header = get_soc_header(soc.constants, with_access_functions=False)
kerneldir = os.path.join(builddir, "software", "pcie", "kernel")
os.makedirs(kerneldir, exist_ok=True)
write_to_file(os.path.join(kerneldir, "csr.h"), csr_header)
write_to_file(os.path.join(kerneldir, "soc.h"), soc_header)

if hasattr(soc, 'do_exit'):
soc.do_exit(vns, filename="{}/analyzer.csv".format(testdir))
Expand Down

0 comments on commit f026f84

Please sign in to comment.