Add entrypoint to export mapping
Currently, a mapping file is a pickled file containing palmed structures, eg. ins.Instruction_Pipedream
. This is perfect for internal use (we actually want to be able to easily refer to the Instruction_Pipedream
from the pickled version), but won't do for an export, eg. for the web interface, if we want to avoid loading all the code of Palmed there.
This MR adds an entrypoint palmed-export-mapping
that converts a mapping to another pickled mapping file, entirely independent of palmed, encoding the same data. This file also contains the IPC and latency of each instruction, since we won't be able to load_pipedream
from the external tool.
This tool can be trivially extended to output a yaml file encoding the same data in the future, if we ever want a human-readable, self-contained, or simply Python-independant output.