TWI755695B - Boot method for system on chip - Google Patents

Boot method for system on chip Download PDF

Info

Publication number
TWI755695B
TWI755695B TW109108192A TW109108192A TWI755695B TW I755695 B TWI755695 B TW I755695B TW 109108192 A TW109108192 A TW 109108192A TW 109108192 A TW109108192 A TW 109108192A TW I755695 B TWI755695 B TW I755695B
Authority
TW
Taiwan
Prior art keywords
program
springboard
external storage
storage device
booting method
Prior art date
Application number
TW109108192A
Other languages
Chinese (zh)
Other versions
TW202134867A (en
Inventor
林世陵
Original Assignee
智微科技股份有限公司
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 智微科技股份有限公司 filed Critical 智微科技股份有限公司
Priority to TW109108192A priority Critical patent/TWI755695B/en
Publication of TW202134867A publication Critical patent/TW202134867A/en
Application granted granted Critical
Publication of TWI755695B publication Critical patent/TWI755695B/en

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a booting method, which may dynamically adapt the booting sequence of system-on-chip without modifying the bootloader in the read-only memory. By reading the external input signal to change the starting address to read the description program, and then the real target program is read by the description program. Since the description program is stored in the external storage device, it can be modified by the user at any time. In this way, the target program can be stored in an external storage device that exists data without modifying the startup program in the read-only memory to achieve the goal of sharing the external storage.

Description

系統單晶片的開機方法 System single chip boot method

本發明係指一種適用於系統單晶片的開機方法,尤指一種可在不修改唯讀記憶體內的啟動程式的情況下,動態修改系統單晶片開機程序的開機方法。 The present invention refers to a booting method suitable for SoCs, especially a booting method that can dynamically modify the booting procedure of the SoC without modifying the booting procedure in the ROM.

於嵌入式系統中,啟動程式是作業系統運行前執行的一段程式碼,目的是在作業系統運行前,執行硬體初始化操作,最後將作業系統載入到記憶體執行。於系統單晶片中,啟動程式存放於唯讀記憶體中。作業系統運行前,執行啟動程式,向外部儲存裝置讀取並執行目標程式完成開機。使得使用者可以隨時更新目標程式。 In an embedded system, the startup program is a piece of code that is executed before the operating system runs. The purpose is to perform hardware initialization before the operating system runs, and finally load the operating system into the memory for execution. In the SoC, the startup program is stored in the read-only memory. Before the operating system runs, execute the startup program, read from the external storage device and execute the target program to complete the boot. Allows the user to update the target program at any time.

然而,隨著電子產品越來越複雜,一個電子產品內經常是由複數個系統單晶片所整合而成,倘若每個系統單晶片都擁有自己對應的外部儲存裝置,整個系統的成本及走線的難度便會提升。反之,若使複數個系統單晶片共用同一顆外部儲存裝置,則須透過修改複數個系統單晶片的光罩並重新下線,以修改位於複數個系統單晶片唯讀記憶體中的啟動程式。 However, as electronic products become more and more complex, an electronic product is often composed of multiple SoCs. If each SoC has its own corresponding external storage device, the cost and wiring of the entire system will be reduced. difficulty will increase. Conversely, if multiple SoCs share the same external storage device, it is necessary to modify the boot programs located in the ROMs of the multiple SoCs by modifying the masks of the multiple SoCs and re-offline.

因此,習知技術實有改善之必要。 Therefore, there is a real need for improvement in the prior art.

因此,本發明之主要目的即在於提供一種在不修改唯讀記憶體內的啟動程式的情況下,可動態修改系統單晶片開機程序的開機方法,以改善習知技術的缺點。 Therefore, the main purpose of the present invention is to provide a booting method that can dynamically modify the booting procedure of the SoC without modifying the booting procedure in the ROM, so as to improve the shortcomings of the prior art.

本發明實施例揭露一種開機方法,適用於一系統單晶片的一開機程序上,其中該系統單晶片包括一輸入埠,用來提供外部輸入信號,一處理單元,用來執行程式,以及一唯讀記憶體,用來儲存一起始開機程序,該開機方法包括選擇一跳板程式的一起始位置;讀取該跳板程式,並以該處理單元執行該跳板程式;以及透過該跳板程式,以該處理單元執行該目標程式;其中,該跳板程式與該目標程式儲存於一外部儲存裝置中;其中,該跳板程式用來執行讀取該目標程式,以及該目標程式用來執行該開機程序。 An embodiment of the present invention discloses a booting method, which is suitable for a booting procedure of a SoC, wherein the SoC includes an input port for providing external input signals, a processing unit for executing programs, and a unique The read memory is used to store an initial boot program, and the boot method includes selecting an initial position of a springboard program; reading the springboard program, and executing the springboard program with the processing unit; and through the springboard program, using the processing The unit executes the target program; wherein, the springboard program and the target program are stored in an external storage device; wherein, the springboard program is used to execute and read the target program, and the target program is used to execute the boot procedure.

10:習知技術系統單晶片 10: Conventional SoCs

100:習知技術處理單元 100: Known Technology Processing Unit

102:習知技術唯讀記憶體 102: Conventional Technology Read-Only Memory

104:習知技術隨機存取記憶體 104: Prior Art Random Access Memory

12:習知技術外部儲存裝置 12: Conventional external storage devices

14:習知技術系統單晶片 14: Conventional SoCs

140:習知技術處理單元 140: Conventional Technology Processing Unit

142:習知技術唯讀記憶體 142: Conventional Technology Read-Only Memory

144:習知技術隨機存取記憶體 144: Conventional Technology Random Access Memory

16:習知技術外部儲存裝置 16: Prior art external storage devices

30:系統單晶片 30: SoC

300:處理單元 300: Processing Unit

302:唯讀記憶體 302: read-only memory

304:隨機存取記憶體 304: Random Access Memory

306:輸入埠 306: input port

32:外部儲存裝置 32: External storage device

34:系統單晶片 34: SoC

340:處理單元 340: Processing Unit

342:唯讀記憶體 342: read-only memory

60:流程 60: Process

600~612:步驟 600~612: Steps

第1A圖為習知技術一系統單晶片及其系統之示意圖。 FIG. 1A is a schematic diagram of a system-on-chip and its system in the prior art.

第1B圖為習知技術整合二系統單晶片於一系統之示意圖。 FIG. 1B is a schematic diagram of integrating two SoCs into one system in the prior art.

第2A、2B圖為習知技術一外部儲存裝置記憶體配置方法之示意圖。 FIGS. 2A and 2B are schematic diagrams of a conventional method for configuring the memory of an external storage device.

第3A、3B圖為本發明實施例一系統單晶片及其系統之示意圖。 Figures 3A and 3B are schematic diagrams of a system-on-chip and its system according to an embodiment of the present invention.

第4圖為本發明實施例一外部儲存裝置記憶體配置之示意圖。 FIG. 4 is a schematic diagram of a memory configuration of an external storage device according to an embodiment of the present invention.

第5A、5B圖為本發明實施例一外部儲存裝置記憶體配置之示意圖。 5A and 5B are schematic diagrams of the memory configuration of an external storage device according to an embodiment of the present invention.

第6圖為本發明實施例一系統單晶片開機方法流程之示意圖。 FIG. 6 is a schematic diagram of a flow of a system-on-chip power-on method according to an embodiment of the present invention.

第7圖為本發明實施例一系統單晶片系統之示意圖。 FIG. 7 is a schematic diagram of a system-on-a-chip system according to an embodiment of the present invention.

在說明書及申請專利範圍當中使用了某些詞彙來指稱特定之元件。所屬領域具有通常知識者應可理解,硬體製造商可能會用不同之名詞來稱呼同一個元件。本說明書及申請專利範圍並不以名稱之差異來作為區分元件之方式,而係以元件在功能上之差異來作為區分之準則。在說明書及申請專利範圍當中所提及之「包含」及「包括」為一開放式用語,故應解釋成「包含但不限定於」。此外,「耦接」一詞在此包含任何直接及間接之電性連接手段。因此,若文中描述一第一裝置耦接於一第二裝置,則代表該第一裝置可直接電性連接於該第二裝置,或透過其它裝置或連接手段間接地電性連接至該第二裝置。 Certain terms are used in the specification and claims to refer to specific elements. It should be understood by those of ordinary skill in the art that hardware manufacturers may refer to the same element by different names. This specification and the scope of the patent application do not use the difference in name as a way to distinguish elements, but use the difference in function of the elements as a criterion for distinguishing. The terms "including" and "including" mentioned in the description and the scope of the patent application are open-ended terms, so they should be interpreted as "including but not limited to". In addition, the term "coupled" herein includes any direct and indirect means of electrical connection. Therefore, if a first device is described as being coupled to a second device, it means that the first device can be directly electrically connected to the second device, or indirectly electrically connected to the second device through other devices or connecting means device.

第1A圖為習知技術一系統單晶片(System on Chip,SoC)10及其系統之示意圖。如第1A圖所示,系統單晶片10包含一處理單元100、一唯讀記憶體(Read-Only Memory,ROM)102及一隨機存取記憶體(Random Access Memory,RAM)104,系統單晶片10耦接至一外部儲存裝置12而組成一系統。為了初始化系統單晶片10,於開機程序中,處理單元100先讀取並執行唯讀記憶體102中儲存的啟動程式(BootLoader),再透過啟動程式由外部儲存裝置12載入目標程式至隨機存取記憶體104中,最後處理單元100執行目標程式以完成開機流程。 FIG. 1A is a schematic diagram of a system on chip (SoC) 10 and its system in the prior art. As shown in FIG. 1A , the SoC 10 includes a processing unit 100 , a Read-Only Memory (ROM) 102 and a Random Access Memory (RAM) 104 . 10 is coupled to an external storage device 12 to form a system. In order to initialize the SoC 10, in the boot process, the processing unit 100 first reads and executes the boot program (BootLoader) stored in the ROM 102, and then loads the target program from the external storage device 12 to the random memory through the boot program. In the memory 104, finally the processing unit 100 executes the target program to complete the boot process.

於實際應用時,系統不僅只以一系統單晶片實現,如第1B圖所示,第1B圖為習知技術將二系統單晶片10、14整合於一系統之示意圖。於習知技術中,二系統單晶片10及14分別耦接至其使用的外部儲存裝置12及16並整合於一系統中。簡言之,若一系統中包含有複數個系統單晶片時,該系統即需要複數 個外部儲存裝置,以儲存複數個系統單晶片的目標程式。 In practical application, the system is not only implemented by one SoC, as shown in FIG. 1B , which is a schematic diagram of integrating two SoCs 10 and 14 into one system in the prior art. In the prior art, two SoCs 10 and 14 are respectively coupled to the external storage devices 12 and 16 used by them and integrated into one system. In short, when a system contains multiple SoCs, the system requires multiple an external storage device to store target programs for multiple SoCs.

舉例來說,第2A、2B圖為習知技術之一外部儲存裝置記憶體配置之示意圖。如第2A圖所示,若二系統單晶片唯讀記憶體102及142中儲存的啟動程式會向外部儲存裝置12及16中起始位置為0000_0000處與8000_0000處讀取資料,則第1B圖中的電路可簡化,使二個系統單晶片30及34共同耦接至一外部儲存裝置。另一方面,若外部儲存裝置記憶體配置如第2B圖所示,則二個系統單晶片唯讀記憶體102及142中儲存的啟動程式會向外部儲存裝置12及16中起始位置為0000_0000處與0000_0000處讀取資料,則因為二個系統單晶片啟動程式讀取的位置相同,第1B圖中的電路即無法進一步簡化為共同耦接至一外部儲存裝置。也就是說,此時需要二個外部儲存裝置12及16,並且此二個外部儲存裝置12及16均有閒置空間的浪費。 For example, FIGS. 2A and 2B are schematic diagrams of the memory configuration of an external storage device in the prior art. As shown in FIG. 2A, if the boot programs stored in the two SoCs 102 and 142 read data from the external storage devices 12 and 16 at the starting positions 0000_0000 and 8000_0000, then FIG. 1B The circuitry in the SoC can be simplified so that the two SoCs 30 and 34 are commonly coupled to an external storage device. On the other hand, if the memory configuration of the external storage device is as shown in FIG. 2B, the start-up programs stored in the two SoC ROMs 102 and 142 will start at 0000_0000 in the external storage devices 12 and 16 If the data is read at 0000_0000, since the positions read by the two SoC startup programs are the same, the circuit in FIG. 1B cannot be further simplified to be commonly coupled to an external storage device. That is to say, two external storage devices 12 and 16 are required at this time, and both the two external storage devices 12 and 16 are wasted of idle space.

唯讀記憶體經系統單晶片下線(Tape out)之後,除非修改光罩(Mask),否則無法修改。易言之,若二系統單晶片10及14於外部儲存裝置之記憶體配置已如第2B圖所示,則除非透過修改光罩來修改系統單晶片10或14中唯讀記憶體102或唯讀記憶體142的內容,否則第1B圖中整個單晶片系統中即需使用二個外部儲存裝置12及16。 After the ROM is taped out, it cannot be modified unless the mask is modified. In other words, if the memory configuration of the two SoCs 10 and 14 in the external storage device is as shown in FIG. 2B, unless the ROM 102 or the only memory in the SoC 10 or 14 is modified by modifying the mask. Read the contents of the memory 142, otherwise two external storage devices 12 and 16 will be used in the entire single-chip system in FIG. 1B.

第3A、3B圖為本發明實施例一系統單晶片30及其系統之示意圖。如第3A圖所示,本發明所提供的開機方法利用跳板程式及目標程式,可使系統單晶片30與其他系統單晶片34共用同一外部儲存裝置32;其中,外部儲存裝置32已有既存程式或資料,且外部儲存裝置32的閒置空間大於跳板程式與目標程式的大小。系統單晶片30包含一處理單元300、一唯讀記憶體302、一隨機存取記 憶體304及一輸入埠306。本發明實施例係於唯讀記憶體302中儲存啟動程式,先判斷輸入埠306的信號以決定跳板程式的位置,再從外部儲存裝置32中讀取跳板程式至隨機存取記憶體304後由處理單元300執行,跳板程式裡描述真正的目標程式的位置、大小等資訊,隨後處理單元300可再由外部儲存裝置32中讀取目標程式至隨機存取記憶體304後再執行,完成開機程序。此外,系統單晶片30可以依使用的場景而有不同的修飾。舉例來說,相較於第3A圖,第3B圖中系統單晶片30移除了隨機存取記憶體304,以節省成本。 3A and 3B are schematic diagrams of a system-on-chip 30 and a system thereof according to an embodiment of the present invention. As shown in FIG. 3A, the booting method provided by the present invention utilizes a springboard program and a target program, so that the SoC 30 and other SoCs 34 can share the same external storage device 32; wherein, the external storage device 32 has existing programs or data, and the free space of the external storage device 32 is larger than the size of the springboard program and the target program. The SoC 30 includes a processing unit 300, a ROM 302, a random access memory Memory 304 and an input port 306 . In the embodiment of the present invention, the startup program is stored in the ROM 302, the signal of the input port 306 is judged to determine the position of the springboard program, and then the springboard program is read from the external storage device 32 to the random access memory 304, and then The processing unit 300 executes, and the springboard program describes the location, size and other information of the real target program, and then the processing unit 300 can read the target program from the external storage device 32 to the random access memory 304 and execute it to complete the booting process . In addition, the SoC 30 can be modified differently depending on the scene of use. For example, compared to FIG. 3A, the SoC 30 in FIG. 3B has the random access memory 304 removed to save cost.

關於系統單晶片30的運作,請同時參考第4圖,第4圖為外部儲存裝置32之記憶體配置之一實施例之示意圖。如第4圖所示,外部儲存裝置32於4000_0000至7FFF_FFFF及C000_0000至EFFF_FFFF處已有既存的資料與程式。於本實施例中,於F000_0000處儲存一跳板程式,啟動程式可藉由處理單元300先讀取輸入埠306的輸入信號,決定跳板程式的起始位置為F000_0000。接著,透過載入跳板程式至隨機存取記憶體304後由處理單元300執行,並據以執行目標程式,完成系統單晶片30的開機程序。 Regarding the operation of the SoC 30 , please also refer to FIG. 4 . FIG. 4 is a schematic diagram of an embodiment of the memory configuration of the external storage device 32 . As shown in FIG. 4 , the external storage device 32 has existing data and programs at 4000_0000 to 7FFF_FFFF and C000_0000 to EFFF_FFFF. In this embodiment, a springboard program is stored at F000_0000, and the startup program can first read the input signal of the input port 306 through the processing unit 300 to determine the start position of the springboard program as F000_0000. Next, by loading the springboard program into the random access memory 304 and then executing it by the processing unit 300 , and executing the target program accordingly, the booting process of the SoC 30 is completed.

由於外部儲存裝置中32中的內容可隨時被使用者所修改,使用者可隨時修改儲存於外部儲存裝置中32中的跳板程式,如此可使處理單元300於讀取目標程式時相對應地變換位置,以實現在不修改唯讀記憶體內的啟動程式的情況下,可動態修改系統單晶片開機程序的開機方法。 Since the content in the external storage device 32 can be modified by the user at any time, the user can modify the springboard program stored in the external storage device 32 at any time, so that the processing unit 300 can change accordingly when reading the target program position, so as to realize the booting method that can dynamically modify the booting procedure of the SoC without modifying the booting procedure in the read-only memory.

惟於開機程序中,隨機存取記憶體304並非不可或缺之元件。舉例來說,於第4圖之外部儲存裝置的記憶體配置中,外部儲存裝置32位址為0000_0000至3FFF_FFFF處為閒置空間,系統單晶片30可透過存取外部儲存裝置32,跳板程 式與目標程式的指令部分載入處理單元300運算直接執行,並將處理單元300運算時中間資料暫時存放於外部儲存裝置32,以實現開機流程。 However, in the boot process, the random access memory 304 is not an indispensable component. For example, in the memory configuration of the external storage device in FIG. 4, the addresses of the external storage device 32 are free space from 0000_0000 to 3FFF_FFFF, and the SoC 30 can access the external storage device 32 by accessing the The instruction part of the formula and the target program are loaded into the processing unit 300 for direct execution, and the intermediate data during the operation of the processing unit 300 are temporarily stored in the external storage device 32 to realize the boot process.

此外,目標程式係透過跳板程式而載入,其中使用者隨時可因應使用場景的不同而適當的修改儲存於外部儲存裝置的跳板程式,更進一步地說,目標程式於外部儲存裝置中的記憶體配置不需進行字節對齊(word alignment),也不須包含檔案標頭(header)、檔案結尾(end-of-file)、校驗碼(checksum)或雜湊值(hash value),且不限於此。舉例來說,第5A圖為本發明實施例一外部儲存裝置記憶體配置之示意圖。於第5A圖中,目標程式的起始位置為8000_0002的bit3,此外亦不包括檔案標頭、檔案結尾、校驗碼或雜湊值,使用者仍可透過修改跳板程式,完成該目標程式的載入、讀取與執行。相同地,跳板程式於外部儲存裝置中的記憶體配置亦不須進行字節對齊,於此不再贅述。 In addition, the target program is loaded through the springboard program, in which the user can modify the springboard program stored in the external storage device at any time according to different usage scenarios. Furthermore, the target program is stored in the memory of the external storage device. The configuration does not need word alignment, nor does it need to include header, end-of-file, checksum or hash value, and is not limited to this. For example, FIG. 5A is a schematic diagram of a memory configuration of an external storage device according to an embodiment of the present invention. In Figure 5A, the starting position of the target program is bit3 of 8000_0002, and it does not include the file header, file end, check code or hash value. Users can still modify the springboard program to complete the loading of the target program. Enter, read and execute. Similarly, the memory configuration of the springboard program in the external storage device does not need to be byte aligned, and details are not repeated here.

第5B圖為本發明實施例一外部儲存裝置記憶體配置之示意圖。於第5B圖中,由於外部儲存裝置32記憶體配置中0000_0000至3FFF_FFFF此一段連續的閒置空間不足以容納目標程式,於一實施例中,使用者仍可透過修改跳板程式,將目標程式分割成二片段,並分別儲存於0000_0000至3FFF_FFFF及8000_0000至8FFF_FFFF中,於系統單晶片32的開機程序中,透過修改後的跳板程式,將此二目標程式片段先後載入隨機存取記憶體304後由處理單元300加以執行,以完成開機程序。 FIG. 5B is a schematic diagram of a memory configuration of an external storage device according to an embodiment of the present invention. In FIG. 5B, since the continuous free space from 0000_0000 to 3FFF_FFFF in the memory configuration of the external storage device 32 is not enough to accommodate the target program, in one embodiment, the user can still divide the target program into two parts by modifying the springboard program. The two segments are stored in 0000_0000 to 3FFF_FFFF and 8000_0000 to 8FFF_FFFF respectively. In the boot process of the SoC 32, the two target program segments are loaded into the random access memory 304 successively through the modified springboard program, and then stored in the random access memory 304. The processing unit 300 is executed to complete the booting procedure.

須注意的是,前述實施例用以說明本發明之概念,舉例來說,跳板程式與目標程式可依外部儲存裝置閒置的空間,分割成數段,或跳板程式可再區分初級跳板程式及複數個次級跳板程式等,由唯讀記憶體302中的啟動程式讀 取初級跳板程式,再透過初級跳板程式讀取複數個次級跳板程式,最後完成複數個目標程式片段的讀取,以完成開機程序。本領域具通常知識者當可據以做不同的修飾,而不限於此。 It should be noted that the foregoing embodiments are used to illustrate the concept of the present invention. For example, the springboard program and the target program can be divided into several sections according to the idle space of the external storage device, or the springboard program can be further divided into the primary springboard program and a plurality of Secondary springboard programs, etc., are read by the startup program in the ROM 302 Take the primary springboard program, then read multiple secondary springboard programs through the primary springboard program, and finally complete the reading of multiple target program segments to complete the boot process. Those with ordinary knowledge in the art can make various modifications accordingly, but are not limited to this.

最後,關於系統單晶片30開機方法之運作,可歸納為一系統單晶片開機方法流程60,如第6圖所示。系統單晶片開機方法流程60包含以下步驟: Finally, the operation of the booting method of the SoC 30 can be summarized as a flow 60 of the booting method of the SoC, as shown in FIG. 6 . The SoC booting method process 60 includes the following steps:

步驟600:開始。 Step 600: Start.

步驟602:系統單晶片30透過外部輸入決定跳板程式的起始位置。 Step 602: The SoC 30 determines the starting position of the springboard program through external input.

步驟604:自外部儲存裝置32讀取跳板程式,並以處理單元300執行該跳板程式。 Step 604 : Read the springboard program from the external storage device 32 and execute the springboard program with the processing unit 300 .

步驟606:重複執行步驟604,直到所有跳板程式已讀取並執行完畢。 Step 606: Repeat step 604 until all springboard programs have been read and executed.

步驟608:透過跳板程式自外部儲存裝置32讀取目標程式,以處理單元300執行該目標程式。 Step 608 : Read the target program from the external storage device 32 through the springboard program, and use the processing unit 300 to execute the target program.

步驟610:重複執行步驟608,直到所有目標程式已讀取並執行完畢。 Step 610: Repeat step 608 until all target programs have been read and executed.

步驟612:結束。 Step 612: End.

於步驟602中,系統單晶片30透過輸入埠306取得外部輸入信號,決定跳板程式的起始位置,其中該外部輸入信號可為該起始位置的直接位址,或透過一儲存於唯讀記憶體302中的對應表以對應起始位置。舉例來說,於一實施例中,輸入埠306共一位元,其輸入值為0時代表跳板程式位於外部儲存裝置32的起始位置為0000_0000,其輸入值為1時代表跳板位於外部儲存裝置32起始位置為F000_0000。此外,輸入埠的型態亦不以系統單晶片的通用型輸入輸出埠(General-Purpose Input/Output,GPIO)為限,亦可為打線選擇(Bonding Option),直接定址或間接定址的方式為本領域具通常知識者常見技藝,於此不 再贅述。 In step 602, the SoC 30 obtains an external input signal through the input port 306 to determine the starting position of the jumper program, wherein the external input signal can be the direct address of the starting position, or is stored in the ROM through a The correspondence table in the body 302 corresponds to the starting position. For example, in one embodiment, the input port 306 has a total of one bit. When its input value is 0, it means that the springboard program is located in the starting position of the external storage device 32 as 0000_0000, and when its input value is 1, it means that the springboard is located in the external storage device. The starting position of the device 32 is F000_0000. In addition, the type of input port is not limited to the general-purpose input/output port (General-Purpose Input/Output, GPIO) of the system single chip, and can also be a bonding option (Bonding Option), direct addressing or indirect addressing. There is a common skill of those of ordinary skill in the art, and it is not Repeat.

於步驟606及步驟610中,由於外部儲存裝置的記憶體配置因素,跳板程式與目標程式可能無法連續地儲存於外部儲存裝置的一段空間(如第5B圖所示),故跳板程式與目標程式可能需要分割成複數個片段,從而系統單晶片30於步驟602跳板程式的起始位置後,仍需分複數次讀取並執行跳板程式,並再藉由跳板程式讀取並執行目標程式,以實現完整的開機流程。 In step 606 and step 610, due to the memory configuration factor of the external storage device, the springboard program and the target program may not be continuously stored in a space of the external storage device (as shown in Figure 5B), so the springboard program and the target program It may need to be divided into a plurality of segments, so that after the system single chip 30 is at the starting position of the springboard program in step 602, it still needs to read and execute the springboard program several times, and then read and execute the target program through the springboard program, so as to Implement a complete boot process.

至於系統單晶片開機方法流程60之其他步驟可參考前述說明,於此不再贅述。 As for other steps of the SoC booting method process 60, reference may be made to the foregoing description, and details are not described herein again.

需注意的是,外部輸入信號係指對系統單晶片30之外部,而非整個系統的外部。若於整個電子裝置有複數個系統單晶片時,只要其他系統單晶片較系統單晶片30早完成初始化,其系統單晶片30的外部訊號可由其他系統單晶片中的一打線選擇或一可程式化邏輯裝置耦接而得,其中該可程式化邏輯裝置可為一一次性寫入記憶體(One-Time Programmable,OTP)、一數次性寫入記憶體(Few-Time Programmable,FTP)、一可多次寫入記憶體(Multiple-Time Programmable,MTP),例如電子熔絲(eFuse)、反熔絲(Anti-fuse)、唯讀記憶體、隨機存取記憶體、唯獨記憶光碟(CD-ROM)、磁帶(Magnet Tape)、軟性磁碟(Floppy Disk)、光學數據儲存裝置(Optical Data Storage Device)、非揮發性記憶體(Non-volatile Memory),且不限於此。 It should be noted that the external input signal refers to the outside of the SoC 30, not the outside of the entire system. If there are multiple SoCs in the entire electronic device, as long as the other SoCs complete the initialization earlier than the SoC 30, the external signal of the SoC 30 can be selected by a wire bond or a programmable controller in the other SoCs. A logic device is coupled, wherein the programmable logic device can be a write-once memory (One-Time Programmable, OTP), a write-once memory (Few-Time Programmable, FTP), A Multiple-Time Programmable (MTP), such as eFuse, Anti-fuse, Read-Only Memory, Random Access Memory, Memory-Only Disc ( CD-ROM), Magnetic Tape, Floppy Disk, Optical Data Storage Device, Non-volatile Memory, but not limited to this.

舉例來說,第7圖為本發明實施例一系統單晶片系統之示意圖。於第7圖中,系統單晶片30與一SoC1、一SoC2及一eFuse整合於一系統中,其中SoC1 與eFuse的初始化順序較系統單晶片30早完成,則可透過eFuse的輸出埠耦接至系統單晶片30的輸入埠306上。本領域具通常知識者可依適用的設備不同而選擇適當組態。此種電路設計方法為本領域具通常知識者常見技藝,於此不再贅述。 For example, FIG. 7 is a schematic diagram of a system-on-a-chip system according to an embodiment of the present invention. In FIG. 7, the SoC 30 is integrated into a system with a SoC1, a SoC2 and an eFuse, wherein the SoC1 is If the initialization sequence with the eFuse is completed earlier than the SoC 30 , the output port of the eFuse can be coupled to the input port 306 of the SoC 30 . Those with ordinary knowledge in the art can select an appropriate configuration according to different applicable devices. Such a circuit design method is a common technique of those skilled in the art, and will not be repeated here.

此外,雖然出於說明目的以上系統單晶片30、外部儲存裝置32被表示為不同單元,但這些單元可全部或一部整合至同一電路。舉例來說,透過系統封裝(System in a Package,SIP)可將外部儲存裝置32與系統單晶片30整合至同一系統單晶片內。於一實施例中,電子熔絲、反熔絲可為獨立元件或與系統單晶片30整合至同一系統單晶片中。 Furthermore, although the SoC 30, external storage device 32 are shown above as different units for illustrative purposes, all or part of these units may be integrated into the same circuit. For example, the external storage device 32 and the SoC 30 can be integrated into the same SoC through a System in a Package (SIP). In one embodiment, the electronic fuses and antifuses may be separate components or integrated with the SoC 30 in the same SoC.

前述實施例用以說明本發明之概念,本領域具通常知識者當可據以做不同的修飾,而不限於此。因此,只要系統單晶片的開機方法,可透過讀取一信號後,動態改變目標程式於外部儲存裝置的讀取位置,即滿足本發明的要求,而屬於本發明之範疇。 The foregoing embodiments are used to illustrate the concept of the present invention, and those skilled in the art can make various modifications accordingly, but are not limited thereto. Therefore, as long as the booting method of the SoC can dynamically change the read position of the target program in the external storage device by reading a signal, the requirements of the present invention are satisfied and belong to the scope of the present invention.

綜上所述,本發明提供一種在不修改唯讀記憶體內的啟動程式的情況下,可動態修改系統單晶片開機程序的開機方法,該方法藉由讀取外部輸入信號改變啟動程式讀取跳板程式的起始位置,再由跳板程式讀取真正的目標程式,由於跳板程式儲存於外部儲存裝置中,可隨時被使用者所修改,如此即可在不修改唯讀記憶體內的啟動程式下,將目標程式儲存於已有既存資料的外部儲存裝置,以實現共用外部儲存裝置的目標。以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。 In summary, the present invention provides a booting method that can dynamically modify the booting procedure of the SoC without modifying the booting program in the ROM. The method changes the booting program and reads the springboard by reading an external input signal. The starting position of the program, and then the real target program is read by the springboard program. Since the springboard program is stored in the external storage device, it can be modified by the user at any time. In this way, without modifying the startup program in the read-only memory, The target program is stored in an external storage device with existing data to achieve the goal of sharing the external storage device. The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope of the present invention.

30:系統單晶片 30: SoC

300:處理單元 300: Processing Unit

302:唯讀記憶體 302: read-only memory

304:隨機存取記憶體 304: Random Access Memory

306:輸入埠 306: input port

32:外部儲存裝置 32: External storage device

34:系統單晶片 34: SoC

340:處理單元 340: Processing Unit

342:唯讀記憶體 342: read-only memory

Claims (15)

一種開機方法,適用於一系統單晶片的一開機程序上,其中該系統單晶片包括一輸入埠,用來提供外部輸入信號,一處理單元,用來執行程式,以及一唯讀記憶體,用來儲存一起始開機程序,該開機方法包括:選擇一跳板程式的一起始位置;讀取該跳板程式,並以該處理單元執行該跳板程式;以及透過該跳板程式,以該處理單元執行一目標程式;其中,該跳板程式與該目標程式儲存於一外部儲存裝置中;其中,該跳板程式用來執行讀取該目標程式,以及該目標程式用來執行該開機程序。 A booting method is suitable for a booting procedure of a system single chip, wherein the system single chip includes an input port for providing external input signals, a processing unit for executing programs, and a read-only memory for to store an initial boot program, the boot method includes: selecting an initial position of a springboard program; reading the springboard program, and executing the springboard program with the processing unit; and executing a target with the processing unit through the springboard program a program; wherein, the springboard program and the target program are stored in an external storage device; wherein, the springboard program is used to execute and read the target program, and the target program is used to execute the boot procedure. 如請求項1所述的開機方法,其中該唯讀記憶體經編程後不可再修改。 The booting method of claim 1, wherein the read-only memory cannot be modified after being programmed. 如請求項1所述的開機方法,其中該外部儲存裝置已有既存程式或資料,且其複數個不連續閒置空間之空間總和大於該跳板程式與該目標程式的大小。 The booting method of claim 1, wherein the external storage device has existing programs or data, and the sum of the space of the plurality of discontinuous free spaces is greater than the size of the springboard program and the target program. 如請求項1所述的開機方法,其中該系統單晶片更包括一隨機存取記憶體,用來儲存程式碼供該處理單元執行;其中,讀取該跳板程式並以該處理單元執行該跳板程式之步驟,係讀取該跳板程式,下載該跳板程式至該隨機存取記憶體內,以該處理單元執行該跳板程式。 The booting method of claim 1, wherein the SoC further comprises a random access memory for storing program codes for the processing unit to execute; wherein the springboard program is read and executed by the processing unit The step of the program is to read the springboard program, download the springboard program into the random access memory, and execute the springboard program with the processing unit. 如請求項1所述的開機方法,其中該系統單晶片更包括一隨機存取記憶體,用來儲存程式碼供該處理單元執行;其中,透過該跳板程式以該處理單元執行該目標程式之步驟,係透過該跳板程式,下載該目標程式至該隨機存取記憶體內,以該處理單元執行該目標程式。 The booting method of claim 1, wherein the SoC further comprises a random access memory for storing program codes for the processing unit to execute; wherein the target program is executed by the processing unit through the springboard program In the step, the target program is downloaded into the random access memory through the springboard program, and the target program is executed by the processing unit. 如請求項1所述的開機方法,其中該跳板程式的該起始位置由該輸入埠輸入的一外部信號控制。 The booting method of claim 1, wherein the start position of the springboard program is controlled by an external signal input from the input port. 如請求項6所述的開機方法,其中該輸入埠為一通用型輸入輸出埠。 The booting method of claim 6, wherein the input port is a general-purpose input and output port. 如請求項1所述的開機方法,其中該系統單晶片更包括一打線選擇或一可程式化邏輯裝置,用以直接或間接決定該跳板程式的起始位置。 The booting method of claim 1, wherein the SoC further comprises a wire-bonding selection or a programmable logic device for directly or indirectly determining the start position of the springboard program. 如請求項8所述的開機方法,其中該可程式化邏輯裝置為一一次性寫入記憶體、一數次性寫入記憶體、一可多次寫入記憶體。 The booting method of claim 8, wherein the programmable logic device is a write-once memory, a write-once memory, and a write-once memory. 如請求項1所述的開機方法,其中該跳板程式係由複數個子跳板程式構成。 The booting method of claim 1, wherein the springboard program is composed of a plurality of sub-springboard programs. 如請求項1所述的開機方法,其中該目標程式係由複數個子目標程式構成。 The booting method of claim 1, wherein the target program is composed of a plurality of sub-target programs. 如請求項1所述的開機方法,其中該跳板程式不與一外部儲存裝置的位置對齊。 The booting method of claim 1, wherein the springboard program is not aligned with the location of an external storage device. 如請求項1所述的開機方法,其中該目標程式不與一外部儲存裝置的位置對齊。 The booting method of claim 1, wherein the target program is not aligned with a location of an external storage device. 如請求項1所述的開機方法,其中該外部儲存裝置為序列定址或並列定址。 The booting method of claim 1, wherein the external storage device is serially addressed or parallel addressed. 如請求項1所述的開機方法,其中該外部儲存裝置與該系統單晶片整合為一晶片。 The booting method of claim 1, wherein the external storage device and the SoC are integrated into one chip.
TW109108192A 2020-03-12 2020-03-12 Boot method for system on chip TWI755695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109108192A TWI755695B (en) 2020-03-12 2020-03-12 Boot method for system on chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109108192A TWI755695B (en) 2020-03-12 2020-03-12 Boot method for system on chip

Publications (2)

Publication Number Publication Date
TW202134867A TW202134867A (en) 2021-09-16
TWI755695B true TWI755695B (en) 2022-02-21

Family

ID=78777319

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109108192A TWI755695B (en) 2020-03-12 2020-03-12 Boot method for system on chip

Country Status (1)

Country Link
TW (1) TWI755695B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929565A (en) * 2012-10-24 2013-02-13 北京华大信安科技有限公司 Method, device and chip for reading boot loader based on system on chip (SoC)
EP2639703A1 (en) * 2010-11-08 2013-09-18 ZTE Corporation Device for booting soc chip and soc chip
US9336010B2 (en) * 2013-03-15 2016-05-10 Xilinx, Inc. Multi-boot or fallback boot of a system-on-chip using a file-based boot device
TWI594188B (en) * 2012-04-10 2017-08-01 祥碩科技股份有限公司 System-on-chip and booting method thereof
CN109918124A (en) * 2019-03-15 2019-06-21 盛科网络(苏州)有限公司 SOC starting early stage is loaded into method and system, the Bootloader mirror configuration method of user configuration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2639703A1 (en) * 2010-11-08 2013-09-18 ZTE Corporation Device for booting soc chip and soc chip
TWI594188B (en) * 2012-04-10 2017-08-01 祥碩科技股份有限公司 System-on-chip and booting method thereof
CN102929565A (en) * 2012-10-24 2013-02-13 北京华大信安科技有限公司 Method, device and chip for reading boot loader based on system on chip (SoC)
US9336010B2 (en) * 2013-03-15 2016-05-10 Xilinx, Inc. Multi-boot or fallback boot of a system-on-chip using a file-based boot device
CN109918124A (en) * 2019-03-15 2019-06-21 盛科网络(苏州)有限公司 SOC starting early stage is loaded into method and system, the Bootloader mirror configuration method of user configuration

Also Published As

Publication number Publication date
TW202134867A (en) 2021-09-16

Similar Documents

Publication Publication Date Title
US4542453A (en) Program patching in microcomputer
JP2682700B2 (en) IC card
US7343483B1 (en) Configuring both a programmable logic device and its embedded logic with a single serialized configuration bit stream
EP0167572A1 (en) Data processing system including memory hierarchy.
CN107704285B (en) Multi-version configuration chip, system and method for field programmable gate array
US7425843B1 (en) Programmable logic device multi-boot state machine for serial peripheral interface (SPI) programmable read only memory (PROM)
US20190129638A1 (en) Memory interface for a Secure NOR Flash Memory
US7930535B1 (en) Method and apparatus for loading configuration data
CN108628641A (en) A kind of quick start method based on embedded system
US7162563B2 (en) Semiconductor integrated circuit having changeable bus width of external data signal
US8260968B2 (en) Method and system for booting a software package on a network processor
US7680976B2 (en) Method and apparatus for emulating rewritable memory with non-rewritable memory in an MCU
US6862724B1 (en) Reconfigurable programmable logic system with peripheral identification data
TWI755695B (en) Boot method for system on chip
US6076161A (en) Microcontroller mode selection system and method upon reset
CN113495762A (en) Starting method of system on chip
US10453534B2 (en) Patching of programmable memory
US6912101B2 (en) Integrated circuit and method of automatically selecting an internal or an external non-volatile memory as a source of program code responsive to presence or absence of the external non-volatile memory
US11822930B2 (en) Electrically programmable application-specific integrated circuit initialization engine
US20230176865A1 (en) Computing device
WO2020091771A1 (en) Memory interface for a secure nor flash memory
TWI838563B (en) Serial memory device i/o mode selection
TWI760911B (en) Method for choosing and loading serial presence detecet
US7234048B2 (en) Method for initializing or configuring an electrical circuit
JP6603100B2 (en) Memory control device and memory control method