# Pastebin Ni5Nr1QQ reg done; ... done = 1'b0; for (i = 0; i < NDAQ; i = i + 1) begin if (daq_req[i] && !done) begin daq <= i; daq_grant[i] <= 1; ... state <= DA_GRANTED; done = 1'b1; end end