mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
integration/builder: Add get_bios_filename/get_bitstream_filename methods to simplify targets/projects.
This commit is contained in:
parent
e6a81ec2af
commit
148324862a
1 changed files with 12 additions and 0 deletions
|
@ -359,6 +359,18 @@ class Builder:
|
|||
|
||||
return vns
|
||||
|
||||
def get_bios_filename(self):
|
||||
return os.path.join(self.software_dir, "bios", "bios.bin")
|
||||
|
||||
def get_bitstream_filename(self, mode="sram", ext=None):
|
||||
assert mode in ["sram", "flash"]
|
||||
if ext is None:
|
||||
ext = {
|
||||
"sram" : self.soc.platform.bitstream_ext,
|
||||
"flash" : ".bin" # FIXME.
|
||||
}[mode]
|
||||
return os.path.join(self.gateware_dir, self.soc.build_name + ext)
|
||||
|
||||
# Builder Arguments --------------------------------------------------------------------------------
|
||||
|
||||
def builder_args(parser):
|
||||
|
|
Loading…
Reference in a new issue