diff --git a/src/finn/transformation/fpgadataflow/make_deployment.py b/src/finn/transformation/fpgadataflow/make_deployment.py new file mode 100644 index 0000000000000000000000000000000000000000..b5bd205302c4ad9c80e47175f32d7e4cf04061f1 --- /dev/null +++ b/src/finn/transformation/fpgadataflow/make_deployment.py @@ -0,0 +1,24 @@ +from finn.transformation import Transformation + + +class DeployToPYNQ(Transformation): + """Collects all necessary files for deployment and copies them to the PYNQ board. + Expects information about PYNQ board to make scp possible: + * ip address of board + * username and password for board + * target directory where the files are stored on the board""" + + def __init__(self, ip, username, password, target_dir): + super().__init__() + self.ip = ip + self.username = username + self.password = password + self.target_dir = target_dir + + def apply(self, model): + model.set_metadata_prop("pynq_ip", self.ip) + model.set_metadata_prop("pynq_username", self.username) + model.set_metadata_prop("pynq_password", self.password) + model.set_metadata_prop("pynq_target_dir", self.target_dir) + + return (model, False)