Low-power FIFO (First In First Out) module

By adding mux selection registers and third adders to the FIFO controller, the output logic of the FIFO module is controlled, and the problem of invalid data output in traditional FIFO modules is solved, and the effect of reducing chip power consumption is achieved.

CN120179576AActive Publication Date: 2025-06-20WUXI XINSU TECH CO LTD

Patent Information

Application Number
CN202510655513.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-06-20
Estimated Expiration
2045-05-21

AI Technical Summary

Technical Problem

Traditional FIFO modules are prone to output invalid data during data transmission, resulting in invalid flips, thereby increasing the power consumption of the chip.

Method used

Adding mux selection register and third adder to the FIFO controller, by controlling the output of the multiplexer, ensure that data output is only performed when there is valid data in the storage unit or the last valid data is output, and the output of invalid data is avoided.

Benefits of technology

It effectively avoids the output of invalid data, prevents invalid flip, reduces the power consumption of the chip, and is suitable for applications with different data transmission bandwidths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179576A_ABST
    Figure CN120179576A_ABST
Patent Text Reader

Abstract

The invention discloses a low-power FIFO (First In First Out) module, which comprises an FIFO memory and an FIFO controller, the FIFO memory comprises a writing unit, a memory unit and a multiplexer, the FIFO controller comprises a writing pointer register, a reading pointer register, a first adder and a second adder, the FIFO controller further comprises a mux selection register and a third adder, the third adder enables a mux selection pointer signal output by the mux selection register to increase by 1 only when valid data is cached in the storage unit or new valid data is to be cached while the storage unit outputs the last valid data; and when the read signal is high, the multiplexer selects the data on the corresponding address from the storage unit according to the mux selection pointer signal and outputs the data. According to the invention, the problem of invalid flipping caused by invalid data output is solved, so that the power consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a FIFO module inside a chip, and particularly to a FIFO module with low power consumption characteristics. Background Art

[0002] A common FIFO module inside a chip involves a first-in-first-out (FIFO) data storage and buffering mechanism, which is often used to cache data. For example Figure 1 , a traditional FIFO module 50 includes a FIFO memory 10 and a FIFO controller 20 for controlling the FIFO memory 10. Input data data_in (binary data) is input and cached from one end of the FIFO memory 10, and then output as output data data_out from the other end under the control of the FIFO controller 20. As the name implies, the data that enters the FIFO first will be output first. When the FIFO memory 10 is not full and the write signal push is high, the FIFO controller 20 outputs a write pointer signal wr_ptr to the FIFO memory 10 to store the input data data_in into the FIFO memory 10. When the FIFO memory 10 is not empty and the read signal pop is high, the FIFO controller 20 outputs a read pointer signal rd_ptr to the FIFO memory 10, and reads out the corresponding output data data_out from the FIFO memory 10 according to the read pointer signal rd_ptr for output.

[0003] Furthermore, for example Figure 2 , Figure 2Taking a depth of 4 as an example, the structure of the FIFO memory 10 is shown. The FIFO memory 10 includes a write unit 11, a storage unit 12, and a multiplexer 13. The write unit 11 receives an input data data_in, a write signal push, and a write pointer signal wr_ptr. When the write signal push is high, the input data data_in is cached at the corresponding address in the storage unit 12 according to the write pointer signal wr_ptr output by the write pointer register 21. Then, the write pointer register 21 increments the write pointer signal wr_ptr by 1 through the first adder 22. Specifically, the write unit 11 includes a decoder 14 and 4 parallel AND gates 15. The AND gates 15 are used to perform an AND calculation on the received input data data_in, write signal push, and the write pointer decoding signal output by the decoder 14 for the write pointer signal, so that the input data data_in is output according to the write pointer decoding signal, that is, output through the corresponding AND gate 15 and cached at the corresponding address in the storage unit 12. When the read signal pop is high, the multiplexer 13 selects the data at the corresponding address from the storage unit 12 according to the read pointer signal rd_ptr output by the read pointer register 24, that is, outputs the output data data_out. Then, the read pointer register 24 increments the read pointer signal rd_ptr by 1 through the second adder 25. Thus, the function of first-in, first-out data is realized. Moreover, after the write pointer signal wr_ptr and the read pointer signal rd_ptr are updated, they will respectively generate a data full signal full and a data empty signal empty through the first comparator 26 and the second comparator 27. If the number of valid data cached in the storage unit 12 reaches 4, the data full signal full is pulled high. If the number of valid data is 0, the data empty signal empty is pulled high.

[0004] From the above control logic, it can be seen that when the last valid data in the storage unit 12 is output based on the high level of the read signal pop, the read pointer signal rd_ptr is incremented by 1. Since the valid data in the storage unit 12 is empty at this time, the output data data_out is the data pointed to by the current read pointer signal rd_ptr, and this data is not the data that is really to be output, but invalid data. That is, there is an invalid flip in the output data. As Figure 3 shown in the interface timing diagram, the data marked by the red circle is the invalid flip of the output data data_out under the action of each signal of push and pop. In actual operation, the invalid flip means a waste of chip power consumption.

[0005] Furthermore, two extreme scenarios may occur for the traditional FIFO module 50: In Scenario 1, data is continuously transmitted, that is, the data empty signal empty is always low, so there is no invalid data in the output data data_out and no invalid flips. In Scenario 2, only one data is transmitted each time, and after the transmission, the data empty signal empty is pulled high, so there will be one invalid data in the output data data_out, resulting in a total of twice as much invalid data, that is, twice as many invalid flips. It can be seen that the larger the data transmission bandwidth, the more data is continuously transmitted each time, and the closer it is to Scenario 1. Then, the invalid flip rate tends to 0%. On the contrary, the smaller the data transmission bandwidth, the fewer data is continuously transmitted each time, and the closer it is to Scenario 2. Then, the invalid flip rate tends to 100%. Here, the invalid flip rate is defined as the number of invalid flips divided by the number of valid flips. An invalid data output necessarily involves an invalid flip, and the flip during the output of valid data is called a valid flip.

[0006] As can be seen from the above, in applications with either large or small data transmission bandwidths (unless reaching the theoretical maximum bandwidth), there is a problem of invalid flips caused by the output of invalid data. Therefore, how to solve the problem of invalid data output is an urgent issue to be solved currently. Summary of the Invention

[0007] The object of the present invention is to provide a low-power FIFO module, which solves the problem of invalid flips caused by the output of invalid data, thereby reducing power consumption.

[0008] To achieve the above object, the present invention adopts the following technical solutions: A low-power FIFO module includes a FIFO memory and a FIFO controller. The FIFO memory includes a write unit, a storage unit, and a multiplexer. The FIFO controller includes a write pointer register, a read pointer register, a first adder, and a second adder. The first adder is used to increment the write pointer signal output by the write pointer register by 1 based on the original write pointer signal when the write signal is high. The second adder is used to increment the read pointer signal output by the read pointer register by 1 based on the original read pointer signal when the read signal is high. Particularly, the FIFO controller further includes a mux selection register and a third adder. The third adder is used to increment the mux selection pointer signal output by the mux selection register by 1 only when there is valid data cached in the storage unit or when a new valid data is about to be cached while the storage unit outputs the last valid data, so that the multiplexer selects the data at the corresponding address from the storage unit according to the mux selection pointer signal when the read signal is high.

[0009] The advantages of the present invention are: By adding a mux selection register and a third adder in the FIFO controller, the present invention no longer outputs invalid data, avoids generating invalid flips, eliminates the problem of chip power consumption waste caused by invalid flips, and is applicable to both application scenarios with large data transmission bandwidth and those with small data transmission bandwidth. Moreover, the present invention has less newly added control logic, does not affect the total chip area, and does not affect the chip performance. Description of the Drawings

[0010] Figure 1 is a block diagram of a traditional 4-depth FIFO module.

[0011] Figure 2 is a control logic block diagram of a traditional 4-depth FIFO module.

[0012] Figure 3 is an interface timing diagram of a traditional 4-depth FIFO module.

[0013] Figure 4 is a control logic block diagram of the low-power FIFO module of the present invention.

[0014] Figure 5 is an interface timing diagram of the low-power FIFO module of the present invention. Detailed Embodiment

[0015] Such as Figure 4As shown in the figure, the present invention proposes a low-power FIFO module 50', which is an improvement on the traditional FIFO module 50. Specifically, the low-power FIFO module 50' of the present invention includes a FIFO memory 10 and a FIFO controller 20' for controlling the FIFO memory 10. The FIFO memory 10 includes a write unit 11, a storage unit 12, and a multiplexer 13. The FIFO controller 20' includes a write pointer register 21, a read pointer register 24, a first adder 22, and a second adder 25. The first adder 22 is used to increment the write pointer signal wr_ptr output by the write pointer register 21 by 1 based on the original write pointer signal wr_ptr when the write signal push is high. The second adder 25 is used to increment the read pointer signal rd_ptr output by the read pointer register 24 by 1 based on the original read pointer signal rd_ptr when the read signal pop is high. Among them, the FIFO controller 20' further includes a mux selection register 30 and a third adder 40. The third adder 40 is used to receive the write signal push, the read signal pop, the write pointer signal wr_ptr output by the write pointer register 21, the read pointer signal rd_ptr output by the read pointer register 24, and the original mux selection pointer signal output by the mux selection register 30, so as to increment the mux selection pointer signal output by the mux selection register 30 only when there is valid data cached in the storage unit 12 or when a new valid data is about to be cached while the storage unit 12 outputs the last valid data, so that the multiplexer 13 selects the data at the corresponding address from the storage unit 12 according to the mux selection pointer signal when the read signal pop is high, that is, outputs the output data data_out, which effectively prevents the output of invalid data.

[0016] The mux selection register 30 designed by the present invention decouples the multiplexer 13 from the read pointer register 24. The multiplexer 13 no longer selects the data at the corresponding address from the storage unit 12 according to the read pointer signal rd_ptr output by the read pointer register 24, but selects the output data from the storage unit 12 according to the mux selection pointer signal output by the mux selection register 30.

[0017] In actual implementation, when any of the following conditions is satisfied, the third adder 40 sends an instruction to increment the mux selection register 30 by 1, so that the mux selection pointer signal output by the mux selection register 30 is incremented by 1: Condition 1: There is no valid data cached in the storage unit 12 (i.e., the storage unit 12 is empty), and the write signal push is high; Condition 2: The number of valid data cached in the storage unit 12 is 1, and the write signal push and the read signal pop are both high; Condition 3: The number of valid data cached in the storage unit 12 is greater than 1, and the read signal pop is high.

[0018] In the present invention, the actually cached data in the storage unit 12 of the FIFO memory 10 is the valid data. When there is no data cached in the storage unit 12 but an output operation is still performed, the output data is invalid data. A plurality of consecutive addresses are provided in the storage unit 12, and the input data input into the storage unit 12 is cached in the order of the addresses before and after, and the read operation is performed in accordance with the principle of first in first out of the data. The write pointer signal wr_ptr, the read pointer signal rd_ptr, and the increment of the mux selection pointer signal by 1 mean that the addresses they point to in the storage unit 12 move to the next address, which is a well-known technology in the art and will not be elaborated.

[0019] In the present invention, some contents in the module structure of the chip are represented in a simplified manner. For example, the slashes on the signal lines and the numbers thereon (such as Figure 2 , Figure 4 the 2 or n in) represent the number of signal lines, that is, the bit width for representing the binary data transmitted.

[0020] In the present invention, the write unit 11 is used to receive the input data data_in, the write signal push, and the write pointer signal wr_ptr, and cache the input data data_in to the corresponding address in the storage unit 12 according to the write pointer signal wr_ptr when the write signal push is high.

[0021] As Figure 4 , the write unit 11 includes a decoder 14 and a plurality of parallel AND gates 15. The AND gates 15 are used to perform an AND calculation on the received input data data_in, the write signal push, and the write pointer decoding signal output by the decoder 14 for the write pointer signal wr_ptr, so that the input data data_in is output through the corresponding AND gates 15 according to the write pointer decoding signal and cached to the corresponding address in the storage unit 12.

[0022] As Figure 4 , the FIFO controller 20' further includes a first comparator 26 and a second comparator 27. The first comparator 26 and the second comparator 27 are used to generate a data full signal full and a data empty signal empty respectively after the write pointer signal wr_ptr and the read pointer signal rd_ptr are updated, where: if the storage unit 12 is full of valid data, the data full signal full is high and the data empty signal empty is low. On the contrary, if there is no valid data in the storage unit 12, the data empty signal empty is high and the data full signal full is low.

[0023] In the present invention, the first adder 22, the second adder 25, the third adder 40, the first comparator 26 and the second comparator 27 are composed of well-known logic components such as AND gates and OR gates, which are well-known technologies and are not specifically limited here and will not be elaborated in detail.

[0024] This new control logic of the present invention well solves the problem of invalid flips that occurred in the above-mentioned scenario 2.

[0025] As Figure 4 , Figure 4 Taking 4-depth as an example, the composition of the FIFO module 50' is shown. Four parallel AND gates 15 receive the input data data_in (binary data), the write signal push, and the write pointer decoding signal (the write pointer signal wr_ptr outputs the write pointer decoding signal after passing through the decoder 14), and perform AND calculations. Thus, when the write signal push is high, according to the address pointed to by the write pointer decoding signal, the input data data_in is cached into the storage unit 12 through the AND gate 15 corresponding to the address pointed to by this write pointer decoding signal. At this time, the write pointer signal wr_ptr output by the write pointer register 21 is incremented by 1 on the basis of the original write pointer signal wr_ptr through the first adder 22 (when the write signal push is high).

[0026] When the read signal pop is high, the read pointer signal rd_ptr output by the read pointer register 24 is incremented by 1 on the basis of the original read pointer signal rd_ptr through the second adder 25. And at this time, the third adder 40 receives the write signal push, the read signal pop, the write pointer signal wr_ptr output by the write pointer register 21, the read pointer signal rd_ptr output by the read pointer register 24, and the original mux selection pointer signal output by the mux selection register 30, and makes a judgment on whether to increment by 1. That is, only when there is valid data cached in the storage unit 12 at this time or when the storage unit 12 outputs the last valid data but is about to cache a valid data, the third adder 40 sends an instruction to increment by 1 to the mux selection register 30, that is, to increment the mux selection pointer signal output by the mux selection register 30, so that the multiplexer 13 selects the data at the corresponding address (the next address) from the storage unit 12 according to the mux selection pointer signal and outputs it (when the read signal pop is high). And at this time, there must be valid data cached in the storage unit 12. Therefore, it avoids the situation of outputting invalid data and causing invalid flips like the traditional FIFO module 50, and solves the problem of waste of chip power consumption.

[0027] In addition, similar to the traditional FIFO module 50, after the write pointer signal wr_ptr and the read pointer signal rd_ptr are updated, they will respectively generate a data full signal full and a data empty signal empty through the first comparator 26 and the second comparator 27. If the number of valid data cached in the storage unit 12 reaches 4, the data full signal full is pulled high. If the number of valid data is 0, the data empty signal empty is pulled high.

[0028] As Figure 5 , Figure 5 shown in the interface timing diagram of the FIFO module 50' of the present invention after improving the traditional FIFO module 50. Compared with Figure 3 , Figure 5 the output data data_out in does not have invalid data anymore, eliminating the invalid flips and avoiding the waste of chip power consumption.

[0029] Generally speaking, the data bit width is much larger than the pointer bit width. For example, the bit width of the input data is 128, while the pointer bit width of the 4-depth FIFO memory 10 is 2. Therefore, it can be seen that the power consumption saved by the third adder 40 and the mux selection register 30 is much greater than the power consumption generated by the third adder 40 and the mux selection register 30 themselves. So, as long as the actual bandwidth of data transmission is less than the theoretical bandwidth and the data is not a constant value, the power consumption can be reduced by the present invention. Moreover, the smaller the bandwidth and the greater the change in the input data, the better the power consumption reduction effect. In special cases, that is, if the actual bandwidth is equal to the theoretical bandwidth, due to the large total power consumption of the module, the power consumption overhead caused by the third adder 40 and the mux selection register 30 added by the present invention is very small and can be ignored.

[0030] In summary, the present invention eliminates the waste of chip power consumption caused by invalid flips. In addition, the newly added devices of the present invention basically do not increase power consumption at high bandwidths and are suitable for application scenarios with large data transmission bandwidths. At low bandwidths, power consumption can be saved, so it is more suitable for application scenarios with small data transmission bandwidths. Moreover, the present invention has less newly added control logic, will not affect the total chip area, and will not affect the chip performance, and is suitable for popularization.

[0031] The above is the preferred embodiment of the present invention and the technical principles applied. For those skilled in the art, any obvious changes such as equivalent transformations and simple replacements based on the technical solution of the present invention without departing from the spirit and scope of the present invention shall fall within the protection scope of the present invention.

Claims

1. A low-power FIFO module, comprising a FIFO memory and a FIFO controller, wherein the FIFO memory comprises a write unit, a storage unit and a multiplexer, and the FIFO controller comprises a write pointer register, a read pointer register, a first adder and a second adder, wherein the first adder is used to increment the write pointer signal output by the write pointer register by 1 based on the original write pointer signal when the write signal is high, and the second adder is used to increment the read pointer signal output by the read pointer register by 1 based on the original read pointer signal when the read signal is high, wherein: The FIFO controller also includes a mux selection register and a third adder. The third adder is used to increment the mux selection pointer signal output by the mux selection register by 1 only when valid data is cached in the storage unit or when the storage unit outputs the last valid data and is about to cache new valid data, so that the multiplexer selects the data at the corresponding address from the storage unit according to the mux selection pointer signal when the read signal is high and outputs it.

2. The low-power FIFO module according to claim 1, characterized in that: When any of the following conditions is met, the third adder sends an increment instruction of 1 to the mux selection register, so that the mux selection pointer signal output by the mux selection register is incremented by 1: Condition 1: There is no valid data cached in the storage unit, and the write signal is high; Condition 2: The number of valid data cached in the storage unit is 1, and the write signal and the read signal are both high; Condition 3: The number of valid data cached in the storage unit is greater than 1, and the read signal is high.

3. The low-power FIFO module according to claim 2, characterized in that: The write unit is used to receive input data, a write signal and a write pointer signal, and cache the input data to a corresponding address in the storage unit according to the write pointer signal when the write signal is high.

4. The low-power FIFO module according to claim 3, characterized in that: The write unit includes a decoder and multiple parallel AND gates, and the AND gates are used to perform AND calculations on the received input data, write signal and write pointer signal via the write pointer decoding signal output by the decoder, so that the input data is cached to the corresponding address in the storage unit through the corresponding AND gate output according to the write pointer decoding signal.

5. The low-power FIFO module according to any one of claims 1 to 4, characterized in that: The FIFO controller also includes a first comparator and a second comparator, and the first comparator and the second comparator are used to generate a data full signal and a data empty signal respectively after the write pointer signal and the read pointer signal are updated, wherein: if the storage unit is full of valid data, the data full signal is high, on the contrary, if there is no valid data in the storage unit, the data empty signal is high.

Citation Information

Patent Citations

  • Processing system with interspersed processors with multi-layer interconnect

    CN104798062A

  • FIFO data transmission method and FIFO storage device

    CN111832240A

  • Device and method for managing storage space, computing equipment and chip

    CN115599556A

  • Pseudo-First In, First Out (FIFO) Tag Line Replacement

    US20200371958A1

  • Fast reprogrammable FIFO status flags system

    US6345008B1

Cited By

  • Instruction buffer and control method thereof, network processor and chip

    CN121722443A

  • An instruction buffer and a control method thereof, a network processor and a chip

    CN121722443B