Output Function
function out input st s; input Integer queue[nports]; input Integer nports; output Integer port[nports]; end out;