CN111984317A - 用于对存储器中的数据进行寻址的系统和方法 - Google Patents

用于对存储器中的数据进行寻址的系统和方法 Download PDF

Info

Publication number
CN111984317A
CN111984317A CN202010434498.8A CN202010434498A CN111984317A CN 111984317 A CN111984317 A CN 111984317A CN 202010434498 A CN202010434498 A CN 202010434498A CN 111984317 A CN111984317 A CN 111984317A
Authority
CN
China
Prior art keywords
cpu
digital signal
signal processor
offset
addressing
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.)
Pending
Application number
CN202010434498.8A
Other languages
English (en)
Inventor
T·D·安德森
D·Q·布伊
J·茨维西亚克
K·车尔卡
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.)
Texas Instruments Inc
Original Assignee
Texas Instruments Inc
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 Texas Instruments Inc filed Critical Texas Instruments Inc
Publication of CN111984317A publication Critical patent/CN111984317A/zh
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/30123Organisation of register space, e.g. banked or distributed register file according to context, e.g. thread buffers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/34Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
    • G06F9/355Indexed addressing
    • G06F9/3557Indexed addressing using program counter as base address
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30098Register arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30098Register arrangements
    • G06F9/30101Special purpose registers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/30134Register stacks; shift registers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/321Program or instruction counter, e.g. incrementing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

本申请题为“用于对存储器中的数据进行寻址的系统和方法”。公开一种具有CPU(110)的数字信号处理器100,该CPU具有程序计数器寄存器(121)并且可选地具有用于在较高优先级事件抢占较低优先级事件处理程序时保存和恢复事件处理程序上下文的事件上下文堆栈指针寄存器(122)。CPU(110)被配置为使用最小化的寻址模式集,包括使用事件上下文堆栈指针寄存器(122)和程序计数器寄存器(121)来计算用于将数据存储在存储器(112、114)中的地址。CPU(110)还可以消除后递减寻址、前递增寻址和后递减寻址,并且仅依赖于后递增寻址。

Description

用于对存储器中的数据进行寻址的系统和方法
背景技术
现代数字信号处理器(DSP)面临多重挑战。工作量不断增加,需要增加带宽。片上系统(SOC)的大小和复杂性不断增长。存储器系统延迟严重影响某些类别的算法。此外,用于对存储器中的数据进行寻址的模式可能很复杂和/或可能无法满足许多DSP的需求。
发明内容
本文描述的示例包括一种用于对存储器中的数据进行寻址的方法。该方法包括使用事件上下文(context)堆栈指针作为基地址。本文描述的其他示例包括数字信号处理器。该数字信号处理器包括CPU。CPU包括程序计数器寄存器,其中CPU被配置为用作将数据存储在存储器中的基地址。CPU另外被配置为使用后递增寻址来寻址存储器,而不被配置为使用前递增寻址、前递减寻址或后递减寻址来寻址存储器。CPU还可以包括事件上下文堆栈指针寄存器,该事件上下文堆栈指针寄存器用于在较高优先级事件抢占较低优先级事件处理程序(handler)时保存和恢复事件处理程序上下文。CPU可替代地使用事件上下文堆栈指针寄存器作为基地址,以用于将数据存储在存储器中。
本文描述的其他示例包括数字信号处理器系统。该数字信号处理器系统包括存储器和数字信号处理器。该数字信号处理器包括CPU。CPU包括程序计数器寄存器,其中CPU被配置为用作将数据存储在存储器中的基地址。CPU另外被配置为使用后递增寻址来寻址存储器,而不被配置为使用前递增寻址、前递减寻址或后递减寻址来寻址存储器。CPU还可以包括事件上下文堆栈指针寄存器,该事件上下文堆栈指针寄存器用于在较高优先级事件抢占较低优先级事件处理程序时保存和恢复事件处理程序上下文。CPU可替代地使用事件上下文堆栈指针寄存器作为基地址,以用于将数据存储在存储器中。
附图说明
为了详细描述各种示例,现在将参考附图,其中:
图1示出根据本文所描述的实施例的DSP;和
图2示出示例性事件上下文堆栈指针寄存器。
具体实施方式
图1示出DSP 100的框图,该DSP 100包括矢量CPU核110。如图1所示,矢量CPU 110包括指令提取单元141、指令分派单元142、指令解码单元143和控制寄存器144。矢量CPU110进一步包括用于从一级数据缓存器(L1D)112接收和处理64位标量数据的64位寄存器文件150(例如,指定的寄存器A0至A15和D0至D15)和64位功能单元151。矢量CPU 110还包括用于从一级数据缓存器(L1D)112和/或从流引擎113接收和处理512位矢量数据的512位寄存器文件160和512位功能单元161。矢量CPU 110还可以包括调试单元171和中断逻辑单元172。
DSP 100还包括流引擎113。如美国专利第9,606,803号(以下称为“803专利”,其全部内容通过引用并入本文)所述,诸如流引擎113的流引擎可以增加CPU的可用带宽,减少缓存错失的数量,减少标量操作,并且允许进行多维存储器访问。DSP 100在矢量CPU 110中还包括流地址生成器180、181、182、183。如与本文同时提交并通过引用并入本文的题为“Streaming Address Generation”的美国专利申请(以下称为“Streaming AddressGeneration申请”)中所述,流地址生成器180生成用于对流数据进行寻址的偏移量。尽管图1示出四个流地址生成器,如在该同时提交的申请中所述,可以有一个、两个、三个或四个流地址生成器,并且在其他示例中有多于四个流地址生成器。如Streaming AddressGeneration申请中所述,由流地址生成器180、181、182、183生成的偏移量分别被存储在流地址偏移量寄存器SA0 190、SA1 191、SA2 192和SA3 193中。
控制寄存器144包括程序计数器(PC)寄存器121,并且可选地包括一个或多个事件上下文堆栈指针(ECSP)122。DSP使用ECSP寄存器122以在较高优先级事件抢占较低优先级事件处理程序时保存和恢复事件处理程序上下文。ECSP寄存器122在中断事件中保留上下文,并且包含在检测到事件时用于堆栈机器状态的地址。图2示出示例性ECSP寄存器,其包括地址21和嵌套中断计数器22。
为了从CPU写入数据,通常使用存储操作。为了将数据读入CPU,通常使用加载操作。为了指示存储器中用于读取或写入数据的地址,通常提供基地址作为操作数并且可选地作为偏移量。
基地址寄存器可以是A0-A15(优选A0-A15)、D0-D15 64位标量寄存器中的任何一个。这些寄存器在下文中被统称为“baseR”。程序计数器(PC)寄存器或事件上下文堆栈指针(ECSP)控制寄存器也可以用作基地址寄存器。
基地址寄存器也可以是64位寄存器。在这种情况下,由于虚拟地址大小通常是49位,因此地址生成逻辑或uTLB查找不使用该寄存器的其余高位(例如15位)。但是,将检查这些位以确保它们全为0或全为1,否则,可能会生成地址异常。
恒定偏移量可以是缩放的5位无符号常量或未缩放的32位带符号常量。该值可以按数据类型进行缩放,例如元素大小(如果元素大小分别是字节(Byte)、半字(Half-Word)、字(Word)或双字(Double-Word),则分别移位0、1、2或3)和结果(移位后最多35位结果)可以以其他方式被符号扩展到49位。然后此偏移量可以被添加到基地址寄存器。当未指定带括号的寄存器或常量时,偏移值可以默认为0。
加载指令和存储指令可以用于偏移,例如A0-A15(优选A8-A15)、D0-D15寄存器。通过将基地址操作数与移位的偏移值操作数相加以执行线性缩放地址计算的ADDA/SUBA指令可以使用例如A0-A15、D0-D15寄存器。总的来说,有效寄存器偏移量被表示为offsetR32。流地址偏移寄存器SA0 190、SA1 191、SA2 192和SA3 193也可以用于加载指令、存储指令、ADDA指令或SUBA指令的偏移。可以使用也可以不使用流地址偏移寄存器SA0 190、SA1 191、SA2 192和SA3 193进行推进。如Streaming Address Generation申请中所述,用于推进流地址偏移寄存器SA0的示例性语法是“SA0++”,其将在用于下一个偏移之后推进偏移。
在地址计算之后,后递增寻址以指定的量更新基地址寄存器。对于后递增寻址,在加法之前的基地址寄存器的值是要从存储器访问的地址。基地址寄存器的后递增操作被表示为baseR++。在访问该值后,此操作将使基地址寄存器递增一个寻址元素大小。
使用程序计数器121作为基地址可以被称为PC相关的寻址模式。PC相关的引用可以与包含引用的提取数据包的PC相关。这对于跨越提取数据包的执行数据包同样成立,其中PC引用可以与包含具有PC相关的寻址模式的指令的提取数据包相关。具体来说,在至少一个示例中,当使用PC相关的寻址模式时用于基地址的地址是包含具有PC相关的寻址模式的.D单元指令的提取数据包的地址。
例如,对于此代码序列:
LDW.D1*PC[0x30],A0
||LDW.D2*PC[0x34],A1
如果由于扩展而使.D1上的指令和.D2上的指令位于不同的提取数据包中,则它们最终将使用PC的不同值来结束。
使用图2所示的ECSP 122作为基地址提供以下优势:在发生中断甚至嵌套中断的情况下,将保留地址。
表1示出根据上述示例的用于加载操作和存储操作的寻址模式:
Figure BDA0002501722790000041
通过将寻址模式限制为仅几个选项并且仅包括后递增(即没有前递增或前递减/后递减),减少了设计验证空间,并且需要较少的操作码位。
在权利要求书的范围内,所描述的实施例中的修改是可能的,并且其他实施例是可能的。

Claims (20)

1.一种数字信号处理器,其包括:
CPU,其包括程序计数器寄存器,
其中所述CPU被配置为使用所述程序计数器寄存器的值作为用于将数据存储在存储器中的基地址,并且被配置为使用后递增寻址来寻址存储器,
其中所述CPU不被配置为使用前递增寻址、前递减寻址或后递减寻址来寻址存储器。
2.根据权利要求1所述的数字信号处理器,其中所述CPU将偏移量添加到存储在所述程序计数器寄存器中的值以计算所述地址。
3.根据权利要求2所述的数字信号处理器,其中所述偏移量是无符号的5位常数。
4.根据权利要求2所述的数字信号处理器,其中所述偏移量是32位常数。
5.一种数字信号处理器系统,其包括:
存储器;
数字信号处理器,其包括:
CPU,其包括程序计数器寄存器,
其中所述CPU被配置为使用所述程序计数器寄存器的值作为用于将数据存储在存储器中的基地址,并且被配置为使用后递增寻址来寻址存储器,
其中所述CPU不被配置为使用前递增寻址、前递减寻址或后递减寻址来寻址存储器。
6.根据权利要求5所述的数字信号处理器系统,其中所述CPU将偏移量添加到存储在所述程序计数器寄存器中的值。
7.根据权利要求6所述的数字信号处理器系统,其中所述偏移量是无符号的5位常数。
8.根据权利要求6所述的数字信号处理器系统,其中,所述偏移量是32位常数。
9.一种用于对存储器中的数据进行寻址的方法,所述方法包括:
使用事件上下文堆栈指针寄存器来保存和恢复事件处理程序上下文;以及
使用所述事件上下文堆栈指针作为基地址。
10.根据权利要求9所述的方法,进一步包括以偏移量偏移所述基地址。
11.根据权利要求10所述的方法,其中所述偏移量是无符号的5位常数。
12.根据权利要求10所述的方法,其中所述偏移量是32位常数。
13.一种数字信号处理器,其包括:
CPU,其包括事件上下文堆栈指针寄存器,所述事件上下文堆栈指针寄存器用于在较高优先级事件抢占较低优先级事件处理程序时保存和恢复事件处理程序上下文,并且
其中所述CPU被配置为使用所述事件上下文堆栈指针寄存器的值作为用于将数据存储在存储器中的基地址。
14.根据权利要求13所述的数字信号处理器,其中所述CPU将偏移量添加到存储在所述事件上下文堆栈指针寄存器中的值以计算所述地址。
15.根据权利要求14所述的数字信号处理器,其中所述偏移量是无符号的5位常数。
16.根据权利要求14所述的数字信号处理器,其中所述偏移量是32位常数。
17.一种数字信号处理器系统,其包括:
存储器;
数字信号处理器,其包括:
CPU,其包括事件上下文堆栈指针寄存器,所述事件上下文堆栈指针寄存器用于在较高优先级事件抢占较低优先级事件处理程序时保存和恢复事件处理程序上下文,并且
其中所述CPU被配置为使用所述事件上下文堆栈指针寄存器的值作为用于将数据存储在存储器中的基地址。
18.根据权利要求17所述的数字信号处理器系统,其中所述CPU将偏移量添加到存储在所述事件上下文堆栈指针寄存器中的值以计算所述地址。
19.根据权利要求18所述的数字信号处理器系统,其中所述偏移量是无符号的5位常数。
20.根据权利要求18所述的数字信号处理器系统,其中所述偏移量是32位常数。
CN202010434498.8A 2019-05-24 2020-05-21 用于对存储器中的数据进行寻址的系统和方法 Pending CN111984317A (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US16/421,920 2019-05-24
US16/421,920 US11106463B2 (en) 2019-05-24 2019-05-24 System and method for addressing data in memory

Publications (1)

Publication Number Publication Date
CN111984317A true CN111984317A (zh) 2020-11-24

Family

ID=73442192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010434498.8A Pending CN111984317A (zh) 2019-05-24 2020-05-21 用于对存储器中的数据进行寻址的系统和方法

Country Status (2)

Country Link
US (3) US11106463B2 (zh)
CN (1) CN111984317A (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11106463B2 (en) * 2019-05-24 2021-08-31 Texas Instruments Incorporated System and method for addressing data in memory
CN117555599B (zh) * 2024-01-10 2024-04-05 睿思芯科(成都)科技有限公司 加快关键数据访问速度的芯片设计方法、系统及相关设备

Family Cites Families (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3560935A (en) * 1968-03-15 1971-02-02 Burroughs Corp Interrupt apparatus for a modular data processing system
US4240139A (en) * 1977-09-22 1980-12-16 Tokyo Shibaura Denki Kabushiki Kaisha Address generating system
US6157967A (en) * 1992-12-17 2000-12-05 Tandem Computer Incorporated Method of data communication flow control in a data processing system using busy/ready commands
JP3672634B2 (ja) * 1994-09-09 2005-07-20 株式会社ルネサステクノロジ データ処理装置
US5642489A (en) * 1994-12-19 1997-06-24 International Business Machines Corporation Bridge between two buses of a computer system with a direct memory access controller with accessible registers to support power management
US6532531B1 (en) * 1996-01-24 2003-03-11 Sun Microsystems, Inc. Method frame storage using multiple memory circuits
US5954811A (en) * 1996-01-25 1999-09-21 Analog Devices, Inc. Digital signal processor architecture
US5944841A (en) * 1997-04-15 1999-08-31 Advanced Micro Devices, Inc. Microprocessor with built-in instruction tracing capability
JP3407859B2 (ja) * 1998-04-24 2003-05-19 富士通株式会社 コーデック
EP1182561B1 (en) * 2000-08-21 2011-10-05 Texas Instruments France Cache with block prefetch and DMA
KR20040034601A (ko) * 2001-04-23 2004-04-28 아트멜 코포레이숀 바이트 컴파일된 자바 코드를 실행하는 마이크로 프로세서
US6807595B2 (en) * 2001-05-10 2004-10-19 Qualcomm Incorporated Mobile communication device having a prioritized interrupt controller
US6976158B2 (en) * 2001-06-01 2005-12-13 Microchip Technology Incorporated Repeat instruction with interrupt
EP1622009A1 (en) * 2004-07-27 2006-02-01 Texas Instruments Incorporated JSM architecture and systems
US7533236B1 (en) * 2006-05-11 2009-05-12 Nvidia Corporation Off-chip out of order memory allocation for a unified shader
US7533237B1 (en) * 2006-05-11 2009-05-12 Nvidia Corporation Off-chip memory allocation for a unified shader
US8190861B2 (en) * 2006-12-04 2012-05-29 Texas Instruments Incorporated Micro-sequence based security model
US9652241B2 (en) * 2007-04-10 2017-05-16 Cambridge Consultants Ltd. Data processing apparatus with instruction encodings to enable near and far memory access modes
US9256369B2 (en) * 2012-04-18 2016-02-09 Samsung Electronics Co., Ltd. Programmable memory controller
US9606803B2 (en) * 2013-07-15 2017-03-28 Texas Instruments Incorporated Highly integrated scalable, flexible DSP megamodule architecture
US10908909B2 (en) * 2015-06-09 2021-02-02 Optimum Semiconductor Technologies Inc. Processor with mode support
US10489188B2 (en) * 2017-01-19 2019-11-26 Samsung Electronics Co., Ltd. Method for reducing interrupt latency in embedded systems
US10540287B2 (en) * 2017-05-12 2020-01-21 Samsung Electronics Co., Ltd Spatial memory streaming confidence mechanism
US11106463B2 (en) * 2019-05-24 2021-08-31 Texas Instruments Incorporated System and method for addressing data in memory

Also Published As

Publication number Publication date
US20240103863A1 (en) 2024-03-28
US11836494B2 (en) 2023-12-05
US11106463B2 (en) 2021-08-31
US20210357226A1 (en) 2021-11-18
US20200371803A1 (en) 2020-11-26

Similar Documents

Publication Publication Date Title
US6665749B1 (en) Bus protocol for efficiently transferring vector data
EP1126368B1 (en) Microprocessor with non-aligned circular addressing
US6813701B1 (en) Method and apparatus for transferring vector data between memory and a register file
US6901505B2 (en) Instruction causing swap of base address from segment register with address from another register
US6513107B1 (en) Vector transfer system generating address error exception when vector to be transferred does not start and end on same memory page
KR101072645B1 (ko) 마이크로프로세서내의 예외­트리거링 페이지를 표시하기 위한 방법 및 장치
US7721066B2 (en) Efficient encoding for detecting load dependency on store with misalignment
CN109997109B (zh) 具有提取提前滞后的流引擎
EP3550437B1 (en) Adaptive spatial access prefetcher apparatus and method
US20240103863A1 (en) System and method for addressing data in memory
US7865699B2 (en) Method and apparatus to extend the number of instruction bits in processors with fixed length instructions, in a manner compatible with existing code
TWI764997B (zh) 圖形處理單元及處理圖形應用程式的方法
WO2005013118A2 (en) Renaming for register with multiple bit fields
US6553486B1 (en) Context switching for vector transfer unit
EP1105792A1 (en) System with wide operand architecture, and method
CN113924550A (zh) 直方图运算
JP5688165B2 (ja) 特権レベルに関わらずセグメントレジスタの読み取りおよび書き込みを行うプログラム、コンピュータプロセッサ、および方法
US6757809B1 (en) Data processor having 2n bits width data bus for context switching functions
JP6143841B2 (ja) コンテキストスイッチを伴うマイクロコントローラ
US6625720B1 (en) System for posting vector synchronization instructions to vector instruction queue to separate vector instructions from different application programs
US11449336B2 (en) Method of storing register data elements to interleave with data elements of a different register, a processor thereof, and a system thereof
JP2696578B2 (ja) データ処理装置
US20030135717A1 (en) Method and apparatus for transferring vector data

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