[go: up one dir, main page]

CN116662006A - Multi-threaded processor renaming resource management method, system, device and medium - Google Patents

Multi-threaded processor renaming resource management method, system, device and medium Download PDF

Info

Publication number
CN116662006A
CN116662006A CN202310664422.8A CN202310664422A CN116662006A CN 116662006 A CN116662006 A CN 116662006A CN 202310664422 A CN202310664422 A CN 202310664422A CN 116662006 A CN116662006 A CN 116662006A
Authority
CN
China
Prior art keywords
resource
real
thread
renaming
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310664422.8A
Other languages
Chinese (zh)
Other versions
CN116662006B (en
Inventor
张稚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hexin Technology Co ltd
Beijing Hexin Digital Technology Co ltd
Original Assignee
Hexin Technology Co ltd
Beijing Hexin Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hexin Technology Co ltd, Beijing Hexin Digital Technology Co ltd filed Critical Hexin Technology Co ltd
Priority to CN202310664422.8A priority Critical patent/CN116662006B/en
Publication of CN116662006A publication Critical patent/CN116662006A/en
Application granted granted Critical
Publication of CN116662006B publication Critical patent/CN116662006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)

Abstract

The invention provides a renaming resource management method, a renaming resource management system, a renaming resource management device and a renaming resource management medium for a multithreading processor, wherein the renaming resource management method comprises the following steps: responding to thread instruction receiving, sequentially carrying out pipeline processing on the thread instruction according to the sequence of instruction fetching decoding, renaming, instruction scheduling and instruction submitting; when a thread instruction enters a renaming stage, a virtual renaming resource number is allocated for the thread instruction in a virtual renaming resource domain, and a resource corresponding mark is added to the virtual renaming resource number; when the thread instruction enters the instruction scheduling stage, judging whether the virtual renaming resource number corresponds to the real renaming resource according to the resource correspondence mark, if so, distributing the real renaming resource number for the thread instruction and scheduling the execution, otherwise, waiting until the virtual renaming resource number is converted into the real renaming resource number and then scheduling the execution. The invention can effectively reduce the probability that the linear instruction in the processor is blocked in the renaming stage due to insufficient renaming resources, and improve the running efficiency of the multithreading processor.

Description

多线程处理器重命名资源管理方法、系统、装置及介质Multi-threaded processor renaming resource management method, system, device and medium

技术领域technical field

本发明涉及处理器设计技术领域,特别是涉及一种多线程处理器重命名资源管理方法、系统、装置及介质。The invention relates to the technical field of processor design, in particular to a multi-thread processor renaming resource management method, system, device and medium.

背景技术Background technique

处理器运行中,寄存器重命名资源不足是阻塞流水线运行的常见原因。寄存器重命名时出现资源不足的处理方式一般是先阻塞前端指令提交,等待重命名资源准备完毕,再释放被阻塞的指令流。此种简单阻塞指令流的处理方式对于指令相关性较高的单线程处理器而言,不会产生较大影响,而对于多线程处理器来说,在发生某类重命名资源不足时,阻塞一些不需要该类重命名资源的线程,势必增加了不同线程间指令处理的假相关性,将所有线程指令均阻塞在重命名流水线,进而降低了多线程处理器的运行效率。When the processor is running, insufficient register renaming resources are a common cause of blocking pipeline operation. The way to deal with insufficient resources when renaming registers is generally to block the submission of front-end instructions first, wait for the renaming resources to be ready, and then release the blocked instruction stream. This simple blocking instruction flow processing method will not have a great impact on single-threaded processors with high instruction dependencies, but for multi-threaded processors, when certain types of renaming resources are insufficient, blocking Some threads that do not need this type of renaming resources will inevitably increase the false correlation of instruction processing between different threads, and all thread instructions will be blocked in the renaming pipeline, thereby reducing the operating efficiency of the multi-threaded processor.

尽管现有通过增加处理器重命名资源的数量的方式,可以有效减小多线程处理器的流水线阻塞几率,但其必然会造成处理器面积过大,进而引入时序收敛难度增加的问题。Although the existing method of increasing the number of processor renaming resources can effectively reduce the pipeline blocking probability of multi-threaded processors, it will inevitably cause the processor area to be too large, and then introduce the problem of increased difficulty in timing convergence.

发明内容Contents of the invention

本发明的目的是提供一种多线程处理器重命名资源管理方法,通过设置虚拟重命名资源域,动态管理在重命名阶段分配且在该阶段之后才会被直接使用的重命名资源,将流水线阻塞周期延后到保留站,消除多线程指令间的假相关性,解决了现有多线程处理器重命名资源管理方法的应用缺陷,降低多线程处理器中线程指令因重命名资源不足而被阻塞在前端流水线的概率,提高多线程处理器的运行效率。The purpose of the present invention is to provide a multi-threaded processor renaming resource management method, by setting a virtual renaming resource domain, dynamically manage the renaming resources that are allocated in the renaming stage and will be directly used after this stage, so as to block the pipeline The cycle is delayed to the reserved station, eliminating the false correlation between multi-threaded instructions, solving the application defects of the existing multi-threaded processor renaming resource management method, and reducing the thread instructions in the multi-threaded processor being blocked due to insufficient renaming resources. The probability of front-end pipeline improves the operating efficiency of multi-threaded processors.

为了实现上述目的,有必要针对上述技术问题,提供一种多线程处理器重命名资源管理方法及系统。In order to achieve the above purpose, it is necessary to provide a multi-threaded processor renaming resource management method and system for the above technical problems.

第一方面,本发明实施例提供了一种多线程处理器重命名资源管理方法,响应于线程指令接收,将所述线程指令依次按照取指译码、重命名、指令调度和指令提交的顺序进行流水线处理,所述方法包括以下步骤:In the first aspect, the embodiment of the present invention provides a multi-threaded processor renaming resource management method. In response to receiving a thread instruction, the thread instruction is sequentially executed in the order of fetching and decoding, renaming, instruction scheduling, and instruction submission. Pipeline processing, the method includes the following steps:

当所述线程指令进入重命名阶段时,在预先设置的虚拟重命名资源域内,为所述线程指令分配对应的虚拟重命名资源编号,并将所述虚拟重命名资源编号添加资源对应标记;When the thread instruction enters the renaming stage, assign a corresponding virtual rename resource number to the thread instruction in the preset virtual rename resource field, and add a resource corresponding mark to the virtual rename resource number;

当所述线程指令进入指令调度阶段时,根据对应的资源对应标记,判断对应的虚拟重命名资源编号是否已对应真实重命名资源,若是,则为所述线程指令分配真实重命名资源编号并调度执行,反之,则等待至对应的虚拟重命名资源编号转换为真实重命名资源编号后再调度执行。When the thread instruction enters the instruction scheduling phase, judge whether the corresponding virtual renaming resource number corresponds to the real renaming resource according to the corresponding resource corresponding mark, if so, assign the real renaming resource number and schedule for the thread instruction Execute, otherwise, wait until the corresponding virtual rename resource number is converted to a real rename resource number before scheduling execution.

进一步地,预先设置虚拟重命名资源域的步骤包括:Further, the step of presetting the virtual renaming resource domain includes:

根据多线程处理器的真实重命名资源数和保留站条目数,设置预设大小的虚拟重命名资源域。Sets a virtual rename resource domain of a preset size based on the real number of rename resources and the number of reservation station entries for multi-threaded processors.

进一步地,所述资源对应标记包括已对应真实资源和未对应真实资源;所述将所述虚拟重命名资源编号添加资源对应标记的步骤包括:Further, the resource correspondence mark includes a corresponding real resource and an uncorresponded real resource; the step of adding the resource corresponding mark to the virtual renamed resource number includes:

根据预先设置的资源计数器,获取真实重命名资源域中剩余重命名资源数;所述资源计数器的计数上限为多线程处理器的真实重命名资源数;Acquiring the number of remaining renaming resources in the real renaming resource domain according to the preset resource counter; the counting upper limit of the resource counter is the real renaming resource number of the multi-threaded processor;

当所述剩余重命名资源数为零时,将所述虚拟重命名资源编号的资源对应标记设为未对应真实资源;When the remaining number of rename resources is zero, set the resource corresponding flag of the virtual rename resource number as not corresponding to a real resource;

当所述剩余重命名资源数不为零时,将所述虚拟重命名资源编号的资源对应标记设为已对应真实资源。When the remaining number of rename resources is not zero, set the resource corresponding flag of the virtual rename resource number to correspond to a real resource.

进一步地,所述将所述虚拟重命名资源编号添加资源对应标记的步骤包括:Further, the step of adding the virtual rename resource number with a resource corresponding mark includes:

当所述资源对应标记为未对应真实资源时,分别根据对应的虚拟重命名资源编号和线程号,生成对应的第一真实资源转化请求和第二真实资源转化请求;When the resource is correspondingly marked as not corresponding to a real resource, generate a corresponding first real resource conversion request and a second real resource conversion request according to the corresponding virtual renaming resource number and thread number respectively;

将所述第一真实资源转化请求写入与所述线程指令对应的线程子先入先出缓存,并同时将所述第二真实资源转化请求写入所有线程指令共享的主先入先出缓存。Writing the first real resource conversion request into the thread sub-first-in-first-out cache corresponding to the thread instruction, and simultaneously writing the second real resource conversion request into the main first-in-first-out cache shared by all thread instructions.

进一步地,所述将对应的虚拟重命名资源编号转换为真实重命名资源编号的步骤包括:Further, the step of converting the corresponding virtual rename resource number into a real rename resource number includes:

根据所述资源计数器,获取当前剩余真实重命名资源数,并在所述当前剩余真实重命名资源数不为零时,获取各个线程号的监控信息;根据各个线程号的监控信息,得到对应的真实资源转换优先级,并根据各个线程号的真实资源转换优先级,得到至少一个待转换线程号;According to the resource counter, obtain the current remaining number of real renaming resources, and when the current remaining number of real renaming resources is not zero, obtain the monitoring information of each thread number; according to the monitoring information of each thread number, obtain the corresponding Real resource conversion priority, and according to the real resource conversion priority of each thread number, at least one thread number to be converted is obtained;

根据所述待转换线程号,得到待转换虚拟重命名资源编号,并为所述待转换虚拟重命名资源编号分配对应的真实重命名资源编号;According to the thread number to be converted, the virtual rename resource number to be converted is obtained, and a corresponding real rename resource number is assigned to the virtual rename resource number to be converted;

响应于所述待转换虚拟重命名资源编号对应的真实重命名资源编号分配完成,将对应的第一真实资源转化请求和第二真实资源转化请求清除。In response to the allocation of the real rename resource number corresponding to the virtual rename resource number to be converted is completed, the corresponding first real resource conversion request and the second real resource conversion request are cleared.

进一步地,所述监控信息包括线程优先级、取指译码阶段的线程指令数、以及线程子先入先出缓存的第一真实资源转化请求数。Further, the monitoring information includes thread priority, the number of thread instructions in the instruction fetching and decoding phase, and the number of first real resource conversion requests in the first-in-first-out cache of the thread sub-cache.

进一步地,所述根据各个线程的监控信息,得到对应的真实资源转换优先级的步骤包括:Further, the step of obtaining the corresponding real resource conversion priority according to the monitoring information of each thread includes:

将各个监控信息按照对应的预设权重值进行加权求和,得到所述真实资源转换优先级。The weighted summation is performed on each piece of monitoring information according to the corresponding preset weight value to obtain the real resource conversion priority.

进一步地,所述根据各个线程号的真实资源转换优先级,得到至少一个待转换线程号的步骤包括:Further, the step of obtaining at least one thread number to be converted according to the real resource conversion priority of each thread number includes:

选取所有真实资源转换优先级中的最大值,并将所述最大值对应的线程号作为所述待转换线程号。Select the maximum value among all real resource conversion priorities, and use the thread number corresponding to the maximum value as the thread number to be converted.

进一步地,所述根据所述待转换线程号,得到待转换虚拟重命名资源编号的步骤包括:Further, the step of obtaining the virtual renaming resource number to be converted according to the thread number to be converted includes:

当所述待转换线程号为一个时,读取对应的线程子先入先出缓存中最先写入的第一真实资源转化请求,并将最先写入的第一真实资源转化请求对应的虚拟重命名资源编号作为所述待转换虚拟重命名资源编号;When the thread number to be converted is one, read the first real resource conversion request first written in the corresponding thread sub-first-in-first-out cache, and write the first real resource conversion request corresponding to the first real resource conversion request first The rename resource number is used as the virtual rename resource number to be converted;

当所述待转换线程号为多个时,从所述主先入先出缓存中读取与所述待转换线程号对应的最先写入的第二真实资源转化请求,并将最先写入的第二真实资源转化请求对应的线程号作为优选转换线程号,以及读取所述优选转换线程号对应的线程子先入先出缓存中最先写入的第一真实资源转化请求,将最先写入的第一真实资源转化请求对应的虚拟重命名资源编号作为所述待转换虚拟重命名资源编号。When there are multiple thread numbers to be converted, read the first written second real resource conversion request corresponding to the thread number to be converted from the main first-in-first-out cache, and write it first The thread number corresponding to the second real resource conversion request is used as the preferred conversion thread number, and the first real resource conversion request written first in the first-in-first-out cache of the thread sub-thread corresponding to the preferred conversion thread number is read, and the first The written virtual rename resource number corresponding to the first real resource conversion request is used as the virtual rename resource number to be converted.

第二方面,本发明实施例提供了一种多线程处理器重命名资源管理系统,响应于线程指令接收,将所述线程指令依次按照取指译码、重命名、指令调度和指令提交的顺序进行流水线处理,所述系统包括:In the second aspect, an embodiment of the present invention provides a resource management system for renaming a multithreaded processor. In response to receiving a thread instruction, the thread instruction is sequentially executed in the order of fetching and decoding, renaming, instruction scheduling, and instruction submission. Pipeline processing, the system includes:

虚拟资源分配模块,用于当所述线程指令进入重命名阶段时,在预先设置的虚拟重命名资源域内,为所述线程指令分配对应的虚拟重命名资源编号,并将所述虚拟重命名资源编号添加资源对应标记;A virtual resource allocation module, configured to assign a corresponding virtual rename resource number to the thread instruction in a preset virtual rename resource field when the thread instruction enters the renaming stage, and allocate the virtual rename resource Add the corresponding mark of the resource to the number;

真实资源转化模块,用于当所述线程指令进入指令调度阶段时,根据对应的资源对应标记,判断对应的虚拟重命名资源编号是否已对应真实重命名资源,若是,则为所述线程指令分配真实重命名资源编号并调度执行,反之,则等待至将对应的虚拟重命名资源编号转换为真实重命名资源编号后再调度执行。The real resource conversion module is used to determine whether the corresponding virtual rename resource number has corresponded to the real rename resource according to the corresponding resource corresponding mark when the thread instruction enters the instruction scheduling stage, and if so, assign the thread instruction Real rename the resource number and schedule execution, otherwise, wait until the corresponding virtual rename resource number is converted into a real rename resource number before scheduling execution.

第三方面,本发明实施例还提供了一种多线程处理器重命名资源管理装置,所述装置包括:In the third aspect, the embodiment of the present invention also provides a multithreaded processor renaming resource management device, the device comprising:

存储有可执行程序代码的存储器;a memory storing executable program code;

与所述存储器耦合的执行器;an actuator coupled to said memory;

所述执行器调用所述存储器中存储的所述可执行程序代码,执行上述方法步骤。The executor invokes the executable program code stored in the memory to execute the above method steps.

第四方面,本发明实施例还提供一种计算机存储介质,其上存储有计算机指令,所述计算机指令被调用时,执行上述方法步骤。In a fourth aspect, the embodiment of the present invention further provides a computer storage medium, on which computer instructions are stored, and when the computer instructions are invoked, the above method steps are executed.

上述本申请提供了一种多线程处理器重命名资源管理方法、系统、装置及介质,通过所述方法,实现了响应于线程指令接收,将线程指令依次按照取指译码、重命名、指令调度和指令提交的顺序进行流水线处理,当线程指令进入重命名阶段时,在预先设置的虚拟重命名资源域内为线程指令分配对应的虚拟重命名资源编号,将虚拟重命名资源编号添加资源对应标记,并在线程指令进入指令调度阶段时,根据对应的资源对应标记,判断对应的虚拟重命名资源编号是否已对应真实重命名资源,若是,则为线程指令分配真实重命名资源编号并调度执行,反之,则等待至对应的虚拟重命名资源编号转换为真实重命名资源编号后再调度执行的技术方案。与现有技术相比,该多线程处理器重命名资源管理方法,通过设置虚拟重命名资源域,动态管理在重命名阶段分配且在该阶段之后才会被直接使用的重命名资源,将流水线阻塞周期延后到保留站,消除多线程指令间的假相关性,有效降低多线程处理器中线程指令因重命名资源不足而被阻塞在前端流水线的概率,提高多线程处理器的运行效率,进而在不增加处理器面积、不增加时序收敛难度的同时,为多线程处理器的高效运行提供可靠的技术支持。The above application provides a resource management method, system, device and medium for multi-threaded processor renaming. Through the method, in response to receiving thread instructions, the thread instructions are sequentially followed by fetching and decoding, renaming, and instruction scheduling. Pipeline processing is performed with the order of instruction submission. When the thread instruction enters the renaming stage, the corresponding virtual rename resource number is assigned to the thread instruction in the preset virtual rename resource field, and the virtual rename resource number is added to the resource corresponding mark. And when the thread instruction enters the instruction scheduling stage, judge whether the corresponding virtual renaming resource number corresponds to the real renaming resource according to the corresponding flag of the corresponding resource, if so, assign the real renaming resource number to the thread instruction and schedule execution, otherwise , wait until the corresponding virtual rename resource number is converted into a real rename resource number, and then schedule and execute the technical solution. Compared with the prior art, the multi-threaded processor renaming resource management method dynamically manages the renaming resources allocated in the renaming stage and will be directly used after this stage by setting a virtual renaming resource domain, so as to block the pipeline The cycle is delayed to the reserved station, eliminating the false correlation between multi-threaded instructions, effectively reducing the probability of thread instructions in the multi-threaded processor being blocked in the front-end pipeline due to insufficient renaming resources, improving the operating efficiency of the multi-threaded processor, and then It provides reliable technical support for the efficient operation of multi-threaded processors without increasing the area of the processor or increasing the difficulty of timing convergence.

附图说明Description of drawings

图1是现有多线程处理器的多线程指令处理流程示意图;Fig. 1 is a schematic diagram of a multi-thread instruction processing flow diagram of an existing multi-thread processor;

图2是现有重命名资源不足时流水线阻塞在重命名阶段的流水线处理流程示意图;Fig. 2 is a schematic diagram of the pipeline processing flow in the renaming stage when the existing renaming resources are insufficient;

图3是本发明实施例中多线程处理器重命名资源管理方法的流程示意图;3 is a schematic flow diagram of a method for managing resources renaming a multithreaded processor in an embodiment of the present invention;

图4是采用本发明多线程处理器重命名资源管理的流水线处理流程示意图;FIG. 4 is a schematic diagram of a pipeline processing flow for renaming resource management using a multithreaded processor of the present invention;

图5是本发明实施例中虚拟重命名资源转化为真实重命名资源的流程示意图;FIG. 5 is a schematic flow diagram of converting a virtual renaming resource into a real renaming resource in an embodiment of the present invention;

图6是本发明实施例中多线程处理器重命名资源管理系统的结构示意图;FIG. 6 is a schematic structural diagram of a multi-threaded processor renaming resource management system in an embodiment of the present invention;

图7是本发明实施例中多线程处理器重命名资源管理装置的结构示意图。Fig. 7 is a schematic structural diagram of a resource management device for renaming a multithreaded processor in an embodiment of the present invention.

具体实施方式Detailed ways

为了使本申请的目的、技术方案和有益效果更加清楚明白,下面结合附图及实施例,对本发明作进一步详细说明,显然,以下所描述的实施例是本发明实施例的一部分,仅用于说明本发明,但不用来限制本发明的范围。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and beneficial effects of the present application clearer, the present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments. Obviously, the embodiments described below are part of the embodiments of the present invention and are only used for The present invention is illustrated, but not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明提供的多线程处理器重命名资源管理方法是基于现有如图1所示的多线程处理器运行中某个线程指令在重命名阶段出现重命名资源不可用时,采用图2所示的重命名资源分配管理方法,会导致后续与其不相关的其他线程指令均会被阻塞,大幅降低多线程处理器流水线效率的重命名资源管理缺陷,而提出的一种通过设置虚拟重命名资源域动态管理重命名阶段仅分配而非直接使用的重命名资源,在真实重命名资源不足时,将流水线阻塞的周期延后到指令调度阶段的保留站中的真实重命名资源有效管理方法,以有效消除多线程指令间的假相关性,降低多线程处理器因重命名资源不足而被阻塞在前端流水线的概率,可靠提高多线程处理器的流水线效率。下述实施例将对本发明的多线程处理器重命名资源管理方法进行详细说明。The multi-threaded processor renaming resource management method provided by the present invention is based on the renaming method shown in FIG. The resource allocation management method will cause other thread instructions that are not related to it to be blocked, which greatly reduces the renaming resource management defect of the multi-threaded processor pipeline efficiency. The renaming resources are only allocated rather than directly used in the naming stage. When the real renaming resources are insufficient, the pipeline blocking cycle is postponed to the effective management method of the real renaming resources in the reservation station of the instruction scheduling stage to effectively eliminate multi-threading. The false correlation between instructions reduces the probability of multi-threaded processors being blocked in the front-end pipeline due to insufficient renaming resources, and reliably improves the pipeline efficiency of multi-threaded processors. The following embodiments will describe in detail the resource management method for multi-threaded processor renaming of the present invention.

在一个实施例中,如图3所示,提供了一种多线程处理器重命名资源管理方法,响应于线程指令接收,将所述线程指令依次按照取指译码、重命名、指令调度和指令提交的顺序进行流水线处理,包括以下步骤:In one embodiment, as shown in FIG. 3 , a multi-threaded processor renaming resource management method is provided. In response to receiving a thread instruction, the thread instruction is sequentially followed by fetching and decoding, renaming, instruction scheduling, and instruction The order of submission is pipelined, including the following steps:

本实施例中,流水线处理过程仍采用通用的流水线时序,包括四个流水线处理阶段:1)取指译码阶段;2)重命名阶段;3)指令调度阶段;4)指令提交阶段。对于多线程处理器而言,取指译码阶段和重命名阶段输入的线程指令都是顺序执行的,而在指令调度阶段会根据指令处理所需资源是否可用来动态的调度执行指令,即此阶段指令将由顺序执行转变为乱序执行,使得即使出现更早进入指令调度阶段的指令所需资源未可用情况,处理器也可以在其之后进入指令调度阶段的指令中选取资源均可用的指令执行;可见,指令调度阶段通过利用指令间的非相关性的乱序处理方式,在一定程度上保证了处理器流水线的利用率,进而提高多线程处理器的运行效率。In this embodiment, the general pipeline sequence is still used in the pipeline processing process, including four pipeline processing stages: 1) instruction fetching and decoding stage; 2) renaming stage; 3) instruction scheduling stage; 4) instruction submitting stage. For a multi-threaded processor, the thread instructions input in the fetch-decode stage and the rename stage are executed sequentially, and in the instruction scheduling stage, the instructions are dynamically scheduled and executed according to whether the resources required for instruction processing are available, that is, Instructions in the stage will be executed in order from sequential execution to out-of-order execution, so that even if the resources required by the instructions that enter the instruction scheduling stage earlier are not available, the processor can also select instructions that have available resources from the instructions that enter the instruction scheduling stage later. It can be seen that in the instruction scheduling stage, the utilization rate of the processor pipeline is guaranteed to a certain extent by using the out-of-order processing method of non-correlation between instructions, and then the operating efficiency of the multi-thread processor is improved.

基于处理器流水线运行机制中各个阶段处理的特点,为了在尽可能规避重命名阶段顺序处理造成拉低流水线效率的劣势影响的基础上,更好地发挥指令调度阶段乱序处理提升流水线利用率的优势效应,进而进一步提升多线程处理器的运行效率,本实施例优选的,在沿用现有处理器流水线处理时序的基础上,通过图4所示的通过增设虚拟重命名资源域,结合对重命名阶段和指令调度阶段的处理优化,简单可靠地解决了现有重命名阶段阻塞造成的不同线程的低相关指令之间假相关性问题,以真正实现对真实重命名资源域中各个重命名资源的高效可靠的分配管理。Based on the processing characteristics of each stage in the processor pipeline operation mechanism, in order to avoid the disadvantageous effect of lowering the pipeline efficiency caused by sequential processing in the renaming stage as much as possible, and better utilize the out-of-order processing in the instruction scheduling stage to improve pipeline utilization. advantage effect, and then further improve the operating efficiency of the multi-threaded processor, this embodiment is preferred, on the basis of continuing to use the existing processor pipeline processing timing, by adding a virtual rename resource domain as shown in Figure 4, combined with the counterweight The processing optimization of the naming stage and the instruction scheduling stage simply and reliably solves the problem of false correlation between low-correlation instructions of different threads caused by the blocking of the existing renaming stage, so as to truly realize the renaming of each renaming resource in the real renaming resource domain Efficient and reliable allocation management.

S11、当所述线程指令进入重命名阶段时,在预先设置的虚拟重命名资源域内,为所述线程指令分配对应的虚拟重命名资源编号,并将所述虚拟重命名资源编号添加资源对应标记;其中,虚拟重命名资源域可理解为是用于预先替代真实重命名资源域,实现仅分配而无需真实使用的真实重命名资源域在重命名阶段所需满足功能的虚拟资源集合。为了尽可能规避重命名阶段顺序处理造成拉低流水线效率的劣势影响,原则上虚拟重命名资源域的大小只需大于真实重命名资源域即可满足一定程度上降低重命名阶段流水线阻塞的概率,但考虑到实际处理器流水线各阶段处理性能的限制,为了在不降低流水线各阶段处理性能的基础上,有效降低前端流水线阻塞概率,本实施例优选地在指令调度阶段的存储性能能够支持的情况下,尽可能增大虚拟重命名资源域的大小;具体的,预先设置虚拟重命名资源域的步骤包括:S11. When the thread instruction enters the renaming stage, assign a corresponding virtual rename resource number to the thread instruction in the preset virtual rename resource field, and add a resource corresponding mark to the virtual rename resource number ; Among them, the virtual renaming resource field can be understood as a set of virtual resources that are used to replace the real renaming resource field in advance, and realize the functions required by the real renaming resource field that are only allocated but not used in the renaming stage. In order to avoid the disadvantageous effect of lowering the pipeline efficiency caused by sequential processing in the renaming stage, in principle, the size of the virtual renaming resource field only needs to be larger than the real renaming resource field to meet the requirements to reduce the probability of pipeline blocking in the renaming stage to a certain extent. However, considering the limitations of the processing performance of each stage of the actual processor pipeline, in order to effectively reduce the blocking probability of the front-end pipeline without reducing the processing performance of each stage of the pipeline, this embodiment is preferably in the case where the storage performance of the instruction scheduling stage can support Next, increase the size of the virtual renaming resource domain as much as possible; specifically, the steps for setting the virtual renaming resource domain in advance include:

根据多线程处理器的真实重命名资源数和保留站条目数,设置预设大小的虚拟重命名资源域;其中,保留站理解为是指令调度阶段用于对指令信息进行存储的存储结构,在实际应用中,指令操作数或重命名资源未准备好时,指令信息都会停留在保留站中等待直至满足指令调度条件被调度执行后才会移出;本实施例中的虚拟重命名资源域的预设大小为尽可能满足上述分析的应用需求,而优选设置为保留站条目数与实际重命名资源数的和。According to the number of real renaming resources and the number of reservation station entries of the multi-threaded processor, a virtual renaming resource domain with a preset size is set; among them, the reservation station is understood as the storage structure used to store instruction information in the instruction scheduling stage. In practical applications, when the instruction operand or the renaming resource is not ready, the instruction information will stay in the reservation station and wait until it meets the instruction scheduling condition and is scheduled to be executed before being moved out; The size is set to meet the application requirements of the above analysis as much as possible, and the optimal setting is the sum of the number of reserved station entries and the actual number of resources to be renamed.

上述资源对应标记可理解为在线程指令处理进入到指令重命名阶段,被分配虚拟重命名资源编号的同时,对其能否使用真实重命名资源域中的真实重命名资源的情况的一个记录;对应的,资源对应标记包括已对应真实资源和未对应真实资源,其中,已对应真实资源可理解为是当前进入重命名阶段的该线程指令在分配虚拟重命名资源编号的同时,真实重命名资源域中还有可用的真实重命名资源,后续在指令调度阶段可直接被调度执行;同理,未对应真实资源可理解为是当前进入重命名阶段的该线程指令在分配虚拟重命名资源编号的同时,真实重命名资源域中不存在可用的真实重命名资源,需要在后续有被释放的真实重命名资源被动态调度分配真实重命名资源后再被调度执行;本实施例中的资源对应标记是配合虚拟重命名资源域对真实重命名资源域进行有效管理的关键标记,为了保证该标记的可靠性,本实施例优选通过引入资源计数器的方式动态更新可用真实重命名资源数,以实现对每个虚拟重命名资源编号的资源对应标记进行精准记录;具体的,所述将所述虚拟重命名资源编号添加资源对应标记的步骤包括:The above resource corresponding flag can be understood as a record of whether the real renaming resource in the real renaming resource domain can be used when the thread instruction processing enters the instruction renaming stage and the virtual renaming resource number is assigned; Correspondingly, the resource corresponding flag includes the corresponding real resource and the uncorresponding real resource, wherein, the corresponding real resource can be understood as the thread instruction currently entering the renaming stage, while assigning the number of the virtual renaming resource, the real renaming resource There are also real renaming resources available in the domain, which can be directly scheduled and executed in the instruction scheduling stage; similarly, the uncorresponding real resources can be understood as the thread instruction currently entering the renaming stage is assigned the virtual renaming resource number At the same time, there is no real renaming resource available in the real renaming resource domain, and it needs to be scheduled and executed after the real renaming resource that is released is dynamically scheduled and allocated in the real renaming resource domain; It is a key mark to effectively manage the real rename resource domain in conjunction with the virtual rename resource domain. The resource corresponding mark of each virtual rename resource number is accurately recorded; specifically, the step of adding the resource corresponding mark to the virtual rename resource number includes:

根据预先设置的资源计数器,获取真实重命名资源域中剩余重命名资源数;所述资源计数器的计数上限为多线程处理器的真实重命名资源数;Acquiring the number of remaining renaming resources in the real renaming resource domain according to the preset resource counter; the counting upper limit of the resource counter is the real renaming resource number of the multi-threaded processor;

当所述剩余重命名资源数为零时,将所述虚拟重命名资源编号的资源对应标记设为未对应真实资源;When the remaining number of rename resources is zero, set the resource corresponding flag of the virtual rename resource number as not corresponding to a real resource;

当所述剩余重命名资源数不为零时,将所述虚拟重命名资源编号的资源对应标记设为已对应真实资源。When the remaining number of rename resources is not zero, set the resource corresponding flag of the virtual rename resource number to correspond to a real resource.

在实际应用中,原则上在通过上述方法步骤实现对每个线程指令的虚拟重命名资源编号的资源对应标记进行准确记录后,就可以在指令调度阶段通过查询对应的资源对应标记,按照一定的动态管理规则对真实重命名资源进行动态分配,但考虑到尽管所有线程的所有指令在进入重命名阶段时都是不分线程按照进入重命名阶段的时间先后顺序被依次分配虚拟重命名资源域中的资源编号,可并未分配真实重命名资源,而在后续的指令调度阶段需要指令被分配真实重命名资源后才能调度执行,为了便于指令调度阶段能有效感知具体哪些线程指令未对应真实重命名资源,以及在同时存在众多未对应真实重命名资源的指令情况下,实现不损耗多线程处理效率且遵循现有流水线工作时序的同时,高效且合理的将各个未对相应真实重命名资源的虚拟重命名资源转换为真实重命名资源,为多线程处理器中各个线程指令的高效可靠处理提供可靠保障,本实施例优选地,通过设置所有线程指令共享,按指令输入的时序记录所有在重命名阶段未对应真实重命名资源的指令的线程号的主先入先出缓存,同时设置与各个线程对应,按照指令输入的时序记录单个线程指令的虚拟重命名资源编号的多个线程子先入先出缓存的方式维护各个未对相应真实重命名资源的虚拟重命名资源,为指令调度阶段动态筛选出优先分配真实重命名资源的线程和对应的虚拟重命名资源编号提供可靠依据;In practical applications, in principle, after the resource corresponding mark of the virtual renaming resource number of each thread instruction is accurately recorded through the above method steps, the corresponding resource corresponding mark can be queried in the instruction scheduling stage, according to a certain The dynamic management rules dynamically allocate real renaming resources, but considering that all instructions of all threads are assigned to the virtual renaming resource domain in sequence according to the time sequence of entering the renaming stage, regardless of the threads when entering the renaming stage The resource number of the real renaming resource may not be allocated, but in the subsequent instruction scheduling stage, the instruction needs to be allocated real renaming resources before it can be scheduled and executed. In order to facilitate the instruction scheduling stage to effectively perceive which thread instructions do not correspond to the real renaming Resources, and when there are many instructions that do not correspond to real renaming resources at the same time, it is possible to effectively and reasonably allocate virtual resources that do not correspond to real renaming resources while not losing multi-thread processing efficiency and following the existing pipeline work sequence. The renaming resource is converted into a real renaming resource, which provides a reliable guarantee for the efficient and reliable processing of each thread instruction in the multi-threaded processor. In this embodiment, preferably, by setting all thread instructions to be shared, all renaming is recorded according to the sequence of instruction input. The main first-in-first-out cache of the thread number of the instruction that does not correspond to the real rename resource in the stage, and simultaneously set up multiple thread sub-first-in first-out caches that correspond to each thread and record the virtual rename resource number of a single thread instruction according to the timing of instruction input Maintain each virtual renaming resource that does not correspond to the corresponding real renaming resource, and provide a reliable basis for dynamically screening out the threads that give priority to real renaming resources and the corresponding virtual renaming resource numbers in the instruction scheduling stage;

具体的,如图5所示,所述将所述虚拟重命名资源编号添加资源对应标记的步骤包括:Specifically, as shown in FIG. 5, the step of adding the virtual rename resource number to the resource corresponding mark includes:

当所述资源对应标记为未对应真实资源时,分别根据对应的虚拟重命名资源编号和线程号,生成对应的第一真实资源转化请求和第二真实资源转化请求;When the resource is correspondingly marked as not corresponding to a real resource, generate a corresponding first real resource conversion request and a second real resource conversion request according to the corresponding virtual renaming resource number and thread number respectively;

将所述第一真实资源转化请求写入与所述线程指令对应的线程子先入先出缓存,并同时将所述第二真实资源转化请求写入所有线程指令共享的主先入先出缓存;其中,线程子先入先出缓存的个数与处理器中运行的线程总数相同,且各个线程子先入先出缓存的大小与保留站支持存储的总条目数保持一致;同时,主先入先出缓存的大小也与保留站支持存储的总条目数保持一致。Writing the first real resource conversion request into the thread sub-first-in-first-out cache corresponding to the thread instruction, and simultaneously writing the second real resource conversion request into the main first-in-first-out cache shared by all thread instructions; wherein , the number of thread sub-FIFO caches is the same as the total number of threads running in the processor, and the size of each thread sub-FIFO cache is consistent with the total number of entries supported by the reservation station; at the same time, the main FIFO cache The size is also consistent with the total number of entries backed by the reservation station.

S12、当所述线程指令进入指令调度阶段时,根据对应的资源对应标记,判断对应的虚拟重命名资源编号是否已对应真实重命名资源,若是,则为所述线程指令分配真实重命名资源编号并调度执行,反之,则等待至对应的虚拟重命名资源编号转换为真实重命名资源编号后再调度执行;S12. When the thread instruction enters the instruction scheduling stage, judge whether the corresponding virtual rename resource number corresponds to the real rename resource according to the corresponding resource corresponding flag, and if so, assign the real rename resource number to the thread instruction And schedule execution, otherwise, wait until the corresponding virtual rename resource number is converted into a real rename resource number before scheduling execution;

在实际应用中,线程指令的处理进入到指令调度阶段时,会检查其分配的虚拟重命名资源编号对应的资源对应标记是否为已对应真实重命名资源:若是,则判定该指令可以调度执行,并在调度执行时为其分配真实重命名资源编号;若否,则判定该指令需要在调度阶段等待被分配真实的重命名资源后才能执行。因此,如何根据前述的主先入先出缓存和各个线程子先入先出缓存记录的信息对真实重命名资源进行动态分配将直接影响多线程处理器的运行效率。In practical applications, when the thread instruction processing enters the instruction scheduling stage, it will check whether the resource corresponding to the assigned virtual rename resource number corresponds to the corresponding real rename resource: if so, it is determined that the instruction can be scheduled for execution, And assign the real renaming resource number to it during scheduling execution; if not, it is determined that the instruction needs to wait for the real renaming resource to be allocated in the scheduling stage before it can be executed. Therefore, how to dynamically allocate real renaming resources according to the information recorded in the aforementioned main FIFO cache and each thread sub-FIFO cache will directly affect the operating efficiency of the multi-threaded processor.

考虑到多线程处理器中不同线程的指令的相关性较低,若只按指令产生转化请求的先后顺序对请求进行转换(分配真实重命名资源),就会将造成不同线程间指令的假相关性,进而损害多线程处理器效率的情况,本实施例优选地,通过对可能影响指令处理时效的相关线程信息进行实时监控,并在当有真实重命名资源可用时,以获取的各个线程的监控信息作为各个线程的真实资源转化请求的调度依据,实现虚拟重命名资源及时合理地转化为真实重命名资源;具体的,如图5所示,所述将对应的虚拟重命名资源编号转换为真实重命名资源编号的步骤包括:Considering that the correlation of instructions of different threads in a multi-threaded processor is low, if the requests are only converted (allocated real renaming resources) according to the order in which the instructions generate conversion requests, it will cause false correlations between instructions of different threads In the event that the efficiency of the multi-threaded processor is damaged, this embodiment preferably monitors the relevant thread information that may affect the timeliness of instruction processing in real time, and when there are real renaming resources available, the obtained information of each thread The monitoring information is used as the scheduling basis for the real resource conversion request of each thread, and the virtual rename resource is converted into a real rename resource in a timely and reasonable manner; specifically, as shown in Figure 5, the corresponding virtual rename resource number is converted into The steps to actually rename a resource number include:

根据所述资源计数器,获取当前剩余真实重命名资源数,并在所述当前剩余真实重命名资源数不为零时,获取各个线程号的监控信息;根据各个线程号的监控信息,得到对应的真实资源转换优先级,并根据各个线程号的真实资源转换优先级,得到至少一个待转换线程号;其中,监控信息可根据不同多线程处理器的实际运行需求进行设置,原则上采集相关信息越多,依据监控信息得到的调度依据就越可靠,但考虑到监控信息的采集会额外占用处理器资源,为了实现调度依据有效性保证和处理器资源占用的平衡,本实施例优选的监控信息包括线程优先级、取指译码阶段的线程指令数、以及线程子先入先出缓存的第一真实资源转化请求数;According to the resource counter, obtain the current remaining number of real renaming resources, and when the current remaining number of real renaming resources is not zero, obtain the monitoring information of each thread number; according to the monitoring information of each thread number, obtain the corresponding Real resource conversion priority, and according to the real resource conversion priority of each thread number, at least one thread number to be converted is obtained; among them, the monitoring information can be set according to the actual operation requirements of different multi-threaded processors. In principle, the more relevant information is collected, the more more, the more reliable the scheduling basis obtained based on the monitoring information is, but considering that the collection of monitoring information will occupy additional processor resources, in order to achieve a balance between the effectiveness of the scheduling basis and the occupancy of processor resources, the preferred monitoring information in this embodiment includes Thread priority, the number of thread instructions in the fetching and decoding phase, and the number of first real resource conversion requests in the first-in-first-out cache of the thread sub-cache;

同时,考虑到各个监控信息对指令处理优先级的影响大小不同,如何对各个监控信息进行合理利用会直接影响到各个线程的真实资源转换优先级的可靠性,进而影响处理器真实重命名资源动态分配的合理性,为在真实资源转换优先级的计算中尽可能对各个监控信息的不同影响,本实施优选地根据各个监控信息对指令处理时效影响的大小分配对应的权重并组合得到对应的真实资源转换优先级;具体的,所述根据各个线程的监控信息,得到对应的真实资源转换优先级的步骤包括:At the same time, considering that each monitoring information has different influences on the priority of instruction processing, how to make reasonable use of each monitoring information will directly affect the reliability of the real resource conversion priority of each thread, and then affect the real renaming resource dynamics of the processor. The rationality of allocation, in order to have different influences on each monitoring information as much as possible in the calculation of real resource conversion priority, this implementation preferably assigns corresponding weights according to the influence of each monitoring information on the timeliness of instruction processing and combines them to obtain the corresponding real Resource conversion priority; specifically, the step of obtaining the corresponding real resource conversion priority according to the monitoring information of each thread includes:

将各个监控信息按照对应的预设权重值进行加权求和,得到所述真实资源转换优先级;其中,真实资源转换优先级计算的详细过程可参照下述示例实现:比如,每个线程子先入先出缓存中有效的条目数为每个线程待转换的数目,可将此类监控信息的预设权重值设为1;取指译码阶段中各线程的指令为即将进入重命名阶段的指令,可将此类监控信息的预设权重值设为0.4;处理器中各个线程的优先级可按照高、中、低等级别动态设置,并分别赋予对应的预设权重值为3、2和1;最终,将计算得到的各线程的各类监控信息的优先级进行累加;若线程0具有高优先级,其线程子先入先出缓存中待转换的请求数目为x,取指译码阶段属于线程0的指令数为y,则计算得到的线程0的真实资源转换优先级为3+x+0.4y;需要说明的是,上述计算过程中各类监控信息的预设权重值的设置仅为示例性描述,在实际应用中可根据实际情况优选设置,此处不作具体限制。Each monitoring information is weighted and summed according to the corresponding preset weight value to obtain the real resource conversion priority; wherein, the detailed process of calculating the real resource conversion priority can be realized by referring to the following example: For example, each thread sub-first-in The effective number of entries in the first-out cache is the number to be converted by each thread, and the preset weight value of such monitoring information can be set to 1; the instructions of each thread in the instruction fetching and decoding stage are instructions that are about to enter the renaming stage , the preset weight value of such monitoring information can be set to 0.4; the priority of each thread in the processor can be dynamically set according to high, medium, and low levels, and the corresponding preset weight values are assigned to 3, 2, and 1. Finally, accumulate the calculated priorities of various monitoring information of each thread; if thread 0 has a high priority, the number of requests to be converted in the first-in-first-out cache of the thread is x, and the fetching and decoding stage The number of instructions belonging to thread 0 is y, and the calculated real resource conversion priority of thread 0 is 3+x+0.4y; it should be noted that the preset weight values of various monitoring information in the above calculation process are only set It is an exemplary description, and may be preferably set according to actual conditions in actual applications, and no specific limitation is made here.

此外,为了尽可能在遵循各个线程指令输入的时序性的基础上,满足各个线程指令处理的时效性需求,进而有效保证多线程处理器运行的高效性,本实施例优选地,当处理器中存在真实资源转化请求且真实重命名资源域有剩余可用真实重命名资源时,处理器将对具有最高转换优先级的一个线程进行优先转换;具体的,所述根据各个线程号的真实资源转换优先级,得到至少一个待转换线程号的步骤包括:In addition, in order to meet the timeliness requirements of each thread instruction processing on the basis of following the timing of each thread instruction input as much as possible, and thus effectively ensure the high efficiency of the operation of the multi-thread processor, in this embodiment, preferably, when the processor When there is a real resource conversion request and there are remaining real renaming resources available in the real renaming resource domain, the processor will perform priority conversion on a thread with the highest conversion priority; specifically, the real resource conversion priority according to each thread number Level, the step of obtaining at least one thread number to be converted includes:

选取所有真实资源转换优先级中的最大值,并将所述最大值对应的线程号作为所述待转换线程号。Select the maximum value among all real resource conversion priorities, and use the thread number corresponding to the maximum value as the thread number to be converted.

根据所述待转换线程号,得到待转换虚拟重命名资源编号,并为所述待转换虚拟重命名资源编号分配对应的真实重命名资源编号;其中,待转换线程号如上所示是根据各个线程对应的真实资源转换优先级排序得到的最大值确定的,而在实际应用中,很有可能出现某个时刻几个线程同时具备最高的真实资源转换优先级,那么筛选得到的待转换线程号就不止一个,此时就需要引入其他的选取依据进一步确定最终的优选转换线程号,再根据该优选转换线程号确定优先转化请求;基于实际动态分配真实重命名资源应用场景的多样性,为了保证每个优先转化请求调度的高效性和精准性,本实施例优选地,为待转换线程号是一个或多个的不同应用场景设置不同不的优先转化请求调度方案;具体的,所述根据所述待转换线程号,得到待转换虚拟重命名资源编号的步骤包括:According to the thread number to be converted, the virtual rename resource number to be converted is obtained, and the corresponding real rename resource number is allocated for the virtual rename resource number to be converted; wherein, the thread number to be converted is based on each thread as shown above The maximum value of the corresponding real resource conversion priority sorting is determined, but in practical applications, it is very likely that several threads have the highest real resource conversion priority at a certain moment, then the filtered thread number to be converted is If there is more than one, it is necessary to introduce other selection basis to further determine the final preferred conversion thread number, and then determine the priority conversion request according to the preferred conversion thread number; based on the diversity of actual dynamic allocation of real renaming resource application scenarios, in order to ensure For the efficiency and accuracy of priority conversion request scheduling, in this embodiment, preferably, different priority conversion request scheduling schemes are set for different application scenarios with one or more thread numbers to be converted; specifically, according to the The steps for obtaining the number of the virtual rename resource to be converted for the thread number to be converted include:

当所述待转换线程号为一个时,读取对应的线程子先入先出缓存中最先写入的第一真实资源转化请求,并将最先写入的第一真实资源转化请求对应的虚拟重命名资源编号作为所述待转换虚拟重命名资源编号;需要说明的是,待转换线程号为一个时,就可以直接根据该待转换线程号直接读取对应的线程子先入先出缓存,将该线程子先入先入缓存中处于顶端的转化请求(最早被写入该缓存的最老的第一真实资源转化请求)读出,并为其分配真实重命名资源编号,实现该请求对应的虚拟重命名资源编号与真实重命名资源编号的映射,为后续的指令调度执行提供准备;When the thread number to be converted is one, read the first real resource conversion request first written in the corresponding thread sub-first-in-first-out cache, and write the first real resource conversion request corresponding to the first real resource conversion request first The rename resource number is used as the virtual rename resource number to be converted; it should be noted that when the thread number to be converted is one, the corresponding thread sub-first-in-first-out cache can be directly read directly according to the thread number to be converted, and the This thread reads out the conversion request at the top of the first-in-first-in cache (the oldest first real resource conversion request that was first written into the cache), and assigns a real resource number for renaming to realize the virtual rename corresponding to the request. The mapping between the named resource number and the real rename resource number provides preparation for the subsequent instruction scheduling execution;

当所述待转换线程号为多个时,从所述主先入先出缓存中读取与所述待转换线程号对应的最先写入的第二真实资源转化请求,并将最先写入的第二真实资源转化请求对应的线程号作为优选转换线程号,以及读取所述优选转换线程号对应的线程子先入先出缓存中最先写入的第一真实资源转化请求,将最先写入的第一真实资源转化请求对应的虚拟重命名资源编号作为所述待转换虚拟重命名资源编号;需要说明的是,待转换线程号为多个时,需要先将各个待转换线程号分别与主先入先出缓存中按时序写入的线程号进行匹配,找到与待转换线程号中的一个线程号对应的最先写入的最老第二真实资源转化请求,再读取该第二真实资源转化请求中的线程号作为优选转换线程号,并根据该优选线程号对去读取对应的线程子先入先出缓存,获取该缓存中的最先写入的最老第一真实资源转化请求,以及对其分配真实重命名资源编号,实现该请求对应的虚拟重命名资源编号与真实重命名资源编号的映射,为后续的指令调度执行提供准备;比如,主先入先出缓存中从顶部至顶端的记录为“线程1线程2线程1线程3线程2”,且待转换线程为线程2和线程3,则此时从主先入先出缓存中筛选出来的最先写入的转化请求就是内容为“线程2”的第二真实资源转化请求,读取该请求就可得到对应的优选转换线程号(线程2),再去读取线程2对应的线程子先入先出缓存顶部的最先写入的第一真实资源转化请求得到需要转化的虚拟重命名资源编号(比如,15),则为该虚拟重命名资源编号(15)分别对应的真实重命名资源编号。When there are multiple thread numbers to be converted, read the first written second real resource conversion request corresponding to the thread number to be converted from the main first-in-first-out cache, and write it first The thread number corresponding to the second real resource conversion request is used as the preferred conversion thread number, and the first real resource conversion request written first in the first-in-first-out cache of the thread sub-thread corresponding to the preferred conversion thread number is read, and the first The number of the virtual rename resource corresponding to the written first real resource conversion request is used as the number of the virtual rename resource to be converted; it should be noted that when there are multiple thread numbers to be converted, each thread number to be converted needs to be divided into Match the thread numbers written in time sequence in the main FIFO cache, find the oldest second real resource conversion request written first corresponding to one of the thread numbers to be converted, and then read the second real resource conversion request The thread number in the real resource conversion request is used as the preferred conversion thread number, and the corresponding thread sub-first-in-first-out cache is read according to the preferred thread number pair, and the oldest real resource conversion first written in the cache is obtained request, and allocate the real rename resource number to it, realize the mapping between the virtual rename resource number corresponding to the request and the real rename resource number, and provide preparation for the subsequent instruction scheduling execution; for example, from the top The record to the top is "Thread 1, Thread 2, Thread 1, Thread 3, Thread 2", and the threads to be converted are Thread 2 and Thread 3, then the first written conversion request screened out from the main FIFO cache at this time is The content is the second real resource conversion request of "Thread 2". Read this request to get the corresponding preferred conversion thread number (Thread 2), and then read the first resource at the top of the first-in-first-out cache corresponding to Thread 2. The written first real resource conversion request obtains the virtual rename resource number (for example, 15) that needs to be converted, then it is the real rename resource number corresponding to the virtual rename resource number (15).

响应于所述待转换虚拟重命名资源编号对应的真实重命名资源编号分配完成,将对应的第一真实资源转化请求和第二真实资源转化请求清除;In response to the allocation of the real rename resource number corresponding to the virtual rename resource number to be converted is completed, clear the corresponding first real resource conversion request and the second real resource conversion request;

本实例在实现上述虚拟重命名资源与真实重命名资源间的有效转化后,将筛选出的第一真实资源转化请求从线程子先入先出缓存中清除,并将主先入先出缓存中记录的该线程的最老第二真实资源转化请求也及时删除,以避免缓存资源无效占用的同时,也能有效保证后续真实资源重命名资源动态分配管理的高效性和可靠性。In this example, after realizing the effective conversion between the above-mentioned virtual rename resource and real rename resource, the filtered first real resource conversion request is cleared from the thread sub-FIFO cache, and the primary FIFO cache record The thread's oldest second real resource conversion request is also deleted in time to avoid invalid occupation of cache resources and effectively ensure the efficiency and reliability of subsequent real resource renaming resource dynamic allocation management.

本申请实施例通过响应于线程指令接收,将线程指令依次按照取指译码、重命名、指令调度和指令提交的顺序进行流水线处理,当线程指令进入重命名阶段时,在预先设置的虚拟重命名资源域内为线程指令分配对应的虚拟重命名资源编号,将虚拟重命名资源编号添加资源对应标记,并在线程指令进入指令调度阶段时,根据对应的资源对应标记,判断对应的虚拟重命名资源编号是否已对应真实重命名资源,若是,则为线程指令分配真实重命名资源编号并调度执行,反之,则等待至对应的虚拟重命名资源编号转换为真实重命名资源编号后再调度执行的技术方案,通过设置虚拟重命名资源域,动态管理在重命名阶段分配且在该阶段之后才会被直接使用的重命名资源,不仅减小了重命名阶段指令被阻塞的概率,将重命名资源缺失的影响延后到指令调度阶段,消除了多线程指令间的假相关性,提高了多线程处理器流水线的利用率,而且能在虚拟重命名资源转换为真实重命名资源时,兼顾多线程处理器的每个线程指令间的历史信息,多个线程间的历史信息以及线程优先级信息,对真实重命名资源动态调度依据有效性保证和处理器资源占用进行合理平衡,提高多线程处理器的运行效率,进而在不增加处理器面积、不增加时序收敛难度的同时,为多线程处理器的高效运行提供可靠的技术支持。In the embodiment of the present application, in response to the receipt of the thread instruction, the thread instruction is sequentially processed in the order of fetching and decoding, renaming, instruction scheduling, and instruction submission. When the thread instruction enters the renaming stage, the preset virtual rename In the naming resource field, assign the corresponding virtual renaming resource number to the thread instruction, add the resource corresponding mark to the virtual renaming resource number, and judge the corresponding virtual renaming resource according to the corresponding resource corresponding mark when the thread instruction enters the instruction scheduling stage Whether the number corresponds to the real rename resource, if so, assign the real rename resource number to the thread instruction and schedule execution, otherwise, wait until the corresponding virtual rename resource number is converted into a real rename resource number and then schedule execution The solution, by setting the virtual renaming resource domain, dynamically manages the renaming resources that are allocated in the renaming stage and will be used directly after this stage, which not only reduces the probability of blocking instructions in the renaming stage, but also eliminates the lack of renaming resources. The impact of the delay is delayed to the instruction scheduling stage, which eliminates the false correlation between multi-threaded instructions, improves the utilization rate of the multi-threaded processor pipeline, and can take into account the multi-threaded processing when the virtual renaming resource is converted into a real renaming resource. The historical information between each thread instruction of the processor, the historical information among multiple threads, and the thread priority information, and the dynamic scheduling of real renaming resources are based on the validity guarantee and processor resource occupation. Reasonable balance, improve the performance of multi-threaded processors Operating efficiency, and then provide reliable technical support for the efficient operation of multi-threaded processors without increasing the area of the processor or increasing the difficulty of timing convergence.

需要说明的是,虽然上述流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。It should be noted that although the various steps in the above flow chart are displayed sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders.

在一个实施例中,如图6所示,提供了一种多线程处理器重命名资源管理系统,响应于线程指令接收,将所述线程指令依次按照取指译码、重命名、指令调度和指令提交的顺序进行流水线处理,所述系统包括:In one embodiment, as shown in FIG. 6 , a multithreaded processor renaming resource management system is provided. In response to receiving a thread instruction, the thread instruction is sequentially followed by instruction fetching and decoding, renaming, instruction scheduling, and instruction The order of submission is pipelined, and the system includes:

虚拟资源分配模块1,用于当所述线程指令进入重命名阶段时,在预先设置的虚拟重命名资源域内,为所述线程指令分配对应的虚拟重命名资源编号,并将所述虚拟重命名资源编号添加资源对应标记;所述资源对应标记包括已对应真实资源和未对应真实资源;The virtual resource allocation module 1 is configured to assign a corresponding virtual rename resource number to the thread instruction in a preset virtual rename resource field when the thread instruction enters the renaming stage, and assign the virtual rename resource number to the virtual rename resource. A resource corresponding mark is added to the resource number; the resource corresponding mark includes a corresponding real resource and an uncorresponding real resource;

真实资源转化模块2,用于当所述线程指令进入指令调度阶段时,根据对应的资源对应标记,判断对应的虚拟重命名资源编号是否已对应真实重命名资源,若是,则为所述线程指令分配真实重命名资源编号并调度执行,反之,则等待至将对应的虚拟重命名资源编号转换为真实重命名资源编号后再调度执行。The real resource conversion module 2 is used to determine whether the corresponding virtual rename resource number corresponds to the real rename resource according to the corresponding resource corresponding mark when the thread instruction enters the instruction scheduling stage, and if so, it is the thread instruction Assign a real rename resource number and schedule execution, otherwise, wait until the corresponding virtual rename resource number is converted into a real rename resource number before scheduling execution.

关于一种多线程处理器重命名资源管理系统的具体限定可以参见上文中对于一种多线程处理器重命名资源管理方法的限定,对应的技术效果也可等同得到,在此不再赘述。上述一种多线程处理器重命名资源管理系统中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific limitations on a multi-threaded processor renaming resource management system, refer to the above-mentioned limitation on a multi-threaded processor renaming resource management method, and the corresponding technical effects can also be obtained equally, and will not be repeated here. Each module in the above-mentioned multi-threaded processor renaming resource management system can be fully or partially realized by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.

在一个实施例中,如图7所示,提供了一种多线程处理器重命名资源管理装置包括:存储有可执行程序代码的存储器;与存储器耦合的执行器;执行器调用存储器中存储的可执行程序代码时执行上述方法步骤。In one embodiment, as shown in FIG. 7 , a resource management device for renaming a multithreaded processor is provided, including: a memory storing executable program code; an executor coupled to the memory; the executor calls the executable code stored in the memory. The above method steps are executed when the program code is executed.

在一个实施例中,提供了一种计算机存储介质,其上存储有计算机指令,计算机指令被调用时执行上述方法步骤。In one embodiment, a computer storage medium is provided, on which computer instructions are stored, and the above method steps are executed when the computer instructions are called.

综上,本发明实施例提供的一种多线程处理器重命名资源管理方法、系统、装置及介质,其多线程处理器重命名资源管理方法实现了通过响应于线程指令接收,将线程指令依次按照取指译码、重命名、指令调度和指令提交的顺序进行流水线处理,当线程指令进入重命名阶段时,在预先设置的虚拟重命名资源域内为线程指令分配对应的虚拟重命名资源编号,将虚拟重命名资源编号添加资源对应标记,并在线程指令进入指令调度阶段时,根据对应的资源对应标记,判断对应的虚拟重命名资源编号是否已对应真实重命名资源,若是,则为线程指令分配真实重命名资源编号并调度执行,反之,则等待至对应的虚拟重命名资源编号转换为真实重命名资源编号后再调度执行的技术方案,该方法通过设置虚拟重命名资源域,动态管理在重命名阶段分配且在该阶段之后才会被直接使用的重命名资源,将流水线阻塞周期延后到保留站,消除多线程指令间的假相关性,有效降低多线程处理器中线程指令因重命名资源不足而被阻塞在前端流水线的概率,提高了多线程处理器流水线的利用率,而且能在虚拟重命名资源转换为真实重命名资源时,兼顾多线程处理器的每个线程指令间的历史信息,多个线程间的历史信息以及线程优先级信息,对真实重命名资源动态调度依据有效性保证和处理器资源占用进行合理平衡,提高多线程处理器的运行效率,进而在不增加处理器面积、不增加时序收敛难度的同时,为多线程处理器的高效运行提供可靠的技术支持。To sum up, the embodiment of the present invention provides a multi-thread processor renaming resource management method, system, device, and medium. The multi-thread processor renaming resource management method realizes that thread commands are sequentially fetched in response to receiving thread commands. Refers to the sequence of decoding, renaming, instruction scheduling, and instruction submission for pipeline processing. When a thread instruction enters the renaming stage, the corresponding virtual renaming resource number is assigned to the thread instruction in the preset virtual renaming resource field, and the virtual Rename the resource number to add the resource corresponding mark, and when the thread instruction enters the instruction scheduling stage, according to the corresponding resource corresponding mark, judge whether the corresponding virtual rename resource number has corresponded to the real rename resource, and if so, assign the real resource to the thread instruction Rename the resource number and schedule execution, otherwise, wait until the corresponding virtual rename resource number is converted into a real rename resource number and then schedule the technical solution for execution. This method dynamically manages renaming by setting the virtual rename resource field. The renaming resources that are allocated in the stage and will be used directly after this stage delay the pipeline blocking cycle to the reservation station, eliminate the false correlation between multi-threaded instructions, and effectively reduce the renaming resources caused by thread instructions in multi-threaded processors. The probability of being blocked in the front-end pipeline due to insufficient resources improves the utilization rate of the multi-threaded processor pipeline, and can take into account the historical information between each thread instruction of the multi-threaded processor when the virtual renaming resource is converted into a real renaming resource , the historical information among multiple threads and the thread priority information, the dynamic scheduling of the real renaming resources is based on the validity guarantee and the processor resource occupation to make a reasonable balance, improve the operating efficiency of the multi-threaded processor, and then do not increase the processor area , While not increasing the difficulty of timing convergence, it provides reliable technical support for the efficient operation of multi-threaded processors.

本说明书中的各个实施例均采用递进的方式描述,各个实施例直接相同或相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。需要说明的是,上述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。Each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment can be directly referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to part of the description of the method embodiment. It should be noted that the various technical features of the above-mentioned embodiments can be combined arbitrarily. For the sake of concise description, all possible combinations of the various technical features in the above-mentioned embodiments are not described. Where there is a contradiction, all should be deemed to be within the scope of this specification.

以上所述实施例仅表达了本申请的几种优选实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本技术领域的普通技术人员来说,在不脱离本发明技术原理的前提下,还可以做出若干改进和替换,这些改进和替换也应视为本申请的保护范围。因此,本申请专利的保护范围应以所述权利要求的保护范围为准。The above-mentioned embodiments only express several preferred implementation modes of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as limiting the scope of the patent for the invention. It should be noted that those skilled in the art can make several improvements and substitutions without departing from the technical principle of the present invention, and these improvements and substitutions should also be regarded as the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the scope of protection of the claims.

Claims (12)

1. A method for renaming resources in a multithreaded processor, responsive to receipt of a thread instruction, for pipelining the thread instruction sequentially in the order of instruction fetch decoding, renaming, instruction scheduling, and instruction submission, the method comprising the steps of:
when the thread instruction enters a renaming stage, distributing a corresponding virtual renaming resource number for the thread instruction in a preset virtual renaming resource domain, and adding a resource corresponding mark to the virtual renaming resource number;
when the thread instruction enters an instruction scheduling stage, judging whether the corresponding virtual renamed resource number corresponds to the real renamed resource according to the corresponding resource corresponding mark, if so, distributing the real renamed resource number for the thread instruction and scheduling execution, otherwise, waiting until the corresponding virtual renamed resource number is converted into the real renamed resource number and then scheduling execution.
2. The method of claim 1, wherein the step of pre-setting a virtual rename resource domain comprises:
and setting a virtual renaming resource domain with a preset size according to the real renaming resource number and the reservation station entry number of the multithreading processor.
3. The multi-threaded processor renaming resource management method of claim 1 wherein the resource correspondence indicia includes corresponding real resources and non-corresponding real resources; the step of adding the virtual renamed resource number with a resource corresponding mark comprises the following steps:
obtaining the number of remaining renamed resources in the true renamed resource domain according to a preset resource counter; the upper limit of the count of the resource counter is the real renamed resource number of the multithreaded processor;
when the number of the remaining renamed resources is zero, setting the resource corresponding mark of the virtual renamed resource number as a real resource which is not corresponding to the virtual renamed resource number;
and when the number of the remaining renamed resources is not zero, setting the resource corresponding mark of the virtual renamed resource number as the corresponding real resource.
4. The method of claim 3, wherein the step of adding a resource correspondence tag to the virtual rename resource number comprises:
when the resource corresponding mark is not corresponding to the real resource, respectively generating a corresponding first real resource conversion request and a corresponding second real resource conversion request according to the corresponding virtual renamed resource number and thread number;
And writing the first real resource conversion request into a thread sub first-in first-out buffer memory corresponding to the thread instruction, and simultaneously writing the second real resource conversion request into a main first-in first-out buffer memory shared by all thread instructions.
5. The method of claim 4, wherein the step of converting the corresponding virtual rename resource number to a real rename resource number comprises:
acquiring the current residual real renamed resource number according to the resource counter, and acquiring monitoring information of each thread number when the current residual real renamed resource number is not zero; obtaining corresponding real resource conversion priority according to the monitoring information of each thread number, and obtaining at least one thread number to be converted according to the real resource conversion priority of each thread number;
obtaining a virtual rename resource number to be converted according to the thread number to be converted, and distributing a corresponding real rename resource number for the virtual rename resource number to be converted;
and responding to the completion of the allocation of the real renamed resource numbers corresponding to the virtual renamed resource numbers to be converted, and clearing the corresponding first real resource conversion request and second real resource conversion request.
6. The method of claim 5, wherein the monitoring information includes thread priority, a number of thread instructions to fetch a decode stage, and a first real resource translation request number of a thread child first-in-first-out cache.
7. The method of claim 5, wherein the step of obtaining the corresponding real resource conversion priority based on the monitoring information of each thread comprises:
and carrying out weighted summation on each monitoring information according to the corresponding preset weight value to obtain the real resource conversion priority.
8. The method of claim 5, wherein the step of obtaining at least one thread number to be translated based on real resource translation priorities of respective thread numbers comprises:
and selecting the maximum value in all the real resource conversion priorities, and taking the thread number corresponding to the maximum value as the thread number to be converted.
9. The method of claim 5, wherein the step of obtaining a virtual rename resource number to be converted from the thread number to be converted comprises:
When the thread number to be converted is one, reading a first real resource conversion request written first in a corresponding thread sub first-in first-out buffer memory, and taking a virtual rename resource number corresponding to the first real resource conversion request written first as the virtual rename resource number to be converted;
when the number of the threads to be converted is multiple, reading a first written second real resource conversion request corresponding to the threads to be converted from the main first-in first-out buffer memory, taking the thread number corresponding to the first written second real resource conversion request as a preferred conversion thread number, reading a first real resource conversion request which is written first in the thread sub first-in first-out buffer memory corresponding to the preferred conversion thread number, and taking a virtual renaming resource number corresponding to the first real resource conversion request which is written first as the virtual renaming resource number to be converted.
10. A multithreaded processor renaming resource management system for sequentially pipelining thread instructions in the order of instruction fetch decoding, renaming, instruction scheduling, and instruction submission in response to thread instruction receipt, the system comprising:
The virtual resource allocation module is used for allocating corresponding virtual renaming resource numbers for the thread instructions in a preset virtual renaming resource domain when the thread instructions enter a renaming stage, and adding resource corresponding marks to the virtual renaming resource numbers;
and the real resource conversion module is used for judging whether the corresponding virtual renamed resource number corresponds to the real renamed resource according to the corresponding resource corresponding mark when the thread instruction enters the instruction scheduling stage, if so, distributing the real renamed resource number for the thread instruction and scheduling execution, otherwise, waiting until the corresponding virtual renamed resource number is converted into the real renamed resource number and then scheduling execution.
11. A multi-threaded processor renaming resource management device, the device comprising:
a memory storing executable program code;
an actuator coupled to the memory;
the executor invoking the executable program code stored in the memory to perform the multi-threaded processor renaming resource management method of any of claims 1-9.
12. A computer storage medium having stored thereon computer instructions which, when invoked, perform the multi-threaded processor renaming resource management method of any of claims 1-9.
CN202310664422.8A 2023-06-06 2023-06-06 Method, system, device and medium for managing renaming resources of multithreaded processor Active CN116662006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310664422.8A CN116662006B (en) 2023-06-06 2023-06-06 Method, system, device and medium for managing renaming resources of multithreaded processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310664422.8A CN116662006B (en) 2023-06-06 2023-06-06 Method, system, device and medium for managing renaming resources of multithreaded processor

Publications (2)

Publication Number Publication Date
CN116662006A true CN116662006A (en) 2023-08-29
CN116662006B CN116662006B (en) 2024-02-23

Family

ID=87723944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310664422.8A Active CN116662006B (en) 2023-06-06 2023-06-06 Method, system, device and medium for managing renaming resources of multithreaded processor

Country Status (1)

Country Link
CN (1) CN116662006B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117270971A (en) * 2023-09-15 2023-12-22 上海合芯数字科技有限公司 Load queue control method, device and processor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030217249A1 (en) * 2002-05-20 2003-11-20 The Regents Of The University Of Michigan Method and apparatus for virtual register renaming to implement an out-of-order processor
US7290261B2 (en) * 2003-04-24 2007-10-30 International Business Machines Corporation Method and logical apparatus for rename register reallocation in a simultaneous multi-threaded (SMT) processor
CN101601008A (en) * 2007-01-24 2009-12-09 高通股份有限公司 Use of a register renaming system for forwarding intermediate results between constituent instructions of extended instructions
CN112214241A (en) * 2020-09-23 2021-01-12 上海赛昉科技有限公司 Method and system for distributed instruction execution unit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030217249A1 (en) * 2002-05-20 2003-11-20 The Regents Of The University Of Michigan Method and apparatus for virtual register renaming to implement an out-of-order processor
US7290261B2 (en) * 2003-04-24 2007-10-30 International Business Machines Corporation Method and logical apparatus for rename register reallocation in a simultaneous multi-threaded (SMT) processor
CN101601008A (en) * 2007-01-24 2009-12-09 高通股份有限公司 Use of a register renaming system for forwarding intermediate results between constituent instructions of extended instructions
CN112214241A (en) * 2020-09-23 2021-01-12 上海赛昉科技有限公司 Method and system for distributed instruction execution unit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117270971A (en) * 2023-09-15 2023-12-22 上海合芯数字科技有限公司 Load queue control method, device and processor
CN117270971B (en) * 2023-09-15 2024-03-19 上海合芯数字科技有限公司 Load queue control method and device and processor

Also Published As

Publication number Publication date
CN116662006B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN1294484C (en) Breaking replay dependency loops in processor using rescheduled replay queue
EP2411908B1 (en) Tracking deallocated load instructions using a dependence matrix
CN1126028C (en) Computer processor with replay system
CN100392622C (en) Processor with memory sequential buffer
US20090100249A1 (en) Method and apparatus for allocating architectural register resources among threads in a multi-threaded microprocessor core
US9465670B2 (en) Generational thread scheduler using reservations for fair scheduling
US8386753B2 (en) Completion arbitration for more than two threads based on resource limitations
US20060184946A1 (en) Thread priority method, apparatus, and computer program product for ensuring processing fairness in simultaneous multi-threading microprocessors
CN1643499A (en) Thread signaling in multi-threaded network processor
US9665375B2 (en) Mitigation of thread hogs on a threaded processor and prevention of allocation of resources to one or more instructions following a load miss
WO2013147852A1 (en) Instruction scheduling for a multi-strand out-of-order processor
CN102566974A (en) Instruction acquisition control method based on simultaneous multithreading
CN115640052B (en) Multi-core and multi-pipeline parallel execution optimization method for graphics processors
US20160026463A1 (en) Zero cycle move using free list counts
TWI768649B (en) Warp scheduling method and stream multiprocessor using the same
US11734014B2 (en) Device and processor for implementing resource index replacement
US7725659B2 (en) Alignment of cache fetch return data relative to a thread
CN1326567A (en) Job-parallel processor
CN116662006B (en) Method, system, device and medium for managing renaming resources of multithreaded processor
KR101466934B1 (en) Distributed dispatch using concurrent, non-sequential dispatch
CN110515659B (en) A method and device for executing atomic instructions
US20080244224A1 (en) Scheduling a direct dependent instruction
CN101923460A (en) A Dynamic Multi-Thread Partitioning Method
WO2025200126A1 (en) Instruction processing method and apparatus, processor, and computer-readable storage medium
CN112114967B (en) GPU resource reservation method based on service priority

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20250725

Granted publication date: 20240223

PP01 Preservation of patent right