build/openfpgaloader/flash: Add verify capability.

This commit is contained in:
Florent Kermarrec 2023-10-13 09:26:52 +02:00
parent 16fcfb9d7e
commit fac003bbf9
1 changed files with 3 additions and 1 deletions

View File

@ -29,11 +29,13 @@ class OpenFPGALoader(GenericProgrammer):
cmd = self.cmd + ["--bitstream", bitstream_file] cmd = self.cmd + ["--bitstream", bitstream_file]
self.call(cmd) self.call(cmd)
def flash(self, address, data_file, external=False): def flash(self, address, data_file, external=False, verify=False):
cmd = self.cmd + ["--write-flash", "--bitstream", data_file] cmd = self.cmd + ["--write-flash", "--bitstream", data_file]
if external: if external:
cmd += ["--external-flash"] cmd += ["--external-flash"]
if address: if address:
cmd += ["--offset"] cmd += ["--offset"]
cmd += [str(address)] cmd += [str(address)]
if verify:
cmd += ["--verify"]
self.call(cmd) self.call(cmd)