A Model-Based Approach for the Synthesis of Software to Firmware Adapters for use with Automatically Generated Components