Data read-write system and read-write method thereof
By using a twisted block deinterleaving unit in the data read and write system, the data blocks arranged in the two-dimensional matrix in the ATSC 3.0 standard are read and stored in the oblique direction and distributed until the buffer capacity is full, the transmission bandwidth is solved. The problem of waste achieves efficient data transmission.
Patent Information
- Application Number
- CN202310846474.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2025-01-14
AI Technical Summary
In the ATSC 3.0 digital TV standard, only part of the data blocks are written at a time during the transmission process, resulting in wasted transmission bandwidth, and the prior art cannot effectively solve this problem.
Provides a data reading and writing system, including a receiving end, a buffer and a write module, through a twisted block deinterleaving unit, the data blocks arranged in a two-dimensional matrix are read in the oblique direction and stored in the buffer block until the buffer is buffered. After the block capacity reaches the upper limit, it outputs it to memory at one time, reducing the waste of transmission bandwidth.
It effectively utilizes the transmission bandwidth of memory, reduces the usage of transmission bandwidth, saves 87.5% of bandwidth, and improves the efficiency of data reading.
Smart Images

Figure CN119311198A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a memory reading related technology, and in particular to a data reading and writing system and a reading and writing method thereof. Background Art
[0002] ATSC 3.0 (Advanced Television Systems Committee) is a standard for transmitting audio and video information for digital television. The data has multiple data blocks arranged in a two-dimensional matrix. The data is read by reading the data blocks in the data along an oblique direction to obtain a block string, and then the block string is written into the memory.
[0003] However, in the process of writing the block string into the memory, only a small part of the data block in the block string will be written at a time, but the entire block string needs to be transmitted at once during the transmission process, which causes a waste of transmission bandwidth. Summary of the invention
[0004] In view of the above, a data reading and writing system is provided. In one embodiment, the data reading and writing system includes a receiving end, a buffer, a memory and a writing module. The receiving end is used to receive a data, and the data includes a plurality of data blocks, each data block is arranged in a two-dimensional matrix. The buffer includes a plurality of buffer blocks. The writing module is connected to the receiving end, the buffer, and the memory, and the writing module includes a twisted block deinterleaving unit, a storage unit and an output unit. The twisted block deinterleaving unit reads each data block to obtain a plurality of first block strings. The storage unit stores the data blocks in each first block string in each buffer block in a dispersed manner. The output unit is used to output each data block in each buffer block to the memory for storage when the occupied capacity of each buffer block reaches an upper limit of a buffer capacity.
[0005] In one embodiment, the twisted block de-interleaving unit reads each data block along a diagonal direction.
[0006] In one embodiment, the twisted block deinterleaving unit reads each data block in two time sequences to obtain each first block string and a plurality of second block strings. The storage unit stores the data blocks in the second block string in corresponding buffer blocks.
[0007] In one embodiment, the number of buffer blocks is the sum of the number of data blocks in the first block string and the number of data blocks in the second block string.
[0008] In one embodiment, the number of rows of the two-dimensional matrix is m, the number of columns is n, the number of data blocks of the first block string is n, and when the twisted block deinterleaving unit reads each data block to the x-th column, m-x+1=y and y<n, the twisted block deinterleaving unit then reads each data block from the y+1-th row of the 1st column along a diagonal direction; wherein m and n are positive integers, and m≧n, 0<x<m, 0<y<n.
[0009] In one embodiment, the number of buffer blocks corresponds to the number of data blocks in the first block string.
[0010] A data reading and writing method is also provided, comprising reading a plurality of data blocks in a data to obtain a plurality of first block strings, each data block being arranged in a two-dimensional matrix. The data blocks in each first block string are dispersedly stored in a plurality of corresponding buffer blocks in a buffer zone. When the occupied capacity in each buffer block reaches an upper limit of a buffer capacity, each data block in each buffer block is output to a memory for storage.
[0011] The detailed features and advantages of the present application are described in detail in the implementation mode below, and the content is sufficient to enable any person familiar with the relevant skills to understand the technical content of the present application and implement it accordingly. Moreover, according to the content disclosed in this specification, the scope of the patent application and the drawings, any person familiar with the relevant skills can easily understand the relevant purposes and advantages of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram of the structure of an electronic component in one embodiment is shown. Figure 2 A flow chart of a reading and writing method in one embodiment is shown. Figure 3 A schematic diagram showing how a data block is read and stored in a buffer block in one embodiment is shown. Figure 4 A schematic diagram showing how a data block is read and stored in a buffer block in one embodiment is shown. Figure 5 A schematic diagram illustrating reading data in two time sequences and storing the read data blocks in a buffer block in one embodiment is shown. DETAILED DESCRIPTION
[0013] See also Figure 1 As shown, the present application is a data reading and writing system, comprising a receiving end 10, a buffer 20, a memory 30, and a writing module 40. The receiving end 10 is used to receive a data 50, the data 50 includes a plurality of data blocks 52, and the plurality of data blocks 52 are arranged in a two-dimensional matrix (such as Figure 3). In some embodiments, the data 50 is stored in a data source 60, and the receiving end 10 is connected to the data source 60 by a transmission line or a printed circuit to receive the data 50 stored in the data source 60. In some examples, the memory 30 is a double data rate synchronous dynamic random-access memory (DDR SDRAM). In some embodiments, the data source 60 is a hard disk. In some embodiments, a plurality of data blocks 52 are arranged in a two-dimensional matrix to form a data forward error correction block (Data FEC Blocks, where FEC is the abbreviation of forward error correction).
[0014] See also Figure 1 and Figure 3 As shown, the buffer 20 includes a plurality of buffer blocks 22A-D, each buffer block 22A-D is used to store data blocks 52, and each buffer block 22A-D can store the same number of data blocks 52. In some embodiments, the number of data blocks 52 that can be stored in the buffer blocks 22A-D is four. Figure 3 As shown, the buffer blocks 22A-D are arranged in order from top to bottom.
[0015] See also Figure 1 , Figure 2 and Figure 3As shown, the writing module 40 is connected to the receiving end 10, the buffer 20 and the memory 30. The writing module 40 includes a twisted block deinterleaving unit 42, a storage unit 44 and an output unit 46. The twisted block deinterleaving unit 42 reads each data block 52 to obtain a plurality of first block strings 70 (step S01). In some embodiments, the two-dimensional matrix is an m*n matrix, that is, the number of columns of the two-dimensional matrix is m and the number of rows is n. The number of data blocks 72 in the first block string 70 is the same as the number of rows of the two-dimensional matrix, which is n. The storage unit 44 stores the data blocks 72 in the first block string 70 in each buffer block 22A~D in a dispersed manner (step S02). In some embodiments, the storage unit 44 stores the data blocks 72 in the first block string 70 in order from the head end to the tail end in each buffer block 22A-D. For example, the data blocks 72 in the first block string 70 are (1,1), (2,2), (3,3), and (4,4), respectively, and (1,1) is the head end and (4,4) is the tail end. When the occupied capacity of each buffer block 22A-D reaches an upper limit of the buffer capacity (that is, the number of data blocks 222 stored in each buffer block 22A-D is equal to the upper limit of the buffer capacity), the output unit 46 outputs each data block 222 in each buffer block 22A-D to the memory 30 for storage (step S03). That is, the data blocks 222 of the same FEC are first stored in the buffer 20, and when the buffer capacity reaches the upper limit, the data blocks 222 in the buffer 20 are written into the memory 30. Here, for ease of understanding, the upper limit of the buffer capacity is illustrated as four, but the present application is not limited thereto. In some embodiments, since the bandwidth of the memory 30 for reading and writing at one time is 256 bits, and the size of a data block 52 is 32 bits, the size of the buffer 20 is a multiple of 8 (256 / 32). In some embodiments, the maximum number of rows of the two-dimensional matrix is 258, so the size of the buffer capacity is 258*256 bits.
[0016] In the process of transferring the data 50 in the data source 60 to the memory 30, the application first reads the data block 52 in the data 50, and stores the data block 52 in each buffer block 22A-D in the buffer 20. When the occupied capacity of the buffer block 22A-D reaches the upper limit of the buffer capacity, the data block 222 in each buffer block 22A-D is transferred to the memory 30 for storage at one time, so as to effectively utilize the transmission bandwidth of the memory 30 and make the reading of the data 50 more efficient. For example, a data block 52 is 32 bits, the number of rows and columns of the two-dimensional matrix of the data 50 is 100, and the number of columns is 8100, and the unit of reading and writing of the memory 30 at one time is 256 bits. In the past, when writing the data 50 to the memory 30, each data block 52 needs to be read and written once, so when writing the data 50 to the memory 30, 810,000 reads and writes (8100*100) are required. At this time, the memory 30 performs a total of 16*1024*256 bits of information operations (unnecessary deletion), but the amount of information actually written into the memory 30 is only 16*1024*32 bits. In this embodiment, before writing the data 50 into the memory 30, the data 50 is first stored in the buffer 20, and is written into the memory 30 when the buffer capacity is full. Therefore, the memory 30 performs a total of about 16*1024*32 information operations, which is the same as the amount of information actually written into the memory 30. Therefore, compared with the previous practice, the present embodiment only needs to use 12.5% of the bandwidth ((16*1024*32) / (16*1024*256)), thus saving 87.5% of the bandwidth.
[0017] See also Figure 3 and Figure 4As shown, taking m=1024 and n=4 as an example, first, in one embodiment, the twisted block deinterleaving unit 42 reads each data block 52 in the data 50 along an oblique direction (i.e., the embodiment of step S01). In some embodiments, the oblique direction is the direction of the upper left and lower right. In addition, from left to right in the two-dimensional matrix, it is the 1st row, the 2nd row, the 3rd row..., and from top to bottom, it is the 1st column, the 2nd column, the 3rd column... The twisted block deinterleaving unit 42 reads from the first column to the first row to obtain a plurality of first block strings 70. Since the number of data blocks 72 in the first block string 70 is n, the first block string 70 includes four data blocks 72, namely (1,1), (2,2), (3,3), and (4,4). The storage unit 44 then stores these data blocks 72 (i.e., (1,1), (2,2), (3,3), and (4,4)) in corresponding buffer blocks 22A-D, i.e., the data block 222 stored in the buffer block 22A is (1,1), the data block 222 stored in the buffer block 22B is (2,2), the data block 222 stored in the buffer block 22C is (3,3), and the data block 222 stored in the buffer block 22D is (4,4). Next, the twisted block deinterleaving unit 42 reads data from the first row and the second column to obtain a first block string 70A. The data blocks 72A in the first block string 70A are (2, 1), (3, 2), (4, 3), and (5, 4), respectively. The storage unit 44 then stores these data blocks 82 (i.e., (2, 1), (3, 2), (4, 3), and (5, 4)) in the corresponding buffer blocks 22A-D, respectively. That is, the data block 222 stored in the buffer block 22A is (2, 1), the data block 222 stored in the buffer block 22B is (3, 2), the data block 222 stored in the buffer block 22C is (4, 3), and the data block 222 stored in the buffer block 22D is (5, 4). The storage method of the rest of the first block string 70 is as described above and will not be repeated.
[0018] The twisted block deinterleaving unit 42 repeatedly reads the data 50 to obtain a plurality of first block strings 70, and then the storage unit 44 stores the data blocks 72 in the first block strings 70 in the buffer blocks 22A-D respectively until the occupied capacity of the buffer blocks 22A-D reaches the upper limit of the buffer capacity, that is, each buffer block 22A-D has four data blocks 72 respectively, such as the data blocks 52 in the buffer block 22A are (1,1), (2,1), (3,1), (4,1) respectively. Next, the output unit 46 transmits the data blocks 222 in all the buffer blocks 22A-D to the memory 30 for storage.
[0019] In one embodiment, the number of the buffer blocks 22 is the same as the number of the data blocks 72 in the first block string 70 .
[0020] See also Figure 4As shown, in some embodiments, when the twisted block deinterleaving unit 42 reads down to the x-th column, m-x+1=y and y<n, the twisted block deinterleaving unit 42 reads the data blocks 52 from the y+1-th row of the 1st column along the oblique direction; wherein m and n are positive integers, and m≧n, 0<x<m, 0<y<n. Figure 4 For example, when the twisted block deinterleaving unit 42 reads to the 1022th row, since 1024-1022+1=3<4, it means that the twisted block deinterleaving unit 42 has only read three data blocks 52 (i.e. (1022,1), (1023,2), (1024,3)) and less than four data blocks 52. At this time, the twisted block deinterleaving unit 42 reads the data block 52 (i.e. (1,4)) from the 4th row of the 1st column (i.e. 3+1=4). At this time, the data blocks 72 in the first block string 70 obtained by the twisted block deinterleaving unit 42 are (1022,1), (1023,2), (1024,3), (1,4) respectively. Similarly, when the twisted block deinterleaving unit 42 reads to the 1023rd column, the data blocks 72 in the first block string 70 obtained are (1023, 1), (1024, 2), (1, 3), and (2, 4) respectively; when the twisted block deinterleaving unit 42 reads to the 1024th column, the data blocks 72 in the first block string 70 obtained are (1024, 1), (1, 2), (2, 3), and (3, 4) respectively.
[0021] In some embodiments, when the twisted block deinterleaving unit 42 finishes reading the data 50 , even if the occupied capacity of the buffer blocks 22A-D has not reached the upper limit of the buffer capacity, the output unit 46 still transmits the data blocks 222 in all the buffer blocks 22A-D to the memory 30 for storage.
[0022] See also Figure 5 As shown, in one embodiment, the twisted block deinterleaving unit 42 reads each data block 52 in the data 50 in two time sequences to obtain a first block string 70 and a second block string 80. Figure 5As shown, the twisted block deinterleaving unit 42 reads data from the first row and the first column in a first time sequence to obtain a first block string 70. The data blocks 72 in the first block string 70 include (1, 1), (2, 2), (3, 3), and (4, 4). The twisted block deinterleaving unit 42 reads data from the first row and the second column in a second time sequence. The data blocks in the obtained second block string 80 include (2, 1), (3, 2), (4, 3), and (5, 4). Then the storage unit 44 stores each data block 72 in the first block string 70 in the buffer blocks 22A to 22D in sequence from the head end to the tail end. That is, the data block 222 stored in the buffer block 22A is (1, 1), the data block 222 stored in the buffer block 22B is (2, 2), the data block 222 stored in the buffer block 22C is (3, 3), and the data block 222 stored in the buffer block 22D is (4, 4). Next, the storage unit 44 stores the data blocks 82 in the second block string 80 in order from the head end to the tail end in the buffer blocks 22E-22H. That is, the data block 222 stored in the buffer block 22E is (2, 1), the data block 222 stored in the buffer block 22F is (3, 2), the data block 222 stored in the buffer block 22G is (4, 3), and the data block 222 stored in the buffer block 22H is (5, 4).
[0023] Then, the twisted block deinterleaving unit 42 jumps to the 3rd column and the 1st row in the first time sequence to start reading the data 50, and the obtained data blocks 52 in the first block string 70 include (3, 1), (4, 2), (5, 3), and (6, 4). Next, the twisted block deinterleaving unit 42 jumps to the 1st row and the 4th column in the second time sequence to start reading the data 50, and the obtained data blocks 52 in the second block string 80A include (4, 1), (5, 2), (6, 3), and (7, 4). Next, the storage unit 44 stores each data block 72A in the first block string 70A and each data block 82A in the second block string 80A in each buffer block 22A-H in the same manner as described above and will not be repeated. In addition, when the time sequence is three, the twisted block deinterleaving unit 42 will read the data 50 from the first row and the first column in the first time sequence, read the data 50 from the first row and the second column in the second time sequence, and read the data 50 from the first row and the third column in the third time sequence. When the time sequence is four or more, the same is true and no further description is given. In this embodiment, after reading each data block 52 in the data 50 in two time sequences, the data is first stored in the buffer 20, and is written to the memory 30 when the buffer capacity reaches the upper limit. Therefore, compared with one time sequence, 50% of bandwidth can be saved.
[0024] In addition, in one embodiment, when the twisted block de-interleaving unit 42 reads the data 50 in binary time sequence, the maximum number of rows of the two-dimensional matrix is 483, so the size of the buffer capacity is 483*256 bits.
[0025] In addition, in one embodiment, the twisted block deinterleaving unit 42 reads each data block 52 in the data 50 in two time series to obtain the first block string 70 and the second block string 80, and the number of buffer blocks 22 in the buffer 20 is the sum of the number of data blocks 72 in the first block string 70 and the number of data blocks 82 in the second block string 80.
[0026] According to the data reading and writing system of an embodiment of the present invention, in the process of writing data 50 into the memory 30, the data block 52 is first stored in the buffer 20, and after the data block 222 in the buffer 20 reaches the buffer capacity limit, the data block 222 in the buffer 20 is written to the memory 30, thereby saving bandwidth usage. In some embodiments, the above-mentioned operation is repeated in two time sequences to write the data 50 into the memory 30, which can further save half of the bandwidth.
Explanation of symbols
[0027] 10: Receiver 20: Buffer 22: Buffer block 22A~22H: Buffer block 222: Data block 30: Memory 40: Write module 42: Twisted Block Deinterleaving Unit 44: Storage unit 46: Output unit 50: Data 52: Data block 60: Data Source 70: First block string 70A: First block string 72: Data block 72A: Data block 80: Second block string 80A: Second block string 82: Data block 82A: Data block S01~S03: Steps
Claims
1. A data reading and writing system, characterized in that: include: A receiving end, for receiving data, the data comprising a plurality of data blocks, the plurality of data blocks being arranged in a two-dimensional matrix; a buffer zone, the buffer zone comprising a plurality of buffer blocks; 1. Memory; and a writing module connected to the receiving end, the buffer, and the memory, the writing module comprising a twisted block deinterleaving unit, a storage unit, and an output unit, the twisted block deinterleaving unit reading the plurality of data blocks to obtain a plurality of first block strings; The storage unit stores a data block in the plurality of first block strings in the plurality of buffer blocks in a dispersed manner; the output unit is used to output the plurality of data blocks in the plurality of buffer blocks to the memory storage when the occupied capacity of the plurality of buffer blocks reaches an upper limit of a buffer capacity.
2. The data reading and writing system according to claim 1, characterized in that: The twisted block de-interleaving unit reads the plurality of data blocks along a diagonal direction.
3. The data reading and writing system according to claim 2, characterized in that: The twisted block deinterleaving unit reads the plurality of data blocks in two time sequences to obtain the plurality of first block strings and the plurality of second block strings; the storage unit stores the data blocks in the second block strings in the corresponding buffer blocks.
4. The data reading and writing system as claimed in claim 3, characterized in that: The number of the buffer blocks is the sum of the number of the data blocks in the first block string and the number of the data blocks in the second block string.
5. The data reading and writing system according to claim 2, characterized in that: The two-dimensional matrix has m rows and n columns, and the number of data blocks in the first block string is n. When the twisted block deinterleaving unit reads the multiple data blocks to the x-th column, m-x+1=y and y<n, the twisted block deinterleaving unit then reads the multiple data blocks from the y+1-th row of the 1st column along the oblique direction; wherein m and n are positive integers, and m≧n, 0<x<m, 0<y<n.
6. The data reading and writing system according to claim 1, characterized in that: The number of the buffer blocks corresponds to the number of the data blocks in the first block string.
7. A data reading and writing method, characterized in that: include: Reading a plurality of data blocks in a data to obtain a plurality of first block strings, wherein the plurality of data blocks are arranged in a two-dimensional matrix; Distribute and store a data block in the plurality of first block strings in a plurality of corresponding buffer blocks in a buffer zone; and When the occupied capacity in the plurality of buffer blocks reaches an upper limit of a buffer capacity, the plurality of data blocks in the plurality of buffer blocks are output to a memory for storage.
8. The data reading and writing method according to claim 7, characterized in that: The plurality of data blocks are read along an oblique direction.
9. The data reading and writing method according to claim 8, characterized in that: The plurality of data blocks are read in two time series respectively to obtain the plurality of first block strings and the plurality of second block strings, and the data blocks in the second block strings are respectively stored in the corresponding buffer blocks.
10. The data reading and writing method according to claim 9, characterized in that: The number of the buffer blocks is the sum of the number of the data blocks in the first block string and the number of the data blocks in the second block string.