IP Library › Granted Patent US 12,541,369
Granted Patent B2
US 12,541,369 · App. 18/135,481 · Granted Feb 3, 2026

Executing phantom loops in a microprocessor

Inventor: Thang Minh Tran (Tustin, CA)
Assignee: Simplex Micro, Inc.
G06F9/3826G06F9/30141G06F9/325G06F9/3836
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,541,369
App. No.
18/135,481
Granted
Feb 3, 2026
Kind
B2
Abstract

A processor includes a loop detection unit to detect a phantom-loop based on the resources reserved for execution of the phantom loop. The processor executes the phantom loop by reading source operand data on a first iteration of the loop and writing back data on the last iteration of the loop while allowing instructions after the loop to be concurrently executed.

Claims (69)

1 . A processor comprising:

a register file including a plurality of registers;

a phantom loop detection circuit that detects a phantom loop in a set of instructions, wherein the phantom loop is a loop in which source data is read from the register file only on a first iteration of the loop and result data is written to the register file only on a last iteration of the loop;

an instruction issue unit coupled to the phantom loop detection circuit for receiving instructions from the phantom loop detection circuit, and issuing those instructions;

an execution queue coupled to the instruction issue unit to receive a first instruction of the loop when the phantom loop is detected from the instruction issue unit, and dispatch the first instruction to a functional unit upon each iteration of the phantom loop until completion of the phantom loop; and

wherein the functional unit writes back result data to the register file only upon completion of the phantom loop.

2 . The processor of claim 1 further comprising:

a branch prediction unit that predicts the phantom loop and provides a target address for a branch instruction at an exit point of the phantom loop.

3 . The processor of claim 1 further comprising:

a clock circuit characterized by a clock cycle;

a time counter that stores a time count representing a current time of the processor and periodically increments the time count as a function of the clock cycle, the time counter comprising,

an N-bit counter wherein an Nth-bit count value represents a largest future time for the instruction issue unit to issue an instruction and wherein the N-bit counter returns to a zero count after reaching the Nth-bit value; and

wherein the processor executes every instruction according to a preset execution time which is correlated to the time count.

4 . The processor of claim 3 further comprising:

a register scoreboard storing a write time of data stored in a register in the register file, the write time being a future time based on the time count; and

wherein the register scoreboard includes storage for a loop bit, the loop bit indicating that the data stored in the register is part of the phantom loop.

5 . The processor of claim 4 further comprising a plurality of phantom loop resources reserved for executing instructions of the phantom loop, and wherein the reserved phantom loop resources include at least one of a plurality of read buses, a plurality of write buses, and a plurality of functional units.

6 . The processor of claim 5 further comprising an instruction

decode unit that determines an execution time for a selected instruction from one of a latest busy time of one of the phantom loop resources and write times of source operands of the selected instruction.

7 . The processor of claim 6 further comprising:

a time-resource matrix unit coupled to the register scoreboard and the time counter for storing information relating to availability of processor resources for each time count of the time counter, and wherein the processor resources include at least one of: the plurality of read buses, the plurality of write buses, and the plurality of functional units;

wherein the time-resource matrix unit adjusts the information based on resources used by an active phantom loop operation; and

wherein the instruction issue unit is coupled to the time resource matrix unit to receive data therefrom to issue a second instruction if all resources required by the second instruction are specified by the time-resource matrix unit as being available, and to stall the second instruction if any of the resources required by the second instruction is specified by the time-resource matrix unit as not being available.

8 . The processor of claim 7 wherein the instruction issue unit receives the second instruction after execution of the phantom loop and issues the second instruction.

9 . The processor of claim 7 further comprising:

a read control unit that controls a source of data that is provided on a first read bus of the plurality of read buses, the source of data comprising a source register of the register file or a forwarding functional unit, the read control unit containing an entry for each time count of the time counter wherein each entry of the read control unit specifies a respective register and includes a valid bit that indicates whether the respective register contains valid data, wherein the read control unit further stores a loop bit for each entry to indicate a beginning of the active phantom loop operation.

10 . The processor of claim 9 further comprising:

a write control unit that contains an entry for each time count of the time counter wherein each entry of the write control unit specifies a respective destination register, a valid bit that specifies whether data in the respective destination register is valid and a loop bit that specifies a start of the active phantom loop operation;

wherein the write control unit operates to reserve a first write bus for writing back data from a first selected functional unit to a first destination register in the register file; and

only on a last iteration of the phantom loop.

11 . The processor of claim 10 wherein the execution queue stores a first plurality of instructions, each instruction of the first plurality of instructions having associated therewith a read time, which is a future time based on the time count, and an associated loop count corresponding to a selected phantom loop; and

wherein each instruction of the first plurality of instructions is dispatched to a second selected functional unit every clock cycle and the associated loop count is decremented until the associated loop count is reset.

12 . The processor of claim 11 wherein the execution queue stores a plurality of read times and wherein each of the read times in the execution queue is stored in the read control unit.

13 . The processor of claim 12 wherein the execution queue dispatches instructions to at least one functional unit.

14 . A processor comprising:

a clock circuit;

a time counter storing a time count representing a current time of the processor, wherein

the time count is incremented with each cycle of the clock circuit;

a register file including a plurality of registers;

a loop detection circuit that detects a phantom loop in a set of instructions, wherein the phantom loop is a loop in which source data is read from the register file only in a first iteration of the phantom loop and result data is written to the register file only on a last iteration of the phantom loop;

an instruction issue unit coupled to the loop detection circuit for receiving instructions from the loop detection circuit, and issuing instructions within a detected phantom loop;

an execution queue coupled to the instruction issue unit to receive a first phantom loop instruction from the instruction issue unit, and dispatch the first phantom loop instruction to a functional unit for every iteration of the detected phantom loop until completion of the detected phantom loop, and then writing back result data of a last iteration of the detected phantom loop to the register file;

a register scoreboard storing a first write time and a loop bit to a selected register in the register file, wherein the first write time is a future time based on the time count and wherein the loop bit indicates the selected register is used in a phantom loop operation;

an instruction decode unit that determines an execution time for a selected instruction;

a time-resource matrix coupled to the register scoreboard and the time counter for storing information relating to available resources for each time count of the time counter and wherein the information relating to the available resources is adjusted to account for resources used by the phantom loop operation;

wherein the available resources include at least one of: a plurality of read buses, a plurality of write buses, and a plurality of functional units.

15 . A computer program product for implementing a microprocessor, the computer program product stored on a non-transitory computer readable storage medium and including instructions for causing a computer system to execute a method, that is executable by the microprocessor, for detecting a phantom loop based on available resources dedicated to execution of a phantom loop operation by the microprocessor, the method executable by the computer system comprising:

detecting among a group of instructions that constitute a loop, a phantom loop in which source data is read from a register file only on a first iteration of the phantom loop and result data is written to the register file only on a last iteration of the phantom loop;

reserving a plurality of resources for execution of the phantom loop, the plurality of resources including a plurality of read buses, a plurality of write buses, and a plurality of functional units;

providing instructions in the phantom loop to an execution queue in the microprocessor processor for execution by a selected functional unit of the plurality of functional units; and

forwarding result data from the selected functional unit to another functional unit without writing to any register until a last iteration of the phantom loop.

16 . The computer program product of claim 15 wherein the instructions in the phantom loop are executed at future times based on a time count from a periodically incremented time counter and the time counter provides a maximum time count corresponding to a latest future time to issue an instruction.

17 . The computer program product of claim 16 , wherein the method executable by the microprocessor further comprises: storing a write time and a first loop bit in a first register of the register file wherein the write time is a future time based on the time count and wherein the first loop bit indicates the first register is used in the phantom loop.

18 . The computer program product of claim 17 , wherein data corresponding to the plurality of resources is stored in a time-resource matrix; and

wherein the data corresponding to the plurality of resources is adjusted depending on resources used by an active phantom loop.

19 . The computer program product of claim 18 , wherein the method executable by the microprocessor further comprises:

storing data and a second loop bit in a second register of the register file associated with a read control unit, wherein the data in the second register are read from the register file and transported on a first read bus of the plurality of read buses, wherein the second loop bit reserves the first read bus for a selected phantom loop operation until completion of the selected phantom loop operation.

20 . The computer program product of claim 19 , wherein the method executable by the microprocessor further comprises: storing data and a third loop bit in a third register of the register file associated with a write control unit, wherein result data are transported from a first write bus of the plurality of write buses and written to a fourth register of the register file, and wherein the third loop bit reserves the first write bus for writing back result data of the selected phantom loop operation only on a last iteration of the selected phantom loop operation.

21 . The computer program product of claim 16 , wherein the method executable by the microprocessor further comprises:

storing a first set of instructions in the execution queue wherein each instruction of the first set of instructions in the execution queue includes a read time based on the time count and a respective loop count;

dispatching instructions repeatedly to a functional unit every clock cycle; and

decrementing the respective loop count until the respective loop count is reset.

22 . The computer program product of claim 21 , wherein the execution queue is configured to dispatch instructions to at least one functional unit.

23 . The computer program product of claim 21 , wherein the method executable by the microprocessor further comprises:

storing data and a second loop bit in a second register of the register file associated with a read control unit, wherein the data in the second register are read from the register file and transported on a first read bus of the plurality of read buses, wherein the second loop bit reserves the first read bus for a selected phantom loop operation until completion of the selected phantom loop operation; and

synchronizing read time of the execution queue with the read control unit.

24 . The computer program product of claim 15 , wherein the method executable by the microprocessor further comprises:

predicting the phantom loop with a branch prediction unit; and

storing data related to the phantom loop prediction in the branch prediction unit.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 6, 2023
From: TRAN, THANG MINH
To: SIMPLEX MICRO, INC.
Reel/Frame 064175/0043 →
Continuity (2)
Provisional Application 63368280 · Jul 13, 2022
Related Publication 20240020122A1 · Jan 18, 2024
References Cited (164)
US 5021985A · Hu et al. · 1991 [cited by applicant]
US 5185868A · Tran · 1993 [cited by applicant]
US 5187796A · Wang et al. · 1993 [cited by applicant]
US 5251306A · Tran · 1993 [cited by applicant]
US 5497467A · Wakui et al. · 1996 [cited by applicant]
US 5655096A · Branigin · 1997 [cited by applicant]
US 5689653A · Karp et al. · 1997 [cited by applicant]
US 5699536A · Hopkins et al. · 1997 [cited by applicant]
US 5799163A · Park et al. · 1998 [cited by applicant]
US 5802386A · Kahle et al. · 1998 [cited by applicant]
US 5809268A · Chan · 1998 [cited by applicant]
US 5835745A · Sager et al. · 1998 [cited by applicant]
US 5860018A · Panwar · 1999 [cited by applicant]
US 5870579A · Tan · 1999 [cited by applicant]
US 5881302A · Omata · 1999 [cited by applicant]
US 5903779A · Park · 1999 [cited by applicant]
US 5903919A · Myers · 1999 [cited by applicant]
US 5958041A · Petolino, Jr. et al. · 1999 [cited by applicant]
US 5961630A · Zaidi et al. · 1999 [cited by applicant]
US 5964867A · Anderson et al. · 1999 [cited by applicant]
US 5974538A · Wilmot · 1999 [cited by examiner]
US 5996061A · Lopez-Aguado et al. · 1999 [cited by applicant]
US 5996064A · Zaidi et al. · 1999 [cited by applicant]
US 6016540A · Zaidi et al. · 2000 [cited by applicant]
US 6035389A · Grochowski et al. · 2000 [cited by applicant]
US 6035393A · Glew et al. · 2000 [cited by applicant]
US 6065105A · Zaidi et al. · 2000 [cited by applicant]
US 6247113B1 · Jaggar · 2001 [cited by applicant]
US 6282634B1 · Hinds et al. · 2001 [cited by applicant]
US 6304955B1 · Arora · 2001 [cited by applicant]
US 6425090B1 · Arimilli et al. · 2002 [cited by applicant]
US 6453424B1 · Janniello · 2002 [cited by applicant]
US 6591359B1 · Hass et al. · 2003 [cited by applicant]
US 6671799B1 · Parthasarathy · 2003 [cited by applicant]
US 6959379B1 · Wojcieszak et al. · 2005 [cited by applicant]
US 7069425B1 · Takahashi · 2006 [cited by applicant]
US 7434032B1 · Coon et al. · 2008 [cited by applicant]
US 8166281B2 · Gschwind et al. · 2012 [cited by applicant]
US 9256428B2 · Heil et al. · 2016 [cited by applicant]
US 9348590B1 · Kashyap et al. · 2016 [cited by applicant]
US 9354884B2 · Comparan et al. · 2016 [cited by applicant]
US 10339095B2 · Moudgill et al. · 2019 [cited by applicant]
US 10346171B2 · Gabor et al. · 2019 [cited by applicant]
US 10437595B1 · Kanapathipillai et al. · 2019 [cited by applicant]
US 11062200B2 · Lie et al. · 2021 [cited by applicant]
US 11132199B1 · Tran · 2021 [cited by applicant]
US 11144319B1 · Battle et al. · 2021 [cited by applicant]
US 11163582B1 · Tran · 2021 [cited by applicant]
US 11204770B2 · Tran · 2021 [cited by applicant]
US 11263013B2 · Tran · 2022 [cited by applicant]
US 11467841B1 · Tran · 2022 [cited by applicant]
US 11829187B2 · Tran · 2023 [cited by applicant]
US 11829762B2 · Tran · 2023 [cited by applicant]
US 11829767B2 · Tran · 2023 [cited by applicant]
US 11954491B2 · Tran · 2024 [cited by applicant]
US 12061906B2 · Stephens et al. · 2024 [cited by applicant]
US 20010004755A1 · Levy et al. · 2001 [cited by applicant]
US 20030023646A1 · Lin et al. · 2003 [cited by applicant]
US 20030135712A1 · Theis · 2003 [cited by applicant]
US 20040073779A1 · Hokenek et al. · 2004 [cited by applicant]
US 20040168045A1 · Morris et al. · 2004 [cited by applicant]
US 20040236920A1 · Sheaffer · 2004 [cited by applicant]
US 20040243894A1 · Smith et al. · 2004 [cited by applicant]
US 20050038980A1 · Rodgers et al. · 2005 [cited by applicant]
US 20050251657A1 · Boucher · 2005 [cited by applicant]
US 20060010305A1 · Maeda et al. · 2006 [cited by applicant]
US 20060095732A1 · Tran et al. · 2006 [cited by applicant]
US 20060218124A1 · Williamson et al. · 2006 [cited by applicant]
US 20060259800A1 · Maejima · 2006 [cited by applicant]
US 20060288194A1 · Lewis et al. · 2006 [cited by applicant]
US 20070028078A1 · Harris et al. · 2007 [cited by applicant]
US 20070038984A1 · Gschwind et al. · 2007 [cited by applicant]
US 20070255903A1 · Tsadik et al. · 2007 [cited by applicant]
US 20070260856A1 · Tran et al. · 2007 [cited by applicant]
US 20080114966A1 · Begon et al. · 2008 [cited by applicant]
US 20080294882A1 · Jayapala et al. · 2008 [cited by applicant]
US 20090113192A1 · Hall et al. · 2009 [cited by applicant]
US 20090158279A1 · Iino et al. · 2009 [cited by applicant]
US 20090217020A1 · Yourst · 2009 [cited by applicant]
US 20100049958A1 · Vaskevich et al. · 2010 [cited by applicant]
US 20100064106A1 · Yamada et al. · 2010 [cited by applicant]
US 20110099354A1 · Takashima et al. · 2011 [cited by applicant]
US 20110153987A1 · Luke et al. · 2011 [cited by applicant]
US 20110320765A1 · Karkhanis et al. · 2011 [cited by applicant]
US 20120047352A1 · Yamana · 2012 [cited by applicant]
US 20120060015A1 · Eichenberger et al. · 2012 [cited by applicant]
US 20120124344A1 · Jarvis · 2012 [cited by applicant]
US 20120151156A1 · Citron et al. · 2012 [cited by applicant]
US 20130151816A1 · Indukuru et al. · 2013 [cited by applicant]
US 20130297912A1 · Tran et al. · 2013 [cited by applicant]
US 20130298129A1 · Rabinovitch et al. · 2013 [cited by applicant]
US 20130346985A1 · Nightingale · 2013 [cited by applicant]
US 20140059328A1 · Gonion · 2014 [cited by applicant]
US 20140082626A1 · Busaba et al. · 2014 [cited by applicant]
US 20150026435A1 · Muff et al. · 2015 [cited by applicant]
US 20150089141A1 · Chen et al. · 2015 [cited by applicant]
US 20150100754A1 · Reid et al. · 2015 [cited by applicant]
US 20150212972A1 · Boettcher et al. · 2015 [cited by applicant]
US 20150227369A1 · Gonion · 2015 [cited by applicant]
US 20150331760A1 · Dalessandro et al. · 2015 [cited by applicant]
US 20160092230A1 · Chen et al. · 2016 [cited by applicant]
US 20160092238A1 · Codrescu et al. · 2016 [cited by applicant]
US 20160275043A1 · Grochowski et al. · 2016 [cited by applicant]
US 20160283240A1 · Mishra et al. · 2016 [cited by applicant]
US 20160371091A1 · Brownscheidle et al. · 2016 [cited by applicant]
US 20170177345A1 · Ould-Ahmed-Vall et al. · 2017 [cited by applicant]
US 20170177354A1 · Ould-Ahmed-Vall · 2017 [cited by applicant]
US 20170185407A1 · Shwartsman · 2017 [cited by examiner]
US 20170357513A1 · Ayub et al. · 2017 [cited by applicant]
US 20170371657A1 · Mahurin et al. · 2017 [cited by applicant]
US 20180181400A1 · Scherbinin et al. · 2018 [cited by applicant]
US 20180196678A1 · Thompto · 2018 [cited by applicant]
US 20180253310A1 · Stephens · 2018 [cited by applicant]
US 20180321938A1 · Boswell · 2018 [cited by examiner]
US 20190079764A1 · Diamond et al. · 2019 [cited by applicant]
US 20190243646A1 · Anderson · 2019 [cited by applicant]
US 20190303161A1 · Nassi et al. · 2019 [cited by applicant]
US 20200004534A1 · Gurram et al. · 2020 [cited by applicant]
US 20200004543A1 · Kumar et al. · 2020 [cited by applicant]
US 20200065111A1 · Bouzguarrou et al. · 2020 [cited by applicant]
US 20200089528A1 · Gutierrez et al. · 2020 [cited by applicant]
US 20200125498A1 · Betts et al. · 2020 [cited by applicant]
US 20200310796A1 · Pfister · 2020 [cited by examiner]
US 20200319885A1 · Eyole et al. · 2020 [cited by applicant]
US 20200387382A1 · Tseng et al. · 2020 [cited by applicant]
US 20210026639A1 · Tekmen et al. · 2021 [cited by applicant]
US 20210200550A1 · Sivtsov et al. · 2021 [cited by applicant]
US 20210208891A1 · Wen et al. · 2021 [cited by applicant]
US 20210311743A1 · Tran · 2021 [cited by applicant]
US 20210326141A1 · Tran · 2021 [cited by applicant]
US 20210389979A1 · Tran · 2021 [cited by applicant]
US 20220066760A1 · Chang et al. · 2022 [cited by applicant]
US 20220326988A1 · Gunter et al. · 2022 [cited by applicant]
US 20230068637A1 · Feiste et al. · 2023 [cited by applicant]
US 20230130826A1 · Segger · 2023 [cited by applicant]
US 20230214218A1 · Battle et al. · 2023 [cited by applicant]
US 20230244490A1 · Tran · 2023 [cited by applicant]
US 20230244491A1 · Tran · 2023 [cited by applicant]
US 20230367599A1 · Waterman et al. · 2023 [cited by applicant]
US 20230393852A1 · Tran · 2023 [cited by applicant]
EP 0840213A2 · 1998 [cited by applicant]
EP 0902360A2 · 1999 [cited by applicant]
EP 0959575A1 · 1999 [cited by applicant]
WO 0010076A1 · 2000 [cited by applicant]
WO 0208894A1 · 2002 [cited by applicant]
WO 0213005A1 · 2002 [cited by applicant]
WO 2024015445A1 · 2024 [cited by applicant]
H. O. Kultala et al., “Exposed datapath optimizations for loop scheduling,” 2017 International Conference on Embedded Computer Systems: Architectures, Modeling, and Simulation (SAMOS), Pythagorion, Greece, pp. 171-178 (… [cited by examiner]
Wang, Y., Jia, Z., Chen, R., Wang, M., Liu, D. and Shao, Z., Loop scheduling with memory access reduction subject to register constraints for DSP applications. Softw. Pract. Exper., pp. 999-1026. (Year: 2014). [cited by examiner]
Choi, W., Park, SJ., Dubois, M. (2009). Accurate Instruction Pre-scheduling in Dynamically Scheduled Processors. In: Stenstrom, P. (eds) Transactions on High-Performance Embedded Architectures and Compilers I. Lecture N… [cited by applicant]
Diavastos, Andreas & Carlson, Trevor. (2021). Efficient Instruction Scheduling using Real-time Load Delay Tracking. (Year: 2021). [cited by applicant]
J. S. Hu, N. Vijaykrishnan and M. J. Irwin, “Exploring Wakeup-Free Instruction Scheduling,” 10th International Symposium on High Performance Computer Architecture (HPCA'04), Madrid, Spain, pp. 232-232 (Year: 2004). [cited by applicant]
Written Opinion of the International Searching Authority, PCT/S2022/052185. [cited by applicant]
Written Opinion of the International Searching Authority, PCT/US2023/018970. [cited by applicant]
Written Opinion of the International Searching Authority, PCT/US2023/018996. [cited by applicant]
Anonymous: “RISC-V—Wikipedia”, Apr. 16, 2022 (Apr. 16, 2022), XP093142703, Retrieved from the Internet: URL:https://en.wikipedia.org/w/index.php?title=RISC-V&oldid=1083030760 [retrieved on Mar. 27, 2024]. [cited by applicant]
PCT/US2023/018970, International Preliminary Report on Patentability, Jul. 18, 2024. [cited by applicant]
PCT/US2023/018996, International Preliminary Report on Patentability, Jul. 19, 2024. [cited by applicant]
PCT/US2023/018996, Written Opinion of the International Preliminary Examining Authority, Apr. 8, 2024. [cited by applicant]
PCT/US23/27497: Written Opinion of the International Searching Authority. [cited by applicant]
PCTUS2023081682, Written Opinion of the International Searching Authority, Mar. 22, 2024. [cited by applicant]
Written Opinion of The International Preliminary Examining Authority, PCTUS2023/018970, Mar. 25, 2024. [cited by applicant]
PCT/US2024/02037, Written Opinion of the International Searching Authority, Dec. 11, 2024. [cited by applicant]
PCT/US2024/020737 International Search Report, Dec. 11, 2024. [cited by applicant]