[go: up one dir, main page]

CN101789118B - Drawing data access system and method - Google Patents

Drawing data access system and method Download PDF

Info

Publication number
CN101789118B
CN101789118B CN2010101058497A CN201010105849A CN101789118B CN 101789118 B CN101789118 B CN 101789118B CN 2010101058497 A CN2010101058497 A CN 2010101058497A CN 201010105849 A CN201010105849 A CN 201010105849A CN 101789118 B CN101789118 B CN 101789118B
Authority
CN
China
Prior art keywords
address
state
access
physical address
draw data
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.)
Active
Application number
CN2010101058497A
Other languages
Chinese (zh)
Other versions
CN101789118A (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.)
Via Technologies Inc
Original Assignee
Via Technologies 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 Via Technologies Inc filed Critical Via Technologies Inc
Priority to CN2010101058497A priority Critical patent/CN101789118B/en
Publication of CN101789118A publication Critical patent/CN101789118A/en
Application granted granted Critical
Publication of CN101789118B publication Critical patent/CN101789118B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

A drawing data access system. The drawing data access system comprises a main memory controller for accessing a main memory; and a graphics cache controller for receiving an access instruction. The mapping cache controller maps a virtual address corresponding to the access instruction to a physical address according to the mapping address mapping table, and maps the physical address to one of a plurality of states according to the mapping address state table; the graphics cache controller accesses a graphics data corresponding to the access instruction from a memory of a processor or a main memory according to the state selection.

Description

绘图数据存取系统及方法Drawing data access system and method

技术领域 technical field

本发明是关于绘图数据存取系统及方法,更是关于避免通过监视路径(snooping path)存取绘图数据以增进效率的绘图数据存取系统及方法。The present invention relates to a drawing data access system and method, and more particularly to a drawing data access system and method that avoids accessing drawing data through a snooping path to improve efficiency.

背景技术 Background technique

现在的计算机系统中,处理器或绘图模块中常会具有专用的高速缓存(cache memory或cache)。有别于位于处理器或绘图模块之外的主存储器(又称系统存储器),高速缓存为一个小型存储器,用来存放经常使用到的程序码及数据,可增进处理器或绘图模块存取数据的速度。然而,共享一主存储器的处理器与绘图模块间自然存在着快取数据一致性(cache coherence)的问题,而一般来说,常采用监视交流(snoop transaction)与非监视交流(non-snoop transaction)并行的方法来克服之。In today's computer systems, there is often a dedicated cache (cache memory or cache) in the processor or graphics module. Different from the main memory (also known as system memory) located outside the processor or graphics module, the cache is a small memory used to store frequently used program codes and data, which can enhance the processor or graphics module to access data speed. However, there is naturally a problem of cache coherence between the processor and the graphics module sharing a main memory, and generally speaking, snoop transaction and non-snoop transaction are often used ) parallel approach to overcome it.

图1为先前技术的中央处理器(CPU)110与绘图模块160间高速缓存架构示意图。计算机系统100包括一CPU 110、一主存储器120、一北桥芯片180及一绘图模块160,而该北桥芯片又包括一前端总线接口130、一主存储器控制器140、一绘图模块接口150。在另一实施例中,绘图模块160也可包含在北桥芯片中。FIG. 1 is a schematic diagram of a cache architecture between a central processing unit (CPU) 110 and a graphics module 160 in the prior art. The computer system 100 includes a CPU 110, a main memory 120, a north bridge chip 180 and a graphics module 160, and the north bridge chip includes a front side bus interface 130, a main memory controller 140, and a graphics module interface 150. In another embodiment, the graphics module 160 can also be included in the north bridge chip.

该CPU 110中,如同前述,具有一CPU高速缓存112,用以增加CPU 110的存取速度。主存储器120具有多个物理地址,并分别存放各种数据。前端总线接口130耦接至CPU 110作为CPU 110及绘图模块160间的接口,前端总线接口130除管理CPU 110与绘图模块160间的沟通外,亦可另外连接至计算机系统100中的其它装置,例如南桥芯片、PCI等装置(图未示)。主存储器控制器140耦接至主存储器120及前端总线接口130。绘图模块接口150为存在于主存储器控制器140与绘图模块160间的接口。绘图模块160中,如同前述,具有一绘图高速缓存162,以增加绘图模块160的存取速度。In the CPU 110, as mentioned above, there is a CPU cache 112 for increasing the access speed of the CPU 110. The main memory 120 has a plurality of physical addresses, and stores various data respectively. The front side bus interface 130 is coupled to the CPU 110 as an interface between the CPU 110 and the graphics module 160. The front side bus interface 130 can also be connected to other devices in the computer system 100 in addition to managing the communication between the CPU 110 and the graphics module 160. For example, South Bridge chip, PCI and other devices (not shown in the figure). The main memory controller 140 is coupled to the main memory 120 and the FSB interface 130 . The graphics module interface 150 is an interface between the main memory controller 140 and the graphics module 160 . As mentioned above, the graphics module 160 has a graphics cache 162 to increase the access speed of the graphics module 160 .

在先前技术中,当绘图模块160接收一存取指令时,其会参照绘图高速缓存162中的绘图地址映射表GAMT(Graphics Address Mapping Table,GAMT),将该存取指令所对应的虚拟地址(Virtual Address)转换成物理地址(Physical Address)。其中,完整的绘图地址映射表GAMT是储存于主存储器120中,而绘图模块160会撷取主存储器120中的绘图地址映射表GAMT,并将该表中较常使用的部分存于绘图高速缓存162以供使用。图2为一绘图地址映射表示意图。举例而言,该绘图地址映射表中的每一项(entry)包括6个栏。第1栏VA记录着虚拟地址,大小通常为16K字节;接下来的四栏PA0~PA 3则分别指向四个大小约为4K字节的物理地址;而最末栏LRU通常用来记录近期最少使用(Least Recently Used)的物理地址的信息,当绘图高速缓存162空间不够时,会依照该LRU提供的信息替换掉该绘图地址映射表中最少使用的某项。值得注意的是,在各物理地址栏中,皆有一监视位(snoop bit),用以指出该物理地址的数据是否存在CPU高速缓存112中。举例而言,当绘图模块160接收一存取指令时会检验对应该存取指令的物理地址,若该物理地址的监视位为1(可快取),则表示CPU 110的CPU高速缓存112中可能存有对应于该物理地址的数据,则绘图模块160会通过前端总线接口130而向CPU 110发出请求以存取其中对应该物理地址的数据,或者,在前端总线接口130监视并判断CPU高速缓存112无该笔数据时,复又通过主存储器控制器140至主存储器120存取该数据(以上路径皆通称为监视路径A)。若该监视位为0(不可快取),则表示该数据必不存在于CPU高速缓存112中,此时,绘图模块160会通过绘图模块接口150及主存储器控制器140向主存储器120发出请求并存取主存储器120中的该笔数据(此路径称为非监视路径B)。In the prior art, when the drawing module 160 receives an access instruction, it will refer to the drawing address mapping table GAMT (Graphics Address Mapping Table, GAMT) in the drawing cache 162, and the virtual address corresponding to the access instruction ( Virtual Address) into a physical address (Physical Address). Wherein, the complete drawing address mapping table GAMT is stored in the main memory 120, and the drawing module 160 will retrieve the drawing address mapping table GAMT in the main memory 120, and store the more frequently used part of the table in the drawing cache 162 for use. FIG. 2 is a schematic diagram of a drawing address mapping table. For example, each entry in the graphics address mapping table includes 6 columns. The first column VA records the virtual address, which is usually 16K bytes in size; the next four columns PA0~PA 3 point to four physical addresses with a size of about 4K bytes; and the last column LRU is usually used to record recent The least recently used (Least Recently Used) physical address information, when the drawing cache 162 space is not enough, the least used item in the drawing address mapping table will be replaced according to the information provided by the LRU. It should be noted that, in each physical address column, there is a snoop bit for indicating whether the data of the physical address exists in the CPU cache 112 or not. For example, when the graphics module 160 receives an access instruction, it will check the physical address corresponding to the access instruction. If the monitoring bit of the physical address is 1 (can be cached), it means that in the CPU cache 112 of the CPU 110 There may be data corresponding to the physical address, then the drawing module 160 will send a request to the CPU 110 through the front side bus interface 130 to access the data corresponding to the physical address, or monitor and judge the high speed of the CPU at the front side bus interface 130 When the cache 112 does not have the data, the data is accessed again through the main memory controller 140 to the main memory 120 (the above paths are collectively referred to as monitoring path A). If the monitoring bit is 0 (not cacheable), it means that the data must not exist in the CPU cache 112. At this time, the drawing module 160 will send a request to the main memory 120 through the drawing module interface 150 and the main memory controller 140. And access the data in the main memory 120 (this path is called non-monitoring path B).

然而,当绘图模块160存取的请求是通过监视路径A发出时,由于前端总线接口130另外管理其它装置,例如:南桥芯片、PCI、或其它装置,绘图模块160发出的请求必须与其它装置发出的请求一同等候。之后,前端总线接口130始对CPU 110进行总线协议监视(bus protocol snooping)等操作,并在获知CPU高速缓存112中无该笔数据的情形下改成至主存储器120存取数据。因此,相对而言,监视路径A消耗的时间会比通过绘图模块接口150和主存储器控制器140直接存取主存储器120的非监视路径B长得多,在多个时钟之后,监视路径A所累积消耗的时间将使系统效能受到不良的影响。However, when the request for access by the graphics module 160 is sent through the monitoring path A, since the FSB interface 130 additionally manages other devices, such as: south bridge chip, PCI, or other devices, the request sent by the graphics module 160 must be communicated with other devices. Waiting with the request sent. Afterwards, the FSB interface 130 begins to perform operations such as bus protocol snooping on the CPU 110, and changes to the main memory 120 to access data when it is known that there is no such data in the CPU cache 112. Therefore, relatively speaking, the time consumed by monitoring path A will be much longer than the non-monitoring path B that directly accesses the main memory 120 through the graphics module interface 150 and the main memory controller 140. The cumulative time spent will adversely affect system performance.

发明内容 Contents of the invention

本发明目的在于通过持续追踪数据状态,以减少先前技术中绘图数据存取上通过监视路径所累积消耗的时间,进而改善绘图系统的效能。The purpose of the present invention is to reduce the cumulative time consumed by monitoring paths in the prior art for drawing data access by continuously tracking the data status, thereby improving the performance of the drawing system.

本发明提供一种绘图数据存取系统,包括:一主存储器控制器以及一绘图快取控制器。其中该主存储器控制器耦接具有多个物理地址的一主存储器,用以直接存取该主存储器;而该绘图快取控制器耦接至该主存储器控制器,用以接收一存取指令。该绘图快取控制器包括一绘图地址映射表(GraphicsAddress Mapping Table,GAMT)及一绘图地址状态表。该绘图快取控制器根据该绘图地址映射表将该存取指令所对应的一虚拟地址映射到一物理地址,且根据该绘图地址状态表将该物理地址再映射到多个状态中的一状态。接着,该绘图快取控制器根据该状态选择从一处理器的存储器或该主存储器中存取。The invention provides a drawing data access system, which includes: a main memory controller and a drawing cache controller. Wherein the main memory controller is coupled to a main memory with multiple physical addresses for directly accessing the main memory; and the graphics cache controller is coupled to the main memory controller for receiving an access command . The graphics cache controller includes a graphics address mapping table (GraphicsAddress Mapping Table, GAMT) and a graphics address state table. The drawing cache controller maps a virtual address corresponding to the access instruction to a physical address according to the drawing address mapping table, and re-maps the physical address to a state among a plurality of states according to the drawing address state table . Then, the graphics cache controller selects to access from a processor's memory or the main memory according to the state.

本发明还提供一种绘图数据存取方法,包括:接收一存取指令;根据一绘图地址映射表将该存取指令所对应的一虚拟地址映射到一物理地址;根据一绘图地址状态表将该物理地址再映射到多个状态中的一状态;以及根据该状态选择从一处理器的存储器或一主存储器中存取该存取指令所对应的一绘图数据。The present invention also provides a drawing data access method, including: receiving an access instruction; mapping a virtual address corresponding to the access instruction to a physical address according to a drawing address mapping table; The physical address is re-mapped to a state in a plurality of states; and a drawing data corresponding to the access command is selected to be accessed from a processor memory or a main memory according to the state.

附图说明 Description of drawings

图1为先前技术中CPU 110与绘图模块160间高速缓存架构示意图;FIG. 1 is a schematic diagram of the cache architecture between the CPU 110 and the graphics module 160 in the prior art;

图2为一绘图地址映射表示意图;FIG. 2 is a schematic diagram of a drawing address mapping table;

图3为依照本发明一实施例的绘图数据存取系统300;FIG. 3 is a drawing data access system 300 according to an embodiment of the present invention;

图4为该绘图地址映射表GAMT及一绘图地址状态表GAST的示意图;FIG. 4 is a schematic diagram of the drawing address mapping table GAMT and a drawing address state table GAST;

图5为依照本发明另一实施例的绘图数据存取方法的流程图;FIG. 5 is a flowchart of a drawing data access method according to another embodiment of the present invention;

图6为依照本发明另一实施例的绘图数据存取方法(图5)中步骤S530的详细流程图。FIG. 6 is a detailed flowchart of step S530 in the drawing data access method ( FIG. 5 ) according to another embodiment of the present invention.

[主要元件标号说明][Description of main component labels]

100~计算机系统;       110~CPU;100~computer system; 110~CPU;

112~CPU高速缓存;      120~主存储器;112~CPU cache; 120~main memory;

130~前端总线接口;     140~主存储器控制器;130~front side bus interface; 140~main memory controller;

150~绘图模块接口;     160~绘图模块;150~drawing module interface; 160~drawing module;

162~绘图高速缓存;     180~北桥芯片;162~drawing cache; 180~Northbridge chip;

GAMT~绘图地址映射表;  300~绘图数据存取系统;GAMT~drawing address mapping table; 300~drawing data access system;

310~CPU;              312~CPU高速缓存;310~CPU; 312~CPU cache memory;

320~主存储器;         330~前端总线接口;320~main memory; 330~front side bus interface;

340~主存储器控制器;   350~绘图模块接口;340~main memory controller; 350~graphic module interface;

360~绘图模块;         362~绘图快取控制器;360~drawing module; 362~drawing cache controller;

380~北桥芯片;         GAMT~绘图地址映射表;380~North Bridge Chip; GAMT~Drawing Address Mapping Table;

GAST~绘图地址状态表;  S510~S540~步骤;GAST~drawing address state table; S510~S540~steps;

S610~S670~步骤。S610~S670~steps.

具体实施方式 Detailed ways

下文为介绍本发明的最佳实施例。各实施例用以说明本发明的原理,但非用以限制本发明。本发明的范围当以所附的权利要求项为准。The following describes the preferred embodiment of the present invention. Each embodiment is used to illustrate the principles of the present invention, but not to limit the present invention. The scope of the present invention should be determined by the appended claims.

图3为依照本发明一实施例的绘图数据存取系统300。本发明的绘图数据存取系统300包括一CPU 310、一主存储器320、一北桥芯片380及一绘图模块360。其中北桥芯片380包括一前端总线接口330、一主存储器控制器340、及一绘图模块接口350。CPU 310中,具有一CPU高速缓存312,用以增加CPU 310的存取速度。主存储器320具有多个物理地址,并分别存放各种数据,包括存放一绘图地址映射表(Graphics Address Mapping Table,GAMT)。前端总线接口330耦接至CPU 310,用以监视(snoop)CPU 310存取主存储器120。主存储器控制器340耦接至主存储器320及前端总线接口330,主要用以直接存取主存储器320。绘图模块接口350为存在于主存储器控制器340与绘图模块360间的接口。绘图模块360包括一绘图快取控制器362,其耦接至前端总线接口330,并通过绘图模块接口350耦接至主存储器控制器340,用以接收一存取指令R/W(读取或写入),并依据存取指令R/W所对应的物理地址选择从CPU高速缓存312或主存储器320存取数据。在本实施例中,上述的绘图模块360是位于北桥芯片380之外。在另一实施例中,绘图模块360亦可位于北桥芯片380中。然而,在其它实施例中,本发明不必以此为限。FIG. 3 is a drawing data access system 300 according to an embodiment of the present invention. The drawing data access system 300 of the present invention includes a CPU 310, a main memory 320, a north bridge chip 380 and a drawing module 360. The north bridge chip 380 includes a front side bus interface 330 , a main memory controller 340 , and a graphics module interface 350 . In the CPU 310, there is a CPU cache 312 for increasing the access speed of the CPU 310. The main memory 320 has multiple physical addresses, and stores various data respectively, including storing a Graphics Address Mapping Table (GAMT). The FSB interface 330 is coupled to the CPU 310 for monitoring (snoop) the CPU 310 accessing the main memory 120. The main memory controller 340 is coupled to the main memory 320 and the FSB interface 330 and is mainly used for directly accessing the main memory 320 . The graphics module interface 350 is an interface between the main memory controller 340 and the graphics module 360 . The graphics module 360 includes a graphics cache controller 362, which is coupled to the front side bus interface 330, and is coupled to the main memory controller 340 through the graphics module interface 350, for receiving an access command R/W (read or Write), and select to access data from the CPU cache 312 or the main memory 320 according to the physical address corresponding to the access command R/W. In this embodiment, the above-mentioned graphics module 360 is located outside the north bridge chip 380 . In another embodiment, the graphics module 360 can also be located in the north bridge chip 380 . However, in other embodiments, the invention is not necessarily so limited.

本发明的绘图快取控制器362除了包括一绘图地址映射表GAMT之外,另包括一绘图地址状态表GAST。绘图快取控制器362会撷取储存于主存储器320中完整的绘图地址映射表GAMT,将该表中较常使用的部分储存于绘图快取控制器362中以供使用。图4为该绘图地址映射表GAMT及一绘图地址状态表GAST的示意图。请一并参照图3。绘图快取控制器362可根据绘图地址映射表GAMT,将存取指令R/W所对应的一虚拟地址VA映射到一物理地址PA,然后根据绘图地址状态表GAST将物理地址PA再映射到一状态。由于一个虚拟地址VA可能映射到多个物理地址PA,举例而言,在本实施例中一个16K大小的虚拟地址VA_0可映射到4个分别为4K大小的物理地址PA_00~PA_03,绘图快取控制器362可通过绘图地址状态表GAST中标签栏(Tag)的信息,以确认所选择的物理地址PA对应的数据是否正确。The graphics cache controller 362 of the present invention includes a graphics address state table GAST in addition to a graphics address mapping table GAMT. The graphics cache controller 362 retrieves the complete graphics address mapping table GAMT stored in the main memory 320 , and stores the more frequently used part of the table in the graphics cache controller 362 for use. FIG. 4 is a schematic diagram of the graphics address mapping table GAMT and a graphics address status table GAST. Please also refer to Figure 3. The graphics cache controller 362 can map a virtual address VA corresponding to the access instruction R/W to a physical address PA according to the graphics address mapping table GAMT, and then remap the physical address PA to a physical address PA according to the graphics address state table GAST. state. Since one virtual address VA may be mapped to multiple physical addresses PA, for example, in this embodiment, a 16K virtual address VA_0 can be mapped to four 4K physical addresses PA_00-PA_03 respectively, and the drawing cache control The controller 362 can check whether the data corresponding to the selected physical address PA is correct by drawing the information in the tag column (Tag) in the address state table GAST.

此外,在本发明另一实施例中,绘图地址映射表GAMT中可包含LRU(LeastRecently Used)字段,通常用来记录近期最少使用的虚拟地址的信息,当绘图高速缓存362空间不够时,会依照该LRU提供的信息替换掉绘图地址映射表GAMT中最少使用的某项。In addition, in another embodiment of the present invention, the drawing address mapping table GAMT may include an LRU (LeastRecently Used) field, which is usually used to record the information of the least recently used virtual address. When the drawing cache 362 space is not enough, it will follow The information provided by this LRU replaces the least used one of the entries in the drawing address mapping table GAMT.

绘图快取控制器362根据物理地址PA对应的状态选择一数据存取路径,并存取对应于存取指令R/W的绘图数据。在本发明中,通过将不同物理地址依照其使用状况而定义不同状态的方式,可大幅减少绘图快取控制器362通过前端总线接口330进行监视(snoop)处理器(如先前技术中的监视路径A)的次数,并采用非监视路径B(通过绘图模块接口350及主存储器控制器340存取主存储器320的方式)取代监视路径A,进而改善绘图数据存取的效率。The drawing cache controller 362 selects a data access path according to the state corresponding to the physical address PA, and accesses drawing data corresponding to the access command R/W. In the present invention, by defining different states according to different physical addresses according to their usage conditions, it is possible to greatly reduce the graphics cache controller 362's monitoring (snoop) processor through the front side bus interface 330 (such as the monitoring path in the prior art). A), and adopt the non-monitoring path B (the way of accessing the main memory 320 through the graphics module interface 350 and the main memory controller 340) to replace the monitoring path A, thereby improving the efficiency of drawing data access.

在一较佳实施例中,绘图地址状态表GAST中的状态可包括:一初始状态、一共享状态及一修正状态。各状态设定如下:In a preferred embodiment, the states in the graphics address state table GAST may include: an initial state, a shared state and a modified state. Each state is set as follows:

(1)初始状态:当绘图地址状态表GAST的一项在初始化或被无效化后、或没有登录任何物理地址时,则该项登记为该初始状态I,如图4所示。(1) Initial state: when an item of the drawing address state table GAST is initialized or invalidated, or when no physical address is registered, the item is registered as the initial state I, as shown in FIG. 4 .

(2)共享状态:当绘图地址映射表GAMT中的一物理地址(例如PA_00)首次被登录至绘图地址状态表GAST时,则在绘图地址状态表GAST中将物理地址PA_00登记为共享状态S。(2) Shared state: when a physical address (such as PA_00) in the drawing address mapping table GAMT is registered in the drawing address state table GAST for the first time, the physical address PA_00 is registered as a shared state S in the drawing address state table GAST.

(3)修正状态:若绘图地址映射表GAMT中的一物理地址(例如PA_11)所对应的绘图数据曾被绘图快取控制器362存取过,无论是通过监视路径A或非监视路径B,则在绘图地址状态表GAST中将物理地址PA_11登记为修正状态M。关于本发明如何将共享状态S修改为修正状态M的机制将于后文详述。(3) Correction state: if the drawing data corresponding to a physical address (such as PA_11) in the drawing address mapping table GAMT has been accessed by the drawing cache controller 362, no matter through the monitoring path A or the non-monitoring path B, Then the physical address PA_11 is registered as the modified state M in the drawing address state table GAST. The mechanism of how the present invention modifies the shared state S to the modified state M will be described in detail later.

再来说明本发明的绘图快取控制器362的功能。在一实施例中,绘图快取控制器362接收存取指令R/W0后,可根据绘图地址映射表GAMT将存取指令R/W0所对应的虚拟地址VA_0转换成的一物理地址PA_00。因为该物理地址PA_00是首次被登录至绘图地址状态表GAST,且未曾被其它存取指令据以进行存取操作,故在绘图地址状态表GAST中将物理地址PA_00登记为共享状态S。其后,由于物理地址PA_00未曾被存取或更新,为维持绘图模块360与CPU 310间的快取数据一致性,故绘图快取控制器362会依据共享状态S而选择通过前端总线接口330(监视路径A)进行数据存取。之后,前端总线接口330会进一步监视CPU 310。在一情况下,当CPU 310的CPU高速缓存312中欲被存取的数据未失效时,前端总线接口330会对CPU高速缓存312进行存取。在另一情况下,当前端总线接口330发现CPU高速缓存312中欲被存取的数据已经失效时,则前端总线接口330改通过主存储器控制器340至主存储器320中存取指令R/W0所对应的物理地址PA_00上存取绘图数据。无论如何,在存取绘图数据后,绘图模块360会将CPU高速缓存312中对应存取指令R/W0的绘图数据予以无效化,以维持快取数据一致性。如上所述,此物理地址PA_00在经过存取后,状态将不再是共享状态S,而会改成修正状态M。Next, the functions of the drawing cache controller 362 of the present invention will be described. In one embodiment, after receiving the access command R/W0, the graphics cache controller 362 can convert the virtual address VA_0 corresponding to the access command R/W0 into a physical address PA_00 according to the graphics address mapping table GAMT. Because the physical address PA_00 is registered in the drawing address state table GAST for the first time and has not been accessed by other access commands, the physical address PA_00 is registered as the shared state S in the drawing address state table GAST. Thereafter, since the physical address PA_00 has not been accessed or updated, in order to maintain the cache data consistency between the graphics module 360 and the CPU 310, the graphics cache controller 362 will choose to use the FSB interface 330 ( Monitoring path A) performs data access. Afterwards, the FSB interface 330 will further monitor the CPU 310. In one case, when the data to be accessed in the CPU cache 312 of the CPU 310 is not invalid, the FSB interface 330 will access the CPU cache 312. In another case, when the FSB interface 330 finds that the data to be accessed in the CPU cache 312 has been invalidated, the FSB interface 330 changes to the access command R/W in the main memory 320 through the main memory controller 340. The drawing data is accessed on the corresponding physical address PA_00. In any case, after accessing the drawing data, the drawing module 360 invalidates the drawing data corresponding to the access command R/W0 in the CPU cache 312 to maintain cache data consistency. As mentioned above, after the physical address PA_00 is accessed, the state will no longer be the shared state S, but will change to the modified state M.

在另一实施例中,绘图快取控制器362在接收存取指令R/W1后,发现存取指令R/W1所对应的虚拟地址VA_1转换成的物理地址PA_11已登录于绘图地址状态表GAST中,且其状态已登记为修正状态M,故得知该物理地址PA_11曾被其它存取指令据以存取数据。因此,该绘图快取控制器362可选择通过绘图模块接口350及主存储器控制器340直接存取位于主存储器320中物理地址PA_11的绘图数据(非监视路径B)。如此一来,依照本发明的绘图数据存取系统,仅首次被存取的物理地址会通过监视路径A来存取,大部分的存取操作将会通过非监视路径B进行,因而能减少通过监视路径存取绘图数据所累积消耗的时间,进而改善绘图系统的效能。In another embodiment, after receiving the access command R/W1, the drawing cache controller 362 finds that the physical address PA_11 converted from the virtual address VA_1 corresponding to the access command R/W1 has been registered in the drawing address state table GAST , and its state has been registered as the modified state M, so it is known that the physical address PA_11 has been used by other access commands to access data. Therefore, the graphics cache controller 362 can choose to directly access the graphics data located at the physical address PA_11 in the main memory 320 through the graphics module interface 350 and the main memory controller 340 (non-monitoring path B). In this way, according to the drawing data access system of the present invention, only the physical address accessed for the first time will be accessed through the monitoring path A, and most of the access operations will be performed through the non-monitoring path B, thereby reducing the number of physical addresses accessed through the monitoring path A. Monitor the cumulative time consumed by routing access to drawing data, thereby improving the performance of the drawing system.

值得注意的是,为使CPU 310与绘图模块360间维持快取数据一致性,在一最佳实施例中,本发明的绘图数据存取系统300可另外包括一专用的绘图监视总线(路径C)。该绘图监视总线耦接于前端总线接口330与绘图快取控制器362之间,当CPU 310对主存储器320或其它装置中的高速缓存存取绘图数据时,CPU 310可通过该绘图监视总线(路径C),使绘图快取控制器362中绘图地址状态表GAST所对应该绘图数据的物理地址无效化,或者,将绘图地址状态表GAST中所对应该绘图数据的物理地址的状态修改为共享状态S。在未使用该绘图监视总线(路径C)的情况下,CPU 310对绘图快取控制器362的更新数据可通过原来的管道(路径A或路径B)传递,而该管道的数据流量负担将相对沉重。因此,具有专用绘图监视总线的绘图数据存取系统300,也可使本发明相较于先前技术能获致更高的绘图数据存取效能。It should be noted that, in order to maintain the cache data consistency between the CPU 310 and the drawing module 360, in a preferred embodiment, the drawing data access system 300 of the present invention may additionally include a dedicated drawing monitoring bus (path C ). The drawing monitoring bus is coupled between the front side bus interface 330 and the drawing cache controller 362. When the CPU 310 accesses drawing data to the cache memory in the main memory 320 or other devices, the CPU 310 can pass the drawing monitoring bus ( Path C), invalidate the physical address of the drawing data corresponding to the drawing address state table GAST in the drawing cache controller 362, or modify the state of the corresponding physical address of the drawing data in the drawing address state table GAST to share state S. In the case of not using the drawing monitor bus (path C), the update data of the drawing cache controller 362 by the CPU 310 can be transmitted through the original pipeline (path A or path B), and the data flow burden of the pipeline will be relatively heavy. Therefore, the drawing data access system 300 having a dedicated drawing monitor bus can also enable the present invention to obtain higher drawing data access performance compared with the prior art.

此外,在本发明一实施例中,当绘图地址映射表GAMT的储存空间不够时,绘图快取控制器362可依照近期最少使用(Least Recently Used)字段LRU所提供的信息替换掉绘图地址映射表GAMT中最少使用的某项,同时绘图快取控制器362会将绘图地址状态表GAST中对应该被替换掉的该项的物理地址予以无效化。In addition, in one embodiment of the present invention, when the storage space of the drawing address mapping table GAMT is insufficient, the drawing cache controller 362 can replace the drawing address mapping table according to the information provided by the Least Recently Used (Least Recently Used) field LRU An item that is least used in the GAMT, and the graphics cache controller 362 will invalidate the physical address of the item that should be replaced in the graphics address state table GAST.

值得一提的是,本发明的绘图地址状态表GAST所设定的状态数目不限于「初始状态」、「共享状态」、「修正状态」三种。此外,本领域技术人员亦可依照本发明的精神,对绘图地址映射表GAMT、绘图地址状态表GAST两者进行整合或变更,甚或减少或增设更多字段而进行各种用途。It is worth mentioning that the number of states set in the graphics address state table GAST of the present invention is not limited to the three types of "initial state", "shared state" and "modified state". In addition, those skilled in the art can also integrate or change the graphics address mapping table GAMT and the graphics address status table GAST according to the spirit of the present invention, or even reduce or add more fields for various purposes.

除了上述的绘图数据存取系统外,本发明还提供一绘图数据存取方法。图5为依照本发明另一实施例的绘图数据存取方法的流程图。同前述的说明,本发明的绘图数据存取方法可应用于一计算机系统中,请一并参照图3、4。在步骤S510中,绘图快取控制器362可根据一绘图地址映射表GAMT而将一存取指令所对应的一虚拟地址VA映射到一物理地址PA。在步骤S520中,绘图快取控制器362可根据一绘图地址状态表GAST而将物理地址PA再映射到多个状态中的一状态,而该等状态可以是一初始状态I、一共享状态S、及一修正状态M。请一并参照图4及图5。其中,当绘图地址状态表GAST中的一项在初始化或被无效化之后,或没有登录任何物理地址时,则该项登记为初始状态I;当绘图地址映射表GAMT中的一物理地址(例如PA_00)首次被登录至绘图地址状态表GAST时,则在绘图地址状态表GAST中将该物理地址PA_00登记为共享状态S;以及当绘图地址状态表GAST中的一物理地址(例如PA_11)所对应的绘图数据曾被绘图快取控制器362存取过,则在绘图地址状态表GAST中将该物理地址PA_11登记为修正状态M。其后,在步骤S530中,绘图快取控制器362根据物理地址PA映射的状态,选择通过前端总线接口330从CPU高速缓存312中存取该存取指令所对应的绘图数据,或选择通过绘图模块接口350及主存储器控制器340从主存储器320中存取该存取指令所对应的绘图数据。In addition to the above drawing data access system, the present invention also provides a drawing data access method. FIG. 5 is a flowchart of a drawing data access method according to another embodiment of the invention. Similar to the foregoing description, the drawing data access method of the present invention can be applied to a computer system, please refer to FIGS. 3 and 4 together. In step S510 , the graphics cache controller 362 can map a virtual address VA corresponding to an access command to a physical address PA according to a graphics address mapping table GAMT. In step S520, the drawing cache controller 362 can remap the physical address PA to a state among a plurality of states according to a drawing address state table GAST, and these states can be an initial state I, a shared state S , and a modified state M. Please refer to FIG. 4 and FIG. 5 together. Wherein, when an item in the drawing address state table GAST is after initialization or being invalidated, or when not registering any physical address, then this item is registered as initial state I; When a physical address in the drawing address mapping table GAMT (such as When PA_00) is registered in the drawing address state table GAST for the first time, the physical address PA_00 is registered as the shared state S in the drawing address state table GAST; and when a physical address (such as PA_11) in the drawing address state table GAST corresponds The drawing data of the drawing has been accessed by the drawing cache controller 362, then the physical address PA_11 is registered as the modified state M in the drawing address state table GAST. Thereafter, in step S530, the drawing cache controller 362 selects to access the drawing data corresponding to the access instruction from the CPU cache 312 through the front side bus interface 330 according to the state of the physical address PA mapping, or selects to use the drawing The module interface 350 and the main memory controller 340 access the drawing data corresponding to the access command from the main memory 320 .

图6为依照本发明另一实施例的绘图数据存取方法(图5)中步骤S530的详细流程图。步骤S530还包括:在步骤S610中,判断存取指令所对应的物理地址于绘图地址状态表GAST中登记的状态。若登记的状态为共享状态S时,则进入步骤S620而选择通过前端总线接口330(监视路径A)存取数据。若登记的状态为修正状态M时,则进入步骤S630而选择通过主存储器控制器340(非监视路径B)存取位于主存储器320中对应该物理地址的绘图数据。FIG. 6 is a detailed flowchart of step S530 in the drawing data access method ( FIG. 5 ) according to another embodiment of the present invention. Step S530 further includes: in step S610, judging whether the physical address corresponding to the access command is registered in the graphics address status table GAST. If the registered state is the shared state S, go to step S620 and choose to access data through the FSB interface 330 (monitoring path A). If the registered state is the modified state M, then go to step S630 and choose to access the drawing data corresponding to the physical address in the main memory 320 through the main memory controller 340 (non-monitoring path B).

上述步骤S620又分为两种状况。在步骤S640中,前端总线接口330会在监视CPU 310后判断CPU 310的CPU高速缓存312中对应至该物理地址的绘图数据是否失效。若CPU高速缓存312中的对应绘图数据未失效时,则进入步骤S650而存取CPU高速缓存312中的绘图数据。若CPU高速缓存312中的对应绘图数据已失效时,则进入步骤S660而选择通过主存储器控制器340存取位于主存储器320的绘图数据。在存取该绘图数据后,步骤S650及S660皆进入步骤S670。在步骤S670中,前端总线接口330会将CPU高速缓存312中对应该物理地址的绘图数据无效化,且将绘图地址状态表GAST中对应该绘图数据的状态修改成该修正状态M。The above step S620 is further divided into two situations. In step S640, after monitoring the CPU 310, the FSB interface 330 determines whether the drawing data corresponding to the physical address in the CPU cache 312 of the CPU 310 is invalid. If the corresponding drawing data in the CPU cache 312 is not invalid, go to step S650 to access the drawing data in the CPU cache 312 . If the corresponding drawing data in the CPU cache 312 is invalid, go to step S660 and choose to access the drawing data in the main memory 320 through the main memory controller 340 . After accessing the drawing data, steps S650 and S660 both proceed to step S670. In step S670 , the FSB interface 330 invalidates the drawing data corresponding to the physical address in the CPU cache 312 , and modifies the state corresponding to the drawing data in the drawing address state table GAST to the modified state M.

最后,在一理想的实施例中,为维持CPU 310与绘图模块360间的快取数据一致性,本发明的绘图数据存取方法还包括:当CPU 310对主存储器320或其它任何装置中的高速缓存存取一绘图数据时,则CPU 310将绘图模块360中的绘图地址状态表GAST表上对应该绘图数据的物理地址予以无效化(通过路径C),或者,将对应该绘图数据的物理地址的状态修改成共享状态S。Finally, in an ideal embodiment, in order to maintain the cache data consistency between the CPU 310 and the drawing module 360, the drawing data access method of the present invention further includes: When the high-speed cache accesses a drawing data, then CPU 310 invalidates the physical address corresponding to the drawing data on the drawing address state table GAST table in the drawing module 360 (by path C), or the physical address corresponding to the drawing data The state of the address is changed to shared state S.

如此一来,依照本发明的绘图数据存取方法,仅首次被存取的物理地址会通过监视路径A来存取对应的绘图数据,大部分的存取操作将会通过非监视路径B来存取,因而能减少通过监视路径存取绘图数据所累积消耗的时间,进而改善绘图系统的效能。In this way, according to the drawing data access method of the present invention, only the physical address accessed for the first time will access the corresponding drawing data through the monitoring path A, and most of the access operations will be stored through the non-monitoring path B. Therefore, it can reduce the cumulative time consumed by accessing the drawing data through the monitoring path, thereby improving the performance of the drawing system.

本发明虽以较佳实施例揭露如上,然其并非用以限定本发明的范围,任何本领域技术人员,在不脱离本发明的精神和范围内,当可做些许的更动与润饰,因此本发明的保护范围当视所附的权利要求范围所界定者为准。Although the present invention is disclosed above with preferred embodiments, it is not intended to limit the scope of the present invention. Any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, The scope of protection of the present invention should be defined by the appended claims.

Claims (10)

1. mapping data accessing system comprises:
One main memory controller couples the primary memory with a plurality of physical addresss, in order to this primary memory of access; And
One draws gets controller soon, is coupled to this main memory controller, and this drawing is got controller soon and comprised:
One drawing address mapping table; And
One drawing address state table;
Wherein this drawing is got controller soon in order to receive an access instruction; According to this drawing address mapping table with the pairing virtual address map of this access instruction to a physical address; Again according to this drawing address state table with the state of this physical address map in a plurality of states; And select the pairing draw data of this access instruction of access from the storer of a processor or this primary memory according to this state
Wherein these a plurality of states comprise at least:
One original state, one in this drawing address state table after initialization or being disabled, or when not having any physical address of login, then this is registered as this original state;
One shares state, when one first physical address in this drawing address mapping table is logined to this drawing address state table first, then in this drawing address state table, this first physical address is registered as this shared state; And
It is out-of-date that one correction state, the pairing draw data of one second physical address in this drawing address state watch are once got the controller access by this drawing soon, in this drawing address state table, is this correction state with this second physics address registration then.
2. mapping data accessing system according to claim 1, wherein,
Get controller soon when this drawing and receive this access instruction; And when pairing this physical address of this access instruction is registered as this shared state in this drawing address state table; Then this draw data that controller selects to be positioned at through a front-side bus interface access storer of this processor is got in this drawing soon, and wherein this front-side bus interface is in order to keep watch on the also storer of this processor of access; And
Get controller soon when this drawing and receive this access instruction; And when pairing this physical address of this access instruction was registered as this correction state in this drawing address state table, then this draw data that controller selects to be positioned at through this main memory controller access this primary memory was got in this drawing soon.
3. mapping data accessing system according to claim 2; Wherein this drawing get soon controller behind the storer of this processor of access with this draw data ineffective treatment in the storer of this processor, and in should drawing address state table the status modifier of this physical address that should draw data be become should the correction state.
4. mapping data accessing system according to claim 2; Wherein this front-side bus interface is coupled to this main memory controller; When this draw data after this front-side bus interface is kept watch on the storer of this processor in the storer of this processor of discovery had lost efficacy, this front-side bus interface was positioned at this draw data of this primary memory through this main memory controller access.
5. mapping data accessing system according to claim 1; Also comprise a drawing monitor bus; Be coupled to a front-side bus interface and this drawing is got between the controller soon; When another draw data of this processor access, this processor makes in this drawing address state table the status modifier to physical address that should another draw data become this shared state or ineffective treatment through this drawing monitor bus.
6. draw data access method comprises:
According to a drawing address mapping table with the pairing virtual address map of an access instruction to a physical address;
According to a drawing address state table with the state of this physical address map in a plurality of states; And
Select the pairing draw data of this access instruction of access from the storer of a processor or a primary memory according to this state,
Wherein these a plurality of states comprise at least:
One original state, one in this drawing address state table after initialization or being disabled, or when not having any physical address of login, then this is registered as this original state;
One shares state, when one first physical address in this drawing address mapping table is logined to this drawing address state table first, then in this drawing address state table, this first physical address is registered as this shared state; And
One correction state, the pairing draw data of one second physical address in this drawing address state table was once out-of-date by access, in this drawing address state table, was this correction state with this second physics address registration then.
7. draw data access method according to claim 6 also comprises:
When pairing this physical address of this access instruction is registered as this shared state in this drawing address state table, then be positioned at this draw data of the storer of this processor through a front-side bus interface access; And
When pairing this physical address of this access instruction is registered as this correction state in this drawing address state table, then be positioned at this draw data of this primary memory through a main memory controller access.
8. draw data access method according to claim 7; Wherein behind the storer of this processor of access; With this draw data ineffective treatment of the storer of this processor, and in should drawing address state table the status modifier of this physical address that should draw data be become should the correction state.
9. draw data access method according to claim 7; When finding when the storer of this processor of access that wherein this draw data in the storer of this processor had lost efficacy, be positioned at this draw data of this primary memory through a main memory controller access.
10. draw data access method according to claim 6 also comprises:
When another draw data of a processor access, the status modifier to physical address that should another draw data in this drawing address state table is become this shared state or ineffective treatment.
CN2010101058497A 2010-01-26 2010-01-26 Drawing data access system and method Active CN101789118B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101058497A CN101789118B (en) 2010-01-26 2010-01-26 Drawing data access system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101058497A CN101789118B (en) 2010-01-26 2010-01-26 Drawing data access system and method

Publications (2)

Publication Number Publication Date
CN101789118A CN101789118A (en) 2010-07-28
CN101789118B true CN101789118B (en) 2012-07-11

Family

ID=42532321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101058497A Active CN101789118B (en) 2010-01-26 2010-01-26 Drawing data access system and method

Country Status (1)

Country Link
CN (1) CN101789118B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617790A (en) * 2013-12-19 2014-03-05 大连辽无二电器有限公司 Field programmable gate array (FPGA)-based graphic controller
GB2571539B (en) * 2018-02-28 2020-08-19 Imagination Tech Ltd Memory interface

Also Published As

Publication number Publication date
CN101789118A (en) 2010-07-28

Similar Documents

Publication Publication Date Title
US10031857B2 (en) Address translation services for direct accessing of local memory over a network fabric
EP2476051B1 (en) Systems and methods for processing memory requests
US7624235B2 (en) Cache used both as cache and staging buffer
JP4941148B2 (en) Dedicated mechanism for page mapping in GPU
US9665486B2 (en) Hierarchical cache structure and handling thereof
US9218286B2 (en) System cache with partial write valid states
US10120832B2 (en) Direct access to local memory in a PCI-E device
US6721848B2 (en) Method and mechanism to use a cache to translate from a virtual bus to a physical bus
CN104346294B (en) Data read/write method, device and computer system based on multi-level buffer
US8185695B2 (en) Snoop filtering mechanism
US7415575B1 (en) Shared cache with client-specific replacement policy
JP3264319B2 (en) Bus bridge
JP6821879B2 (en) Asymmetric set join cache
CN101853227B (en) Method for improving storage map input/output demand processing, and processor
JPH10504124A (en) Two-way set associative cache memory
CN112540939A (en) Storage management device, storage management method, processor and computer system
JPH11272559A (en) Cache coherency protocol for data processing system containing multilevel memory hierarchy
CN101868786A (en) Address translation cache and I/O cache performance improvements in virtualized environments
US9268697B2 (en) Snoop filter having centralized translation circuitry and shadow tag array
US10467138B2 (en) Caching policies for processing units on multiple sockets
CN114761934A (en) In-process Translation Lookaside Buffer (TLB) (mTLB) for enhancing a Memory Management Unit (MMU) TLB for translating Virtual Addresses (VA) to Physical Addresses (PA) in a processor-based system
CN101789118B (en) Drawing data access system and method
CN120492372A (en) Prefetch termination and recovery in an instruction cache
US10896135B1 (en) Facilitating page table entry (PTE) maintenance in processor-based devices
US9218293B2 (en) Data processing system with cache linefill buffer and method of operation

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