# dependencies
if actions["all"]:
- actions["clean"] = True
actions["build-csr-csv"] = True
actions["build-bitstream"] = True
actions["load-bitstream"] = True
- if actions["build-core"]:
- actions["clean"] = True
-
if actions["build-bitstream"]:
- actions["clean"] = True
actions["build-csr-csv"] = True
actions["build-bitstream"] = True
actions["load-bitstream"] = True
tools.write_to_file("build/litesata.v", src)
if actions["build-bitstream"]:
- platform.build(soc, build_name=build_name)
+ vns = platform.build(soc, build_name=build_name, run=False)
+ if hasattr(soc, "do_exit") and vns is not None:
+ if hasattr(soc.do_exit, '__call__'):
+ soc.do_exit(vns)
if actions["load-bitstream"]:
prog = platform.create_programmer()
-import os, atexit
+import os
from litesata.common import *
from migen.bank import csrgen
self.submodules.la = LiteScopeLA(debug, 2048)
self.la.trigger.add_port(LiteScopeTerm(self.la.dw))
- atexit.register(self.exit, platform)
def do_finalize(self):
BISTSoC.do_finalize(self)
self.sata_core_command_tx_fsm_state.eq(self.sata.core.command.tx.fsm.state)
]
- def exit(self, platform):
- if platform.vns is not None:
- self.la.export(platform.vns, "../test/la.csv")
+ def do_exit(self, vns):
+ self.la.export(vns, "test/la.csv")
default_subtarget = BISTSoC