It is impossible to port the protocol code written for a network simulator/emulator directly into hardware. This is true of all networks simulators. There are many reasons for the same and to explain three of them:

a. Protocol codes in a network simulator run for ALL nodes in the network and not just in ONE node like it would in hardware. This has many implications including the fact that codes in a network simulator should continuously keep track of Node-ID, Interface-ID etc

b. All Network simulators are Discrete Event Simulators which means that time is NOT continuous. Time 'jumps' between events. This is not how the real world works where time is continuous. Since simulation/emulation codes are event-driven and not time-driven they cannot be run directly on hardware,

c. In the real world, the protocol code interfaces with the device OS. In a network simulator, there is no OS running in any of the devices. The protocol code interaction is with a 'virtual network stack' within the simulator which is very different from an OS.