446880 五、發明說明(1) 、本發月,:關於—種將系統暫時擱置再重新開始之方 法特別疋帛於種自動可重覆地讓系統暫時摘置再重 新開始之方法。 β $ 在電腦帝資訊等電子系統之品管過程中,為了確保產 品之品質均需過一系列重覆之相關測試。例如,重覆讓 電腦系統進入暫時攔罟r ^ 置(suspend)之狀態’再將使其重新 開始動作(resume),以桮 、 M便測試系統之穩定度等。目前,有 很多之方法可以讓已鍊、任 ,^ '、進入擱置狀態之電腦系統嗔醒 (Wake叫)再重新開始動作之方法,如按下鍵盤、或是移 動滑鼠等。然而,為使如上之測試具 戍疋移 則經常需要進行多達數百次之試 =度 „ , ^ , ,8|1 ^ , 使用人工操作,所以相當浪費時 B a . 另外,不斷地使用鍵盤、和滑鼠等機 械性之元件來進行測試,> 交& ,4 + # i ώ 席鼠寻機 9§注里,4 , ^ 也夺易造成其本身、和系統發生 問《I。厂果’ 4成研發人員必須花另外之時間,來排除 s u s p e n d f口 r e s u m e 動作之泪士士 垃 v j Η M 切作之測式等相關項碎之問題,實在不 合經濟效益。 有鑑於此’本發明之一目的為提出 統暫時擱置再重新開始之方法,藴wΛ J置復地眾系 續么去®… 乃决藉以避免使用人工來從事 讓系統重覆地suspend後再resume”之操作,以 人工 時間。 當I本Ϊ::2細::备為使測試人員可以依照系統測之 需要’自::疋調整讓系統自動重覆地執行—和 resume之次數,且測試過程中若有錯誤發生,亦可得知在446880 V. Description of the invention (1) This month, about: A method of temporarily putting the system on hold and restarting it is particularly focused on a method of automatically and repeatedly letting the system temporarily take off and restart. β $ In the process of quality control of electronic systems such as computer emperor information, in order to ensure the quality of the products, a series of repeated relevant tests are required. For example, repeatedly putting the computer system into a state of temporary suspension (suspend) 'will cause it to resume operation, and the stability of the system will be tested with a cup or M. At present, there are many ways to make the computer system that has been chained, left, ^, and put on hold (wake), and then restart the operation, such as pressing the keyboard or moving the mouse. However, it is often necessary to perform hundreds of trials in order to make the above test fixtures move. Degrees ^, ^,, 8 | 1 ^, using manual operations, so it is a waste of time B a. In addition, continuous use Keyboard, mouse and other mechanical components to test, > pay &, 4 + # i FREE xi mouse hunting machine 9§ Note, 4, ^ also easily cause itself and the system to ask "I .Fruits and Fruits 40% of the R & D staff must spend additional time to eliminate the problem of related items such as the tears of suspendf mouth resume action jj v M j M cut, which is really not economical. In view of this, this One of the objects of the invention is to propose a method of temporarily shelving and restarting. It is necessary to avoid the need to manually use the operation to resume the system after the system is suspended. Labor time. When this book Ϊ :: 2 is fine :: prepared so that the tester can follow the system's testing needs' from :: 疋 adjust the number of times that the system automatically executes-and resume, and if an error occurs during the test, also Can be found in
C:\ProgramFiles\Patent\0506-3846-E.ptd第 4 頁 446880 發明說明(2) 和resume之次數,以方 發生錯誤前系統已經執行suspend 便除錯。 為達到上述目的’本發明提出之方法包括如下步驟: 认定硬體中斷程序,以作為將系統由搁置之狀態中喚醒之 觸發源;設定系統和相關硬體之狀態;執行一計時器程 序,其在設定一警報時間後,讓系統進入擱置狀態;之 後,當系統時間到達上述警報時間,則觸發上述設定之硬 體中斷程序,以將系統由擱置之狀態中喚醒;檢查上述計 時器程序已執行之次數是否大於一預設值;若為否,則重 覆執行上述計時器程序;若為是,則回復系統和相關硬體 原本之設定值。 圖式之簡單說明: 為讓本發明之上述目的、特徵、和優點能更明顯易 懂,下文特舉較佳實施例,並配合所附圖式,做詳細說明 如下: 、 第1圖顯示依據本發明方法實施例之主程序流程圖; 第2圖顯示依據本發明方法實施例之主程 時器程序之流程圖;以及 ' 第3圖顯示依據本發明方法實施例計時器程序中,其 RTC攔截程序之流程圖。 符號說明: 卜8〜主程序之步驟;5a — 5d〜計時程序之步驟;以及η 1-Π3〜RTC攔截程序之步驟。 實施例:C: \ ProgramFiles \ Patent \ 0506-3846-E.ptd page 4 446880 Description of the invention (2) and the number of resumes, in order to debug before the system has executed suspend. In order to achieve the above objective, the method proposed by the present invention includes the following steps: identifying a hardware interrupt program as a trigger source for waking the system from a suspended state; setting the state of the system and related hardware; executing a timer program, which After setting an alarm time, let the system enter the hold state; after that, when the system time reaches the above alarm time, trigger the set hardware interrupt procedure to wake the system from the hold state; check that the timer program has been executed Whether the number of times is greater than a preset value; if not, repeat the above timer procedure; if yes, restore the original set values of the system and related hardware. Brief description of the drawings: In order to make the above-mentioned objects, features, and advantages of the present invention more comprehensible, a detailed description is given below with reference to the preferred embodiments, and the detailed description is as follows: The main program flowchart of the method embodiment of the present invention; FIG. 2 shows the flowchart of the main timer program according to the method embodiment of the present invention; and FIG. 3 shows the RTC of the timer program according to the method embodiment of the present invention. Flow chart of the interception process. Explanation of symbols: bu 8 ~ steps of the main program; 5a-5d ~ steps of the timing program; and η 1-Π3 ~ steps of the RTC interception program. Example:
C:\PrograniFiles\Patent\0506-3846-E.ptd第 5 頁 ^ 44688〇 五 '發明說明(3) 以下將以一電腦系統為例,並參照第1圖至第3圖來對 本發明之方法作一詳細之解說。 主程序 第1圖顯示本發明方法之主程序流程圖。 (步驟1)首先’將電腦系統中IRQ8之中斷請求(即時時 鐘RTC之硬體中斷),設定為可將系統(如ρ ΠΧ4、或相同等 級晶片組)由棚置狀態喚醒之觸發源。另外,將主要8 2 5 9 中斷控制器(master)之IRQ2、以及從屬8259中斷控制器 (slave)之IRQ0分別致能。 (步驟2)設定計時器(timer)之狀態、組態。 (步驟3)預先設定一即時時鐘(RTC)攔截程序。 (步驟4)讀取要讓系統重覆執行” suspend後再resume" 動作之次數(對應於下述計時器程序之執行次數),此一預 設值可由檔案中讀取’或是由使用者(測試者)自行輸入。 (步驟5)執行一計時器程序,用以在設定一警報時間 後,讓系統進入搁置狀態;之後,當系統時間到達上述警 報時間,則觸發上述設定之硬體中斷程序,以將系統由^ 置之狀態(suspend)中喚醒(wake up,以進行resume)。詳 細之動作情形,將另外於下文中描述。 (步驟6)檢查上述計時器程序已執行之次數,若仍小 於上述預設值則繼續執行步驟5之計時器程序;若大於上 述預設值則繼續下一步驟。 (步驟7)解除計時器之相關狀態設定。 (步驟8)將設定上述即時時鐘攔戴程序時所改變之值C: \ PrograniFiles \ Patent \ 0506-3846-E.ptd page 5 ^ 44688 05 'description of the invention (3) The following will take a computer system as an example, and refer to Figures 1 to 3 to describe the method of the present invention Give a detailed explanation. Main Program Figure 1 shows the main program flowchart of the method of the present invention. (Step 1) First, set the IRQ8 interrupt request (hardware interrupt of real-time clock RTC) in the computer system as the trigger source that can wake up the system (such as ρ Π × 4 or the same level chipset) from the shed state. In addition, enable IRQ2 of the main 8 2 5 9 interrupt controller (master) and IRQ0 of the slave 8259 interrupt controller (slave) respectively. (Step 2) Set the status and configuration of the timer. (Step 3) A real-time clock (RTC) interception program is set in advance. (Step 4) Read the number of times that the system should be executed repeatedly after “suspend” and resume " actions (corresponding to the number of executions of the timer program below). This preset value can be read from the file or by the user. (Tester) Enter it by yourself. (Step 5) Execute a timer program to put the system into a suspended state after setting an alarm time; then, when the system time reaches the above alarm time, the above-mentioned hardware interrupt is triggered. Program to wake up the system from suspend (wake up to resume). The detailed operation will be described in the following. (Step 6) Check the number of times the timer program has been executed. If it is still less than the above preset value, continue to execute the timer procedure of step 5. If it is greater than the above preset value, continue to the next step. (Step 7) Cancel the related state setting of the timer. (Step 8) The above real-time clock will be set Changed value when blocking the program
4468 d 五、發明說明(4) 、 加以恢復成原狀。 計時器程序 第2圖顯示本發明主程序中之計時器程序流程圖。 (步驟5a)開始執行計時程序之後,先取得目前系統内 之時間T,並將設定時間加上2分鐘(可依需要設定),而 到一警報時間Τ’ OT + 2)。 (步驟5b)將上述警報時間τ’設定成可以觸發上述即 時鐘(RTC)中斷程序。 % (步驟5c)對系統發出進入暫時搁置狀態之指示,使 統進入搁置狀態後。 m 系統進入擱置狀態後,當系統時間一到達上述孽報 間Τ’,則觸發明上述RTC中斷程序以便將系統喚醒/之後呀 再執行上述預先設定之RTC攔截程序,讓系統重新取 制權。 其中,上述RTC攔截程序之動作流程如第3圖所示。 (步驟Π1)清除警報時間Τ’ ,以便使下一次之憨 間可=生中斷;(步驟H2)清除使用㈣中斷來喚醒系統 之過程中相關之設定值,以便使下次之RTC中斷程序仍可 以將系統喚醒;(步驟H3)送出一結束訊號£〇1給82 控制器。 (步驟5d)將記錄計時器程序已執行之次數加 錄總共執行之次數,之後返回主程序。 屺 2述可知,本發明利用即時時鐘設定警報時間之特 性,讓系統能夠在進入暫時摘置狀態一特定時間之後自4468 d 5. Description of the invention (4), restore it to its original state. Timer Program Fig. 2 shows a flowchart of the timer program in the main program of the present invention. (Step 5a) After starting the timing procedure, first obtain the current time T in the system, add the set time by 2 minutes (can be set as required), and reach an alarm time T ′ OT + 2). (Step 5b) The above-mentioned alarm time τ 'is set so that the above-mentioned clock (RTC) interrupt routine can be triggered. % (Step 5c) Give the system an instruction to enter a temporary hold state, and put the system into a hold state. m After the system enters the suspended state, as soon as the system time reaches the above-mentioned report time T ′, the above-mentioned RTC interrupt procedure is triggered to wake up the system / later. Then the above-mentioned preset RTC interception procedure is executed to allow the system to regain control. The operation flow of the above-mentioned RTC interception program is shown in FIG. 3. (Step Π1) Clear the alarm time T ′ so that the next time can be interrupted; (Step H2) Clear the relevant setting values in the process of using ㈣ interrupt to wake up the system, so that the next RTC interrupt process is still You can wake up the system; (step H3) send an end signal £ 〇1 to the 82 controller. (Step 5d) Add the total number of times the record timer program has been executed, and then return to the main program.屺 As can be seen from the second description, the present invention uses the characteristics of the real-time clock to set the alarm time, so that the system can
44688ο 五、發明說明(5) ' -------- 二由巧。中斷喚醒’以進行resume。並且可依照實施需 立:f由改變檔案之執行次數預設值、或自行輸入,可任 二 調整所要重覆執行"suspend後再resume"動作之次 .. 研仃suspend後再resume”動作,均為由 程序控制而自動發也 赞生’所以可以節省所須之人工時間成 丰。 次數另:可誤發生’#由所記錄之已執行 Q ,. 得知在發生錯誤前系統已經執行 suspend 和resume 夕-k 值。 之夂數,對於除錯而言有相當之參考價 雖然本發明已以較#音 m - A ^ HH匕t較佳實施例揭露如上,然其並非用以 限疋本發明’任何熟籴太馆社溢土 神和範圍"可做者’在不脫離本發明之精 護範圍當視後附之申;潤•,因此本發明之保 τ叫專利範圍所界定者為準。44688ο V. Description of the invention (5) '-------- Eryou Qiao. Wake up interrupt 'for resume. And can be established according to the implementation needs: f by changing the preset number of times the file is executed, or input by yourself, you can adjust the "resume" and "resume after suspend" actions .. Both are automatically controlled by the program and can also be issued automatically, so you can save the required manual time to become abundant. Another number of times: can occur by mistake '# by the recorded executed Q ,. Learn that the system has been executed before the error occurred The values of the suspend and resume values are equal to the reference value for debugging. Although the present invention has been disclosed as above with the preferred embodiment of # 音 m-A ^ HH dagger, it is not limited.疋 The present invention 'anyone who knows Taijisha ’s overflowing gods and scope' can do it without departing from the scope of the present invention; Run •, so the protection of the present invention is called the patent scope. Defined shall prevail.
C:\Program Files\Patent\0506-3846-E, ptd第C: \ Program Files \ Patent \ 0506-3846-E, ptd