US 11,989,561 B2
Method and apparatus for scheduling out-of-order execution queue in out-of-order processor
Dandan Huan, Beijing (CN)
Assigned to BEIJING VCORE TECHNOLOGY CO., LTD., Beijing (CN)
Appl. No. 17/611,670
Filed by BEIJING VCORE TECHNOLOGY CO.,LTD., Beijing (CN)
PCT Filed May 21, 2021, PCT No. PCT/CN2021/095137
§ 371(c)(1), (2) Date Nov. 16, 2021,
PCT Pub. No. WO2022/028048, PCT Pub. Date Feb. 10, 2022.
Claims priority of application No. 202010784534.3 (CN), filed on Aug. 6, 2020.
Prior Publication US 2022/0308883 A1, Sep. 29, 2022
Int. Cl. G06F 9/38 (2018.01)
CPC G06F 9/3856 (2023.08) [G06F 9/3836 (2013.01)] 16 Claims
OG exemplary drawing
 
1. A method for scheduling an out-of-order execution queue in an out-of-order processor, comprising:
constructing a sequence maintenance queue with a same number of items as the out-of-order execution queue, and allocating an empty item for instructions and data entering the out-of-order execution queue, wherein the sequence maintenance queue comprises at least one identity (id) field;
numbering each item of the out-of-order execution queue sequentially, and recording an id number of each item of the out-of-order execution queue in the id field of the sequence maintenance queue;
enabling the instructions to enter an item of the out-of-order execution queue corresponding to an id number pointed by a tail of the sequence maintenance queue; and
selecting instructions in ready items for execution from the out-of-order execution queue according to id number information indicated by the sequence maintenance queue;
wherein each item in the out-of-order execution queue comprises a valid field and a ready (rdy) field, in which the valid field is configured to record whether a corresponding item of the out-of-order execution queue is valid, the rdy field is configured to record whether the instructions and data in the corresponding item of the out-of-order execution queue are ready, and the sequence maintenance queue comprises a tail item, in which the tail item is an item pointed by the tail of the sequence maintenance queue;
wherein in response to there being only execution of instructions selected from the out-of-order execution queue of the processor and no instruction entering into the out-of-order execution queue, the method further comprises:
in an order from the top to the tail item in the sequence maintenance queue, searching a first item whose valid field is 1 and rdy field is 1 from the items in the out-of-order execution queue and executing an instruction for the first item,
setting the first item to be an empty item,
moving the id number in the tail item and the id number in items between the tail item and the empty item up by one item, and
saving an id number corresponding to the empty item in the id field of the tail item, where the tail in a next cycle equals the tail in a current cycle minus one, the valid field being 1 indicates that the corresponding item is valid, and the rdy field being 1 indicates that the instructions and data of the corresponding item are ready.