High level modeling and generation of FPGA firmware