I'm working on changing the structure of the Issue Unit. Until now the Issue Unit used sequential allocation (a Cyclic Queue), and I'm changing it to a queue where entries can be allocated and freed anywhere.
While thinking through the changes to the Issue Unit, I keep turning things over in my mind, especially how Issue Select should work.
As for instruction issue priority, I'd like to select the oldest instruction among those whose dependencies have been resolved. This is probably the ideal.
For priority, the Cyclic Queue I had implemented so far used pointer-based priority selection. In other words, because it is a Cyclic Queue, the oldest instruction is tracked by a pointer, and priority is assigned in order from the oldest instruction using that pointer as the reference, and instructions are selected accordingly.
In the figure below, Entry[6] through Entry[1] are the valid entries, with Entry[6] having the highest issue priority and Entry[1] the lowest.
The priority ordering is extremely simple.

Next, with random placement using a Freelist, the instructions are not sorted by age, so issuing in age order becomes difficult. I considered introducing an Age Matrix to track age completely, but that would amount to In-Order issue and hurt performance.

I feel it would be good to remember the ordering relationships among entries, even if only roughly, but is there a clever way to do it?
Entry allocation currently uses a Freelist, and the order of the list cannot be rearranged, so there is nothing clever I can do at allocation time. What is required is to select appropriately from among randomly allocated entries.
I've also been digging through some papers. While going through documents, I found a few references.
- Un-Ordered Issue Queue: I think this is close to random allocation. It is simple, but in many cases it cannot select the right instruction.
- Age-Ordered Issue Queue: It is organized like a FIFO, with entries lined up by age. An entry in the middle can be issued, and the vacated slot is filled by shifting the later instructions forward. Performance is easy to achieve, but the complexity is high.
This is an English translation of the original Japanese post: 自作CPUの新しい動的スケジューラのためのSelectアルゴリズムを考える