soc/integration/builder: update copyright, align arguments

This commit is contained in:
Florent Kermarrec 2020-02-12 16:43:11 +01:00
parent 98ae91ada5
commit 1d6ce66bf7
1 changed files with 16 additions and 13 deletions

View File

@ -5,6 +5,7 @@
# This file is Copyright (c) 2018 Sergiusz Bazanski <q3k@q3k.org> # This file is Copyright (c) 2018 Sergiusz Bazanski <q3k@q3k.org>
# This file is Copyright (c) 2016-2017 Tim 'mithro' Ansell <mithro@mithis.com> # This file is Copyright (c) 2016-2017 Tim 'mithro' Ansell <mithro@mithis.com>
# This file is Copyright (c) 2018 William D. Jones <thor0505@comcast.net> # This file is Copyright (c) 2018 William D. Jones <thor0505@comcast.net>
# This file is Copyright (c) 2020 Xiretza <xiretza@xiretza.xyz>
# License: BSD # License: BSD
@ -37,23 +38,25 @@ def _makefile_escape(s):
class Builder: class Builder:
def __init__(self, soc, def __init__(self, soc,
output_dir=None, output_dir = None,
gateware_dir=None, gateware_dir = None,
software_dir=None, software_dir = None,
include_dir=None, include_dir = None,
generated_dir=None, generated_dir = None,
compile_software=True, compile_gateware=True, compile_software = True,
gateware_toolchain_path=None, compile_gateware = True,
csr_json=None, csr_csv=None): gateware_toolchain_path = None,
csr_json = None,
csr_csv = None):
self.soc = soc self.soc = soc
# From Python doc: makedirs() will become confused if the path # From Python doc: makedirs() will become confused if the path
# elements to create include '..' # elements to create include '..'
self.output_dir = os.path.abspath(output_dir or "soc_{}_{}".format(soc.__class__.__name__.lower(), soc.platform.name)) self.output_dir = os.path.abspath(output_dir or "soc_{}_{}".format(soc.__class__.__name__.lower(), soc.platform.name))
self.gateware_dir = os.path.abspath(gateware_dir or os.path.join(self.output_dir, "gateware")) self.gateware_dir = os.path.abspath(gateware_dir or os.path.join(self.output_dir, "gateware"))
self.software_dir = os.path.abspath(software_dir or os.path.join(self.output_dir, "software")) self.software_dir = os.path.abspath(software_dir or os.path.join(self.output_dir, "software"))
self.include_dir = os.path.abspath(include_dir or os.path.join(self.software_dir, "include")) self.include_dir = os.path.abspath(include_dir or os.path.join(self.software_dir, "include"))
self.generated_dir = os.path.abspath(generated_dir or os.path.join(self.include_dir, "generated")) self.generated_dir = os.path.abspath(generated_dir or os.path.join(self.include_dir, "generated"))
self.compile_software = compile_software self.compile_software = compile_software
self.compile_gateware = compile_gateware self.compile_gateware = compile_gateware