initial commit from lattice FPGA_firmware