CN102662629B - 一种减少处理器寄存器文件的写端口数目的方法 - Google Patents

一种减少处理器寄存器文件的写端口数目的方法 Download PDF

Info

Publication number
CN102662629B
CN102662629B CN201210117108.XA CN201210117108A CN102662629B CN 102662629 B CN102662629 B CN 102662629B CN 201210117108 A CN201210117108 A CN 201210117108A CN 102662629 B CN102662629 B CN 102662629B
Authority
CN
China
Prior art keywords
instruction
scheduler
latency
decoding module
register file
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.)
Expired - Fee Related
Application number
CN201210117108.XA
Other languages
English (en)
Other versions
CN102662629A (zh
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.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN201210117108.XA priority Critical patent/CN102662629B/zh
Publication of CN102662629A publication Critical patent/CN102662629A/zh
Application granted granted Critical
Publication of CN102662629B publication Critical patent/CN102662629B/zh
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

本发明公开了一种减少处理器寄存器文件的写端口数目的方法,增加一个调度器模块,用于接收来自于译码模块的信息,对指令发射进行调度;译码模块增加功能,为每条指令提供额外的信息,所述信息被发送到调度器。具有低成本、低功耗的优点,适用于计算机技术领域。

Description

一种减少处理器寄存器文件的写端口数目的方法
技术领域
本发明属于计算机技术领域,涉及一种减少处理器寄存器文件的写端口数目的方法。
背景技术
一条指令的运行可以分成四个阶段:取指,译码,执行,回写。因此,处理器的组成可以分成四个单元模块:取指单元模块,译码单元模块,执行单元模块,回写单元模块。如图1所示。
由于现代的处理器设计均采用了流水线技术,使得上述的那四个单元模块,均能在每个时钟周期内处理至少一条指令。
在实际运行中,不同的指令在执行阶段所需要的时钟周期是不同的。例如,对于某处理器来说,其整形乘法的执行需要4个时钟周期,而其浮点乘法的执行需要5个时钟周期。在下文中,指令在执行阶段所需要的时钟周期数,称为指令执行的latency。比如,上述的整形乘法指令的latency是4,浮点乘法指令的latency是5。
在处理器设计的时候,通常会实现多个执行单元,每个执行单元负责执行那些latency一样的指令。如图2所示。例如,整形乘法由专门的整形算术执行单元负责,浮点乘法由专门的浮点算术执行单元负责。对于不同的处理器,其执行单元的数目可以是不一样的。
由于存在多个执行单元,这会带来一个新的问题:在某些情况下,不同latency的指令,会在同一时刻回写到寄存器文件里,如图3所示。这对寄存器文件的设计提出了多个写端口的需求。但是,出于低成本、低功耗的考虑,我们的设计不想采用多个写端口的寄存器文件,而是采用单个写端口的寄存器文件,因此,如何解决多条指令同时回写的问题,正是本发明所要解决的问题所在。
发明内容
本发明的目的在于克服上述技术缺陷,提供一种减少处理器寄存器文件的写端口数目的方法,该方法使得寄存器文件只需要1个写端口,就能够支持不同latency的多条指令的流水线执行,从而有效减少处理器的功耗和电路面积。
其技术方案为:
一种减少处理器寄存器文件的写端口数目的方法,增加一个调度器模块,用于接收来自于译码模块的信息,对指令发射进行调度;译码模块增加功能,为每条指令提供额外的信息,所述信息被发送到调度器。
所述调度器在发射指令到执行单元之前,会判断指令序列是否会在将来发生同时回写,若发生,将通过适当的指令调度来避免多条指令同时回写的情况发生,从而可以采用单个写端口的寄存器文件,来减低处理器整体的功耗和电路面积。
所述译码模块在进行指令译码的时候,把指令的latency数值,转换成独热码;
译码模块把所述的从指令latency数值转换出的独热码,发送给调度器;
调度器接受到指令latency数值的独热码,把它和调度器内部的记分板做逻辑与的运算。
与现有技术相比,本发明的有益效果为:
本发明方法是采用单个写端口的寄存器文件,因此,解决了多条指令同时回写的问题,具有低成本、低功耗的优点。
附图说明
图1单个执行单元的处理器组成示意图;
图2多个执行单元的处理器组成示意图;
图3latency不同的多条指令的同时回写示意图;
图4举例说明调度器的算法过程图;
图5经过调度后的指令序列。
具体实施方式
下面结合附图与具体实施方式对本发明作进一步详细地说明。
本发明方法需要给译码模块增加功能,该功能为每条指令提供额外的信息,这些信息将会被发送到调度器。
本发明方法需要增加一个调度器模块,该模块接收来自于译码模块的信息,对指令发射进行调度。
译码模块在进行指令译码的时候,把指令的latency数值,转换成独热码。例如:某指令的latency数值是5,转换成独热码是2′b10000;某指令的latency数值是3,转换成独热码是2′b00100。
译码模块把上述的从指令latency数值转换出的独热码,发送给调度器。
调度器接受到指令latency数值的独热码,把它和调度器内部的记分板做逻辑与的运算。
该过程的伪代码如下:
t=(req&scoreboard)&req;
can_launch=t?1:0;
scoreboard=(scoreboard>>1)|t;
该过程的举例说明如下,如图4所示。
假设待发射的指令分别是:指令A、指令B、指令C;它们的latency分别是:5、4、3;对应的独热码分别是2′b10000、2′b01000、2′b00100;那么,在每个时钟周期里:
时钟周期1:指令A的发射请求的第4比特是1,记分板的第4比特是0,结果是可以发射。
时钟周期2:指令B的发射请求的第3比特是1,记分板的第3比特是1,结果是禁止发射。
时钟周期3:指令B继续请求发射,其发射请求的第3比特是1,记分板的第3比特已变成0,结果是可以发射。
时钟周期4:指令C的发射请求的第2比特是1,记分板的第2比特是1,结果是禁止发射。
时钟周期5:指令C继续请求发射,其发射请求的第2比特是1,记分板的第2比特已变成0,结果是可以发射。
通过使用上述的调度,该例子的指令发射变成如图5所示。
以上所述,仅为本发明较佳的具体实施方式,本发明的保护范围不限于此,任何熟悉本技术领域的技术人员在本发明披露的技术范围内,可显而易见地得到的技术方案的简单变化或等效替换均落入本发明的保护范围内。

Claims (1)

1.一种减少处理器寄存器文件的写端口数目的方法,其特征在于,增加一个调度器模块,用于接收来自于译码模块的信息,对指令发射进行调度;译码模块增加功能,为每条指令提供额外的信息,所述信息被发送到调度器;所述调度器在发射指令到执行单元之前,会判断指令序列是否会在将来发生同时回写,若发生,将通过适当的指令调度来避免多条指令同时回写的情况发生;所述译码模块在进行指令译码的时候,把指令的latency数值,转换成独热码;译码模块把所述的从指令latency数值转换出的独热码,发送给调度器;调度器接受到指令latency数值的独热码,把它和调度器内部的记分板做逻辑与的运算。
CN201210117108.XA 2012-04-20 2012-04-20 一种减少处理器寄存器文件的写端口数目的方法 Expired - Fee Related CN102662629B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210117108.XA CN102662629B (zh) 2012-04-20 2012-04-20 一种减少处理器寄存器文件的写端口数目的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210117108.XA CN102662629B (zh) 2012-04-20 2012-04-20 一种减少处理器寄存器文件的写端口数目的方法

Publications (2)

Publication Number Publication Date
CN102662629A CN102662629A (zh) 2012-09-12
CN102662629B true CN102662629B (zh) 2015-09-30

Family

ID=46772130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210117108.XA Expired - Fee Related CN102662629B (zh) 2012-04-20 2012-04-20 一种减少处理器寄存器文件的写端口数目的方法

Country Status (1)

Country Link
CN (1) CN102662629B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10514911B2 (en) 2014-11-26 2019-12-24 International Business Machines Corporation Structure for microprocessor including arithmetic logic units and an efficiency logic unit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737750A (zh) * 2005-08-31 2006-02-22 上海海尔集成电路有限公司 一种新型的8位risc微控制器构架
CN101178646A (zh) * 2006-11-08 2008-05-14 松下电器产业株式会社 多线程处理器
CN101706714A (zh) * 2009-11-23 2010-05-12 北京龙芯中科技术服务中心有限公司 指令发射系统及方法、处理器及其设计方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040199749A1 (en) * 2003-04-03 2004-10-07 Robert Golla Method and apparatus to limit register file read ports in an out-of-order, multi-stranded processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737750A (zh) * 2005-08-31 2006-02-22 上海海尔集成电路有限公司 一种新型的8位risc微控制器构架
CN101178646A (zh) * 2006-11-08 2008-05-14 松下电器产业株式会社 多线程处理器
CN101706714A (zh) * 2009-11-23 2010-05-12 北京龙芯中科技术服务中心有限公司 指令发射系统及方法、处理器及其设计方法

Also Published As

Publication number Publication date
CN102662629A (zh) 2012-09-12

Similar Documents

Publication Publication Date Title
US10552163B2 (en) Method and apparatus for efficient scheduling for asymmetrical execution units
TWI544409B (zh) 執行緒暫停處理器、方法、系統與指令
TWI628594B (zh) 用戶等級分叉及會合處理器、方法、系統及指令
CN105144082B (zh) 基于平台热以及功率预算约束,对于给定工作负荷的最佳逻辑处理器计数和类型选择
US9645819B2 (en) Method and apparatus for reducing area and complexity of instruction wakeup logic in a multi-strand out-of-order processor
US8639882B2 (en) Methods and apparatus for source operand collector caching
US20170315812A1 (en) Parallel instruction scheduler for block isa processor
KR102271986B1 (ko) 다수의 마이크로 오퍼레이션에 대응한 복합 프로그램 명령어의 디코딩
US9069565B2 (en) Processor and control method of processor
US10095623B2 (en) Hardware apparatuses and methods to control access to a multiple bank data cache
US9870226B2 (en) Control of switching between executed mechanisms
GB2548511A (en) Processors, methods, and systems to relax synchronization of accesses to shared memory
US20120290780A1 (en) Multithreaded Operation of A Microprocessor Cache
CN112214241A (zh) 一种分布式指令执行单元的方法及系统
US10152329B2 (en) Pre-scheduled replays of divergent operations
CN102662629B (zh) 一种减少处理器寄存器文件的写端口数目的方法
CN103336681A (zh) 针对采用变长指令集的流水线结构处理器的取指方法
JP2007200180A (ja) プロセッサシステム
US20160179533A1 (en) Scalable event handling in multi-threaded processor cores
CN108845832B (zh) 一种提高处理器主频的流水线细分装置
US10514925B1 (en) Load speculation recovery
CN112559037A (zh) 一种指令执行方法、单元、装置及系统
CN108255587B (zh) 一种同步多线程处理器
Wu et al. A dynamically clustered chip multiprocessor
Nemirovsky et al. Fine-Grain Multithreading

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
DD01 Delivery of document by public notice

Addressee: Wang Ping

Document name: Notice of termination of patent right

DD01 Delivery of document by public notice
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150930

Termination date: 20210420

CF01 Termination of patent right due to non-payment of annual fee