TW440765B - L2 cache testing method - Google Patents

L2 cache testing method Download PDF

Info

Publication number
TW440765B
TW440765B TW87120200A TW87120200A TW440765B TW 440765 B TW440765 B TW 440765B TW 87120200 A TW87120200 A TW 87120200A TW 87120200 A TW87120200 A TW 87120200A TW 440765 B TW440765 B TW 440765B
Authority
TW
Taiwan
Prior art keywords
cache
test
memory
scope
patent application
Prior art date
Application number
TW87120200A
Other languages
Chinese (zh)
Inventor
You-Chiuan Jang
Cheng-Long Hu
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to TW87120200A priority Critical patent/TW440765B/en
Application granted granted Critical
Publication of TW440765B publication Critical patent/TW440765B/en

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

This invention provides a L2 cache testing method for directly testing the L2 cache of computer system through the execution of computer to check if the function of L2 cache works properly. The method includes: getting the allocation parameter and capacity size of the L2 cache; then initiating the L2 cache to make the content of cache (including a L1 cache and a L2 cache) identical to that of the memory; and finally using the cache bus related control registers to access the L2 cache to check if the function of L2 cache works correctly.

Description

440765 五、發明說明(1) 【發明的應用範圍】 本發明係有關於-種二級高速緩衝儲存器之測試方 法/特別是一種利用電腦系統(Pe[ulum Π級以上者)之 緩衝儲存為匯流排相關的控制暫存器(Cache Bus Related C〇ntrol Reglsters),透過對構成u Cachet 標記模塊和資料模塊分別進行狀態的控制和資料的存取, 而可以直接利用電腦之運作而檢知L2 Cache之功能是否疋 常的測試方法。 【發明之技術背景】 以往在Intel Pentium I I級以下的電腦結構中,於微 ,理器(Processor)與主記憶體(MaU Mem〇ry)之間設置 问速缓衝儲存器(Cache),用以提高微處理器之資料存取 速度的技術早已為人所熟知(其硬體方塊圖如「第1A 圖」所示)’而此種高速緩衝儲存器(Cache)包括有:内 建於微處理器10 (CPU)的一級緩衝儲存器2〇(li Cache),以及一設於微處理器外部的二級緩衝儲存器 3〇(L2 Cache);而在 Intel Pentium II 級(含)以上的電 腦系統中’其中的二級緩衝儲存器(L2 Cache ) 30,則被 放到了處理器之中,其硬體方塊圖則是如「第1 B圖」所 示; 其中二級緩衝儲存器(L2 Cache)30的規模要比一級緩 衝儲存器(LI Cache) 20大得多,而且在正常運作的情形 下’Ll Cache 20的存取速度通常要較L2 Cache 30快1 倍’而L2 Cache 30的存取速度通常又比主記憶體(main440765 V. Description of the invention (1) [Scope of application of the invention] The present invention relates to a test method of a secondary cache memory / particularly a buffer storage using a computer system (Pe [ulum Π or higher) as The Cache Bus Related Control Registers (Cache Bus Related Control Reglsters) can control the status and access data of the u Cachet tag module and the data module respectively, and can directly use the operation of the computer to detect L2. Cache function is the normal test method. [Technical background of the invention] In the past, in the computer structure of Intel Pentium II or lower, a cache memory (Cache) was set between the microprocessor and the main memory (MaU Memory). The technology to improve the data access speed of the microprocessor is already well known (its hardware block diagram is shown in "Figure 1A"). And this type of cache memory (Cache) includes: The first level buffer memory 20 (li Cache) of the processor 10 (CPU) and a second level cache memory 3 (L2 Cache) located outside the microprocessor; and the Intel Pentium II level (inclusive) and above The L2 Cache 30 in the computer system is placed in the processor, and its hardware block diagram is as shown in "Figure 1B"; where the L2 Cache ( The scale of L2 Cache) 30 is much larger than that of LI Cache 20, and under normal operating conditions, 'Ll Cache 20's access speed is usually 1 times faster than L2 Cache 30' and L2 Cache 30 Is usually faster than main memory (main

C:\PrograraFiles\Patent\p-0178tw.ptd 第 4 頁 076 5 五、發明說明(2) " ' memory)40快3〜5倍’因此在提高微處理器1〇的存取速度上 有著明顯的助益。 因此’ Cache是否可以正常運作?對於電腦製造者或 疋使用者而吾均是非常重要的’若是Cache在製造過程中 發生損壞’將可能造成運作中之電腦系統的紊亂與當機, 或是造成資料的嚴重流失’進—步造成嚴重的損失。此種 硬體的缺陷若是未能正確的檢知,不但影響製造者的商 譽’更會使消費者遭受到難以估計的損害。但在目前的已 知技術中’卻仍未有任何可以直接針對L2 Cache之功能進 行測試的測試方法或是測試工具(如測試軟體)。 【發明之目的及概述】 本發明之主要目的在提供一種可以直接透過電腦之執 行,而對Pentium I I級以上(含)的電腦系統中之二級高 速緩衝儲存器(L2 Cache )進行功能測試的方法。 根據本發明所揭露的測試方法,可以透過電腦執行下列之 步驟而完成: 1 、初始化L2 Cache ;【在這個過程中,關閉(Disable )LI Cache和L2 Cache,使Cache的内容無效,並讓 在Cache中修改過而主記憶體(Memory)中未修改的 數據寫回到主記憶體之中,使C a c h e和M e ra 〇 r y内容保 持一致。】 2、對該L2 Cache進行資料的存取測試,並輸出相應的測 試結果;【係對L2 Cache產生讀寫命令,測試L2 Cache行(Cache lines)對應的實質地址空間*它利C: \ PrograraFiles \ Patent \ p-0178tw.ptd Page 4 076 5 V. Description of the invention (2) " 'memory " 40 is 3 to 5 times faster' 'Therefore it has an advantage in improving the access speed of the microprocessor 10. Obvious benefits. So ’’s Cache working? It is very important for computer makers or users. 'If the cache is damaged during the manufacturing process', it may cause disorder and crash of the computer system in operation, or cause serious loss of data. Cause serious losses. If such hardware defects are not properly detected, it will not only affect the manufacturer's goodwill ’, but also cause consumers to suffer inestimable damage. However, in the current known technology, there is still no test method or test tool (such as test software) that can directly test the function of L2 Cache. [Objective and Summary of the Invention] The main object of the present invention is to provide a function that can be directly executed by a computer to perform a function test on a level 2 cache (L2 Cache) in a computer system of Pentium level II or higher. method. According to the test method disclosed in the present invention, the following steps can be completed through a computer: 1. Initialize the L2 Cache; [During this process, disable (Disable) the LI Cache and the L2 Cache to invalidate the contents of the Cache and let the The modified data in the cache and the unmodified data in the main memory (Memory) are written back to the main memory, so that the contents of Cache and Merary are consistent. ] 2. Perform data access test on the L2 Cache and output the corresponding test results; [Generate read and write commands to the L2 Cache and test the actual address space corresponding to the L2 Cache lines (Cache lines)

C:\Program F i1es\Patent\p-〇178tw. ptd 第 5 頁 "440765 五、發明說明(3) 用缓衝儲存器匯流排相關的控制暫存器(Cache BusC: \ Program F i1es \ Patent \ p-〇178tw. Ptd page 5 " 440765 V. Description of the invention (3) Buffer bus related control register (Cache Bus

Related Control Registers)對 L2 Cache 進行讀寫 操作,以驗註L2 Cache功能的完好性。】以及 3 、判斷測試的結果,輸出成功或錯誤的信息。 而根據本發明所揭露之技術’使用者可以在欲進行測 试之L2 Cache所在的電腦系統,透過上述步驟的執行 而快速的完成L2 Cache之測試,藉此提供一種可以快 速而且方便的測試方法。 有關本發明之詳細技術内容及實施例,茲配合圖式說 明如次。 【圖式說明】 巧1 A圖’係為Pen t i um Π級以下之電腦系統中微處理 器、LI Cache、L2 Cache以及主記憶體之間的硬體方 塊圖。 第1 β圖’係為Pentium I I級以上(含)之電腦系統十微 處理器、LI Cache、L2 Cache以及主記憶體之間的硬 體方塊圖。 第2圖,係為L2 Cache内部之資料儲存結構圖。 第3圖,係為本方法之主要測試步驟流程圖。 第4圖’係為本發明之局部測試步驟的詳細流程圖。 第5圖,係為本發明之局部測試步驟的詳細流程圖。 第6 — 1 ,6 — 2圖’係為本發明之局部測試步驟的詳細 流程圖。 請參閱「第2圖」係為L2 Cache 30内部之資料儲存Related Control Registers) read and write the L2 Cache to verify the integrity of the L2 Cache function. ] And 3. Judge the test results and output success or error messages. According to the technology disclosed in the present invention, the user can quickly complete the L2 Cache test by performing the above steps on the computer system where the L2 Cache is to be tested, thereby providing a quick and convenient test method. . The detailed technical content and embodiments of the present invention are described as follows with reference to the drawings. [Illustration of the diagram] Qiao 1A 'is a hardware block diagram between the microprocessor, LI Cache, L2 Cache, and main memory in the computer system below Pen t um Π level. Figure 1 β is a hardware block diagram between the Pentium I level I (inclusive) computer system, ten microprocessors, LI Cache, L2 Cache, and main memory. Figure 2 shows the data storage structure inside L2 Cache. Figure 3 is a flowchart of the main test steps of the method. Fig. 4 'is a detailed flowchart of a partial test procedure of the present invention. FIG. 5 is a detailed flowchart of a partial test procedure of the present invention. Figures 6-1, 6-2 are detailed flowcharts of the partial test steps of the present invention. Please refer to "Figure 2" for the internal data storage of L2 Cache 30

440765 五、發明說明(4) 結構圖’一般而吕’ L 2 C a c h e 3 0包括有兩個相對獨立的 標記(Tag) RAM模塊300和資料(Data) RAM模塊301 ;其 中標3己模塊3 0 0係用以儲存l 2 C a c h e 3 0運作時的命中標令己 (H i t T a g ) ’狀態(S t a t e ),最近最少使用陣列 (Least Recently Used array);而資料模塊則是用來 儲存主記憶體40的資料備份,亦即是資料的儲存位置。 請參閱「第3圖」,本發明所揭露之方法,可以透過 電腦執行下列的步驟完成,其包括有: 1 、偵測電腦運行的環境是否符合測試之要求,若符 合則進行下一步驟’反之則提示使用者設置正確的 測試環境’並且結束測試;【由於測試的過程中必 需要求當前電腦的運行環境是處於實地址(Rea i Address )的運行模式,因此必需先對當前電腦的 運行模式進行偵測,以便能正常的進行下列之測試 步驟。】 2、 獲取L2 Cache 30的配置參數及容量大小;【後 續的偵測過程主要便是根據在此得到的數據而進 行。】 3、 初始化L2 Cache 30 ;【在這個步驟中,將會關 閉(Disable )L1 Cache 20 和L2 Cache 30 ,使 Cache的内容無效,並且使存在Cache (20,30 )中 修改過而在主記憶體4 0中尚未修改的資料回存至主 記憶體40之中,使Cache (20,30)和Memory 40的 内容保持一致。】440765 V. Description of the invention (4) Structure diagram 'General and Lu' L 2 C ache 3 0 includes two relatively independent tags RAM module 300 and data RAM module 301; among them, 3 modules 3 0 0 is used to store l 2 C ache 3 0 when the operation hits Hit T ag 'State (S tate), the least recently used array (Least Recently Used array); and the data module is used to The data backup of the main memory 40 is stored, that is, the data storage location. Please refer to "Figure 3". The method disclosed in the present invention can be performed by a computer by performing the following steps, which include: 1. Detect whether the environment in which the computer runs meets the requirements of the test, and if it does, proceed to the next step. ' Otherwise, it prompts the user to set the correct test environment 'and end the test; [Because the process of testing must require the current computer's operating environment to be in the real address (Rea i Address) operating mode, it is necessary to first set the current computer operating mode Perform detection so that the following test steps can be performed normally. ] 2. Obtain the configuration parameters and capacity of L2 Cache 30. [The subsequent detection process is mainly based on the data obtained here. ] 3. Initialize L2 Cache 30; [In this step, the L1 Cache 20 and L2 Cache 30 will be disabled (Disable), the contents of the Cache will be invalidated, and the changes stored in the Cache (20, 30) will be stored in the main memory. The unmodified data in the bank 40 is stored back into the main memory 40, so that the contents of the cache (20, 30) and the memory 40 are consistent. 】

C:\Program Files\Patent\p-〇178tw. ptd 第 7 頁 440765 五、發明說明(5) 4、測試L2 Cache 30 ;【係對L2 Cache 30產生讀寫 命令,測試L2 Cache 30行(Cache lines)對應的 實際地址空間,它利用緩衝儲存器匯流排相關的控 制暫存器(Cache Bus Related Control Registers)對L2 Cache 30進行資料的存取,以驗 言正L 2 C a c h e 3 0功能的完好性°】 5 、判斷測試的結果,若為測試通過,則輸出成功的 信息,反之則輸出錯誤的信息;以及 6、恢復相始的狀態。【在此過程中,致能(E n a b 1 e )L1 Cache 20 和 L2 Cache 30,讓 Cache 能正常工 作。】 其中的步驟1還包括有(見「第4圖」): la.檢知當前電腦的運行模式;【一般而言,在 8 04 86級以上的微處理器10存在一個名叫CR0的控制 暫存器,其控制著當前電腦系統的狀態;而在 8 0486級以下的微處理器10中則設有一機器狀態字 暫存器(MSW,Machine Status Word)。通過檢知 CR0或是MSW中之PE (Protect Enable)端的邏輯位 準,便可以判斷微處理器1 0目前的狀態,若PE = 1, 表示在保護模式(Protect Mode),反之若ΡΕ = 0, 表示在真實地址模式(Real Address Mode)。】 1 b ·判斷是否為實地址模式?若為是則進行下一步 驟,若為否則提示使用者設置正確的測試環境,然 後結束測試;C: \ Program Files \ Patent \ p-〇178tw. Ptd Page 7 440765 V. Description of the invention (5) 4. Test L2 Cache 30; [Generate read and write commands to L2 Cache 30, test L2 Cache 30 lines (Cache lines) corresponding to the actual address space, it uses the cache memory related control registers (Cache Bus Related Control Registers) to access the L2 Cache 30 data, in order to verify the positive L 2 C ache 3 0 function Integrity °] 5. Judge the test result. If the test passes, it outputs a successful message, otherwise it outputs an incorrect message; and 6, it returns to the initial state. [In this process, enable (E n a b 1 e) L1 Cache 20 and L2 Cache 30 to enable the Cache to work normally. ] Step 1 also includes (see "Figure 4"): la. Check the current computer operating mode; [Generally, there is a control named CR0 in the microprocessor 10 above 8 04 86 level A register, which controls the current state of the computer system; and in the microprocessor 10 below level 80486, a machine status word register (MSW, Machine Status Word) is provided. By detecting the logic level of the PE (Protect Enable) terminal in CR0 or MSW, the current state of the microprocessor 10 can be judged. If PE = 1, it means that it is in Protect Mode, otherwise if PE = 0 Indicates that it is in the Real Address Mode. ] 1 b · Determine whether it is a real address mode? If yes, proceed to the next step; otherwise, prompt the user to set the correct test environment, and then end the test;

C:\Program F i1es\Patent\p-0178tw. ptd 第 8 頁 440765 五 '發明說明(6) 1 C ·檢知電腦系統之微處理器1 〇的類型;以及 Id·判斷是否為Pentium Π級以上的微處理器10?若 為是則跳至步驟2,若為否則結束測試。【由於本 發明所揭露之方法係以Pen t i um I I級以上之電腦系 統為實施的硬體架構,利用其中緩衝儲存器匯流排 相關的控制暫存器(Cache Bus Related Control Registers) ’對L2 Cache 30進行資料的存取,藉 此檢知L2 Cache 30的功能是否可以正常運行,故 必需做此一判斷之動作。】 在其中的步驟2又包括有下列步驟(見「第5圖」 )' 2a .取得L2 Cache 30 的容量大小(Total Size); 【可以根據有關於「緩衝儲存器匯流排相關的控制 暫存器(C a c h e B u s R e 1 a t e d C ο n t r ο 1 R e g i s t e r s )」其中的設定值而取得;其中所稱的Cache Bus Related Control Registers是存在於處理器中的 一群暫存器組,而且這些暫存器組係屬於處理器 MSR (Model Specific Register )。其中的相關設 定請參考「表一」所示。】 2b _取得L2 Cache 30的記憶頁(Bank )數; 2c .取得L2 Cache 30的相聯列數(L2 way );以及 2d ·計算L2 Cache 30令每一列的儲存容量大小(SizeC: \ Program F i1es \ Patent \ p-0178tw. Ptd p. 8 440765 5 'Description of invention (6) 1 C · Detect the type of microprocessor 1 in the computer system; and Id · Determine whether it is Pentium Π level If the above microprocessor 10? Is YES, skip to step 2, if not, end the test. [Because the method disclosed in the present invention is a hardware architecture implemented by a computer system of Pen Tium II or higher, the cache memory related control registers (Cache Bus Related Control Registers) are used to cache the L2 Cache. 30 to access data to check whether the function of L2 Cache 30 can run normally, so it is necessary to make this judgment. 】 Step 2 in it includes the following steps (see "Figure 5") '2a. Get the L2 Cache 30 capacity (Total Size); [Can be temporarily stored according to the relevant control of the "buffer storage bus" (C ache B us R e 1 ated C ο ntr ο 1 R egisters) "; and the so-called Cache Bus Related Control Registers are a group of register groups existing in the processor, and these The register group belongs to the processor MSR (Model Specific Register). Please refer to “Table 1” for related settings. ] 2b _ Get the number of memory pages (Bank) of L2 Cache 30; 2c. Get the number of associated columns (L2 way) of L2 Cache 30; and 2d · Calculate the storage capacity of each column of L2 Cache 30 (Size

Per Way)。【其計算式為 Total Size/L2 Way】 至於步驟4中所述測試L 2 C a c h e 3 0的詳細過程,現以Per Way). [The calculation formula is Total Size / L2 Way] As for the detailed process of testing L 2 C a c h e 3 0 described in step 4, now take

C:\ProgramFiles\Patent\p-0178tw_ptd 第 9 頁 440765 五、發明說明(7) 容量大小為256Kbytes ’Cache lines 為 32bits之 L2 Cache 30為例作一說明’請參考「第6 — 1 ,6 — 2圖」,其包 括有: 4 A ♦設一測試列(C a c h e R 〇 w )之計數器I = 0 ; 4B .設一測試行(Cache lines)之計數器J = 0 ; 4C *定義出一地址空間;【亦即是將L2 Cache的 Cache line轉換為L2 Cache 30之中的實際地址空 間】 4 D ·向前述的地址空間填寫測試資料;【其中的測試 資料係為已知者,如儲存在主記憶體40之中的資 料。】 4 E .判斷寫入是否成功?若為是則進行下步驟,若為 否則輸出一錯誤信息,然後跳至步驟5 ; 4F .讀取前述地址空間内的資料; 4 G *判斷讀取資料是否成功?若為是則進行下一步 驟,若為否則輸出一錯誤信息,然後跳至步驟5 ; 4 Η ·比較寫入與讀取的資料是否相同,若為是則進行 下一步驟,若為否則輪出一錯誤信息,然後跳至步 驟5 ; 4 I ·設測試行(C a c h e 1 i n e s )之計數器J = j + 3 2 ; 【由於在此一例子中’Cache line為32位元,故遞 增3 2用以在測試下一列(R0W )時,可以正確的讀取 下一筆Cache line的資料。】 4 J .判斷是否J>Size Per Way ?若為是則進行下一步C: \ ProgramFiles \ Patent \ p-0178tw_ptd Page 9 440765 V. Description of the invention (7) Capacity 256Kbytes 'L2 Cache 30 with 32bits cache as an example' Please refer to "Section 6 — 1, 6 — 2 ", including: 4 A ♦ Set a counter I (C ache R 〇w) counter I = 0; 4B. Set a counter (Cache lines) counter J = 0; 4C * define an address Space; [that is, the L2 Cache line is converted to the actual address space in L2 Cache 30] 4 D · Fill in the test data into the aforementioned address space; [The test data is known, such as stored in Data in main memory 40. ] 4 E. Determine whether the write was successful? If yes, proceed to the next step, if not, output an error message, and then skip to step 5; 4F. Read the data in the aforementioned address space; 4 G * Determine whether the reading of the data was successful? If yes, go to the next step, if not, output an error message, then skip to step 5; 4 Η · Compare whether the data written and read are the same, if yes, go to the next step, if not, turn An error message is issued, then skip to step 5; 4 I · Set the counter of the test line (C ache 1 ines) J = j + 3 2; [Since the 'Cache line is 32 bits in this example, it is incremented by 3 2 is used to correctly read the data of the next cache line when testing the next row (R0W). ] 4 J. Determine if J > Size Per Way? If yes, go to the next step

C:\Program Files\Patent\p-〇178tw. ptd 第 10 頁 440765 五、發明說明(8) 驟,若為否則跳至步驟4C ; 4k .設測試列(Cache Row )之計數器ι = ι + ι;【遞增 測試每一列】以及 4L .判斷是否I>L2 Way ?若為是(表示所有之列均已 測試完畢)則輸出一正常信息,然後跳至步驟5, 若為否則跳至步驟4B。 因此、藉由以上的技術内容可以瞭解,透過本發明所 揭露之執行步驟,我們將可以利用電腦對其内部的L2 C a c h e 3 0直接進行測試’並且根據資料的存取結果,判斷 此一 L2 Cache 30是否可以正常的運作。 而在實際實施的階段,以上的各個步驟將透過程式化 之方式,於待測試的電腦系統上執行—測試程式而完成, 而此一測試程式則是儲存在一電腦可讀取之記錄媒體(如 光碟、磁碟或記憶體)’以便在電腦系統上執行。 【發明之功效】 1 ·低成本:本發明所提供的技術,只需直接在待測試的 電腦系統中執行上述的測試程式即可進行測試,不需 其他額外的硬體裝置。 2 .實用性:由於目前並沒有可用於測試L2 cache之測試 工具’故本發明的提出將可以解決此一問題。 3 _操作容易:本發明所提供的技術,只需直接在待測試 的電腦系統中執行上述的測試程式即可進行測試,不 需複雜的操作或專業技術。 4 ·可快速檢知錯誤:在測試的過程中,只要L2 Cache發C: \ Program Files \ Patent \ p-〇178tw. Ptd Page 10 440765 V. Description of the invention (8) Step, if not, skip to step 4C; 4k. Set the counter of the test row (Cache Row) ι = ι + ι; [Incrementally test each column] and 4L. Determine if I > L2 Way? If yes (indicating that all columns have been tested), output a normal message, and then skip to step 5, if not, skip to step 4B . Therefore, from the above technical content, we can understand that through the implementation steps disclosed in the present invention, we will be able to use a computer to directly test its internal L2 C ache 3 0 'and judge this L2 based on the results of data access. Is Cache 30 working properly? In the actual implementation stage, each of the above steps will be completed in a programmatic manner on a computer system to be tested-a test program, and this test program is stored in a computer-readable recording medium ( (E.g. CD-ROM, disk or memory) 'to run on a computer system. [Effects of the invention] 1 · Low cost: The technology provided by the present invention can be tested simply by executing the above test program directly in the computer system to be tested, without the need for other additional hardware devices. 2. Practicality: Since there is currently no testing tool for testing the L2 cache, the present invention can solve this problem. 3 _ Easy to operate: The technology provided by the present invention can be tested simply by executing the above test program directly in the computer system to be tested, without the need for complicated operations or professional skills. 4 · Can quickly detect errors: During the test, as long as the L2 Cache sends

C:\ProgramFiles\Patent\p-0178tw.ptd 第 11 頁C: \ ProgramFiles \ Patent \ p-0178tw.ptd page 11

4407 BF4407 BF

五、發明說明(9) 生錯誤(如無法寫入、無法讀取、或是資料的存取錯 誤)均可以立刻得知。 【圖式符號說明】V. Description of the invention (9) Any errors (such as failure to write, read, or data access errors) can be known immediately. [Illustration of Symbols]

10 · · ·' • ’ . . ·處理器 20 · · ·. ,* 級緩衝儲存器(LI Cache) 3 0 · · 1 • . * 二級緩衝儲存器(L2 Cache) 300 ·.. ......標記(Tag ) RAM模塊 301 ·· · ······資料(Data ) RAM 模塊 40 ·——_ , * · ’ .主記憶體(Memory) 暫存器名稱 MSR Address (十六進制) 暫存器之描述 i BBL_CR_D0 88 數據暫存器,用於從 L2 Cache中讀取和寫 入數據 BBL_CR_D1 89 數據暫存器,用於從 L2 Cache中讀取和寫 入數據 BBL_CR_D2 8A 數據暫存器|用於從 L2 Cache中讀取和寫 入數據 BBL_CR_D3 8B 數據暫存器·用於從 L2 Cache中讀取和寫 入數據 BBL_CR_ADDR 116 地址暫存器,用於向 L2 Cache發送持定的 地址 BBL_CR^TRIG 11A 觸發暫存器,用於觸 發一個Cache讀取 BBL_CR_BUSY 1 IB 狀態暫存器,用於說 明是否正在讀取L2 Cache命令中 BBL_CR_CTL 119 控制暫存器,用於編 輯L2 Cache的命令 BBL_CR_CTL3 HE 控制暫存器*用於配 置 L2 Cache 【表一】 C:\Program Files\Patent\p-〇l78tw. ptd 第 12 頁10 · · · '•'.. · Processor 20 · · ·., * Level Cache (LI Cache) 3 0 · · 1 •. * Level 2 Cache (L2 Cache) 300 · .. .. .... Tag RAM module 301 ··· ······ Data RAM module 40 · ——_ , * · '. Main memory (MSR) register name MSR Address (ten Hex) Description of the register i BBL_CR_D0 88 data register for reading and writing data from L2 Cache BBL_CR_D1 89 data register for reading and writing data from L2 Cache BBL_CR_D2 8A Data register | Used to read and write data from L2 Cache BBL_CR_D3 8B Data register · Used to read and write data from L2 Cache BBL_CR_ADDR 116 Address register to send data to L2 Cache The specified address BBL_CR ^ TRIG 11A trigger register, used to trigger a cache to read BBL_CR_BUSY 1 IB status register, used to indicate whether the L2 Cache command is read BBL_CR_CTL 119 control register, used to edit the L2 Cache Command BBL_CR_CTL3 HE Control Register * Used to configure L2 Cache [Table 1] C: \ Program Files \ Patent \ p-〇l78tw. Ptd page 12

Claims (1)

〇7 _案號 8712Π?Μ …申請專利範圍 —種二級高速緩衝儲存器 係在一包括有一微處理器 級緩衝儲存器(LI Cache) 級緩衝儲存器(L2 Cache)〇7 _ Case No. 8712Π? M… Application scope of patents — a type of secondary cache memory is included in a microprocessor-level cache memory (LI Cache) -level cache memory (L2 Cache) 8 月 - - «» 。之 (L2 Cache )之測試方法, 内建於該微處理器的一 設於該微處理器外部的 '…Ί Θ丨相1f品、JU 4 υ a c n e J,以及 主要記憶體 (Memory )的pen t i um I I級以上(含)的電腦系統中 執行下列的步驟完成,其包括有: 1 ·偵測該電腦運行的環境是否符合測試之要求,若符 合則進行下一步驟,反之則提济使用者設置正確的 測試環境,並且結束測試; 獲取該L2 Cache的配置參數及容量大小(Total Size); 3·初始化該L2 Cache ; 4, 對該L2 Cache進行資料的存取别試’並輪出相應的 測試結果; 5. 判斷該測試的結果,若為測試通過’則輪出成功的 信息,反之則輸出錯誤的信息;以及 6·恢復初始的狀態,即致能(Enable )該“ Cache和 S^L2 Cache ° 如申請專利範圍第1項所述二级高速緩衝儲存器(L2 Cache )之測試方法,其中該步驟1係通過檢知設於 該微處理器中的一控制暫存器(CR0 )或是機器狀態 字暫存器(MSW,Machine Status Word)中之PE (Protect Enable )端的邏輯位率’用以判斷該電腦 系統目前的狀態,若p E二1,表示在保護模式 2August - - "" . (L2 Cache) test method, a '... 于 Θ 丨 phase 1f product, JU 4 υ acne J, and a main memory (memory) pen built into the microprocessor The following steps are performed in a computer system of Tium II or higher (inclusive), which includes the following: 1 · Detect whether the environment in which the computer runs meets the requirements of the test, if it is, proceed to the next step, otherwise use it for other purposes The user sets the correct test environment, and ends the test; obtains the configuration parameters and total size of the L2 Cache; 3. initializes the L2 Cache; 4, accesses the data of the L2 Cache, do not try again, and rolls out Corresponding test results; 5. Judge the results of the test, if the test passes', then the success information is output, otherwise the wrong information is output; and 6. Restore the original state, that is, enable the "Cache and S ^ L2 Cache ° The test method for the L2 Cache described in item 1 of the scope of the patent application, wherein step 1 is performed by detecting a control register provided in the microprocessor ( CR0) or machine Device Status Word (Machine Status Word) The logical bit rate of the PE (Protect Enable) terminal ’is used to determine the current state of the computer system. If p E 2 is 1, it indicates that it is in protection mode 2 :第Ά. 440765 ___案號87120200_年月日 修正 六、申請專利範圍 (Protect Mode),反之若ΡΕ = 0,表示在真實地址模 式(Rea 1 Address Mode )。 3、 如申請專利範圍第1項所述二級南速緩衝儲存彳匕2 Cache )之測試方法,其中該L2 Cache的容量大小是 根據有關於「缓衝儲存器匯流排相關的控制暫存n (Cache Bus Related Control Registers )」其中 的設定值而取得。;/ 4、 如申請專利範圍第1項所述二級高速缓衝儲存器(l 2 Cache )之測試方法,其中該L2 Cache的配置參數包 括有:該L 2 C a c h e的記憶頁(B a n k )數、相聯列數 (L2 Way)、以及該每一列的儲存容量大小(Size Per Way),且該Size Per Way =Total Size/L2 Way。 5、 如申請專利範圍第1項所述二級高速缓衝儲存器(L2 Cache )之測試方法,其中該步驟3係關閉(D i sab 1 e )該LI Cache和該L2 Cache,並且使存在該LI Cache 與該L2 Cache中修改過而在該主記憶體之中尚未修改 的資料回存至該主記憶體,使該LI Cache與該L2 Cache和該主記憶體的内容保持一致。 6 、如申請專利範圍第1項所述二級高速緩衝儲存器(L 2 Cache )之測試方法,其中該步驟4係利用一緩衝儲 存器匯流排相關的控制暫存器(Cache Bus Related Control Registers)對該L2 Cache進行資料的存取 操作,並根據存取的結果驗証該L2 Cache之功能是否: No. 440765 ___ Case No. 87120200_Year Month Date Amendment 6. The scope of the patent application (Protect Mode), otherwise if PE = 0, it means the real address mode (Rea 1 Address Mode). 3. The test method for the second-level South-speed buffer storage 2 Cache) described in item 1 of the scope of patent application, wherein the capacity of the L2 Cache is temporarily stored according to the control related to "buffer storage buses n (Cache Bus Related Control Registers) ". ; / 4. The test method of the secondary cache (l 2 Cache) as described in item 1 of the scope of the patent application, wherein the configuration parameters of the L2 Cache include: the memory page of the L 2 C ache (B ank ) Number, the number of associated rows (L2 Way), and the storage capacity size (Size Per Way) of each row, and the Size Per Way = Total Size / L2 Way. 5. The test method of the secondary cache (L2 Cache) as described in item 1 of the scope of the patent application, wherein step 3 is to close (D i sab 1 e) the LI Cache and the L2 Cache, and enable the existence The LI Cache and the L2 Cache modify the data that has not been modified in the main memory back to the main memory, so that the LI Cache is consistent with the contents of the L2 Cache and the main memory. 6. The test method of the secondary cache (L 2 Cache) as described in item 1 of the scope of the patent application, wherein step 4 is to use a cache bus related control register (Cache Bus Related Control Registers). ) Perform data access operations on the L2 Cache, and verify whether the function of the L2 Cache is based on the access result -871202ΠΟ__年 月 曰 修正 六'申請專利範圍 正常。 7、如申請專利範圍第1項所述二級高逮緩衝儲存器(L 2 Cache )之測試方法,其中該步驟4係依據該12 Cache之配置參數中的記憶頁(Bank )數、相聯列數 (L2 Way )、以及該每一列的儲存容量大*(Size Per Way),該Size Per Way =Total Size/L2 Way , 進行資料的存取測試,其更包括有下列步驟: 4 A · δ又 測試列(C a c h e R 〇 w )之計數器I = 〇 ; 4 B · a又一測試行(c a c h e 1 i n e s )之計數器j = 〇 ; 4C .定義出一位於該[2 Cache的地址空間; 4D .向前述的地址空間填寫測試資料; 4E ·判斷寫入是否成功?若為是則進行下4,若為 否則輸出一錯誤信息,然後跳至步驟5 ; 4 F *讀取前述地址空間内的資料; 4G 判斷讀取資料是否成功?若為是則進行下步驟, 若為否則輪出一錯誤信息,然後跳至步驟5 ; 4 Η .比較如述寫入與讀取的資料是否相同,若為是則 進行下一步驟,若為否則輸出一錯誤信息,然後跳 至步驟5 ; ^ 4 I .設該測試行(C a c h e i i n e s )之計數器j = j + 3 2 ; 4J .判斷是否J>Size Per Way ?若為是則進行下一步 驟,若為否則跳至步驟4C ; 4k ·設該測試列(Cache Row )之計數器1 = 1 + 1 ;以及 4L .判斷是否I >L2 Way ?若為是則輸出一正常信息,-871202ΠΟ__Year Month and Day Amendment Six 'patent application scope is normal. 7. The test method for the secondary high-capacity buffer cache (L 2 Cache) as described in item 1 of the scope of the patent application, wherein step 4 is based on the number of memory pages (Bank) in the configuration parameters of the 12 Cache and the association The number of rows (L2 Way) and the storage capacity of each row are large * (Size Per Way), the Size Per Way = Total Size / L2 Way, to perform data access test, it also includes the following steps: 4 A · δ test counter (C ache R 〇w) counter I = 〇; 4 B · a counter test (cache 1 ines) counter j = 〇; 4C. Define an address space located in the [2 Cache; 4D. Fill in the test data into the aforementioned address space; 4E · Determine whether the writing was successful? If yes, go to next 4; otherwise, output an error message, and then skip to step 5; 4 F * Read the data in the aforementioned address space; 4G judge whether the reading of the data is successful? If yes, proceed to the next step, if not, roll out an error message, and then skip to step 5; 4 Η. Compare whether the data written and read are the same as described, if yes, proceed to the next step, if it is Otherwise, an error message is output, and then skip to step 5; ^ 4 I. Set the counter of the test line (Cacheeiines) j = j + 3 2; 4J. Determine if J > Size Per Way? If yes, go to the next step. Step, if not, skip to step 4C; 4k. Set the counter of the test row (Cache Row) 1 = 1 + 1; and 4L. Determine if I > L2 Way? If yes, output a normal message, 440765 _案號 8_7120200___车月日_修正__ 六、申請專利範圍 然後跳至步驟5,若為否則跳至步驟4B。 8、 一種二級兩速緩衝儲存器(L 2 C a c h e )之測試方法, 係在一包括有一微處理器、一内建於該微處理器的一 級緩衝儲存器(LI Cache)、一設於該微處理器外部的 一級缓衝儲存器(L 2 C a c h e) ’以及一主要記憶體 (Memory )的電腦系統中執行下列的步驟完成,其包 括有: 1 _初始化該L2 Cache ; 2 ·對該L2 Cache進行資料的存取測試,並輸出相應 的測試結果;以及 3 ·判斷該測試的結果,輸出成功或錯誤的信息。 9、 如申請專利範圍第8項所述二級高速緩衝儲存器(L2 Cache )之測試方法,其中該步驟1係關閉(Disable )該LI Cache和該L2 Cache ’並且使存在該LI Cache 與該L2 Cache中修改過而在該主記憶體之中尚未修改 的資料回存至該主記憶體,使該LI Cache與該L2 Cache和該主記憶體的内容保持—致。 1 0、如申請專利範圍第8項所述二級高速緩衝儲存器 (L2 Cache )之測試方法,其中該步驟2係利用一緩 衝儲存器匯流排相關的控制暫存器(Cache Bus Related Control Registers)對該L2 Cache 進行資 料的存取操作,並根據存取的結果驗証該L2 Cache之 功能是否正常。440765 _Case No. 8_7120200___ Car Moon Day _ Amendment __ 6. Scope of Patent Application Then skip to step 5, if not, skip to step 4B. 8. A method for testing a two-level two-speed buffer memory (L 2 C ache), which is a first-level buffer memory (LI Cache) including a microprocessor, a built-in The following steps are performed in a computer system with a primary buffer memory (L 2 C ache) external to the microprocessor and a main memory, including: 1 _initializing the L2 Cache; 2 The L2 Cache performs a data access test and outputs the corresponding test results; and 3. judges the test results and outputs success or error information. 9. The method for testing a secondary cache (L2 Cache) as described in item 8 of the scope of the patent application, wherein the step 1 is to disable (disable) the LI Cache and the L2 Cache 'and enable the LI Cache and the The data modified in the L2 Cache but not modified in the main memory is stored back to the main memory, so that the contents of the LI Cache and the L2 Cache and the main memory are kept consistent. 10. The test method for the second level cache (L2 Cache) as described in item 8 of the scope of the patent application, wherein step 2 is to use a cache bus related control register (Cache Bus Related Control Registers). ) Perform data access operation on the L2 Cache, and verify whether the function of the L2 Cache is normal according to the access result. 第仔頁Page
TW87120200A 1998-12-04 1998-12-04 L2 cache testing method TW440765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW87120200A TW440765B (en) 1998-12-04 1998-12-04 L2 cache testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW87120200A TW440765B (en) 1998-12-04 1998-12-04 L2 cache testing method

Publications (1)

Publication Number Publication Date
TW440765B true TW440765B (en) 2001-06-16

Family

ID=21632199

Family Applications (1)

Application Number Title Priority Date Filing Date
TW87120200A TW440765B (en) 1998-12-04 1998-12-04 L2 cache testing method

Country Status (1)

Country Link
TW (1) TW440765B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7992059B2 (en) 2007-09-11 2011-08-02 International Business Machines Corporation System and method for testing a large memory area during processor design verification and validation
US8006221B2 (en) 2007-09-11 2011-08-23 International Business Machines Corporation System and method for testing multiple processor modes for processor design verification and validation
US8019566B2 (en) 2007-09-11 2011-09-13 International Business Machines Corporation System and method for efficiently testing cache congruence classes during processor design verification and validation
US8099559B2 (en) 2007-09-11 2012-01-17 International Business Machines Corporation System and method for generating fast instruction and data interrupts for processor design verification and validation
US9965391B2 (en) 2014-06-30 2018-05-08 Hewlett Packard Enterprise Development Lp Access cache line from lower level cache
CN113268384A (en) * 2021-04-30 2021-08-17 瑞芯微电子股份有限公司 Method for detecting abnormal mark space and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7992059B2 (en) 2007-09-11 2011-08-02 International Business Machines Corporation System and method for testing a large memory area during processor design verification and validation
US8006221B2 (en) 2007-09-11 2011-08-23 International Business Machines Corporation System and method for testing multiple processor modes for processor design verification and validation
US8019566B2 (en) 2007-09-11 2011-09-13 International Business Machines Corporation System and method for efficiently testing cache congruence classes during processor design verification and validation
US8099559B2 (en) 2007-09-11 2012-01-17 International Business Machines Corporation System and method for generating fast instruction and data interrupts for processor design verification and validation
US9965391B2 (en) 2014-06-30 2018-05-08 Hewlett Packard Enterprise Development Lp Access cache line from lower level cache
CN113268384A (en) * 2021-04-30 2021-08-17 瑞芯微电子股份有限公司 Method for detecting abnormal mark space and storage medium
CN113268384B (en) * 2021-04-30 2022-05-13 瑞芯微电子股份有限公司 Method for detecting abnormal mark space and storage medium

Similar Documents

Publication Publication Date Title
US9916116B2 (en) Memory access and detecting memory failures using dynamically replicated memory based on a replication policy
KR102426619B1 (en) Data Integrity for Persistent Memory Systems and More
TWI506626B (en) Phase change memory in a dual inline memory module
US7770077B2 (en) Using cache that is embedded in a memory hub to replace failed memory cells in a memory subsystem
US11200961B1 (en) Apparatus, system and method to log memory commands and associated addresses of a memory array
US8255742B2 (en) Dynamically replicated memory
EP2311043B1 (en) Method and apparatus for repairing high capacity/high bandwidth memory devices
TWI467591B (en) Method for defective block isolation in a non-volatile memory system and non-volatile memory device related to the same
US20070234182A1 (en) Error checking and correction (ECC) system and method
TWI380178B (en) System and method for managing memory errors in an information handling system
CN109155146A (en) Prosthetic device after integral type encapsulation
EP3770764B1 (en) Method of controlling repair of volatile memory device and storage device performing the same
CN101369246A (en) System and method for using a memory mapping function to map memory defects
US20180188960A1 (en) Method and apparatus for redirecting memory access commands sent to unusable memory partitions
US9009548B2 (en) Memory testing of three dimensional (3D) stacked memory
CN114730607A (en) Memory fault repairing method and device
TW440765B (en) L2 cache testing method
CN112466379B (en) Memory bit mapping relation determination method and device, processor chip and server
US20240013851A1 (en) Data line (dq) sparing with adaptive error correction coding (ecc) mode switching
CN109582523B (en) Method and system for effectively analyzing performance of NVMe (network video recorder) module at front end of SSD (solid State drive)
EP3553662A1 (en) Intergral post package repair
US20240013822A1 (en) Adjustable memory cell reliability management
US20240086090A1 (en) Memory channel disablement
US20240241778A1 (en) In-system mitigation of uncorrectable errors based on confidence factors, based on fault-aware analysis
US10229057B2 (en) Method and apparatus for avoiding bus contention after initialization failure

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent
MM4A Annulment or lapse of patent due to non-payment of fees