TWI829394B - Electronic device and operation method thereof - Google Patents

Electronic device and operation method thereof Download PDF

Info

Publication number
TWI829394B
TWI829394B TW111139317A TW111139317A TWI829394B TW I829394 B TWI829394 B TW I829394B TW 111139317 A TW111139317 A TW 111139317A TW 111139317 A TW111139317 A TW 111139317A TW I829394 B TWI829394 B TW I829394B
Authority
TW
Taiwan
Prior art keywords
block
sub
address
memory
read
Prior art date
Application number
TW111139317A
Other languages
Chinese (zh)
Other versions
TW202418069A (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 TW111139317A priority Critical patent/TWI829394B/en
Application granted granted Critical
Publication of TWI829394B publication Critical patent/TWI829394B/en
Publication of TW202418069A publication Critical patent/TW202418069A/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An electronic device and an operation method thereof are provided. The electronic device includes a first and second decoding circuits. The electronic device is coupled to a storage device and a memory, and the storage device stores compressed data. The operation method includes the following steps: performing a first read operation to read a first sub-block from a first read address of the storage device; performing a first write operation to write the first sub-block to a first write address of the memory; performing a second read operation to read a second sub-block from a second read address of the storage device, the second read address being a sum of the first read address and the data amount of the first sub-block; performing a second write operation to write the second sub-block to a second write address of the memory; the first decoding circuit reading the first sub-block from the memory and decoding the first sub-block; and the second decoding circuit reading the second sub-block from the memory and decoding the second sub-block.

Description

電子裝置及其操作方法Electronic device and method of operating the same

本發明是關於電子裝置,尤其是關於電子裝置之解壓縮操作。 The present invention relates to electronic devices, and in particular to decompression operations of electronic devices.

圖1顯示習知的電子裝置100。電子裝置100包含計算電路110及儲存裝置120。儲存裝置120儲存壓縮的文件(例如,壓縮後的程式碼或程式指令)。當計算電路110要執行該些程式碼或程式指令時,計算電路110必須先解壓縮該文件。因此,計算電路110的解壓縮效率大大地影響電子裝置100的效能。 Figure 1 shows a conventional electronic device 100. The electronic device 100 includes a computing circuit 110 and a storage device 120 . The storage device 120 stores compressed files (eg, compressed program codes or program instructions). When the computing circuit 110 wants to execute the program codes or program instructions, the computing circuit 110 must first decompress the file. Therefore, the decompression efficiency of the computing circuit 110 greatly affects the performance of the electronic device 100 .

在一些情況下,儲存於儲存裝置120的壓縮文件是啟動影像檔案(boot image file)。電子裝置100啟動時,計算電路110從儲存裝置120讀取該壓縮的文件、解壓縮該壓縮的文件,然後執行啟動流程代碼(boot code)。因此,如果計算電路110的解壓縮效能不佳,則電子裝置100的啟動緩慢,造成使用者的使用體驗不佳。 In some cases, the compressed file stored in the storage device 120 is a boot image file. When the electronic device 100 is started, the computing circuit 110 reads the compressed file from the storage device 120, decompresses the compressed file, and then executes the boot code. Therefore, if the decompression performance of the computing circuit 110 is poor, the electronic device 100 will start slowly, resulting in a poor user experience.

鑑於先前技術之不足,本發明之一目的在於提供一種電子裝置及其操作方法,以改善先前技術的不足。 In view of the shortcomings of the prior art, one objective of the present invention is to provide an electronic device and an operating method thereof to improve the shortcomings of the prior art.

本發明之一實施例提供一種電子裝置,耦接一儲存裝置及一記憶體,該儲存裝置儲存一壓縮資料。該電子裝置包含一記憶體介面電路、一解壓縮模組以及一計算電路。記憶體介面電路耦接該記憶體。解壓縮模組包含一第一解碼電路及一第二解碼電路。該解壓縮模組或該計算電路執行以下步驟:(A)執行一第一讀取操作,以從該儲存裝置之一第一讀取地址讀取一第一子區塊;(B)執行一第一寫入操作,以透過該記憶體介面電路將該第一子區塊寫入該記憶體之一第一寫入地址;(C)執行一第二讀取操作,以從該儲存裝置之一第二讀取地址讀取一第二子區塊,該第二讀取地址等於該第一讀取地址加上該第一子區塊的一資料量;以及(D)執行一第二寫入操作,以透過該記憶體介面電路將該第二子區塊寫入該記憶體之一第二寫入地址。該解壓縮模組執行以下步驟:(E)該第一解碼電路從該記憶體讀取該第一子區塊,並解碼該第一子區塊;以及(F)該第二解碼電路從該記憶體讀取該第二子區塊,並解碼該第二子區塊。 One embodiment of the present invention provides an electronic device coupled to a storage device and a memory. The storage device stores compressed data. The electronic device includes a memory interface circuit, a decompression module and a computing circuit. The memory interface circuit is coupled to the memory. The decompression module includes a first decoding circuit and a second decoding circuit. The decompression module or the computing circuit performs the following steps: (A) perform a first read operation to read a first sub-block from a first read address of the storage device; (B) perform a a first write operation to write the first sub-block into a first write address of the memory through the memory interface circuit; (C) perform a second read operation to read from the storage device A second read address reads a second sub-block, the second read address is equal to the first read address plus a data amount of the first sub-block; and (D) performs a second write An input operation is performed to write the second sub-block into a second write address of the memory through the memory interface circuit. The decompression module performs the following steps: (E) the first decoding circuit reads the first sub-block from the memory and decodes the first sub-block; and (F) the second decoding circuit reads the first sub-block from the memory. The memory reads the second sub-block and decodes the second sub-block.

本發明之另一實施例提供一種電子裝置的操作方法,該電子裝置包含一第一解碼電路及一第二解碼電路,該電子裝置耦接一儲存裝置及一記憶體,該儲存裝置儲存一壓縮資料。該方法包含:執行一第一讀取操作,以從該儲存裝置之一第一讀取地址讀取一第一子區塊;執行一第一寫入操作,以將該第一子區塊寫入該記憶體之一第一寫入地址;執行一第二讀取操作,以從該儲存裝置之一第二讀取地址讀取一第二子區塊,該第二讀取地址等於該第一讀取地址加上該第一子區塊的一資料量;執行一第二寫入操作,以將該第二子區塊寫入該記憶體之一第二寫入地址;該第一解碼電路從該記憶體讀取該第一子 區塊並解碼該第一子區塊;以及,該第二解碼電路從該記憶體讀取該第二子區塊並解碼該第二子區塊。 Another embodiment of the present invention provides an operating method of an electronic device. The electronic device includes a first decoding circuit and a second decoding circuit. The electronic device is coupled to a storage device and a memory. The storage device stores a compressed material. The method includes: performing a first read operation to read a first sub-block from a first read address of the storage device; performing a first write operation to write the first sub-block Enter a first write address of the memory; perform a second read operation to read a second sub-block from a second read address of the storage device, the second read address is equal to the first A read address plus a data amount of the first sub-block; a second write operation is performed to write the second sub-block into a second write address of the memory; the first decoding The circuit reads the first sub-byte from the memory block and decode the first sub-block; and, the second decoding circuit reads the second sub-block from the memory and decodes the second sub-block.

本發明之另一實施例提供一種電子裝置,耦接一儲存裝置及一記憶體,該儲存裝置儲存一壓縮資料。該電子裝置包含一記憶體介面電路、一解壓縮模組以及一計算電路。記憶體介面電路耦接該記憶體。解壓縮模組包含一第一解碼電路及一第二解碼電路。該解壓縮模組或該計算電路執行以下步驟:從該儲存裝置讀取該壓縮資料之一第一子區塊;透過該記憶體介面電路將該第一子區塊寫入該記憶體之一第一儲存空間;從該儲存裝置讀取該壓縮資料之一第二子區塊,該第二子區塊在該儲存裝置中緊鄰該第一子區塊;以及,透過該記憶體介面電路將該第二子區塊寫入該記憶體之一第二儲存空間,該第二儲存空間不等於該第一儲存空間。該解壓縮模組執行以下步驟:該第一解碼電路從該第一儲存空間讀取該第一子區塊,並解碼該第一子區塊;以及,該第二解碼電路從該第二儲存空間讀取該第二子區塊,並解碼該第二子區塊。 Another embodiment of the present invention provides an electronic device coupled to a storage device and a memory. The storage device stores compressed data. The electronic device includes a memory interface circuit, a decompression module and a computing circuit. The memory interface circuit is coupled to the memory. The decompression module includes a first decoding circuit and a second decoding circuit. The decompression module or the computing circuit performs the following steps: reading a first sub-block of the compressed data from the storage device; writing the first sub-block into one of the memory through the memory interface circuit a first storage space; reading a second sub-block of the compressed data from the storage device, the second sub-block being adjacent to the first sub-block in the storage device; and, through the memory interface circuit, The second sub-block is written into a second storage space of the memory, and the second storage space is not equal to the first storage space. The decompression module performs the following steps: the first decoding circuit reads the first sub-block from the first storage space and decodes the first sub-block; and the second decoding circuit reads the first sub-block from the second storage space. The space reads the second sub-block and decodes the second sub-block.

本發明之實施例所體現的技術手段可以改善先前技術之缺點的至少其中之一,因此本發明相較於先前技術可以提高電子裝置的程式執行效能及/或開機速度。 The technical means embodied in the embodiments of the present invention can improve at least one of the shortcomings of the prior art. Therefore, the present invention can improve the program execution performance and/or boot speed of the electronic device compared with the prior art.

有關本發明的特徵、實作與功效,茲配合圖式作實施例詳細說明如下。 The features, implementation and effects of the present invention are described in detail below with reference to the drawings and examples.

100,301:電子裝置 100,301: Electronic devices

110,320:計算電路 110,320: Calculation circuit

120,303:儲存裝置 120,303:Storage device

B1_U,B2_U,B3_U,B1_C,B2_C,B3_C,B1_CP,B2_CP,B3_CP:區塊 B1_U,B2_U,B3_U,B1_C,B2_C,B3_C,B1_CP,B2_CP,B3_CP: block

300:嵌入式系統 300:Embedded systems

302:記憶體 302:Memory

310:記憶體介面電路 310: Memory interface circuit

330:唯讀記憶體 330: Read-only memory

340:儲存控制電路 340: Storage control circuit

350:解壓縮模組 350: Decompression module

351:剖析器 351:Parser

352,354,356:解碼電路 352,354,356: Decoding circuit

HDR:標頭 HDR: header

FID:前識別符 FID: pre-identifier

NB:區塊數 NB: number of blocks

SSB:子區塊大小 SSB: sub-block size

SCB1:第一區塊的大小 SCB1: size of the first block

SUB1:第一區塊解壓縮後的大小 SUB1: The decompressed size of the first block

SCB2:第二區塊的大小 SCB2: The size of the second block

SUB2:第二區塊解壓縮後的大小 SUB2: The decompressed size of the second block

SCB3:第三區塊的大小 SCB3: The size of the third block

SUB3:第三區塊解壓縮後的大小 SUB3: The decompressed size of the third block

PD:填充值 PD: fill value

FTR:註腳 FTR: footnote

RID:後識別符 RID: rear identifier

B1_CP1,B1_CP2,B1_CP3,B1_CP4,B2_CP1,B2_CP2,B2_CP3,B2_CP4,B2_CP5,B3_CP1,B3_CP2,B3_CP3:子區塊 B1_CP1,B1_CP2,B1_CP3,B1_CP4,B2_CP1,B2_CP2,B2_CP3,B2_CP4,B2_CP5,B3_CP1,B3_CP2,B3_CP3: sub-block

MB1,MB2,MB3,MB4,MB5,MB6:儲存空間 MB1, MB2, MB3, MB4, MB5, MB6: storage space

addr1,addr2:參考地址 addr1, addr2: reference address

S810:資料搬移程序 S810: Data migration procedure

S820:解碼程序 S820: Decoding program

A1,A2,A3,A4:箭頭 A1,A2,A3,A4: arrows

410,S420,S430,S440,S450,S460,S470,S810,S811,S812,S813,S814,S820,S821,S822,S823,S824,S825:步驟 410,S420,S430,S440,S450,S460,S470,S810,S811,S812,S813,S814,S820,S821,S822,S823,S824,S825: Steps

圖1顯示習知的電子裝置;圖2是本發明原始資料、壓縮資料及對齊後的壓縮資料之一實施例的示意圖;圖3是本發明嵌入式系統之一實施例的功能方塊圖;圖4為本發明資料分割方法之一實施例的流程圖;圖5是本發明之壓縮資料的資訊檔之一實施例的示意圖;圖6顯示記憶體及儲存裝置中的資料配置之一實施例的示意圖;圖7顯示各子區塊在記憶體及儲存裝置中的起始地址及結束地址之一實施例的示意圖;以及圖8為本發明電子裝置的操作方法之一實施例的流程圖。 Figure 1 shows a conventional electronic device; Figure 2 is a schematic diagram of an embodiment of original data, compressed data and aligned compressed data of the present invention; Figure 3 is a functional block diagram of an embodiment of an embedded system of the present invention; Figure 4 is a flow chart of an embodiment of the data segmentation method of the present invention; Figure 5 is a schematic diagram of an embodiment of the compressed data information file of the present invention; Figure 6 shows an embodiment of the data configuration in the memory and storage device Schematic diagram; Figure 7 is a schematic diagram showing an embodiment of the start address and end address of each sub-block in the memory and storage device; and Figure 8 is a flow chart of an embodiment of the operating method of the electronic device of the present invention.

以下說明內容之技術用語係參照本技術領域之習慣用語,如本說明書對部分用語有加以說明或定義,該部分用語之解釋係以本說明書之說明或定義為準。 The technical terms used in the following description refer to the idioms in the technical field. If some terms are explained or defined in this specification, the explanation or definition of these terms shall prevail.

本發明之揭露內容包含電子裝置及其操作方法。由於本發明之電子裝置所包含之部分元件單獨而言可能為已知元件,因此在不影響該裝置發明之充分揭露及可實施性的前提下,以下說明對於已知元件的細節將予以節略。此外,本發明之電子裝置的操作方法的部分或全部流程可以是軟體及/或韌體之形式,在不影響該方法發明之充分揭露及可實施性的前提下,以下方法發明之說明將著重於步驟內容而非硬體。 The disclosure of the present invention includes electronic devices and operating methods thereof. Since some components included in the electronic device of the present invention may be individually known components, the following description will omit details of the known components without affecting the full disclosure and implementability of the device invention. In addition, part or all of the process of the operating method of the electronic device of the present invention may be in the form of software and/or firmware. Without affecting the full disclosure and implementability of the method invention, the following description of the method invention will focus on on the content of the steps rather than the hardware.

圖2是本發明原始資料(即,壓縮前的資料)、壓縮資料及對齊後的壓縮資料之一實施例的示意圖。第一列為原始資料(即,包含區塊 B1_U、區塊B2_U及區塊B3_U),第二列為原始資料經過壓縮後的壓縮資料(包含區塊B1_C、區塊B2_C及區塊B3_C,分別對應到區塊B1_U、區塊B2_U及區塊B3_U),第三列是對齊後的壓縮資料(包含區塊B1_CP、區塊B2_CP及區塊B3_CP,分別對應到區塊B1_C、區塊B2_C及區塊B3_C)。「對齊」是為了使壓縮資料成為單位長度(例如32位元組)的整數倍,可以藉由填充(padding)操作來實現。如果壓縮資料正好為單位長度的整數倍,則不需要填充(即,填充大小為0,例如區塊B2_C)。 FIG. 2 is a schematic diagram of one embodiment of original data (ie, data before compression), compressed data, and aligned compressed data according to the present invention. The first column contains the raw data (i.e., contains the block B1_U, block B2_U and block B3_U), the second column is the compressed data after the original data is compressed (including block B1_C, block B2_C and block B3_C, corresponding to block B1_U, block B2_U and block respectively B3_U), the third column is the aligned compressed data (including block B1_CP, block B2_CP and block B3_CP, corresponding to block B1_C, block B2_C and block B3_C respectively). "Alignment" is to make the compressed data into an integer multiple of the unit length (for example, 32 bytes), which can be achieved by padding operation. If the compressed data is exactly an integer multiple of the unit length, no padding is required (i.e., the padding size is 0, such as block B2_C).

以下的討論中所指的「壓縮資料」是對齊後的壓縮資料。 The "compressed data" referred to in the following discussion is the compressed data after alignment.

圖3是本發明嵌入式系統之一實施例的功能方塊圖。嵌入式系統300包含電子裝置301、記憶體302及儲存裝置303。電子裝置301耦接記憶體302及儲存裝置303,包含記憶體介面電路310、計算電路320、唯讀記憶體330、儲存控制電路340及解壓縮模組350。 Figure 3 is a functional block diagram of an embodiment of the embedded system of the present invention. The embedded system 300 includes an electronic device 301, a memory 302 and a storage device 303. The electronic device 301 is coupled to the memory 302 and the storage device 303, and includes a memory interface circuit 310, a computing circuit 320, a read-only memory 330, a storage control circuit 340 and a decompression module 350.

在一些實施例中,電子裝置301是一個晶片,記憶體302是動態隨機存取記憶體(dynamic random access memory,DRAM),而儲存裝置303是快閃記憶體(flash memory)、嵌入式多媒體卡(embedded multimedia card,eMMC)或安全數位(secure digital,SD)記憶卡。 In some embodiments, the electronic device 301 is a chip, the memory 302 is a dynamic random access memory (DRAM), and the storage device 303 is a flash memory or an embedded multimedia card. (embedded multimedia card, eMMC) or secure digital (secure digital, SD) memory card.

在一些實施例中,計算電路320可以是具有程式執行能力的電路或電子元件,例如中央處理器、微處理器、微處理單元、數位訊號處理器、特殊應用積體電路(Application Specific Integrated Circuit,ASIC),或其等效電路。計算電路320藉由執行程式碼及/或程式指令來實現電子裝置301的功能。 In some embodiments, the computing circuit 320 may be a circuit or electronic component with program execution capabilities, such as a central processing unit, a microprocessor, a microprocessing unit, a digital signal processor, or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or its equivalent circuit. The computing circuit 320 implements the functions of the electronic device 301 by executing program codes and/or program instructions.

記憶體介面電路310耦接記憶體302,而電子裝置301透過記憶體介面電路310存取記憶體302。儲存控制電路340用來存取儲存裝置303,並 且透過記憶體介面電路310將資料寫入記憶體302。解壓縮模組350耦接記憶體介面電路310、計算電路320及儲存控制電路340,用來對壓縮資料進行解壓縮。計算電路320耦接唯讀記憶體330,用來執行唯讀記憶體330中的唯讀記憶體啟動(ROM boot)代碼。唯讀記憶體啟動為本技術領域具有通常知識者所熟知,故不再贅述。 The memory interface circuit 310 is coupled to the memory 302, and the electronic device 301 accesses the memory 302 through the memory interface circuit 310. Storage control circuit 340 is used to access storage device 303, and And the data is written into the memory 302 through the memory interface circuit 310. The decompression module 350 is coupled to the memory interface circuit 310, the computing circuit 320 and the storage control circuit 340, and is used to decompress compressed data. The computing circuit 320 is coupled to the ROM 330 and is used to execute the ROM boot code in the ROM 330 . Read-only memory booting is well known to those with ordinary knowledge in the art, and therefore will not be described in detail.

解壓縮模組350包含解碼電路352、解碼電路354及解碼電路356,分別用來解碼圖2之區塊B1_CP、區塊B2_CP及區塊B3_CP。解壓縮模組350更包含剖析器(parser)351。解壓縮模組350的操作細節將在下方配合圖6~8詳述。剖析器351可以用邏輯電路實作,例如有限狀態機(finite state machine,FSM)。 The decompression module 350 includes a decoding circuit 352, a decoding circuit 354 and a decoding circuit 356, respectively used to decode the block B1_CP, the block B2_CP and the block B3_CP in FIG. 2 . The decompression module 350 further includes a parser 351. The operation details of the decompression module 350 will be detailed below with reference to Figures 6 to 8. The parser 351 can be implemented with a logic circuit, such as a finite state machine (FSM).

解碼電路352、解碼電路354及解碼電路356可同時進行解碼操作,以縮短整體的解壓縮時間。在理想的狀況下,解碼電路352、解碼電路354及解碼電路356實質上同時開始解碼以及實質上同時結束解碼,以提高解壓縮效率(即,所需的整體解壓縮時間較短)。然而,因為原始資料的內容無規則可循,所以如果平均分割原始資料(即,區塊B1_U、區塊B2_U及區塊B3_U大小相同),則有很大的機率每個區塊的壓縮率不同(即,所需的解壓縮時間不同),導致解碼電路352、解碼電路354及解碼電路356無法實質上同時開始解碼及實質上同時完成解碼(例如,結束解碼的時間點有很大的落差)。這會導致電子裝置301的效能降低,因為計算電路320必須等待解壓縮模組350的所有解碼電路完成解碼。因此,本發明提供一種資料分割方法來提升解壓縮的效率。 The decoding circuit 352, the decoding circuit 354 and the decoding circuit 356 can perform decoding operations at the same time to shorten the overall decompression time. In an ideal situation, the decoding circuit 352 , the decoding circuit 354 and the decoding circuit 356 start decoding substantially at the same time and end decoding substantially at the same time to improve the decompression efficiency (ie, the overall decompression time required is shorter). However, because the content of the original data has no rules, if the original data is divided equally (i.e., block B1_U, block B2_U, and block B3_U are the same size), there is a high probability that the compression rate of each block is different. (That is, the required decompression time is different), resulting in the decoding circuit 352, the decoding circuit 354 and the decoding circuit 356 being unable to start decoding substantially at the same time and complete decoding substantially at the same time (for example, there is a big gap in the time point of ending the decoding) . This will result in reduced performance of the electronic device 301 because the computing circuit 320 must wait for all decoding circuits of the decompression module 350 to complete decoding. Therefore, the present invention provides a data segmentation method to improve decompression efficiency.

以下的說明以解壓縮模組350包含三個解碼電路為例。然而, 在其他實施例中,解壓縮模組350可以包含二個、四個或四個以上的解碼電路。 The following description takes the decompression module 350 including three decoding circuits as an example. However, In other embodiments, the decompression module 350 may include two, four, or more than four decoding circuits.

圖4為本發明資料分割方法之一實施例的流程圖,包含以下步驟。 Figure 4 is a flow chart of an embodiment of the data segmentation method of the present invention, including the following steps.

步驟S410:將原始資料視為單一區塊進行壓縮,也就是將原始資料壓縮成單一個區塊。 Step S410: Treat the original data as a single block for compression, that is, compress the original data into a single block.

步驟S420:對該區塊解壓縮,得到解壓縮參考時間T_ref。 Step S420: Decompress the block to obtain the decompression reference time T_ref.

步驟S430:將解壓縮參考時間T_ref除以解碼電路的個數N_dec(例如3個),得到目標解壓縮時間T_tar=T_ref/N_dec。 Step S430: Divide the decompression reference time T_ref by the number of decoding circuits N_dec (for example, 3) to obtain the target decompression time T_tar=T_ref/N_dec.

步驟S440:將原始資料分割成N_dec個區塊(例如圖2所示)。 Step S440: Divide the original data into N_dec blocks (for example, as shown in Figure 2).

步驟S450:對每個區塊分別壓縮及解壓縮,得到N_dec個解壓縮時間T_dec(k)(k=1,2,...,N_dec)。 Step S450: Compress and decompress each block separately to obtain N_dec decompression times T_dec(k) (k=1,2,...,N_dec).

步驟S460:判斷對該N_dec個區塊而言,解壓縮時間與目標解壓縮時間的比值(T_dec(k)/T_tar)是否落於目標範圍內。例如,Lth<T_dec(k)/T_tar<Uth(對所有k)(下限Lth與上限Uth為有理數)。如果是,則結束資料分割流程(代表步驟S440所決定的區塊大小可以確保解壓縮模組350的所有解碼電路在實質上相同的時間或在目標時間區間內完成解碼);如果否,則進行步驟S470。 Step S460: Determine whether the ratio of the decompression time to the target decompression time (T_dec(k)/T_tar) for the N_dec blocks falls within the target range. For example, Lth<T_dec(k)/T_tar<Uth (for all k) (the lower limit Lth and the upper limit Uth are rational numbers). If yes, then end the data segmentation process (meaning that the block size determined in step S440 can ensure that all decoding circuits of the decompression module 350 complete decoding at substantially the same time or within a target time interval); if not, proceed Step S470.

步驟S470:調整區塊大小。例如,若第一區塊的解壓縮時間T_dec(1)太大(即,T_dec(k)/T_tar>Uth)或太小(即,T_dec(k)/T_tar<Lth),則減少或增加該第一區塊的資料量。 Step S470: Adjust the block size. For example, if the decompression time T_dec(1) of the first block is too large (i.e., T_dec(k)/T_tar>Uth) or too small (i.e., T_dec(k)/T_tar<Lth), then reduce or increase the The amount of data in the first block.

在一些實施例中,電子裝置301的開發者或製造商可以藉由調整目標範圍(即,調整下限Lth及/或上限Uth)來控制解壓縮模組350在實際操作時的解壓縮時間。例如,實際操作時解碼電路352、解碼電路354及解碼電路356所需的解壓縮時間分別為Tp_dec(1)、Tp_dec(2)及Tp_dec(3),則可以藉由調整目標範圍來控制三個解壓縮時間Tp_dec(1)、Tp_dec(2)及Tp_dec(3)相近,使得任兩個解壓縮時間的比值實質上小於等於1.2(實施例一)或1.05(實施例二)。實施例一可確保解壓縮模組350的解壓縮效率,而實施例二可以使解壓縮模組350有更高的解壓縮效率(即,電子裝置301有更佳的表現)。 In some embodiments, the developer or manufacturer of the electronic device 301 can control the decompression time of the decompression module 350 during actual operation by adjusting the target range (ie, adjusting the lower limit Lth and/or the upper limit Uth). For example, in actual operation, the decompression times required by the decoding circuit 352, the decoding circuit 354 and the decoding circuit 356 are Tp_dec(1), Tp_dec(2) and Tp_dec(3) respectively, then the three targets can be controlled by adjusting the target range. The decompression times Tp_dec(1), Tp_dec(2) and Tp_dec(3) are similar, so that the ratio of any two decompression times is substantially less than or equal to 1.2 (Embodiment 1) or 1.05 (Embodiment 2). The first embodiment can ensure the decompression efficiency of the decompression module 350, and the second embodiment can make the decompression module 350 have higher decompression efficiency (that is, the electronic device 301 has better performance).

請同時參閱圖2及圖3。如上所述,本發明預先將原始資料分為多個區塊(例如,區塊B1_U、區塊B2_U及區塊B3_U),然後產生該些區塊的壓縮區塊(例如,區塊B1_CP、區塊B2_CP及區塊B3_CP)。電子裝置301運行時,解壓縮模組350的多個解碼電路(例如,解碼電路352、解碼電路354、解碼電路356)同時解碼該些壓縮區塊以提高解壓縮效率。為了使解壓縮模組350的多個解碼電路同時執行解碼操作,本發明更將每個壓縮區塊分成多個子區塊,並且以預設的配置將該些子區塊儲存在儲存裝置303中。以下透過圖5~7來進一步說明。 Please refer to both Figure 2 and Figure 3. As mentioned above, the present invention divides the original data into multiple blocks (for example, block B1_U, block B2_U and block B3_U) in advance, and then generates compressed blocks of these blocks (for example, block B1_CP, block B3_U). Block B2_CP and Block B3_CP). When the electronic device 301 is running, multiple decoding circuits (eg, decoding circuit 352, decoding circuit 354, and decoding circuit 356) of the decompression module 350 decode the compressed blocks simultaneously to improve decompression efficiency. In order to enable multiple decoding circuits of the decompression module 350 to perform decoding operations simultaneously, the present invention further divides each compression block into multiple sub-blocks, and stores the sub-blocks in the storage device 303 in a preset configuration. . This will be further explained below through Figures 5 to 7.

圖5是本發明之壓縮資料的資訊檔之一實施例的示意圖。壓縮資料被安排於標頭(header)HDR與註腳(footer)FTR之間。標頭HDR及註腳FTR合稱為壓縮資料的資訊檔。壓縮資料及其資訊檔儲存於儲存裝置303中。標頭HDR包含前識別符FID、區塊數NB(在圖2的例中子,NB=3,即區塊B1_CP、區塊B2_CP與區塊B3_CP)、子區塊大小SSB(即,子區塊的 資料量)、第一區塊的大小SCB1(即,區塊B1_CP的大小)、第一區塊解壓縮後的大小SUB1(即,區塊B1_U的大小)、第二區塊的大小SCB2(即,區塊B2_CP的大小)、第二區塊解壓縮後的大小SUB2(即,區塊B2_U的大小)、第三區塊的大小SCB3(即,區塊B3_CP的大小)、第三區塊解壓縮後的大小SUB3(即,區塊B3_U的大小)及填充值PD。註腳FTR包含後識別符RID。電子裝置301可以根據前識別符FID、區塊數NB及後識別符RID在儲存裝置303中找到壓縮資料。 FIG. 5 is a schematic diagram of an embodiment of a compressed data information file according to the present invention. The compressed data is arranged between the header HDR and the footer FTR. The header HDR and footer FTR are collectively called the information file of the compressed data. The compressed data and its information files are stored in the storage device 303 . The header HDR contains the pre-identifier FID, the number of blocks NB (in the example of Figure 2, NB=3, that is, block B1_CP, block B2_CP and block B3_CP), the sub-block size SSB (i.e., sub-area Blocky data amount), the size of the first block SCB1 (that is, the size of block B1_CP), the decompressed size of the first block SUB1 (that is, the size of block B1_U), the size of the second block SCB2 (that is, the size of block B1_U) , the size of block B2_CP), the decompressed size of the second block SUB2 (that is, the size of block B2_U), the size of the third block SCB3 (that is, the size of block B3_CP), the size of the third block decompressed The compressed size SUB3 (ie, the size of block B3_U) and padding value PD. The footnote FTR contains the post identifier RID. The electronic device 301 can find the compressed data in the storage device 303 according to the pre-identifier FID, the block number NB and the post-identifier RID.

電子裝置301可以根據標頭HDR得到區塊B1_CP的子區塊個數NSB1(=SCB1/SSB)、區塊B2_CP的子區塊個數NSB2(=SCB2/SSB)及區塊B3_CP的子區塊個數NSB3(=SCB3/SSB)。 The electronic device 301 can obtain the number of sub-blocks NSB1 (=SCB1/SSB) of block B1_CP, the number of sub-blocks NSB2 (=SCB2/SSB) of block B2_CP, and the number of sub-blocks of block B3_CP according to the header HDR. Number NSB3 (=SCB3/SSB).

圖6顯示記憶體302及儲存裝置303中的資料配置之一實施例的示意圖,圖7顯示各子區塊在記憶體302及儲存裝置303中的起始地址及結束地址之一實施例的示意圖。 Figure 6 shows a schematic diagram of an embodiment of the data configuration in the memory 302 and the storage device 303. Figure 7 shows a schematic diagram of an embodiment of the start address and end address of each sub-block in the memory 302 and the storage device 303. .

圖6的第一列顯示壓縮資料在儲存裝置303中的配置,圖6的第二列顯示壓縮資料及解壓縮後的資料在記憶體302中的配置。 The first column of FIG. 6 shows the arrangement of the compressed data in the storage device 303 , and the second column of FIG. 6 shows the arrangement of the compressed data and the decompressed data in the memory 302 .

圖7左側的表格顯示儲存裝置303中每個子區塊的起始地址及結束地址,圖7右側的表格顯示記憶體302中每個子區塊的起始地址及結束地址。「addr1」及「addr2」分別是儲存裝置303及記憶體302中的參考地址。在一些實施例中,參考地址addr1及參考地址addr2可以由嵌入式系統300的開發者或製造商事先決定。 The table on the left side of FIG. 7 shows the start address and the end address of each sub-block in the storage device 303 , and the table on the right side of FIG. 7 shows the start address and the end address of each sub-block in the memory 302 . "addr1" and "addr2" are reference addresses in the storage device 303 and the memory 302 respectively. In some embodiments, the reference address addr1 and the reference address addr2 may be determined in advance by the developer or manufacturer of the embedded system 300 .

請同時參閱圖2、圖6及圖7。在圖2、圖6及圖7的例子中,區塊B1_CP包含四個子區塊(子區塊B1_CP1、子區塊B1_CP2、子區塊 B1_CP3及子區塊B1_CP4,即,子區塊個數NSB1=4),區塊B2_CP包含五個子區塊(子區塊B2_CP1、子區塊B2_CP2、子區塊B2_CP3、子區塊B2_CP4及子區塊B2_CP5,即子區塊個數NSB2=5),而區塊B3_CP包含三個子區塊(子區塊B3_CP1、子區塊B3_CP2及子區塊B3_CP3,即,子區塊個數NSB3=3)。 Please also refer to Figure 2, Figure 6 and Figure 7. In the examples of Figure 2, Figure 6 and Figure 7, block B1_CP includes four sub-blocks (sub-block B1_CP1, sub-block B1_CP2, sub-block B1_CP3 and sub-block B1_CP4, that is, the number of sub-blocks NSB1=4), block B2_CP includes five sub-blocks (sub-block B2_CP1, sub-block B2_CP2, sub-block B2_CP3, sub-block B2_CP4 and sub-area Block B2_CP5, that is, the number of sub-blocks NSB2=5), and block B3_CP includes three sub-blocks (sub-block B3_CP1, sub-block B3_CP2 and sub-block B3_CP3, that is, the number of sub-blocks NSB3=3) .

請參閱圖6及圖7。在儲存裝置303中,區塊B1_CP、區塊B2_CP及區塊B3_CP的子區塊是以以下的順序排列(從標頭HDR到註腳FTR):區塊B1_CP的子區塊B1_CP1、區塊B2_CP的子區塊B2_CP1、區塊B3_CP的子區塊B3_CP1、區塊B1_CP的子區塊B1_CP2、區塊B2_CP的子區塊B2_CP2、區塊B3_CP的子區塊B3_CP2、…。 Please refer to Figure 6 and Figure 7. In the storage device 303, the sub-blocks of block B1_CP, block B2_CP and block B3_CP are arranged in the following order (from header HDR to footer FTR): sub-blocks B1_CP1, block B2_CP of block B1_CP Sub-block B2_CP1, sub-block B3_CP1 of block B3_CP, sub-block B1_CP2 of block B1_CP, sub-block B2_CP2 of block B2_CP, sub-block B3_CP2 of block B3_CP, . . .

請參閱圖6及圖7。在記憶體302中,同一區塊的子區塊被安排在一起。舉例來說,區塊B1_CP的子區塊被安排在儲存空間MB1中,區塊B2_CP的子區塊被安排在儲存空間MB2中,以及區塊B3_CP的子區塊被安排在儲存空間MB3中。 Please refer to Figure 6 and Figure 7. In memory 302, sub-blocks of the same block are arranged together. For example, the sub-blocks of block B1_CP are arranged in storage space MB1, the sub-blocks of block B2_CP are arranged in storage space MB2, and the sub-blocks of block B3_CP are arranged in storage space MB3.

請參閱圖6及圖7。在儲存裝置303中,子區塊B1_CP1及子區塊B2_CP1相鄰(即,連續安排,也就是子區塊B2_CP1緊接於子區塊B1_CP1之後);然而,在記憶體302中,子區塊B1_CP1與子區塊B2_CP1不相鄰排列。在儲存裝置303中,子區塊B1_CP1及子區塊B1_CP2不相鄰;然而,在記憶體302中,子區塊B1_CP1與子區塊B1_CP2相鄰。 Please refer to Figure 6 and Figure 7. In the storage device 303, the sub-block B1_CP1 and the sub-block B2_CP1 are adjacent (ie, arranged consecutively, that is, the sub-block B2_CP1 immediately follows the sub-block B1_CP1); however, in the memory 302, the sub-block B1_CP1 and sub-block B2_CP1 are not arranged adjacently. In the storage device 303, the sub-block B1_CP1 and the sub-block B1_CP2 are not adjacent; however, in the memory 302, the sub-block B1_CP1 and the sub-block B1_CP2 are adjacent.

解壓縮模組350(更明確地說,剖析器351)或計算電路320控制儲存控制電路340(例如,透過更改暫存器的暫存值)從儲存裝置303依序讀取子區塊,並根據標頭HDR控制儲存控制電路340將子區塊寫入記憶體302 中對應的儲存空間。解碼電路352、解碼電路354及解碼電路356透過記憶體介面電路310分別從儲存空間MB1、儲存空間MB2及儲存空間MB3讀取相對應的區塊的子區塊、解碼子區塊,並且將解碼後的資料透過記憶體介面電路310分別儲存在記憶體302的儲存空間MB4、儲存空間MB5及儲存空間MB6。換言之,區塊B1_U被安排在儲存空間MB4中、區塊B2_U被安排在儲存空間MB5中,以及區塊B3_U被安排在儲存空間MB6中。儲存空間MB4、儲存空間MB5及儲存空間MB6中的全部資料即原始資料。 The decompression module 350 (more specifically, the parser 351) or the computing circuit 320 controls the storage control circuit 340 (eg, by changing the temporary value of the register) to sequentially read the sub-blocks from the storage device 303, and The storage control circuit 340 writes the sub-block to the memory 302 according to the header HDR control. corresponding storage space. The decoding circuit 352, the decoding circuit 354 and the decoding circuit 356 respectively read the sub-blocks and decode sub-blocks of the corresponding blocks from the storage space MB1, the storage space MB2 and the storage space MB3 through the memory interface circuit 310, and decode the sub-blocks. The resulting data is stored in the storage space MB4, storage space MB5 and storage space MB6 of the memory 302 respectively through the memory interface circuit 310. In other words, block B1_U is arranged in storage space MB4, block B2_U is arranged in storage space MB5, and block B3_U is arranged in storage space MB6. All data in storage space MB4, storage space MB5 and storage space MB6 are original data.

圖8為本發明電子裝置的操作方法之一實施例的流程圖,包含資料搬移程序S810及解碼程序S820。資料搬移程序S810由剖析器351執行(藉由控制儲存控制電路340),而解碼程序S820由解壓縮模組350執行。更明確地說,當剖析器351正在執行資料搬移程序S810的同時,解碼電路352、解碼電路354及解碼電路356各自同時執行解碼程序S820。 FIG. 8 is a flowchart of an embodiment of the operating method of the electronic device of the present invention, including a data moving process S810 and a decoding process S820. The data moving process S810 is executed by the parser 351 (by controlling the storage control circuit 340), and the decoding process S820 is executed by the decompression module 350. More specifically, while the parser 351 is executing the data moving procedure S810, the decoding circuit 352, the decoding circuit 354 and the decoding circuit 356 are respectively executing the decoding procedure S820 at the same time.

在一些實施例中,如果解壓縮模組350沒有包含剖析器351,則資料搬移程序S810由計算電路320執行。 In some embodiments, if the decompression module 350 does not include the parser 351, the data moving procedure S810 is executed by the computing circuit 320.

以下的說明請參閱圖6~8。 Please refer to Figures 6~8 for the following instructions.

資料搬移程序S810包含以下步驟。 The data migration procedure S810 includes the following steps.

步驟S811:剖析器351或計算電路320執行讀取操作,以透過儲存控制電路340從儲存裝置303讀取目標子區塊。第一次執行步驟S811時,目標子區塊是緊接在標頭HDR後的子區塊,即子區塊B1_CP1(如圖6所示)。換言之,剖析器351或計算電路320先根據標頭HDR決定子區塊B1_CP1的起始地址(例如,先從區塊數NB推得標頭HDR的大小,再將前識別符FID的地址加上標頭HDR的大小以得到子區塊B1_CP1的起始地址), 然後以子區塊B1_CP1的起始地址(addr1)作為讀取地址以透過儲存控制電路340從儲存裝置303讀取子區塊大小SSB的資料量(即,讀取目標子區塊)。 Step S811: The parser 351 or the calculation circuit 320 performs a read operation to read the target sub-block from the storage device 303 through the storage control circuit 340. When step S811 is executed for the first time, the target sub-block is the sub-block immediately following the header HDR, that is, sub-block B1_CP1 (as shown in Figure 6). In other words, the parser 351 or the calculation circuit 320 first determines the starting address of the sub-block B1_CP1 based on the header HDR (for example, first derives the size of the header HDR from the block number NB, and then adds the address of the previous identifier FID The size of the header HDR to get the starting address of sub-block B1_CP1), Then, the starting address (addr1) of the sub-block B1_CP1 is used as the read address to read the data amount of the sub-block size SSB from the storage device 303 through the storage control circuit 340 (ie, the read target sub-block).

步驟S812:剖析器351或計算電路320執行寫入操作,以透過記憶體介面電路310將目標子區塊儲存至記憶體302中的目標儲存空間,該目標儲存空間對應於該目標子區塊所屬之區塊。 Step S812: The parser 351 or the calculation circuit 320 performs a write operation to store the target sub-block to the target storage space in the memory 302 through the memory interface circuit 310, and the target storage space corresponds to the target sub-block to which it belongs. block.

承上段,剖析器351或計算電路320先根據標頭HDR判斷目標子區塊所屬的區塊。如前所述,剖析器351或計算電路320先根據標頭HDR取得每個區塊的子區塊個數(NSB1、NSB2、NSB3),然後剖析器351或計算電路320再根據區塊數NB及子區塊個數(NSB1、NSB2、NSB3)得知子區塊在儲存裝置303中的分佈。因此,剖析器351或計算電路320可以根據標頭HDR判斷目標子區塊所屬的區塊。 Continuing from the previous paragraph, the parser 351 or the calculation circuit 320 first determines the block to which the target sub-block belongs based on the header HDR. As mentioned above, the parser 351 or the calculation circuit 320 first obtains the number of sub-blocks (NSB1, NSB2, NSB3) of each block according to the header HDR, and then the parser 351 or the calculation circuit 320 obtains the number of sub-blocks NB according to the header HDR. and the number of sub-blocks (NSB1, NSB2, NSB3) to obtain the distribution of sub-blocks in the storage device 303. Therefore, the parser 351 or the calculation circuit 320 can determine the block to which the target sub-block belongs according to the header HDR.

承上段,得知目標子區塊所屬的區塊後,剖析器351或計算電路320再根據標頭HDR取得目標子區塊所屬的區塊的大小(即,SCB1、SCB2或SCB3),於記憶體302中決定或找到該區塊所對應的儲存空間(即,儲存空間MB1、儲存空間MB2或儲存空間MB3)。因此,剖析器351或計算電路320便可決定子區塊B1_CP1在記憶體302中的寫入地址(addr2,即,儲存空間MB1的起始地址),然後將子區塊B1_CP1寫入該寫入地址。換言之,當目標子區塊是子區塊B1_CP1時,步驟S811及步驟S812對應到圖6及圖7的箭頭A1。 Continuing from the previous paragraph, after knowing the block to which the target sub-block belongs, the parser 351 or the calculation circuit 320 then obtains the size of the block to which the target sub-block belongs (ie, SCB1, SCB2 or SCB3) according to the header HDR, and stores it in the memory. The storage space corresponding to the block (ie, storage space MB1, storage space MB2, or storage space MB3) is determined or found in the body 302. Therefore, the parser 351 or the calculation circuit 320 can determine the write address (addr2, ie, the starting address of the storage space MB1) of the sub-block B1_CP1 in the memory 302, and then write the sub-block B1_CP1 into the write address. address. In other words, when the target sub-block is sub-block B1_CP1, step S811 and step S812 correspond to arrow A1 in FIG. 6 and FIG. 7 .

步驟S813:剖析器351或計算電路320根據標頭HDR判斷是否仍有待處理的子區塊。如果是,則流程前往步驟S814;如果否(即,對圖6及圖7的例子而言,剖析器351或計算電路320已處理完儲存裝置303中的最後 一個子區塊B2_CP5),則流程結束。 Step S813: The parser 351 or the calculation circuit 320 determines whether there are still sub-blocks to be processed according to the header HDR. If yes, the process proceeds to step S814; if no (that is, for the examples of FIGS. 6 and 7 , the parser 351 or the calculation circuit 320 has finished processing the last file in the storage device 303 A sub-block B2_CP5), the process ends.

步驟S814:剖析器351或計算電路320以緊鄰該目標子區塊之下一子區塊作為該目標子區塊,然後回到步驟S811。詳言之,步驟S814更新目標子區塊,以決定下一輪的讀取操作(即,步驟S811)的讀取地址及寫入操作(即,步驟S812)的寫入地址。承上例,因為目前的目標子區塊是子區塊B1_CP1,所以下一個目標子區塊是子區塊B2_CP1;因此,新的讀取地址為子區塊B2_CP1的起始地址(addr1+SSB),而新的寫入地址為儲存空間MB2的起始地址(addr2+4*SSB)。子區塊B2_CP1的起始地址(addr1+SSB)等於子區塊B1_CP1的起始地址(addr1)加上子區塊大小SSB。 Step S814: The parser 351 or the calculation circuit 320 uses the subblock immediately below the target subblock as the target subblock, and then returns to step S811. Specifically, step S814 updates the target sub-block to determine the read address of the next round of read operation (ie, step S811) and the write address of the write operation (ie, step S812). Following the above example, because the current target sub-block is sub-block B1_CP1, the next target sub-block is sub-block B2_CP1; therefore, the new read address is the starting address of sub-block B2_CP1 (addr1+SSB ), and the new write address is the starting address of storage space MB2 (addr2+4*SSB). The starting address of sub-block B2_CP1 (addr1+SSB) is equal to the starting address of sub-block B1_CP1 (addr1) plus the sub-block size SSB.

剖析器351或計算電路320重複資料搬移程序S810的步驟,以搬移更多子區塊(即,依序執行對應於箭頭A2、箭頭A3、箭頭A4、…之資料搬移)。需注意的是,子區塊B1_CP1及子區塊B2_CP1在儲存裝置303中相鄰,但在記憶體302中不相鄰;換言之,在記憶體302中,子區塊B2_CP1的起始地址(addr2+4*SSB)不等於子區塊B1_CP1的起始地址(addr2)加上子區塊大小SSB。 The parser 351 or the calculation circuit 320 repeats the steps of the data moving procedure S810 to move more sub-blocks (ie, perform data movement corresponding to arrow A2, arrow A3, arrow A4, ... in sequence). It should be noted that sub-block B1_CP1 and sub-block B2_CP1 are adjacent in the storage device 303, but not adjacent in the memory 302; in other words, in the memory 302, the starting address of the sub-block B2_CP1 (addr2 +4*SSB) is not equal to the starting address (addr2) of sub-block B1_CP1 plus the sub-block size SSB.

當子區塊B1_CP1、子區塊B2_CP1及子區塊B3_CP1開始被存入記憶體302時,解碼電路352、解碼電路354及解碼電路356便可開始分別從儲存空間MB1、儲存空間MB2及儲存空間MB3讀取子區塊並解碼該子區塊,也就是執行解碼程序S820。解碼電路352、解碼電路354及解碼電路356從剖析器351或計算電路320取得儲存空間MB1、儲存空間MB2及儲存空間MB3的起始地址。解碼程序S820包含以下步驟。 When the sub-block B1_CP1, the sub-block B2_CP1 and the sub-block B3_CP1 start to be stored in the memory 302, the decoding circuit 352, the decoding circuit 354 and the decoding circuit 356 can start to store data from the storage space MB1, the storage space MB2 and the storage space respectively. MB3 reads the sub-block and decodes the sub-block, that is, executes the decoding procedure S820. The decoding circuit 352 , the decoding circuit 354 and the decoding circuit 356 obtain the starting addresses of the storage space MB1 , the storage space MB2 and the storage space MB3 from the parser 351 or the calculation circuit 320 . The decoding procedure S820 includes the following steps.

步驟S821:第X解碼電路從記憶體302之第X儲存空間讀取目 標子區塊(1

Figure 111139317-A0305-02-0016-1
X
Figure 111139317-A0305-02-0016-2
NB)。以圖6為例,解碼電路352(解碼電路354或解碼電路356)從儲存空間MB1(儲存空間MB2或儲存空間MB3)讀取目標子區塊。 Step S821: The X decoding circuit reads the target sub-block from the X storage space of the memory 302 (1
Figure 111139317-A0305-02-0016-1
X
Figure 111139317-A0305-02-0016-2
NB). Taking FIG. 6 as an example, the decoding circuit 352 (decoding circuit 354 or decoding circuit 356) reads the target sub-block from the storage space MB1 (storage space MB2 or storage space MB3).

步驟S822:第X解碼電路解碼該目標子區塊以得到解碼資料。更明確地說,解碼電路352(解碼電路354或解碼電路356)解碼目標子區塊,並產生解碼資料(即,區塊B1_U、區塊B2_U及區塊B3_U之部分資料)。 Step S822: The X decoding circuit decodes the target sub-block to obtain decoded data. More specifically, decoding circuit 352 (decoding circuit 354 or decoding circuit 356) decodes the target sub-block and generates decoded data (ie, partial data of block B1_U, block B2_U, and block B3_U).

步驟S823:第X解碼電路將該解碼資料儲存至該記憶體之一儲存空間。以圖6為例,解碼電路352(解碼電路354或解碼電路356)將解碼資料儲存至儲存空間MB4(儲存空間MB5或儲存空間MB6)。在一些實施例中,剖析器351或計算電路320根據標頭HDR的內容(即,第一區塊解壓縮後的大小SUB1、第二區塊解壓縮後的大小SUB2及第三區塊解壓縮後的大小SUB3)在記憶體302中配置儲存空間MB4、儲存空間MB5及儲存空間MB6(即,決定儲存空間MB4、儲存空間MB5及儲存空間MB6在記憶體302中的地址),並將儲存空間MB4、儲存空間MB5及儲存空間MB6的起始地址傳送給解碼電路352、解碼電路354及解碼電路356。 Step S823: The X decoding circuit stores the decoded data into a storage space of the memory. Taking FIG. 6 as an example, the decoding circuit 352 (the decoding circuit 354 or the decoding circuit 356) stores the decoded data into the storage space MB4 (the storage space MB5 or the storage space MB6). In some embodiments, the parser 351 or the calculation circuit 320 performs the processing according to the contents of the header HDR (i.e., the first block decompressed size SUB1, the second block decompressed size SUB2, and the third block decompressed size SUB2). The last size SUB3) configures the storage space MB4, the storage space MB5 and the storage space MB6 in the memory 302 (that is, determines the addresses of the storage space MB4, the storage space MB5 and the storage space MB6 in the memory 302), and sets the storage space The starting addresses of MB4, storage space MB5 and storage space MB6 are sent to the decoding circuit 352, the decoding circuit 354 and the decoding circuit 356.

步驟S824:第X解碼電路判斷是否尚有待處理的子區塊。詳言之,解碼電路352、解碼電路354及解碼電路356分別檢查是否已處理完儲存空間MB1、儲存空間MB2及儲存空間MB3中的子區塊。如果是,則流程前往步驟S825;如果否(即,對圖6的例子而言,解碼電路352(解碼電路354或解碼電路356)已處理完儲存空間MB1(儲存空間MB2或儲存空間MB3)中的所有子區塊),則流程結束。 Step S824: The X decoding circuit determines whether there are still sub-blocks to be processed. In detail, the decoding circuit 352, the decoding circuit 354 and the decoding circuit 356 respectively check whether the sub-blocks in the storage space MB1, the storage space MB2 and the storage space MB3 have been processed. If yes, the process proceeds to step S825; if no (that is, for the example of FIG. 6, the decoding circuit 352 (decoding circuit 354 or decoding circuit 356) has finished processing the storage space MB1 (storage space MB2 or storage space MB3) all sub-blocks), the process ends.

步驟S825:第X解碼電路以緊鄰該目標子區塊之下一子區塊作為該目標子區塊。換言之,如圖6及圖7所示,解碼電路352(解碼電路354或解碼電路356)連續讀取儲存空間MB1(儲存空間MB2或儲存空間MB3)中的子區塊。也就是說,在步驟S825中,第X解碼電路將目前的讀取地址(用於步驟S821中)加上子區塊大小SSB以作為新的讀取地址,然後執行步驟S821。 Step S825: The X-th decoding circuit uses the sub-block immediately below the target sub-block as the target sub-block. In other words, as shown in FIG. 6 and FIG. 7 , the decoding circuit 352 (the decoding circuit 354 or the decoding circuit 356) continuously reads the sub-blocks in the storage space MB1 (the storage space MB2 or the storage space MB3). That is to say, in step S825, the X-th decoding circuit adds the current read address (used in step S821) to the sub-block size SSB as a new read address, and then executes step S821.

如前所述,因為區塊的大小事先經過適當的設計(即,圖4之流程),所以解碼電路352、解碼電路354及解碼電路356完成解碼程序S820的時間點相近(即,區塊B1_CP、區塊B2_CP及區塊B3_CP解碼完成的時間點相近,等效於儲存空間MB4、儲存空間MB5及儲存空間MB6被填滿的時間點相近)。 As mentioned above, since the size of the block has been appropriately designed in advance (i.e., the process of FIG. 4 ), the time points at which the decoding circuit 352 , the decoding circuit 354 and the decoding circuit 356 complete the decoding process S820 are similar (i.e., the block B1_CP , the time points at which block B2_CP and block B3_CP are decoded are similar, which is equivalent to the time points at which storage space MB4, storage space MB5 and storage space MB6 are filled up.)

綜上所述,本案的區塊被分割成多個子區塊,有利於多個解碼電路同時解碼,可以提升電子裝置301效能。再者,藉由精心安排子區塊在儲存裝置303及記憶體302中的位置,本案在執行資料搬移程序S810及解碼程序S820時可以分別在儲存裝置303及記憶體302中從連續的地址讀取資料。相較於跳躍式地讀取資料,從連續的地址讀取資料可以提升資料讀取速度。 To sum up, the block in this case is divided into multiple sub-blocks, which is conducive to simultaneous decoding by multiple decoding circuits and can improve the performance of the electronic device 301. Furthermore, by carefully arranging the positions of the sub-blocks in the storage device 303 and the memory 302, this project can read from consecutive addresses in the storage device 303 and the memory 302 respectively when executing the data moving procedure S810 and the decoding procedure S820. Get information. Compared with reading data in jumps, reading data from consecutive addresses can increase the data reading speed.

以上所討論的壓縮資料可以是基於xz壓縮方法所產生的資料。xz壓縮方法為本技術領域具有通常知識者所熟知,故不再贅述。 The compressed data discussed above may be data generated based on the xz compression method. The xz compression method is well known to those with ordinary knowledge in the technical field, and therefore will not be described in detail.

以上所討論的壓縮資料可以是電子裝置301的操作中所需要的資料(例如程式碼或程式指令)。在一些實施例中,壓縮資料是電子裝置301的啟動流程代碼(由計算電路320執行)的一部分。舉例來說,啟動流程代碼包含Miniboot、U-boot及Kernel,而該壓縮資料是U-boot及Kernel。在執行完 唯讀記憶體啟動代碼後,計算電路320先執行Miniboot來啟動記憶體介面電路310、儲存控制電路340及解壓縮模組350,然後再執行圖8的流程以解碼U-boot及Kernel。Miniboot、U-boot及Kernel為本技術領域具有通常知識者所熟知,故不再贅述。 The compressed data discussed above may be data required for the operation of the electronic device 301 (eg, program code or program instructions). In some embodiments, the compressed data is part of the startup process code of the electronic device 301 (executed by the computing circuit 320). For example, the boot process code includes Miniboot, U-boot and Kernel, and the compressed data is U-boot and Kernel. After execution After the read-only memory activation code, the computing circuit 320 first executes Miniboot to activate the memory interface circuit 310, the storage control circuit 340 and the decompression module 350, and then executes the process of FIG. 8 to decode U-boot and Kernel. Miniboot, U-boot and Kernel are well known to those with ordinary knowledge in the technical field, so they will not be described in detail.

雖然本發明之實施例如上所述,然而該些實施例並非用來限定本發明,本技術領域具有通常知識者可依據本發明之明示或隱含之內容對本發明之技術特徵施以變化,凡此種種變化均可能屬於本發明所尋求之專利保護範疇,換言之,本發明之專利保護範圍須視本說明書之申請專利範圍所界定者為準。 Although the embodiments of the present invention are described above, these embodiments are not intended to limit the present invention. Those skilled in the art may make changes to the technical features of the present invention based on the explicit or implicit contents of the present invention. All these changes may fall within the scope of patent protection sought by the present invention. In other words, the patent protection scope of the present invention must be determined by the patent application scope of this specification.

S810,S811,S812,S813,S814,S820,S821,S822,S823,S824,S825:步驟 S810,S811,S812,S813,S814,S820,S821,S822,S823,S824,S825: Steps

Claims (19)

一種電子裝置,耦接一儲存裝置及一記憶體,該儲存裝置儲存一壓縮資料,該電子裝置包含:一記憶體介面電路,耦接該記憶體;一解壓縮模組,包含一第一解碼電路及一第二解碼電路;以及一計算電路;其中,該解壓縮模組或該計算電路執行以下步驟:(A)執行一第一讀取操作,以從該儲存裝置之一第一讀取地址讀取一第一子區塊;(B)執行一第一寫入操作,以透過該記憶體介面電路將該第一子區塊寫入該記憶體之一第一寫入地址;(C)執行一第二讀取操作,以從該儲存裝置之一第二讀取地址讀取一第二子區塊,該第二讀取地址等於該第一讀取地址加上該第一子區塊的一資料量;以及(D)執行一第二寫入操作,以透過該記憶體介面電路將該第二子區塊寫入該記憶體之一第二寫入地址;其中,該解壓縮模組執行以下步驟:(E)該第一解碼電路從該記憶體讀取該第一子區塊,並解碼該第一子區塊;以及(F)該第二解碼電路從該記憶體讀取該第二子區塊,並解碼該第二子區塊; 其中,該壓縮資料包含一第一區塊及一第二區塊,該第一子區塊係該第一區塊的一部分,該第二子區塊係該第二區塊的一部分,該第一解碼電路解碼該第一區塊需要一第一解壓縮時間,該第二解碼電路解碼該第二區塊需要一第二解壓縮時間,該第一解壓縮時間與該第二解壓縮時間之比值實質上小於等於1.2。 An electronic device is coupled to a storage device and a memory. The storage device stores compressed data. The electronic device includes: a memory interface circuit coupled to the memory; a decompression module including a first decoding circuit and a second decoding circuit; and a calculation circuit; wherein the decompression module or the calculation circuit performs the following steps: (A) performing a first read operation to read a first read from the storage device The address reads a first sub-block; (B) performs a first write operation to write the first sub-block into a first write address of the memory through the memory interface circuit; (C) ) performs a second read operation to read a second sub-block from a second read address of the storage device, the second read address being equal to the first read address plus the first sub-area A data amount of the block; and (D) performing a second write operation to write the second sub-block into a second write address of the memory through the memory interface circuit; wherein, the decompression The module performs the following steps: (E) the first decoding circuit reads the first sub-block from the memory and decodes the first sub-block; and (F) the second decoding circuit reads the first sub-block from the memory. Get the second sub-block and decode the second sub-block; Wherein, the compressed data includes a first block and a second block, the first sub-block is a part of the first block, the second sub-block is a part of the second block, and the third sub-block is a part of the second block. A decoding circuit requires a first decompression time to decode the first block, the second decoding circuit requires a second decompression time to decode the second block, and the first decompression time and the second decompression time are The ratio is essentially less than or equal to 1.2. 一種電子裝置,耦接一儲存裝置及一記憶體,該儲存裝置儲存一壓縮資料,該壓縮資料包含一第一區塊及一第二區塊,該電子裝置包含:一記憶體介面電路,耦接該記憶體;一解壓縮模組,包含一第一解碼電路及一第二解碼電路;以及一計算電路;其中,該解壓縮模組或該計算電路執行以下步驟:(A)執行一第一讀取操作,以從該儲存裝置之一第一讀取地址讀取該第一區塊之一第一子區塊;(B)執行一第一寫入操作,以透過該記憶體介面電路將該第一子區塊寫入該記憶體之一第一寫入地址;(C)執行一第二讀取操作,以從該儲存裝置之一第二讀取地址讀取該第二區塊之一第二子區塊,該第二讀取地址等於該第一讀取地址加上該第一子區塊的一資料量;以及(D)執行一第二寫入操作,以透過該記憶體介面電路將該第二子區塊寫入該記憶體之一第二寫入地址,其中,該第一子區塊係該第一區塊的部分,該第二子區塊係該第二區塊的部分,該第二寫入地址不等於該第一寫入地址加上該第一子區塊的該資料量,以將 該第一區塊的其他子區塊寫入到該第一位址與第二位址之間使該第一區塊的所有子區塊自該第一寫入位址連續寫入該記憶體;其中,該解壓縮模組執行以下步驟:(E)該第一解碼電路從該記憶體讀取該第一子區塊,並解碼該第一子區塊;以及(F)該第二解碼電路從該記憶體讀取該第二子區塊,並解碼該第二子區塊。 An electronic device is coupled to a storage device and a memory. The storage device stores compressed data. The compressed data includes a first block and a second block. The electronic device includes: a memory interface circuit, coupled to Connect the memory; a decompression module, including a first decoding circuit and a second decoding circuit; and a calculation circuit; wherein, the decompression module or the calculation circuit performs the following steps: (A) execute a first a read operation to read a first sub-block of the first block from a first read address of the storage device; (B) perform a first write operation to read through the memory interface circuit Write the first sub-block to a first write address of the memory; (C) perform a second read operation to read the second block from a second read address of the storage device a second sub-block, the second read address is equal to the first read address plus a data amount of the first sub-block; and (D) perform a second write operation to pass the memory The body interface circuit writes the second sub-block to a second write address of the memory, wherein the first sub-block is part of the first block and the second sub-block is the second part of the block, the second write address is not equal to the first write address plus the data amount of the first sub-block, so that Other sub-blocks of the first block are written between the first address and the second address so that all sub-blocks of the first block are continuously written into the memory from the first write address. ; wherein, the decompression module performs the following steps: (E) the first decoding circuit reads the first sub-block from the memory and decodes the first sub-block; and (F) the second decoding The circuit reads the second sub-block from the memory and decodes the second sub-block. 如請求項2之電子裝置,其中,該儲存裝置更儲存該壓縮資料之一資訊檔,該解壓縮模組或該計算電路係根據該資訊檔取得該第一讀取地址及該第二讀取地址。 If the electronic device of claim 2 is used, the storage device further stores an information file of the compressed data, and the decompression module or the computing circuit obtains the first reading address and the second reading address based on the information file. address. 如請求項3之電子裝置,其中,該資訊檔係記載該第一子區塊的該資料量,並且該解壓縮模組或該計算電路係根據該第一讀取地址及該資料量決定該第二讀取地址。 For example, the electronic device of claim 3, wherein the information file records the data amount of the first sub-block, and the decompression module or the calculation circuit determines the data amount based on the first reading address and the data amount. Second read address. 如請求項3之電子裝置,其中,該解壓縮模組或該計算電路更執行以下步驟:執行一第三讀取操作,以從該儲存裝置之一第三讀取地址讀取一第三子區塊,該第三子區塊係該第一區塊的一部分,且該第二讀取地址介於該第一讀取地址與該第三讀取地址之間;以及執行一第三寫入操作,以透過該記憶體介面電路將該第三子區塊寫入該記憶體之一第三寫入地址。 The electronic device of claim 3, wherein the decompression module or the computing circuit further performs the following steps: performing a third read operation to read a third sub-code from a third read address of the storage device. block, the third sub-block is part of the first block, and the second read address is between the first read address and the third read address; and performing a third write The operation is to write the third sub-block into a third write address of the memory through the memory interface circuit. 如請求項5之電子裝置,其中,該第三寫入地址等於該第一寫入地址加上該第一子區塊的該資料量。 The electronic device of claim 5, wherein the third writing address is equal to the first writing address plus the data amount of the first sub-block. 如請求項2之電子裝置,其中,該第一解碼電路解碼該第一區塊需要一第一解壓縮時間,該第二解碼電路解碼該第二區塊需要一第二解壓縮時間,該第一解壓縮時間與該第二解壓縮時間之比值實質上小於等於1.2。 The electronic device of claim 2, wherein the first decoding circuit requires a first decompression time to decode the first block, the second decoding circuit requires a second decompression time to decode the second block, and the second decoding circuit requires a second decompression time to decode the second block. The ratio of a decompression time to the second decompression time is substantially less than or equal to 1.2. 如請求項2之電子裝置,其中,該計算電路執行該電子裝置之一啟動流程代碼,而該壓縮資料係該啟動流程代碼的一部分。 The electronic device of claim 2, wherein the computing circuit executes a startup process code of the electronic device, and the compressed data is part of the startup process code. 如請求項8之電子裝置,其中,該部分係該啟動流程代碼的一第一部分,該計算電路執行該啟動流程代碼的一第二部分以啟動該記憶體介面電路,該解壓縮模組或該計算電路係於該記憶體介面電路被啟動後執行該步驟(A)至該步驟(F)。 The electronic device of claim 8, wherein the part is a first part of the startup process code, and the computing circuit executes a second part of the startup process code to activate the memory interface circuit, the decompression module or the The computing circuit performs the steps (A) to (F) after the memory interface circuit is activated. 一種電子裝置的操作方法,該電子裝置包含一第一解碼電路及一第二解碼電路,該電子裝置耦接一儲存裝置及一記憶體,該儲存裝置儲存一壓縮資料,該方法包含:執行一第一讀取操作,以從該儲存裝置之一第一讀取地址讀取一第一子區塊;執行一第一寫入操作,以將該第一子區塊寫入該記憶體之一第一寫入地址;執行一第二讀取操作,以從該儲存裝置之一第二讀取地址讀取一第二子區塊,該第二讀取地址等於該第一讀取地址加上該第一子區塊的一資料量;執行一第二寫入操作,以將該第二子區塊寫入該記憶體之一第二寫入地址; 該第一解碼電路從該記憶體讀取該第一子區塊並解碼該第一子區塊;以及該第二解碼電路從該記憶體讀取該第二子區塊並解碼該第二子區塊;其中,該壓縮資料包含一第一區塊及一第二區塊,該第一子區塊係該第一區塊的一部分,該第二子區塊係該第二區塊的一部分,該第一解碼電路解碼該第一區塊需要一第一解壓縮時間,該第二解碼電路解碼該第二區塊需要一第二解壓縮時間,該第一解壓縮時間與該第二解壓縮時間之比值實質上小於等於1.2。 An operating method of an electronic device. The electronic device includes a first decoding circuit and a second decoding circuit. The electronic device is coupled to a storage device and a memory. The storage device stores compressed data. The method includes: executing a a first read operation to read a first sub-block from a first read address of the storage device; a first write operation to write the first sub-block into a memory a first write address; performing a second read operation to read a second sub-block from a second read address of the storage device, the second read address being equal to the first read address plus An amount of data of the first sub-block; performing a second write operation to write the second sub-block to a second write address of the memory; The first decoding circuit reads the first sub-block from the memory and decodes the first sub-block; and the second decoding circuit reads the second sub-block from the memory and decodes the second sub-block. Block; wherein, the compressed data includes a first block and a second block, the first sub-block is a part of the first block, and the second sub-block is a part of the second block , the first decoding circuit needs a first decompression time to decode the first block, and the second decoding circuit needs a second decompression time to decode the second block. The first decompression time is the same as the second decompression time. The compression time ratio is substantially less than or equal to 1.2. 一種電子裝置的操作方法,該電子裝置包含一第一解碼電路及一第二解碼電路,該電子裝置耦接一儲存裝置及一記憶體,該儲存裝置儲存一壓縮資料,該壓縮資料包含一第一區塊及一第二區塊,該方法包含:執行一第一讀取操作,以從該儲存裝置之一第一讀取地址讀取該第一區塊之一第一子區塊;執行一第一寫入操作,以將該第一子區塊寫入該記憶體之一第一寫入地址;執行一第二讀取操作,以從該儲存裝置之一第二讀取地址讀取該第二區塊之一第二子區塊,該第二讀取地址等於該第一讀取地址加上該第一子區塊的一資料量;執行一第二寫入操作,以將該第二子區塊寫入該記憶體之一第二寫入地址,其中,該第一子區塊係該第一區塊的部分,該第二子區塊係該第二區塊的部分,該第二寫入地址不等於該第一寫入地址加上該第一子區塊的該資料量,以將該第一區塊的其他子區塊寫入到該第一 位址與第二位址之間使該第一區塊的所有子區塊自該第一寫入位址連續寫入該記憶體;該第一解碼電路從該記憶體讀取該第一子區塊並解碼該第一子區塊;以及該第二解碼電路從該記憶體讀取該第二子區塊並解碼該第二子區塊。 An operating method of an electronic device. The electronic device includes a first decoding circuit and a second decoding circuit. The electronic device is coupled to a storage device and a memory. The storage device stores compressed data. The compressed data includes a first decoding circuit. A block and a second block, the method includes: performing a first read operation to read a first sub-block of the first block from a first read address of the storage device; executing a first write operation to write the first sub-block to a first write address of the memory; a second read operation to read from a second read address of the storage device A second sub-block of the second block, the second read address is equal to the first read address plus a data amount of the first sub-block; a second write operation is performed to write the A second sub-block is written to a second write address of the memory, wherein the first sub-block is part of the first block and the second sub-block is part of the second block, The second write address is not equal to the first write address plus the data amount of the first sub-block, so as to write other sub-blocks of the first block to the first Between the address and the second address, all sub-blocks of the first block are continuously written into the memory from the first write address; the first decoding circuit reads the first sub-block from the memory. block and decode the first sub-block; and the second decoding circuit reads the second sub-block from the memory and decodes the second sub-block. 如請求項11之方法,其中,該儲存裝置更儲存該壓縮資料之一資訊檔,該方法更包含:讀取該資訊檔,並根據該資訊檔取得該第一讀取地址及該第二讀取地址。 For example, the method of claim 11, wherein the storage device further stores an information file of the compressed data, the method further includes: reading the information file, and obtaining the first read address and the second read address based on the information file. Get the address. 如請求項12之方法,其中,該資訊檔係記載該第一子區塊的該資料量,該方法更包含:根據該第一讀取地址及該資料量決定該第二讀取地址。 For example, the method of claim 12, wherein the information file records the data amount of the first sub-block, the method further includes: determining the second reading address based on the first reading address and the data amount. 如請求項12之方法,其中,該方法更包含:執行一第三讀取操作,以從該儲存裝置之一第三讀取地址讀取一第三子區塊,該第三子區塊係該第一區塊的一部分,且該第二讀取地址介於該第一讀取地址與該第三讀取地址之間;以及執行一第三寫入操作,以將該第三子區塊寫入該記憶體之一第三寫入地址。 The method of claim 12, wherein the method further includes: performing a third read operation to read a third sub-block from a third read address of the storage device, the third sub-block is A portion of the first block, and the second read address is between the first read address and the third read address; and performing a third write operation to write the third sub-block Write to one of the third write addresses in this memory. 如請求項14之方法,其中,該第三寫入地址等於該第一寫入地址加上該第一子區塊的該資料量。 The method of claim 14, wherein the third writing address is equal to the first writing address plus the data amount of the first sub-block. 如請求項11之方法,其中,該第一解碼電路解碼該第一區塊需要一第一解壓縮時間,該第二解碼電路解碼該第二區塊需要一第二解壓縮時間,該第一解壓縮時間與該第二解壓縮時間之比值實質上小於等於1.2。 The method of claim 11, wherein the first decoding circuit requires a first decompression time to decode the first block, the second decoding circuit requires a second decompression time to decode the second block, and the first decoding circuit requires a second decompression time to decode the second block. The ratio of the decompression time to the second decompression time is substantially less than or equal to 1.2. 一種電子裝置,耦接一儲存裝置及一記憶體,該儲存裝置儲存一壓縮資料,該壓縮資料包含一第一區塊及一第二區塊,該電子裝置包含:一記憶體介面電路,耦接該記憶體;一解壓縮模組,包含一第一解碼電路及一第二解碼電路;以及一計算電路;其中,該解壓縮模組或該計算電路執行以下步驟:從該儲存裝置讀取該壓縮資料之該第一區塊之一第一子區塊;透過該記憶體介面電路將該第一子區塊寫入該記憶體之一第一儲存空間;從該儲存裝置讀取該壓縮資料之該第二區塊之一第二子區塊,該第二子區塊在該儲存裝置中緊鄰該第一子區塊;以及透過該記憶體介面電路將該第二子區塊寫入該記憶體之一第二儲存空間,其中,該第二儲存空間不等於該第一儲存空間,該第一子區塊係該第一區塊的部分,該第二子區塊係該第二區塊的部分,該第二子區塊在該記憶體中不緊鄰該第一子區塊,以將該第一區塊的其他子區塊寫入到該第一子區塊與該第二子區塊之間使該第一區塊的所有子區塊自該第一子區塊連續寫入該記憶體;其中,該解壓縮模組執行以下步驟: 該第一解碼電路從該第一儲存空間讀取該第一子區塊,並解碼該第一子區塊;以及該第二解碼電路從該第二儲存空間讀取該第二子區塊,並解碼該第二子區塊。 An electronic device is coupled to a storage device and a memory. The storage device stores compressed data. The compressed data includes a first block and a second block. The electronic device includes: a memory interface circuit, coupled to Connect to the memory; a decompression module, including a first decoding circuit and a second decoding circuit; and a calculation circuit; wherein, the decompression module or the calculation circuit performs the following steps: reading from the storage device A first sub-block of the first block of compressed data; writing the first sub-block into a first storage space of the memory through the memory interface circuit; reading the compressed data from the storage device a second sub-block of the second block of data, the second sub-block being immediately adjacent to the first sub-block in the storage device; and writing the second sub-block through the memory interface circuit A second storage space of the memory, wherein the second storage space is not equal to the first storage space, the first sub-block is part of the first block, and the second sub-block is the second part of the block, the second sub-block is not immediately adjacent to the first sub-block in the memory, so that other sub-blocks of the first block are written to the first sub-block and the second sub-block. Between sub-blocks, all sub-blocks of the first block are continuously written into the memory from the first sub-block; wherein, the decompression module performs the following steps: The first decoding circuit reads the first sub-block from the first storage space and decodes the first sub-block; and the second decoding circuit reads the second sub-block from the second storage space, and decode the second sub-block. 如請求項17之電子裝置,其中,該儲存裝置更儲存該壓縮資料之一資訊檔,該解壓縮模組或該計算電路係根據該資訊檔取得該第一子區塊及該第二子區塊在該儲存裝置中的地址;該解壓縮模組係根據該資訊檔取得該第一子區塊的大小,並且該解壓縮模組或該計算電路係根據該第一子區塊的地址及大小決定該第二子區塊的地址。 If the electronic device of claim 17 is used, the storage device further stores an information file of the compressed data, and the decompression module or the computing circuit obtains the first sub-block and the second sub-area based on the information file. The address of the block in the storage device; the decompression module obtains the size of the first sub-block based on the information file, and the decompression module or the calculation circuit obtains the size of the first sub-block based on the address of the first sub-block and The size determines the address of this second sub-block. 如請求項18之電子裝置,其中,該解壓縮模組更執行以下步驟:從該儲存裝置讀取該壓縮資料之一第三子區塊,該第三子區塊係該第一區塊的一部分,且在該儲存裝置中該第三子區塊不緊鄰該第一子區塊;以及透過該記憶體介面電路將該第三子區塊寫入該記憶體之該第一儲存空間。 The electronic device of claim 18, wherein the decompression module further performs the following steps: reading a third sub-block of the compressed data from the storage device, the third sub-block being a portion of the first block a portion, and the third sub-block is not immediately adjacent to the first sub-block in the storage device; and writing the third sub-block into the first storage space of the memory through the memory interface circuit.
TW111139317A 2022-10-17 2022-10-17 Electronic device and operation method thereof TWI829394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111139317A TWI829394B (en) 2022-10-17 2022-10-17 Electronic device and operation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111139317A TWI829394B (en) 2022-10-17 2022-10-17 Electronic device and operation method thereof

Publications (2)

Publication Number Publication Date
TWI829394B true TWI829394B (en) 2024-01-11
TW202418069A TW202418069A (en) 2024-05-01

Family

ID=90459146

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111139317A TWI829394B (en) 2022-10-17 2022-10-17 Electronic device and operation method thereof

Country Status (1)

Country Link
TW (1) TWI829394B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201432456A (en) * 2012-12-28 2014-08-16 Apple Inc Methods and apparatus for compressed and compacted virtual memory
US20150019834A1 (en) * 2013-07-11 2015-01-15 Advanced Micro Devices, Inc. Memory hierarchy using page-based compression
US20180196621A1 (en) * 2017-01-10 2018-07-12 SK Hynix Inc. Memory module, memory system and operating method of memory system
TW201928686A (en) * 2017-12-20 2019-07-16 韓商愛思開海力士有限公司 Memory system and operating method thereof
CN110324632A (en) * 2019-05-29 2019-10-11 西安空间无线电技术研究所 A kind of data processing and verification method based on OpenMP multi-core parallel concurrent mechanism

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201432456A (en) * 2012-12-28 2014-08-16 Apple Inc Methods and apparatus for compressed and compacted virtual memory
US20150019834A1 (en) * 2013-07-11 2015-01-15 Advanced Micro Devices, Inc. Memory hierarchy using page-based compression
US20180196621A1 (en) * 2017-01-10 2018-07-12 SK Hynix Inc. Memory module, memory system and operating method of memory system
TW201928686A (en) * 2017-12-20 2019-07-16 韓商愛思開海力士有限公司 Memory system and operating method thereof
CN110324632A (en) * 2019-05-29 2019-10-11 西安空间无线电技术研究所 A kind of data processing and verification method based on OpenMP multi-core parallel concurrent mechanism

Similar Documents

Publication Publication Date Title
TWI773890B (en) Data storage device and parity code processing method thereof
EP3518100B1 (en) Quick loading method for kernel image file, and apparatus
US7661102B2 (en) Method for reducing binary image update package sizes
US9917596B2 (en) Technologies for efficient LZ77-based data decompression
KR20120055352A (en) Apparatus and method for booting based on a snapshot image
JPWO2009022531A1 (en) Data compression / decompression method
CN114398318B (en) File operation method of user space file system and user space file system
TW201706829A (en) Central processing unit with DSP engine and enhanced context switch capabilities
US10185573B2 (en) Caching based operating system installation
US20140006536A1 (en) Techniques to accelerate lossless compression
EP3646467A1 (en) Gpu parallel huffman decoding
TWI829394B (en) Electronic device and operation method thereof
CN106293542B (en) Method and device for decompressing file
CN111552517A (en) Application program starting method and device, electronic equipment and computer storage medium
US10970206B2 (en) Flash data compression decompression method and apparatus
CN111857882B (en) Extensible SSD card opening firmware loading method and device, computer equipment and storage medium
TW202418069A (en) Electronic device and operation method thereof
US20240118834A1 (en) Electronic device and operation method thereof
US6990575B2 (en) Apparatus and process for a starting a data processing installation
US11397684B2 (en) Command interface and pre-fetch architecture
CN114328024A (en) PCIe function level reset implementation method and device, computer equipment and storage medium
CN112732649A (en) OFD document signing method, electronic device and medium
US11269532B2 (en) Data reduction by replacement of repeating pattern with single instance
US20230305739A1 (en) Partial memory updates using preset templates
CN111596861B (en) Data storage method and device and data recovery method and device