Reorganize the hcl.Platform class hierarchy. Each platform object is associated with a set of target devices (class Device) and hardware synthesis tools (class Tool).
Improves modularity. Each platform class should have its own (customizable) methods for hardware synthesis and deployment. Need to remove all the hardcoding logic.
(TBD) introduce new APIs for HCL compiled function (i.e., the function returned by hcl.build) for application deployment and performance measurement.
Here is the proposed interface. To be strict, f.compile and f.generate_code functions are invoked before program execution. So they should not be part of the runtime system. But for simplicity, I just put them together here in the example.
# Generate source code in a local workdir
f.generate_code(args)
# Compile FPGA binary
key_path = "/home/sx233/aws-sx233-test.pem"
f.compile(args, remote=True, aws_key_path=key_path)
# Execute bitstream on AWS F1
f.execute(args, remote=True, aws_key_path=key_path)
This PR mainly improves the following aspects:
hcl.Platform
class hierarchy. Each platform object is associated with a set of target devices (class Device
) and hardware synthesis tools (class Tool
).hcl.build
) for application deployment and performance measurement.Here is the proposed interface. To be strict,
f.compile
andf.generate_code
functions are invoked before program execution. So they should not be part of the runtime system. But for simplicity, I just put them together here in the example.This PR has a lower priority than PR #332.