simulation and netfpga code