Add a function to set input data at a given port