Storage device management method and first-in first-out storage device
By performing data scanning operations in the FIFO storage device and identifying and outputting multiple categories of data units, the problem of insufficient data classification management in traditional FIFO storage devices is solved, and the flexibility of use of the storage device and the operating efficiency of the computer system are improved.
Patent Information
- Application Number
- CN202410711465.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Traditional first-in, first-out (FIFO) storage devices lack data classification management functions and cannot meet the need for further classification management of cached data, resulting in insufficient flexibility in use.
By introducing data scanning operations into the FIFO storage device, multiple categories of data units are identified and output, data classification management is realized, and the usage flexibility of the storage device is improved.
It effectively improves the data classification management capability of the FIFO storage device, enhances its usage flexibility, can output multiple categories of data in parallel in a single operation cycle, and is suitable for a variety of computer systems.
Smart Images

Figure CN118312127B
Abstract
Description
Technical Field
[0001] The present disclosure relates to a storage device management technology, and more particularly to a storage device management method and a first-in-first-out storage device. Background Art
[0002] In computer systems, the use of First In First Out (FIFO) storage devices is quite common. For example, a common FIFO storage device is used to sequentially cache data that needs to be transmitted to a specific electronic circuit and can output the cached data in sequence. However, traditional FIFO storage devices do not have the function of classifying and managing cached data. Therefore, when it is necessary to further classify and manage cached data, traditional FIFO storage devices cannot meet user needs. Summary of the invention
[0003] The present disclosure provides a storage device management method and a FIFO storage device, which can improve the above-mentioned problems and increase the use flexibility of the FIFO storage device.
[0004] An embodiment of the present disclosure provides a storage device management method for a FIFO storage device, the storage device management method comprising: storing a plurality of first data units in a data storage queue in the FIFO storage device; after storing the plurality of first data units in the data storage queue, performing a data scanning operation on the data storage queue to identify a plurality of target data units from the plurality of first data units, wherein the plurality of target data units include a plurality of data units belonging to a plurality of categories; and in a first operation cycle, performing a data reading operation on the data storage queue and outputting the plurality of target data units from the FIFO storage device.
[0005] The embodiment of the present disclosure further provides a FIFO storage device, which includes a data storage queue and a control circuit. The control circuit is connected to the data storage queue. The control circuit is used to: store a plurality of first data units in the data storage queue; after storing the plurality of first data units in the data storage queue, perform a data scanning operation on the data storage queue to identify a plurality of target data units from the plurality of first data units, wherein the plurality of target data units include a plurality of data units belonging to a plurality of categories; and in a first operation cycle, perform a data reading operation on the data storage queue and output the plurality of target data units from the FIFO storage device.
[0006] Based on the above, after storing a plurality of first data units in a data storage queue in a FIFO storage device, a plurality of target data units can be identified from the plurality of first data units by performing a data scanning operation on the data storage queue, and the plurality of target data units include a plurality of data units belonging to a plurality of categories. Thereafter, in a first operation cycle, by performing a data reading operation on the data storage queue, the plurality of target data units can be output from the FIFO storage device. Thus, the present disclosure can effectively improve the flexibility of use of the FIFO storage device by improving the inherent defects of the traditional FIFO storage device in data classification management. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 is a schematic diagram of a FIFO storage device according to an embodiment of the present disclosure;
[0008] Figure 2 is a schematic diagram of a first-in first-out storage device according to an embodiment of the present disclosure;
[0009] Figure 3 is a schematic diagram of managing a data storage queue in a first-in-first-out storage device according to an embodiment of the present disclosure;
[0010] Figure 4 is a schematic diagram of managing a data storage queue in a first-in-first-out storage device according to an embodiment of the present disclosure;
[0011] Figure 5 is a schematic diagram of managing a data storage queue in a first-in-first-out storage device according to an embodiment of the present disclosure;
[0012] Figure 6 is a schematic diagram of managing a data storage queue in a first-in-first-out storage device according to an embodiment of the present disclosure;
[0013] Figure 7 is a schematic diagram showing outputting data from a FIFO storage device according to an embodiment of the present disclosure; and
[0014] Figure 8 is a flowchart of a storage device management method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0015] Reference will now be made in detail to exemplary embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0016] Figure 1is a schematic diagram of a first-in first-out (FIFO) storage device according to an embodiment of the present disclosure. Figure 1 , the FIFO storage device 10 can be used to cache data. In a general sense, the FIFO storage device 10 can use a FIFO mechanism to control the input and output of data.
[0017] In one embodiment, the FIFO storage device 10 can receive data DATA(IN) through one or more channels (also referred to as input channels). The FIFO storage device 10 can sequentially store the data DATA(IN) inside the FIFO storage device 10 according to the order in which the data DATA(IN) is received. It should be noted that the FIFO storage device 10 can receive multiple types of data in the data DATA(IN) through multiple input channels. For example, each input channel can be used to receive data belonging to a specific category, and multiple input channels can be used to receive data belonging to multiple categories (or different categories) in parallel. For example, these data belonging to different categories can be stored in the FIFO storage device 10 in sequence according to their receiving order.
[0018] In one embodiment, the FIFO storage device 10 can output data DATA(OUT) through one or more channels (also referred to as output channels). It should be noted that the FIFO storage device 10 can output multiple types of data in the data DATA(OUT) through multiple output channels. For example, each output channel can be used to output data belonging to a specific category, and multiple output channels can be used to output data belonging to multiple categories (or different categories) in parallel. For example, these data belonging to different categories can be output from the FIFO storage device 10 in sequence according to their receiving order.
[0019] In one embodiment, the category of a certain data can be classified according to at least one of the usage characteristics of the data, the source of the data, and the destination of the data. For example, in one embodiment, according to the usage characteristics of a certain data, such as read-only data, write-only data, or readable and writable data, the data can be classified and managed in the FIFO storage device 10. For example, in one embodiment, if data A is read-only data, data A can be classified as data belonging to category A. If data B is write-only data, data B can be classified as data belonging to category B. In addition, if data C is readable and writable data, data C can be classified as data belonging to category C.
[0020] In one embodiment, based on the fact that at least one of the source and the destination of a certain data is a specific electronic circuit or a specific storage area of a non-volatile storage device (such as a flash memory), the data can be classified and managed in the FIFO storage device 10. For example, in one embodiment, if data D is data sent by a first electronic circuit or read from a first storage area in a non-volatile storage device, the data D can be classified as data belonging to category D. Alternatively, if data E is data sent by a second electronic circuit or read from a second storage area in a non-volatile storage device, the data E can be classified as data belonging to category E. The first electronic circuit is different from the second electronic circuit. The first storage area is different from the second storage area. It should be noted that the classification method of data can also be adjusted according to practical needs, and the present disclosure is not limited thereto.
[0021] Figure 2 is a schematic diagram of a first-in first-out storage device according to an embodiment of the present disclosure. Figure 2 In one embodiment, the FIFO storage device 10 includes an input interface 21 , an output interface 22 , a data storage queue 23 and a control circuit 24 . The data storage queue 23 is connected to the input interface 21 , the output interface 22 and the control circuit 24 .
[0022] The input interface 21 is used to receive data (i.e., Figure 1 The data storage queue 23 is used to store the received data according to the order in which the data is received. The output interface 22 is used to output data (ie, output channels) 202 (1) to 202 (m) through a plurality of channels (ie, output channels) 202 (1) to 202 (m). Figure 1 The total number of input channels may be the same as or different from the total number of output channels, which is not limited by the present disclosure. In addition, the control circuit 24 may be used to control the operation of the FIFO storage device 10 in whole or in part. For example, the control circuit 24 may include a microprocessor, an embedded controller, or other types of controllers, which is not limited by the present disclosure.
[0023] In one embodiment, the control circuit 24 can be used to manage a data write operation for the data storage queue 23, a data read operation for the data storage queue 23, and a data scan operation for the data storage queue 23. The data write operation for the data storage queue 23 can be used to write (i.e., store) data belonging to multiple categories into the data storage queue 23 in sequence or in parallel. The data read operation for the data storage queue 23 can be used to read data belonging to multiple categories from the data storage queue 23 in sequence or in parallel. In addition, the data scan operation for the data storage queue 23 can be used to identify multiple data belonging to different categories to be read from the data storage queue 23.
[0024] In one embodiment, data is stored in the data storage queue 23 in the form of data units. The data storage queue 23 can be used to store multiple data units. For example, the data storage queue 23 may include multiple data slots. Each data unit can be stored in a data slot in the data storage queue 23. In addition, the data volume of a data unit can be set according to practical needs, and the present disclosure is not limited thereto.
[0025] In one embodiment, the control circuit 24 can perform at least one of a data write operation, a data read operation, and a data scan operation of the data storage queue 23 in one operation cycle. After the current operation cycle (or the previous operation cycle) ends, the control circuit 24 can perform at least one of the data write operation, the data read operation, and the data scan operation in the next operation cycle. In this way, the control circuit 24 can continuously control the FIFO storage device 10 to perform at least one of data input, storage, scanning, and output in a plurality of consecutive operation cycles.
[0026] In one embodiment, the control circuit 24 may store a plurality of data units (also referred to as first data units) into the data storage queue 23. After storing the plurality of first data units into the data storage queue 23, the control circuit 24 may perform a data scanning operation on the data storage queue 23 to identify a plurality of specific data units (also referred to as target data units) from the plurality of first data units. It should be noted that the plurality of target data units include a plurality of data units belonging to a plurality of categories (or different categories). Then, in a specific operation cycle (also referred to as a first operation cycle), the control circuit 24 may perform a data reading operation on the data storage queue 23 to read the plurality of target data units and output the plurality of target data units from the FIFO storage device 10.
[0027] In one embodiment, the control circuit 24 may store the plurality of first data units in the data storage queue 23 in one or more operation cycles. In one embodiment, after storing the plurality of first data units, the control circuit 24 may perform the above-mentioned data scanning operation and data reading operation in the same operation cycle (i.e., the first operation cycle). That is, in the same operation cycle (i.e., the first operation cycle), the control circuit 24 may complete the operation of identifying (or searching for) the plurality of target data units from the data storage queue 23, the operation of reading the plurality of target data units from the data storage queue 23, and the operation of outputting the plurality of target data units from the FIFO storage device 10.
[0028] In one embodiment, the control circuit 24 may receive data of various types via the multiple channels 201(1)-20(n) of the input interface 21 in a certain operation cycle. The control circuit 24 may store the data in the data storage queue 23. In one embodiment, the control circuit 24 may output data of various types via the multiple channels 202(1)-202(m) of the output interface 22 in a certain operation cycle. In one embodiment, in the same operation cycle, the control circuit 24 may control the data storage queue 23 to synchronously perform data reception, storage, scanning and output.
[0029] In one embodiment, the control circuit 24 may set a positioning indicator (also called a read positioning indicator) for the data storage queue 23. The read positioning indicator may be used to indicate the starting position for the next identification (or search) of the target data unit in the data storage queue 23.
[0030] In one embodiment, the control circuit 24 may determine a scan interval in the data storage queue 23 according to the read positioning indicator. Thereafter, in a first operation cycle, the control circuit 24 may search (i.e., identify) the plurality of target data units from the scan interval. In one embodiment, in the operation of determining the scan interval, the control circuit 24 may determine the starting position of the scan interval according to the read positioning indicator. In addition, the control circuit 24 may determine the ending position of the scan interval according to the width of the scan interval. In the first operation cycle, the control circuit 24 may perform a data scan operation for this scan interval (i.e., the storage space between the starting position and the ending position of the scan interval in the data storage queue 23) to attempt to search (i.e., identify) the plurality of target data units from this scan interval.
[0031] In one embodiment, after executing the data scanning operation, the control circuit 24 may update the read positioning indicator. For example, in the operation of updating the read positioning indicator, the control circuit 24 may move the read positioning indicator to the starting position of the next data scanning operation. Thereby, in the next operation cycle, the control circuit 24 may re-determine the scanning interval in the data storage queue 23 according to the read positioning indicator, and execute the data scanning operation for the scanning interval.
[0032] In one embodiment, the control circuit 24 may set another positioning indicator (also called a write positioning indicator) for the data storage queue 23. The write positioning indicator may be used to indicate the starting position of the next data writing to the data storage queue 23.
[0033] In one embodiment, in the first operation cycle, the control circuit 24 may synchronously perform a data write operation on the data storage queue 23 to store data units belonging to at least one of the multiple categories (also referred to as second data units) in the data storage queue 23. For example, based on the write positioning indicator, the control circuit 24 may determine a starting position for performing the data write operation in the first operation cycle and start storing the second data unit from the starting position.
[0034] In one embodiment, in response to the data writing operation, the control circuit 24 may update the write positioning indicator. For example, in the operation of updating the write positioning indicator, the control circuit 24 may move the write positioning indicator to the starting position of the next data writing operation. Thereby, in the subsequent operation cycle, the control circuit 24 may perform the data writing operation according to the write positioning indicator to store the data in the data storage queue 23.
[0035] In one embodiment, the control circuit 24 may further adjust the width of the scanning interval according to the distribution of the plurality of target data units in the data storage queue 23. For example, in one embodiment, if one or more executed data scanning operations reflect that the distribution of the plurality of target data units in the data storage queue 23 meets the first condition, the control circuit 24 may shorten the width of the scanning interval. Alternatively, in one embodiment, if one or more executed data scanning operations reflect that the distribution of the plurality of target data units in the data storage queue 23 meets the second condition, the control circuit 24 may increase the width of the scanning interval.
[0036] In one embodiment, if it is detected that in a single data scanning operation (i.e., a single operation cycle), there is a relatively high probability (e.g., the probability is higher than a first critical value) that the desired multiple target data units can be searched (i.e., identified) from the set scanning interval, it means that the distribution of the multiple target data units in the data storage queue 23 is quite even (e.g., data belonging to multiple categories are evenly and dispersedly stored in the data storage queue 23). In one embodiment, if it is detected that in a single data scanning operation, the probability of searching (i.e., identifying) the desired multiple target data units from the scanning interval is higher than a first critical value, the control circuit 24 can determine that the distribution of the multiple target data units in the data storage queue 23 meets the first condition. In response to the distribution of the multiple target data units in the data storage queue 23 meeting the first condition, the control circuit 24 can shorten the width of the scanning interval (e.g., shorten the scanning interval used next time). In this way, the operation efficiency of the data scanning operation can be improved and the system overhead for performing the data scanning operation can be saved by shortening the scanning interval without affecting the search (i.e., identification) of the multiple target data units as much as possible.
[0037] In one embodiment, if it is detected that in a single data scanning operation (i.e., a single operation cycle), there is a relatively low probability (e.g., the probability is lower than a second critical value) that the desired multiple target data units can be searched (i.e., identified) from the set scanning interval, it means that the distribution of the multiple target data units in the data storage queue 23 is relatively uneven (e.g., data belonging to multiple categories are stored in the data storage queue 23 in an uneven and dispersed manner). In one embodiment, if it is detected that in a single data scanning operation, the probability of searching (i.e., identifying) the desired multiple target data units from the scanning interval is lower than the second critical value, the control circuit 24 can determine that the distribution of the multiple target data units in the data storage queue 23 meets the second condition. In response to the distribution of the multiple target data units in the data storage queue 23 meeting the second condition, the control circuit 24 can increase the width of the scanning interval (e.g., increase the width of the scanning interval used next time). Thereby, by increasing the scanning interval, the probability of successfully searching for the desired multiple target data units in a subsequent single operation cycle can be increased.
[0038] In one embodiment, the data storage queue 23 includes a plurality of data storage spaces. For example, each data storage space may include one or more data slots. Each data storage space may be used to store a data unit, tag information corresponding to the data unit (also referred to as first tag information), and another tag information corresponding to the data unit (also referred to as second tag information). The first tag information may be used to reflect the validity (i.e., valid or invalid) of the corresponding data unit. In addition, the second tag information may reflect the category of the corresponding data unit.
[0039] In one embodiment, assuming that a certain data storage space (also referred to as a first data storage space) in the data storage queue 23 is used to store one of the plurality of target data units (also referred to as a first target data unit), the first data storage space can simultaneously store first tag information corresponding to the first target data unit and second tag information corresponding to the first target data unit. The first tag information corresponding to the first target data unit can reflect the validity of the first target data unit (i.e., whether the first target data unit is valid data or invalid data). The second tag information corresponding to the first target data unit can reflect the category of the first target data unit.
[0040] In one embodiment, in response to the data read operation, the control circuit 24 may update the first tag information corresponding to the first target data unit to change the validity of the first target data unit from valid to invalid. That is, assuming that before the data read operation is performed, the first tag information corresponding to the first target data unit reflects that the first target data unit is valid data. After performing the data read operation to read the first target data unit, the control circuit 24 may update the first tag information corresponding to the first target data unit. The updated first tag information corresponding to the first target data unit may reflect that the first target data unit is invalid data. In this way, the first target data unit can be prevented from being repeatedly read in subsequent operation cycles.
[0041] Figure 3 FIG. 1 is a schematic diagram of managing a data storage queue in a first-in first-out storage device according to an embodiment of the present disclosure. Figure 3 , assuming that before operation cycle N, data DATA(1) to DATA(6) have been sequentially stored in the data storage spaces 31(1) to 31(6) of the data storage queue 23. At the same time, the first tag information and the second tag information corresponding to the data DATA(1) to DATA(6) are also stored in the data storage spaces 31(1) to 31(6), respectively. For example, the first tag information corresponding to the data DATA(1) to DATA(6) reflects that the data DATA(1) to DATA(6) are all valid data. In addition, the second tag information corresponding to the data DATA(1) to DATA(6) reflects that the data DATA(1) to DATA(6) belong to "Class(1) (i.e., category 1)", "Class(1)", "Class(2) (i.e., category 2)", "Class(2)", "Class(3) (i.e., category 3)" and "Class(3)" data, respectively.
[0042] On the other hand, before entering the operation cycle N, the pointer PR (i.e., the read positioning pointer) can be set to point to the data storage space 31(1), and the pointer PW (i.e., the write positioning pointer) can be set to point to the data storage space 31(7). In the operation cycle N, the control circuit 24 can determine the scan interval SR according to the pointer PR. For example, according to the starting position and width of the pointer PR, the starting position of the scan interval SR can point to the data storage space 31(1), and the ending position of the scan interval SR can point to the data storage space 31(5). That is, in the operation cycle N, the set scan interval SR covers the data storage spaces 31(1) to 31(5).
[0043] In operation cycle N, according to the determined scan interval SR, the control circuit 24 can perform a data scan operation on the data storage queue 23 to search for target data units of multiple categories from the scan interval SR (i.e., the data storage spaces 31(1) to 31(5)). It should be noted that the target data unit of each category must be the oldest valid data (i.e., the earliest stored in the data storage queue 23) belonging to a specific category in the scan interval SR. For example, according to the scan interval SR, the control circuit 24 can identify the oldest valid data DATA(1), DATA(3), and DATA(5) (i.e., the target data units) belonging to "Class(1)", "Class(2)", and "Class(3)" respectively from the data storage spaces 31(1), 31(3), and 31(5).
[0044] It should be noted that, since the data storage space 31(2) does not store the oldest valid data belonging to "Class(1)" in the current scan interval SR, the control circuit 24 can ignore (i.e., not read) the data stored in the data storage space 31(2) in the operation cycle N. Similarly, since the data storage space 31(4) does not store the oldest valid data DATA(2) belonging to "Class(2)" in the current scan interval SR, the control circuit 24 can ignore (i.e., not read) the data DATA(4) stored in the data storage space 31(4) in the operation cycle N.
[0045] Next, in the same operation cycle N, after identifying the valid data DATA(1), DATA(3) and DATA(5) (i.e., the target data units) belonging to "Class(1)", "Class(2)" and "Class(3)" respectively, the control circuit 24 may perform a data read operation on the data storage queue 23 to read the data DATA(1), DATA(3) and DATA(5) from the data storage queue 23 and output the data DATA(1), DATA(3) and DATA(5) from the FIFO storage device 10.
[0046] On the other hand, in the operation cycle N, the control circuit 24 can synchronously perform a data write operation on the data storage queue 23. For example, in this data write operation, the control circuit 24 can sequentially store the data belonging to "class (1)" and the data belonging to "class (3)" into the data storage spaces 31 (7) and 31 (8) according to the indicator PW.
[0047] Figure 4 FIG. 1 is a schematic diagram of managing a data storage queue in a first-in first-out storage device according to an embodiment of the present disclosure. Figure 4 , continued by Figure 3In the embodiment, after leaving operation cycle N, operation cycle N+1 may be entered.
[0048] In response to the data scanning operation for operation cycle N, the control circuit 24 may update the pointer PR. For example, the control circuit 24 may move the pointer PR to point to the data storage space 31(2). According to the moved pointer PR, the control circuit 24 may reset the scanning interval SR for operation cycle N+1. For example, the reset scanning interval SR may cover the data storage spaces 31(2) to 31(6).
[0049] On the other hand, in response to the data write operation for the operation cycle N, the control circuit 24 may update the pointer PW. For example, the control circuit 24 may move the pointer PR to point to the next data storage space of the data storage space 31 (8).
[0050] In addition, in response to the data read operation for operation cycle N, the control circuit 24 may update the first tag information corresponding to the data DATA(1), DATA(3), and DATA(5). For example, the control circuit 24 may update the first tag information corresponding to the data DATA(1), DATA(3), and DATA(5) from "Valid" to "Invalid" to reflect that the data DATA(1), DATA(3), and DATA(5) currently stored in the data storage spaces 31(1), 31(3), and 31(5) are all invalid data. Thereafter, in operation cycle N+1, the invalid data DATA(1), DATA(3), and DATA(5) may be skipped.
[0051] In operation cycle N+1, according to the reset scan interval SR, the control circuit 24 can again perform a data scan operation on the data storage queue 23 to search for target data units of multiple categories from the scan interval SR (i.e., the data storage spaces 31(2) to 31(6)). For example, according to the reset scan interval SR, the control circuit 24 can identify the oldest valid data DATA(2), DATA(4), and DATA(6) (i.e., target data units) belonging to "Class(1)", "Class(2)", and "Class(3)" respectively from the data storage spaces 31(2), 31(4), and 31(6).
[0052] Next, in operation cycle N+1, after identifying valid data DATA(2), DATA(4) and DATA(6) (i.e., target data units) belonging to "Class(1)", "Class(2)" and "Class(3)" respectively, the control circuit 24 may perform a data read operation on the data storage queue 23 to read the data DATA(2), DATA(4) and DATA(6) from the data storage queue 23 and output the data DATA(2), DATA(4) and DATA(6) from the FIFO storage device 10.
[0053] Figure 5 FIG. 1 is a schematic diagram of managing a data storage queue in a first-in first-out storage device according to an embodiment of the present disclosure. Figure 5 , continued by Figure 4 In the embodiment, after leaving the operation cycle N+1, the operation cycle N+2 can be entered.
[0054] In response to the data scanning operation for operation cycle N+1, the control circuit 24 may update the pointer PR. For example, the control circuit 24 may move the pointer PR to point to the data storage space 31(3). According to the moved pointer PR, the control circuit 24 may reset the scanning interval SR for operation cycle N+2. For example, the reset scanning interval SR may cover the data storage spaces 31(3) to 31(6).
[0055] In addition, in response to the data read operation for operation cycle N+1, the control circuit 24 may update the first tag information corresponding to the data DATA(2), DATA(4), and DATA(6). For example, the control circuit 24 may update the first tag information corresponding to the data DATA(2), DATA(4), and DATA(6) from "Valid" to "Invalid" to reflect that the data DATA(2), DATA(4), and DATA(6) currently stored in the data storage spaces 31(2), 31(4), and 31(6) are all invalid data. Thereafter, in operation cycle N+2, the invalid data DATA(2), DATA(4), and DATA(6) may be skipped.
[0056] In operation cycle N+2, according to the reset scan interval SR, the control circuit 24 may again perform a data scan operation on the data storage queue 23 to try to search for multiple types of target data units from the scan interval SR (i.e., the data storage spaces 31(3)-31(6)). Figure 5 In the embodiment of FIG. 1 , the control circuit 24 does not identify any target data unit from the scan interval SR (ie, the data storage spaces 31 ( 3 ) to 31 ( 6 )). Figure 5In the embodiment of the present invention, in the operation cycle N+2, according to the search result or the recognition result of the data scanning operation, the control circuit 24 may not perform the data reading operation (or skip the data reading operation for the operation cycle N+2).
[0057] Figure 6 FIG. 1 is a schematic diagram of managing a data storage queue in a first-in first-out storage device according to an embodiment of the present disclosure. Figure 6 , continued by Figure 5 In the embodiment, after leaving the operation cycle N+2, the operation cycle N+3 can be entered.
[0058] In response to the data scanning operation for operation cycle N+2, the control circuit 24 may update the indicator PR. It should be noted that in response to the data scanning operation for operation cycle N+2 not detecting any valid data (or target data unit), the control circuit 24 may move the indicator PR to point to the next data storage space of the data storage space 31 (6). That is, in the subsequent data scanning operation for operation cycle N+3, the data storage space that has been confirmed to store invalid data in the previous data scanning operation can be skipped. In this way, in addition to ensuring the correct execution of the subsequent data scanning operation, the execution efficiency of the data scanning operation can also be improved by skipping at least part of the data storage space that does not need to be scanned repeatedly.
[0059] It should be noted that Figures 3 to 6 The above are merely examples of data scanning operations, data reading operations, data writing operations, setting and updating of read positioning indicators, setting and updating of write positioning indicators, and setting and updating of scanning intervals, and are not intended to limit the present disclosure. In one embodiment, the relevant operation details of the above various operations can be adjusted according to practical needs, such as adjusting the width of the scanning interval or adjusting the total number of target data units read in a single operation cycle, etc., and the present disclosure is not limited thereto.
[0060] Figure 7 FIG. 1 is a schematic diagram of outputting data from a FIFO storage device according to an embodiment of the present disclosure. Figure 7 In one embodiment, the control circuit 24 includes a controller 71 and a selector 72 . The controller 71 is connected to the selector 72 .
[0061] In one embodiment, the controller 71 may be used to perform a data scanning operation on the data storage queue 23 and obtain a scanning result corresponding to the data scanning operation. The controller 71 may instruct the selector 72 according to the scanning result to read the target data units belonging to different categories (e.g., "class (1)" to "class (m)") in the data storage queue 23 to the channels 202 (1) to 202 (m) in the output interface 22 respectively to output these target data units in parallel. For example, according to the instruction of the controller 71, the selector 72 may read the data units belonging to a certain category (also referred to as the first category) and the data units belonging to another category (also referred to as the second category) in the target data units to two independent channels (also referred to as the first channel and the second channel) in the channels 202 (1) to 202 (m) respectively. Then, the data units belonging to the first category and the data units belonging to the second category may be output in parallel from the FIFO storage device 10 through the first channel and the second channel.
[0062] In one embodiment, the number of selectors 72 may also be multiple. For example, the number of selectors 72 may be less than or equal to the total number of channels 202(1)~202(m) (i.e., m). In one embodiment, one selector 72 may be dedicated to reading data units belonging to a specific category from the data storage queue 23 and transmitting the read data units to the corresponding channel in the channels 202(1)~202(m) (for example, transmitting the target data units belonging to "class(1)" to the channel 202(1) or transmitting the target data units belonging to "class(m)" to the channel 202(m)). Different selectors 72 may be used to read data units belonging to multiple categories from the data storage queue 23 and transmit the read data units to the channels 202(1)~202(m) respectively.
[0063] Figure 8 FIG. 1 is a flowchart of a storage device management method according to an embodiment of the present disclosure. Figure 8 In step S801, a plurality of first data units are stored in a data storage queue in a first-in-first-out storage device. After the plurality of first data units are stored in the data storage queue, in step S802, a data scanning operation is performed on the data storage queue to identify a plurality of target data units from the plurality of first data units, wherein the plurality of target data units include a plurality of data units belonging to a plurality of categories. In step S803, in a first operation cycle, a data reading operation is performed on the data storage queue and the plurality of target data units are output from the first-in-first-out storage device.
[0064] In one embodiment, the step of performing the data scanning operation on the data storage queue to identify the multiple target data units from the multiple first data units includes: determining a scanning interval in the data storage queue based on a read positioning indicator; and searching for the multiple target data units from the scanning interval in the first operation cycle.
[0065] In one embodiment, the step of determining the scanning interval in the data storage queue includes: determining the starting position of the scanning interval according to the read positioning indicator; and determining the ending position of the scanning interval according to the width of the scanning interval.
[0066] In one embodiment, the storage device management method further includes: after executing the data scanning operation, updating the read positioning indicator to move the read positioning indicator to a starting position for the next execution of the data scanning operation.
[0067] In one embodiment, the storage device management method further includes: adjusting the width of the scanning interval according to the distribution status of the multiple target data units in the data storage queue.
[0068] In one embodiment, the data storage queue includes multiple data storage spaces, and a first data storage space among the multiple data storage spaces is used to store a first target data unit among the multiple target data units, first marking information corresponding to the first target data unit, and second marking information corresponding to the first target data unit, the first marking information reflects the validity of the first target data unit, and the second marking information reflects the category of the first target data unit.
[0069] In one embodiment, the storage device management method further comprises: in response to the data read operation, updating the first marking information to change the validity of the first target data unit from valid to invalid.
[0070] In one embodiment, in the first operation cycle, the plurality of target data units are output in parallel from the first-in-first-out storage device through a plurality of channels.
[0071] In one embodiment, outputting the multiple target data units from the first-in-first-out storage device includes: reading the data units belonging to the first category and the data units belonging to the second category among the multiple target data units to the first channel and the second channel among the multiple channels, respectively; and outputting the data units belonging to the first category and the data units belonging to the second category in parallel through the first channel and the second channel.
[0072] In one embodiment, the storage device management method further includes: in the first operation cycle, performing a data write operation on the data storage queue to store a second data unit belonging to at least one of the multiple categories into the data storage queue; and in response to the data write operation, updating a write positioning indicator to move the write positioning indicator to a starting position for the next execution of the data write operation.
[0073] However, Figure 8 The steps in the above are described in detail, so I will not repeat them here. It is worth noting that Figure 8 Each step in the above process can be implemented as multiple program codes or circuits, which is not limited by the present disclosure. Figure 8 The method can be used in conjunction with the above exemplary embodiments or can be used alone, and the present disclosure is not limited thereto.
[0074] In summary, the storage device management method and the first-in-first-out storage device proposed in the embodiments of the present disclosure can input multiple categories of data into the first-in-first-out storage device through one or more channels, and output multiple categories of data from the first-in-first-out storage device through one or more channels. In particular, the storage device management method and the first-in-first-out storage device proposed in the embodiments of the present disclosure can output data belonging to multiple categories in parallel through multiple channels in a single operation cycle. By improving the inherent defects of traditional first-in-first-out storage devices in data classification management, the storage device management method and the first-in-first-out storage device proposed in the embodiments of the present disclosure can effectively improve the flexibility of use of the first-in-first-out storage device. For example, the first-in-first-out storage device that supports data classification can be applied to various computer systems, thereby improving the operating efficiency of the computer system.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A storage device management method, characterized in that: For a first-in first-out storage device, the storage device management method comprises: storing a plurality of first data units in a data storage queue in the first-in first-out storage device; After storing the plurality of first data units in the data storage queue, performing a data scanning operation on the data storage queue to identify a plurality of target data units from the plurality of first data units, wherein the plurality of target data units include a plurality of data units belonging to a plurality of categories; and In a first operation cycle, performing a data read operation on the data storage queue to read the plurality of target data units and output the plurality of target data units from the first-in first-out storage device; In which, the data storage queue includes multiple data storage spaces, and the first data storage space among the multiple data storage spaces is used to store the first target data unit among the multiple target data units, the first marking information corresponding to the first target data unit and the second marking information corresponding to the first target data unit, the first marking information reflects the validity of the first target data unit, and the second marking information reflects the category of the first target data unit.
2. The storage device management method according to claim 1, wherein the step of performing the data scanning operation on the data storage queue to identify the plurality of target data units from the plurality of first data units comprises: determining a scanning interval in the data storage queue according to the read positioning indicator; as well as In the first operation cycle, the plurality of target data units are searched from the scanning interval.
3. The storage device management method according to claim 2, wherein the step of determining the scanning interval in the data storage queue comprises: Determining the starting position of the scanning interval according to the reading positioning index; as well as An end position of the scanning interval is determined according to the width of the scanning interval.
4. The storage device management method according to claim 2, further comprising: After the data scanning operation is performed, the read positioning indicator is updated to move the read positioning indicator to a starting position for the next data scanning operation.
5. The storage device management method according to claim 2, further comprising: The width of the scanning interval is adjusted according to the distribution status of the multiple target data units in the data storage queue.
6. The storage device management method according to claim 1, further comprising: In response to the data read operation, the first tag information is updated to change the validity of the first target data unit from valid to invalid. 7 . The storage device management method according to claim 1 , wherein in the first operation cycle, the plurality of target data units are output in parallel from the first-in-first-out storage device through a plurality of channels.
8. The storage device management method according to claim 7, wherein outputting the plurality of target data units from the first-in-first-out storage device comprises: Reading data units belonging to a first category and data units belonging to a second category among the plurality of target data units to a first channel and a second channel among the plurality of channels respectively; as well as The data units belonging to the first category and the data units belonging to the second category are output in parallel through the first channel and the second channel.
9. The storage device management method according to claim 1, further comprising: In the first operation cycle, performing a data write operation on the data storage queue to store a second data unit belonging to at least one of the multiple categories into the data storage queue; as well as In response to the data writing operation, the write positioning indicator is updated to move the write positioning indicator to a starting position for executing the data writing operation next time.
10. A first-in first-out storage device, characterized in that: include: Data storage queue; as well as A control circuit connected to the data storage queue, The control circuit is used to: storing a plurality of first data units into the data storage queue; After storing the plurality of first data units in the data storage queue, performing a data scanning operation on the data storage queue to identify a plurality of target data units from the plurality of first data units, wherein the plurality of target data units include a plurality of data units belonging to a plurality of categories; as well as In a first operation cycle, performing a data read operation on the data storage queue to read the plurality of target data units and output the plurality of target data units from the first-in first-out storage device; In which, the data storage queue includes multiple data storage spaces, and the first data storage space among the multiple data storage spaces is used to store the first target data unit among the multiple target data units, the first marking information corresponding to the first target data unit and the second marking information corresponding to the first target data unit, the first marking information reflects the validity of the first target data unit, and the second marking information reflects the category of the first target data unit.
11. The first-in first-out storage device according to claim 10, wherein the operation of performing the data scanning operation on the data storage queue to identify the plurality of target data units from the plurality of first data units comprises: determining a scanning interval in the data storage queue according to the read positioning indicator; as well as In the first operation cycle, the plurality of target data units are searched from the scanning interval.
12. The first-in first-out storage device according to claim 11, wherein the operation of determining the scanning interval in the data storage queue comprises: Determining the starting position of the scanning interval according to the reading positioning index; as well as An end position of the scanning interval is determined according to the width of the scanning interval.
13. The first-in first-out storage device according to claim 11, wherein the control circuit is further configured to: After the data scanning operation is performed, the read positioning indicator is updated to move the read positioning indicator to a starting position for the next data scanning operation.
14. The first-in first-out storage device according to claim 11, wherein the control circuit is further configured to: The width of the scanning interval is adjusted according to the distribution status of the multiple target data units in the data storage queue.
15. The first-in first-out storage device according to claim 10, wherein the control circuit is further configured to: In response to the data read operation, the first tag information is updated to change the validity of the first target data unit from valid to invalid.
16. The first-in-first-out storage device according to claim 10, wherein in the first operation cycle, the plurality of target data units are output in parallel from the first-in-first-out storage device through a plurality of channels.
17. The first-in first-out storage device according to claim 16, wherein the control circuit comprises: at least one selector connected to the data storage queue and the plurality of channels; In the operation of outputting the plurality of target data units from the first-in-first-out storage device, the at least one selector is used to: Reading data units belonging to a first category and data units belonging to a second category among the plurality of target data units to a first channel and a second channel among the plurality of channels respectively; as well as The data units belonging to the first category and the data units belonging to the second category are output in parallel through the first channel and the second channel.
18. The first-in first-out storage device according to claim 10, wherein the control circuit is further configured to: In the first operation cycle, performing a data write operation on the data storage queue to store a second data unit belonging to at least one of the multiple categories into the data storage queue; and In response to the data writing operation, the write positioning indicator is updated to move the write positioning indicator to a starting position for executing the data writing operation next time.
