TWI775167B - Operating system and control method - Google Patents
Operating system and control method Download PDFInfo
- Publication number
- TWI775167B TWI775167B TW109134073A TW109134073A TWI775167B TW I775167 B TWI775167 B TW I775167B TW 109134073 A TW109134073 A TW 109134073A TW 109134073 A TW109134073 A TW 109134073A TW I775167 B TWI775167 B TW I775167B
- Authority
- TW
- Taiwan
- Prior art keywords
- circuit
- trigger
- control parameter
- core circuit
- parameter
- Prior art date
Links
Images
Landscapes
- Information Transfer Systems (AREA)
- Selective Calling Equipment (AREA)
Abstract
Description
本發明係有關於一種操作系統,特別是有關於一種具有複數操作模式的操作系統。The present invention relates to an operating system, and more particularly, to an operating system having a plurality of operating modes.
隨著科技的進步,電子裝置的種類及功能愈來愈多。大部分的電子裝置的內部具有一中央處理器以及許多處理電路。中央處理器用以控制所有處理電路的操作。然而,中央處理器在同一時間只能與單一處理電路溝通。因此,造成許多處理電路的閒置。With the advancement of technology, there are more and more types and functions of electronic devices. Most electronic devices have a central processing unit and many processing circuits inside. The central processing unit is used to control the operation of all processing circuits. However, the central processing unit can only communicate with a single processing circuit at a time. Therefore, many processing circuits are idle.
本發明之一實施例提供一種操作系統,包括一第一儲存電路、一第二儲存電路、一選擇電路、一核心電路以及一觸發源管理電路。第一儲存電路儲存一第一控制參數。第二儲存電路儲存一第二控制參數。選擇電路用以提供一輸出參數。核心電路接收輸出參數。觸發源管理電路用以控制選擇電路。當一第一觸發源致能一第一觸發信號時,觸發源管理電路命令選擇電路將第一控制參數作為輸出參數,使得核心電路進入第一模式,用以執行一第一操作。當一第二觸發源致能一第二觸發信號時,觸發源管理電路命令選擇電路將第二控制參數作為輸出參數,使得核心電路進入第二模式,用以執行一第二操作。An embodiment of the present invention provides an operating system including a first storage circuit, a second storage circuit, a selection circuit, a core circuit, and a trigger source management circuit. The first storage circuit stores a first control parameter. The second storage circuit stores a second control parameter. The selection circuit is used to provide an output parameter. The core circuit receives output parameters. The trigger source management circuit is used to control the selection circuit. When a first trigger source enables a first trigger signal, the trigger source management circuit instructs the selection circuit to use the first control parameter as an output parameter, so that the core circuit enters the first mode for executing a first operation. When a second trigger source enables a second trigger signal, the trigger source management circuit instructs the selection circuit to use the second control parameter as an output parameter, so that the core circuit enters the second mode for executing a second operation.
本發明另提供一種控制方法,用以控制一核心電路的操作模式。本發明的控制方法包括,儲存一第一控制參數於一第一儲存電路中;儲存一第二控制參數於一第二儲存電路中;判斷一第一觸發源是否致能一第一觸發信號;當第一觸發信號被致能時,提供第一控制參數予核心電路,使得核心電路進入一第一模式,用以進行一第一操作;判斷一第二觸發源是否發出致能一第二觸發信號;以及當第二觸發信號被致能時,提供第二控制參數予核心電路,使得核心電路進入一第二模式,用以進行一第二操作。The present invention further provides a control method for controlling the operation mode of a core circuit. The control method of the present invention includes: storing a first control parameter in a first storage circuit; storing a second control parameter in a second storage circuit; determining whether a first trigger source enables a first trigger signal; When the first trigger signal is enabled, a first control parameter is provided to the core circuit, so that the core circuit enters a first mode for performing a first operation; it is judged whether a second trigger source has issued a second trigger to enable a second trigger signal; and when the second trigger signal is enabled, the second control parameter is provided to the core circuit, so that the core circuit enters a second mode for performing a second operation.
本發明之控制方法可經由本發明之操作系統來實作,其為可執行特定功能之硬體或韌體,亦可以透過程式碼方式收錄於一紀錄媒體中,並結合特定硬體來實作。當程式碼被電子裝置、處理器、電腦或機器載入且執行時,電子裝置、處理器、電腦或機器變成用以實行本發明之操作系統。The control method of the present invention can be implemented through the operating system of the present invention, which is hardware or firmware that can perform specific functions, and can also be recorded in a recording medium by means of code, and implemented in combination with specific hardware. . When the code is loaded and executed by an electronic device, processor, computer or machine, the electronic device, processor, computer or machine becomes an operating system for implementing the present invention.
為讓本發明之目的、特徵和優點能更明顯易懂,下文特舉出實施例,並配合所附圖式,做詳細之說明。本發明說明書提供不同的實施例來說明本發明不同實施方式的技術特徵。其中,實施例中的各元件之配置係為說明之用,並非用以限制本發明。另外,實施例中圖式標號之部分重覆,係為了簡化說明,並非意指不同實施例之間的關聯性。In order to make the objects, features and advantages of the present invention more obvious and easy to understand, the following specific embodiments are given and described in detail in conjunction with the accompanying drawings. The present specification provides different embodiments to illustrate the technical features of different embodiments of the present invention. Wherein, the configuration of each element in the embodiment is for illustration, and not for limiting the present invention. In addition, parts of the reference numerals in the drawings in the embodiments are repeated for the purpose of simplifying the description, and do not mean the correlation between different embodiments.
第1圖為本發明之操作系統的示意圖。如圖所示,操作系統100包括一中央處理器(CPU)102、一匯流排104、一處理電路106以及觸發源108、110及112。中央處理器102透過匯流排104與處理電路106溝通。在一可能實施例中,中央處理器102寫入資料至處理電路106的儲存電路(未顯示)中。本發明並不限定匯流排104的種類。在一可能實施例中,匯流排104係以一並列方式或是一串列方式,在中央處理器102與處理電路106之間傳送資料、信號及電源之至少一者。FIG. 1 is a schematic diagram of the operating system of the present invention. As shown, the
處理電路106耦接匯流排104,用以接收來自中央處理器102的訊息(資料、信號及電源之至少一者)。處理電路106更耦接觸發源108、110及112,用以接收觸發信號STA
1~STA
N、STB
1~STB
M及STC
1~STC
Q。在本實施例中,當觸發信號STA
1~STA
N、STB
1~STB
M及STC
1~STC
Q之一者被致能時,處理電路106根據被致能的觸發信號的來源,進入相對應的的操作模式,用以進行相對應的操作。
The
舉例而言,當觸發源108致能觸發信號STA
1~STA
N之一者時,處理電路106進入一第一模式。在第一模式下,處理電路106進行一第一操作。當觸發源110致能觸發信號STB
1~STB
M之一者時,處理電路106進入一第二模式。在第二模式下,處理電路106進行一第二操作。當觸發源112致能觸發信號STC
1~STC
Q之一者時,處理電路106可能進入第一或第二模式。在其它實施例中,當觸發信號STC
1~STC
Q之一者被致能時,處理電路106可能進入一第三模式,用以進行一第三操作。
For example, when the
在一些實施例中,當處理電路106進入第一模式並執行第一操作時,處理電路106忽略來自觸發源110及112的觸發信號。因此,在第一模式下,即使觸發源110致能觸發信號STB
1~STB
M之一者時,處理電路106持續進行第一操作,直到處理電路106完成第一操作。同樣地,當處理電路106進入第二模式並進行第二操作時,即使觸發源108致能觸發信號STA
1~STA
N之一者時,處理電路106持續進行第二操作,直到處理電路106完成第二操作。
In some embodiments, the
在一可能實施例中,處理電路106根據觸發信號STA
1~STA
N、STB
1~STB
M及STC
1~STC
Q的位準,得知觸發信號STA
1~STA
N、STB
1~STB
M及STC
1~STC
Q是否被致能。以觸發信號STA
1為例,當觸發信號STA
1為一第一特定位準時,表示觸發源108致能觸發信號STA
1。因此,處理電路106進入第一模式。當觸發信號STA
1不為特定位準時,表示觸發源108未致能觸發信號STA
1。因此,處理電路106繼續偵測其它觸發信號的位準。第一特定位準可能是一高位準或是一低位準。
In a possible embodiment, the
本發明並不限定處理電路106的架構。在一可能實施例中,處理電路106係為一計時器/計數器(timer/counter)。在此例中,當處理電路106進入第一模式時,處理電路106進行一計時操作。此時,處理電路106作為一計時器。當處理電路106進入第二模式,處理電路106進行一計數操作。此時,處理電路106作為一計數器。在另一可能實施例中,處理電路106係為一串列/並列電路(series and parallel circuit)。在此例中,處理電路106可能具有一第一介面以及一第二介面。第一介面係為一串列介面,如一通用非同步接收器傳輸 (UART)介面、一同步週邊設備介面(SPI)或是一內部積體電路(I2C)介面。第二介面係為一並列介面,如一通用介面匯流排(General-Purpose Interface Bus;GPIB)。當處理電路106進入第一模式時,處理電路106利用第一介面與一外部裝置(如中央處理器102、觸發源108及110之至少一者)溝通。當處理電路106進入第二模式時,處理電路106利用第二介面與外部裝置溝通。在其它實施例中,處理電路106具有更多的操作模式,用以進行更多的操作。The present invention does not limit the structure of the
在一些實施例中,在處理電路160完成相對應的操作時,處理電路106可能致能一輸出信號SOUT。在一可能實施例中,中央處理器102透過匯流排104,接收輸出信號SOUT。在另一實施例中,中央處理器102可能透過其它匯流排接收輸出信號SOUT。在其它實施例中,中央處理器102可能直接耦接處理電路106,用以接收輸出信號SOUT。在一些實施例中,處理電路106可能透過匯流排104提供輸出信號SOUT予其它外部元件(如觸發源108、110及112之至少一者),或是直接提供輸出信號SOUT予其它外部元件。In some embodiments, when the processing circuit 160 completes the corresponding operation, the
在一可能實施例中,中央處理器102根據輸出信號SOUT,判斷處理電路106是否完成相對應的操作。舉例而言,當處理電路106完成第一操作或是第二操作時,處理電路106可能設定輸出信號SOUT為一第二特定位準。因此,中央處理器102根據具有特定位準的輸出信號SOUT,得知處理電路106已完成第一操作或是第二操作。第二特定位準可能為一高位準或是一低位準。在本實施例中,由於處理電路106根據被致能的觸發信號的來源,主動地執行相對應的操作,而不需中央處理器102時時監控觸發源108、110及112是否致能觸發信號,故可節省中央處理器102的功耗。In a possible embodiment, the
在其它實施例中,處理電路106更接收時脈信號CLK
1及CLK
2。在此例中,當處理電路106進入第一模式時,處理電路106可能根據時脈信號CLK
1或CLK
2,進行第一操作。同樣地,當處理電路106進入第二模式時,處理電路106可能根據時脈信號CLK
1或CLK
2,進行第二操作。在其它實施例中,處理電路106可能接收更多或更少的時脈信號。
In other embodiments, the
觸發源108包括週邊電路PA
1~PA
N,用以提供觸發信號STA
1~STA
N。觸發源110包括週邊電路PB
1~PB
M,用以提供觸發信號STB
1~STB
M。觸發源112包括週邊電路PC
1~PC
Q,用以提供觸發信號STC
1~STC
Q。在本實施例中,週邊電路PA
1~PA
N位於同一觸發源中,故週邊電路PA
1~PA
N可稱為第一週邊電路。在此例中,週邊電路PB
1~PB
M稱為第二週邊電路,週邊電路PC
1~PC
Q稱為第三週邊電路。
The
本發明並不限定週邊電路PA 1~PA N、PB 1~PB M及PC 1~PC Q的種類。任何電路均可作為週邊電路PA 1~PA N、PB 1~PB M及PC 1~PC Q之一者。由於週邊電路PA 1~PA N、PB 1~PB M及PC 1~PC Q的特性相似,故以週邊電路PA 1為例。在此例中,當週邊電路PA 1完成本身的操作時,週邊電路PA 1致能觸發信號STA 1。此時,觸發信號STA 1可能為一特定位準。然而,如果週邊電路PA 1尚未完成本身的操作時,週邊電路PA 1不致能觸發信號STA 1。此時,觸發信號STA 1可能不為特定位準。 The present invention does not limit the types of the peripheral circuits PA 1 ˜PAN , PB 1 ˜PB M , and PC 1 ˜PC Q. Any circuit can be used as one of the peripheral circuits PA 1 ˜PAN , PB 1 ˜PB M and PC 1 ˜PC Q . Since the characteristics of the peripheral circuits PA 1 ˜PAN , PB 1 ˜PB M and PC 1 ˜PC Q are similar, the peripheral circuit PA 1 is taken as an example. In this example, when the peripheral circuit PA 1 completes its own operation, the peripheral circuit PA 1 enables the trigger signal STA 1 . At this time, the trigger signal STA1 may be at a specific level. However, if the peripheral circuit PA 1 has not completed its own operation, the peripheral circuit PA 1 cannot trigger the signal STA 1 . At this time, the trigger signal STA1 may not be at a specific level.
觸發源108、110及112各自獨立。換句話說,觸發源108、110及112不共用任何週邊電路。另外,本發明不限定觸發源108、110及112的週邊電路的數量。在一可能實施例中,觸發源108、110及112之一者的週邊電路的數量可能相同於觸發源108、110及112之另一者的週邊電路的數量。在另一可能實施例中,觸發源108、110及112之一者的週邊電路的數量可能不同於觸發源108、110及112之另一者的週邊電路的數量。
第2圖為本發明之處理電路的示意圖。如圖所示,處理電路200包括儲存電路RT
1~RT
3、一選擇電路202、一核心電路204以及一觸發源管理電路206。儲存電路RT
1~RT
3各自獨立。在一可能實施例中,儲存電路RT
1~RT
3係為暫存器。儲存電路RT
1~RT
3分別儲存控制參數P
1~P
3。控制參數P
1~P
3用以控制核心電路204的操作模式。在一可能實施例中,控制參數P
1~P
3由處理電路200以外的一外部裝置(如第1圖的中央處理器102)所提供。在此例中,第1圖的中央處理器102可能透過匯流排104,將控制參數P
1~P
3分別寫入儲存電路RT
1~RT
3。本發明並不限定儲存電路的數量。在其它實施例中,處理電路200可能具有更多或更少的儲存電路。
FIG. 2 is a schematic diagram of the processing circuit of the present invention. As shown in the figure, the
選擇電路202耦接儲存電路RT
1~RT
3。在一可能實施例中,選擇電路202根據一選擇信號SEL,將控制參數P
1~P
3之一者作為一輸出參數PO。舉例而言,當選擇信號SEL具有一第一狀態(如第一電壓)時,選擇電路202將控制參數P
1作為輸出參數PO。當選擇信號SEL具有一第二狀態(如第二電壓)時,選擇電路202將控制參數P
2作為輸出參數PO。當選擇信號SEL具有一第三狀態(如第三電壓)時,選擇電路202將控制參數P
3作為輸出參數PO。在其它實施例中,選擇電路202係根據選擇信號SEL的頻率,將控制參數P
1~P
3之一者作為一輸出參數PO。在一些實施例中,選擇電路202根據多個選擇信號,將控制參數P
1~P
3之一者作為輸出參數PO。本發明並不限定選擇電路202的架構。在一可能實施例中,選擇電路202係為一多工器。
The
核心電路204耦接選擇電路202,用以接收輸出參數PO,並根據輸出參數PO進入相對應的模式。舉例而言,當選擇電路202將控制參數P
1作為輸出參數PO時,核心電路204進入一第一模式,用以執行一第一操作。當選擇電路202將控制參數P
2作為輸出參數PO時,核心電路204進入一第二模式,用以執行一第二操作。當選擇電路202將控制參數P
3作為輸出參數PO時,核心電路204進入一第三模式,用以執行一第三操作。在其它實施例中,當選擇電路202將控制參數P
3作為輸出參數PO時,核心電路204進入第一模式或第二模式。
The
本發明並不限定核心電路204的架構。在一可能實施例中,核心電路204係為一計時器/計數器的核心電路。在此例中,核心電路204具有雙操作模式。當選擇電路202將控制參數P
1作為輸出參數PO時,核心電路204進入第一模式,用以執行一計時操作。當選擇電路202將控制參數P
2作為輸出參數PO時,核心電路204進入第二模式,用以執行一計數操作。
The present invention does not limit the architecture of the
在一可能實施例中,當選擇電路202將控制參數P
3作為輸出參數PO時,核心電路204可能進入第一模式,用以執行計時操作。在此例中,當選擇電路202將控制參數P
1作為輸出參數PO時,核心電路204執行計時操作的總執行時間為一第一時間(如10秒)。當選擇電路202將控制參數P
3作為輸出參數PO時,核心電路204執行計時操作的總執行時間為一第二時間(如5秒)。第一時間不同於第二時間。
In a possible embodiment, when the
在另一可能實施例中,當選擇電路202將控制參數P
3作為輸出參數PO時,核心電路204進入第二模式,用以執行計數操作。在此例中,當選擇電路202將控制參數P
2作為輸出參數PO時,核心電路204可能先設定一第一目標值,並重置一計數值。核心電路204可能根據時脈信號CLK
1的脈衝數量,調整計數值。當計數值達第一目標值時,核心電路204停止執行計數操作。當選擇電路202將控制參數P
3作為輸出參數PO時,核心電路204設定一第二目標值,並再次重置計數值。核心電路204可能根據時脈信號CLK
1的脈衝數量,調整計數值。當計數值達第二目標值時,核心電路204停止執行計數操作。在此例中,第一目標值不同於第二目標值。本發明並不限定核心電路204如何調整計數值。核心電路204可能逐漸減少或逐漸增加計數值。
In another possible embodiment, when the
在本實施例中,核心電路204根據輸出參數PO,決定計時操作的總執行時間、計時操作的時脈來源、計數操作的目標值、計數操作的時脈來源、計數操作的種類(一向上計數或是一向下計數)。在其它實施例中,核心電路204根據輸出參數PO,計數一外部時脈(如CLK
1或CLK
2)的上升邊緣或是下降邊緣的數量。
In this embodiment, the
觸發源管理電路206耦接觸發源108、110及112。觸發源管理電路206用以判斷觸發源108、110及112是否發出致能的觸發信號。當觸發源108、110或112發出致能的觸發信號時,觸發源管理電路206透過選擇信號SEL,命令選擇電路202將相對應的控制參數作為輸出參數PO,用以控制核心電路204的操作模式。
Trigger
舉例而言,當觸發源108致能一觸發信號(如第1圖的觸發信號STA1~STAN之一者)時,觸發源管理電路208產生選擇信號SEL,用以命令選擇電路202將控制參數P1作為輸出參數PO。因此,核心電路204進入第一模式,用以進行第一操作。在一可能實施例中,核心電路204根據輸出參數PO(即控制參數P1),選擇時脈信號CLK1或CLK2,並根據選擇的時脈信號進行第一操作。在完成第一操作後,核心電路204致能輸出信號SOUT。
For example, when the
當觸發源110致能一觸發信號(如第1圖的觸發信號STB1~STBM之一者)時,觸發源管理電路206透過選擇信號SEL,命令選擇電路202將控制參數P2作為輸出參數PO。因此,核心電路204進入第二模式,用以執行第二操作。在第二模式下,核心電路204可能根據輸出參數PO(即控制參數P2),選擇時脈信號CLK1或CLK2,並根據選擇的時脈信號進行第二操作。在完成第二操作後,核心電路204致能輸出信號SOUT。
When the
當觸發源112致能一觸發信號(如第1圖的觸發信號STC1~STCQ之一者)時,觸發源管理電路208可能命令選擇電路202將控制參數P3作為輸出參數PO。此時,核心電路204可能進入第一、第二模式或是第三模式。在此例中,核心電路204可能根據輸出參數PO(即控制參數P3),選擇時脈信號CLK1或CLK2。
When the
在一些實施例中,當核心電路204進入一特定模式時,即使觸發源管理電路206發現其它的觸發源致能觸發信號時,觸發源管理電路206忽略來自其它觸發源的觸發信號。舉例而言,在核心電路204進入第一模式後,即使觸發源110致能觸發信號STB1~STBM之一者時,核心電路204維持執行第一操作。
In some embodiments, when the
由於處理電路200具有多個獨立的儲存電路,每一儲存電路儲存一控制參數,故觸發源管理電路206只要根據被致能的觸發信號的來源,提供相對應的控制參數予核心電路204,便可調整核心電路204的操作模式。因此,核心電路204的模式切換不需中央處理器的介入,故可節省中央處理器的功耗。再者,在核心電路204切換模式時,中央處理器可執行其它的操作,故可提高中央處理器的效能。Since the
在一些實施例中,觸發源管理電路206更提供一觸發信號ST予核心電路204。觸發信號ST係為觸發源108、110及112所致能的觸發信號。舉例而言,當選擇電路202將控制參數P
1作為輸出參數PO時,觸發源管理電路206將觸發源108所致能的觸發信號作為觸發信號ST。當選擇電路202將控制參數P
2作為輸出參數PO時,觸發源管理電路206將觸發源110所致能的觸發信號作為觸發信號ST。當選擇電路202將控制參數P
3作為輸出參數PO時,觸發源管理電路206將觸發源112所致能的觸發信號作為觸發信號ST。
In some embodiments, the trigger
第3圖為本發明之處理電路的動作示意圖。為方便說明,假設處理電路係為一計時器/計數器。在此例中,當觸發源108致能觸發信號STA
1~STA
N之一者時,觸發源管理電路206命令選擇電路202將控制參數P
1作為輸出參數PO。因此,核心電路204進入第一模式,準備進行一計時操作。此時,核心電路204可能根據輸出參數PO,選擇時脈信號CLK
1,並根據時脈信號CLK
1的脈衝,準備進行一計時操作。
FIG. 3 is a schematic diagram of the operation of the processing circuit of the present invention. For convenience of description, it is assumed that the processing circuit is a timer/counter. In this example, when the
然後,觸發源管理電路206將被致能的觸發信號(如STA
1)作為觸發信號ST提供予核心電路204。核心電路204根據觸發信號ST(STA
1)開始執行計時操作。在核心電路204執行計時操作的同時,如果觸發源108致能另一觸發信號(如STA
N)時,觸發源管理電路206將被致能的觸發信號(STA
N)作為觸發信號ST提供予核心電路204。此時,核心電路204可能根據觸發信號ST(STA
N)暫停執行計時操作。當觸發源108致能另一觸發信號(如STA
2)時,觸發源管理電路206將被致能的觸發信號(STA
2)作為觸發信號ST提供予核心電路204。此時,核心電路204可能根據觸發信號ST(STA
2)繼續執行計時操作。當核心電路204完成計時操作時,核心電路204致能一完成信號Timeout。在此例中,完成信號Timeout作為輸出信號SOUT。
Then, the trigger
在另一可能實施例中,當觸發源110致能觸發信號STB
1~STB
M之一者時,觸發源管理電路206命令選擇電路202將控制參數P
2作為輸出參數PO。因此,核心電路204進入第二模式,用以進行一計數操作。核心電路204可能根據輸出參數PO,選擇時脈信號CLK
1,並根據時脈信號CLK
1的脈衝,進行一計數操作。在另一可能實施例中,核心電路204可能根據輸出參數PO,選擇時脈信號CLK
2。
In another possible embodiment, when the
接著,觸發源管理電路206將被致能的觸發信號(如STB
M)作為觸發信號ST提供予核心電路204。因此,核心電路204開始執行一計數操作。在一可能實施例中,核心電路204根據輸出參數PO(即控制參數P
2)進行一向上計數操作或是一向下計數操作。當觸發源110致能另一觸發信號時,觸發源管理電路206將被致能的觸發信號(如STB
2)作為觸發信號ST。此時,核心電路204可能根據觸發信號ST暫停執行計數操作。當觸發源110致能另一觸發信號(如STB
1)時,觸發源管理電路206將被致能的觸發信號(STB
1)作為觸發信號ST。此時,核心電路204可能根據觸發信號ST(STB
1)繼續執行計數操作。當核心電路204完成計數操作時,核心電路204致能完成信號Overflow或Underflow。在一可能實施例中,當核心電路204完成向上計數操作時,核心電路204致能完成信號Overflow。在此例中,完成信號Overflow作為輸出信號SOUT。在另一可能實施例中,當核心電路204完成向下計數操作時,核心電路204致能完成信號Underflow。在此例中,完成信號Underflow作為輸出信號SOUT。
Next, the trigger
在其它實施例中,當觸發源112致能觸發信號STC
1~STC
Q之一者(如STC
1)時,觸發源管理電路206命令選擇電路202將控制參數P
3作為輸出參數PO。因此,核心電路204可能再次進入第一模式,用以進行一計時操作。在此例中,核心電路204根據控制參數P
3,選擇時脈信號CLK
1及CLK
2之一者(如CLK
2)。核心電路204根據時脈信號CLK
2的脈衝,再次進行一計時操作。
In other embodiments, when the
接著,觸發源管理電路206將被致能的信號(如STC
1)作為觸發信號ST提供予核心電路204。因此,核心電路204開始執行計時操作。當核心電路204完成計時操作時,核心電路204致能完成信號Timeout。在一可能實施例中,當選擇電路202將控制參數P
1作為輸出參數PO時,核心電路204執行計時操作的總執行時間為一時間302。當選擇電路202將控制參數P
3作為輸出參數PO時,核心電路204執行計時操作的總執行時間為一時間304。在此例中,時間302不同於時間304。在本實施例中,時間302的長短與控制參數P
1有關。同樣地,時間304的長短與控制參數P
3有關。
Next, the trigger
第4A圖為本發明之控制方法的一可能流程示意圖。本發明的控制方法用以控制一核心電路的操作模式。首先,儲存複數控制參數於複數儲存電路中(步驟S401)。在一可能實施例中,該等控制參數係由一中央處理器寫入該等儲存電路中。在此例中,每一儲存電路儲存一控制參數。FIG. 4A is a schematic flow chart of a possible control method of the present invention. The control method of the present invention is used to control the operation mode of a core circuit. First, the complex control parameters are stored in the complex storage circuit (step S401 ). In a possible embodiment, the control parameters are written into the storage circuits by a central processing unit. In this example, each storage circuit stores a control parameter.
判斷一第一觸發源是否致能一第一觸發信號(步驟S402)。當第一觸發源致能第一觸發信號時,提供該等儲存電路中的一第一儲存電路的控制參數予核心電路,用以命令核心電路進入一第一模式(步驟S403)。在第一模式下,核心電路根據第一觸發信號執行一第一操作,如一計時操作。在第一模式下,如果第一觸發源致能另一觸發信號(或稱第四觸發信號)時,核心電路可能暫停進行計時操作。當第一觸發源致能另一觸發信號(或稱第五觸發信號)時,核心電路繼續進行計時操作。在其它實施例中,在完成計時操作後,回到步驟S402,繼續判斷第一觸發源是否致能第一觸發信號。It is determined whether a first trigger source enables a first trigger signal (step S402). When the first trigger source enables the first trigger signal, a control parameter of a first storage circuit among the storage circuits is provided to the core circuit for instructing the core circuit to enter a first mode (step S403 ). In the first mode, the core circuit performs a first operation, such as a timing operation, according to the first trigger signal. In the first mode, if the first trigger source enables another trigger signal (or the fourth trigger signal), the core circuit may suspend the timing operation. When the first trigger source enables another trigger signal (or the fifth trigger signal), the core circuit continues to perform the timing operation. In other embodiments, after the timing operation is completed, go back to step S402 to continue to determine whether the first trigger source enables the first trigger signal.
當第一觸發源未致能第一觸發信號時,判斷一第二觸發源是否致能一第二觸發信號(步驟S404)。當第二觸發源致能第二觸發信號時,將該等儲存電路中的一第二儲存電路的控制參數提供予核心電路,用以命令核心電路進入一第二模式(步驟S405)。在第二模式下,核心電路根據第二觸發信號執行一第二操作,如一計數操作。在此例中如果第二觸發源致能另一觸發信號(或稱第六觸發信號)時,核心電路可能暫停進行計數操作。當第二觸發源致能另一觸發信號(或稱第七觸發信號)時,核心電路繼續進行計數操作。當第二觸發源未致能第二觸發信號時,回到步驟S402。在一些實施例中,在核心電路在完成計數操作後,可能回到步驟S402。When the first trigger source does not enable the first trigger signal, it is determined whether a second trigger source enables a second trigger signal (step S404 ). When the second trigger source enables the second trigger signal, the control parameters of a second storage circuit in the storage circuits are provided to the core circuit to instruct the core circuit to enter a second mode (step S405 ). In the second mode, the core circuit performs a second operation, such as a counting operation, according to the second trigger signal. In this example, if the second trigger source enables another trigger signal (or the sixth trigger signal), the core circuit may suspend the counting operation. When the second trigger source enables another trigger signal (or the seventh trigger signal), the core circuit continues the counting operation. When the second trigger source does not enable the second trigger signal, go back to step S402. In some embodiments, after the core circuit completes the counting operation, it may return to step S402.
第4B圖為本發明之控制方法的另一可能流程示意圖。第4B圖相似第4A圖,不同之處在於第4B圖多了步驟S406及S407。在步驟S406中,判斷一第三觸發源是否致能一第三觸發信號。當第三觸發源致能第三觸發信號時,將該等儲存電路中的一第三儲存電路的控制參數提供予核心電路,用以命令核心電路進入第一或第二模式(步驟S407)。在一可能實施例中,當核心電路接收到第三儲存電路的控制參數時,核心電路進入第一模式。在此例中,核心電路根據不同的控制參數,決定計時操作的總執行時間。舉例而言,當核心電路接收第一控制參數時,核心電路執行計時操作的總執行時間為一第一時間。當核心電路接收第三控制參數時,核心電路執行計時操作的總執行時間為一第二時間。在此例中,第一時間不同於第二時間。FIG. 4B is a schematic diagram of another possible flow of the control method of the present invention. Fig. 4B is similar to Fig. 4A, except that Fig. 4B has more steps S406 and S407. In step S406, it is determined whether a third trigger source enables a third trigger signal. When the third trigger source enables the third trigger signal, the control parameter of a third storage circuit in the storage circuits is provided to the core circuit to instruct the core circuit to enter the first or second mode (step S407 ). In a possible embodiment, when the core circuit receives the control parameter of the third storage circuit, the core circuit enters the first mode. In this example, the core circuit determines the total execution time of the timing operation according to different control parameters. For example, when the core circuit receives the first control parameter, the total execution time for the core circuit to perform the timing operation is a first time. When the core circuit receives the third control parameter, the total execution time for the core circuit to perform the timing operation is a second time. In this example, the first time is different from the second time.
在另一可能實施例中,當核心電路接收到第三儲存電路的控制參數時,核心電路進入第二模式。在此例中,核心電路根據不同的控制參數,決定計數操作的目標值。舉例而言,核心電路根據第二控制參數,決定一第一目標值。核心電路可能根據一第一時脈信號的脈衝數量,調整一計數值。當計數值達第一目標值時,核心電路停止執行計數操作。在此例中,核心電路根據第三控制參數,決定一第二目標值。核心電路可能根據一第二時脈信號(或第一時脈)的脈衝數量,調整計數值。當計數值達第二目標值時,核心電路停止執行計數操作。第一目標值不同於第二目標值。In another possible embodiment, when the core circuit receives the control parameter of the third storage circuit, the core circuit enters the second mode. In this example, the core circuit determines the target value of the counting operation according to different control parameters. For example, the core circuit determines a first target value according to the second control parameter. The core circuit may adjust a count value according to the number of pulses of a first clock signal. When the count value reaches the first target value, the core circuit stops performing the count operation. In this example, the core circuit determines a second target value according to the third control parameter. The core circuit may adjust the count value according to the number of pulses of a second clock signal (or the first clock). When the count value reaches the second target value, the core circuit stops performing the count operation. The first target value is different from the second target value.
由於核心電路在不同觸發源致能觸發信號時,接收到不同的控制參數,並根據不同的控制參數執行不同的操作,而不需中央處理器持續偵測觸發源是否發出致能的觸發信號,故中央處理器可進行其它的操作,因而提高中央處理器的效能。Since the core circuit receives different control parameters when different trigger sources enable the trigger signal, and performs different operations according to the different control parameters, it is not necessary for the central processor to continuously detect whether the trigger source sends the enabled trigger signal. Therefore, the central processing unit can perform other operations, thereby improving the performance of the central processing unit.
本發明之控制方法,或特定型態或其部份,可以以程式碼的型態存在。程式碼可儲存於實體媒體,如軟碟、光碟片、硬碟、或是任何其他機器可讀取(如電腦可讀取)儲存媒體,亦或不限於外在形式之電腦程式產品,其中,當程式碼被機器,如電腦載入且執行時,此機器變成用以參與本發明之操作系統。程式碼也可透過一些傳送媒體,如電線或電纜、光纖、或是任何傳輸型態進行傳送,其中,當程式碼被機器,如電腦接收、載入且執行時,此機器變成用以參與本發明之操作系統。當在一般用途處理單元實作時,程式碼結合處理單元提供一操作類似於應用特定邏輯電路之獨特裝置。The control method of the present invention, or a specific form or part thereof, may exist in the form of code. The code can be stored on physical media, such as floppy disks, optical discs, hard disks, or any other machine-readable (such as computer-readable) storage media, or not limited to external forms of computer program products, where, When the code is loaded and executed by a machine, such as a computer, the machine becomes an operating system for participating in the present invention. The code may also be transmitted through some transmission medium, such as wire or cable, optical fiber, or any type of transmission, wherein when the code is received, loaded, and executed by a machine, such as a computer, the machine becomes used to participate in this document. Invented operating system. When implemented on a general-purpose processing unit, the code combines with the processing unit to provide a unique device that operates similarly to application-specific logic circuits.
除非另作定義,在此所有詞彙(包含技術與科學詞彙)均屬本發明所屬技術領域中具有通常知識者之一般理解。此外,除非明白表示,詞彙於一般字典中之定義應解釋為與其相關技術領域之文章中意義一致,而不應解釋為理想狀態或過分正式之語態。雖然“第一”、“第二”等術語可用於描述各種信號,但這些信號不應受這些術語的限制。這些術語只是用以區分一個信號和另一個信號。Unless otherwise defined, all terms (including technical and scientific terms) herein are commonly understood by those of ordinary skill in the art to which this invention belongs. Furthermore, unless expressly stated otherwise, the definitions of words in general dictionaries should be construed as consistent with their meanings in articles in the related technical field, and should not be construed as ideal states or overly formal voices. Although terms such as "first," "second," etc. may be used to describe various signals, these signals should not be limited by these terms. These terms are only used to distinguish one signal from another.
雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾。舉例來說,本發明實施例所述之系統、裝置或是方法可以硬體、軟體或硬體以及軟體的組合的實體實施例加以實現。因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. . For example, the system, apparatus, or method described in the embodiments of the present invention may be implemented in a physical embodiment of hardware, software, or a combination of hardware and software. Therefore, the protection scope of the present invention should be determined by the scope of the appended patent application.
100:操作系統
102:中央處理器
104:匯流排
106、200:處理電路
108、110、112:觸發源
STA
1~STA
N、STB
1~STB
M、STC
1~STC
Q:觸發信號
SOUT:輸出信號
CLK
1、CLK
2:時脈信號
PA
1~PA
N、PB
1~PB
M、PC
1~PC
Q:週邊電路
RT
1~RT
3:儲存電路
202:選擇電路
204:核心電路
206:觸發源管理電路
P
1~P
3:控制參數
SEL:選擇信號
PO:輸出參數
ST:觸發信號
Timeout、Overflow、Underflow:完成信號
302、304:時間
S401~S407:步驟
100: operating system 102: central processing unit 104:
第1圖為本發明之操作系統的示意圖。 第2圖為本發明之處理電路的示意圖。 第3圖為本發明之處理電路的動作示意圖。 第4A圖為本發明之控制方法的一可能流程示意圖。 第4B圖為本發明之控制方法的另一可能流程示意圖。 FIG. 1 is a schematic diagram of the operating system of the present invention. FIG. 2 is a schematic diagram of the processing circuit of the present invention. FIG. 3 is a schematic diagram of the operation of the processing circuit of the present invention. FIG. 4A is a schematic flow chart of a possible control method of the present invention. FIG. 4B is a schematic diagram of another possible flow of the control method of the present invention.
108、110、112:觸發源 108, 110, 112: Trigger source
200:處理電路 200: Processing Circuits
RT1~RT3:儲存電路 RT 1 ~RT 3 : Storage circuit
202:選擇電路 202: Selection circuit
204:核心電路 204: Core Circuit
206:觸發源管理電路 206: Trigger source management circuit
P1~P3:控制參數 P 1 ~P 3 : Control parameters
SEL:選擇信號 SEL: select signal
PO:輸出參數 PO: output parameter
ST:觸發信號 ST: trigger signal
SOUT:輸出信號 SOUT: output signal
CLK1、CLK2:時脈信號 CLK 1 , CLK 2 : clock signal
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109134073A TWI775167B (en) | 2020-09-30 | 2020-09-30 | Operating system and control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109134073A TWI775167B (en) | 2020-09-30 | 2020-09-30 | Operating system and control method |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202215201A TW202215201A (en) | 2022-04-16 |
TWI775167B true TWI775167B (en) | 2022-08-21 |
Family
ID=82197497
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109134073A TWI775167B (en) | 2020-09-30 | 2020-09-30 | Operating system and control method |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI775167B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04124735A (en) * | 1990-09-17 | 1992-04-24 | Fujitsu Ltd | System starting system |
TWM381828U (en) * | 2010-01-27 | 2010-06-01 | Biostar Microtech Int L Corp | Outside reset circuit of system-setting storage |
CN104268019A (en) * | 2014-09-23 | 2015-01-07 | 广州金山网络科技有限公司 | Software operating method and device and terminal |
TWI697841B (en) * | 2018-12-18 | 2020-07-01 | 新唐科技股份有限公司 | Control circuit and method for fast setting power mode |
-
2020
- 2020-09-30 TW TW109134073A patent/TWI775167B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04124735A (en) * | 1990-09-17 | 1992-04-24 | Fujitsu Ltd | System starting system |
TWM381828U (en) * | 2010-01-27 | 2010-06-01 | Biostar Microtech Int L Corp | Outside reset circuit of system-setting storage |
CN104268019A (en) * | 2014-09-23 | 2015-01-07 | 广州金山网络科技有限公司 | Software operating method and device and terminal |
TWI697841B (en) * | 2018-12-18 | 2020-07-01 | 新唐科技股份有限公司 | Control circuit and method for fast setting power mode |
Also Published As
Publication number | Publication date |
---|---|
TW202215201A (en) | 2022-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9588916B1 (en) | Interrupt latency reduction | |
TWI763539B (en) | Wafer testing method, computing wafer and data processing equipment | |
JP5629819B2 (en) | Apparatus and method for using variable clock gating hysteresis in communication port | |
US8078781B2 (en) | Device having priority upgrade mechanism capabilities and a method for updating priorities | |
US7889581B2 (en) | Digital DLL circuit | |
TW201706990A (en) | Low-power clocking for a high-speed memory interface | |
JP2002074811A (en) | System and method for controlling power supply | |
US20110185145A1 (en) | Semiconductor storage device and control method thereof | |
CN108268119B (en) | Method for operating system-on-chip, system-on-chip and electronic system | |
TWI775167B (en) | Operating system and control method | |
EP3262759B1 (en) | Power-up system comprising a voltage comparator | |
WO2024146187A1 (en) | Zynq-based multi-channel adc synchronous acquisition apparatus and method | |
US20210141755A1 (en) | Bridge chip with function of expanding external devices and associated expansion method | |
US11409346B2 (en) | Control circuit and method for fast setting power mode | |
US20120072760A1 (en) | Timer, method of implementing system time using a timer, and integrated circuit device including the same | |
US7345496B2 (en) | Semiconductor apparatus and test execution method for semiconductor apparatus | |
CN116149735A (en) | Operating system and control method | |
JP2021135576A (en) | Load variation test program and load variation test method | |
US6715017B2 (en) | Interruption signal generating apparatus | |
TWI760872B (en) | Management controller and control method thereof | |
US9143130B2 (en) | Integrated circuit and control method thereof | |
TWI743638B (en) | Timing generator, timing generating method, and associated control chip | |
JP4951739B2 (en) | Semiconductor integrated circuit and operating condition control method | |
US20130166269A1 (en) | Simulation apparatus, simulation method, and recording medium | |
WO2012067211A1 (en) | Information processing device, electronic apparatus, computer program storage medium, and method of controlling performance and power |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GD4A | Issue of patent certificate for granted invention patent |