get_pid function (reconfigurable)