This application claims benefit of priority to U.S. Provisional Application No. 62/380,530, filed on Aug. 29, 2016, which is hereby incorporated by reference in its entirety. To the extent that anything in the above application conflicts with material expressly set forth herein, the material expressly set forth herein controls.
Embodiments described herein are related to refresh timing for memory systems.
Certain types of memory devices require refresh to ensure that the data stored in the memory remains correctly stored there (i.e. without incurring unexpected change while stored). For example, dynamic random access memories (DRAMs) generally include a capacitor on which charge is deposited or removed to store a logical one or logical zero. Over time, the charge may have a tendency to leak away from the capacitor, which leads to loss of data. To prevent this, each memory location in the DRAM is required to be refreshed (read and then written with the same data) at least once prior to the expiration of an interval during which correct storage of the data is guaranteed by the manufacturer of the DRAM. Dividing the period by the total number of memory locations in the DRAM results in a refresh interval. If a refresh of a memory location is performed once each refresh interval, and all memory locations are refreshed before a given memory location is refreshed a second time, then data loss can be avoided.
The refresh interval specifies the minimum frequency at which the refreshes can occur in a memory, but it is acceptable to refresh more frequently than the refresh interval. On the other hand, refreshes consume power in the same manner that other read and write operations do, so refreshing more often than required to maintain data storage consumes power unnecessarily. For power-sensitive devices such as various battery-powered devices, consuming power unnecessarily is undesirable. Additionally, various power-saving modes that are often used in such power-sensitive devices, and frequent switching between the modes, makes tracking refreshes across such modes more problematic. For example, on entry into a mode in which the memory is responsible for refresh (“self refresh” mode), the memory does not have information on when the next refresh is due. Accordingly, to ensure data integrity, the memory performs a precautionary refresh on entry to self refresh mode. Similarly, on entry to a mode in which the circuitry interfacing to the memory is responsible for refresh, the circuitry does not have information on when the next self refresh is due. Accordingly, to ensure data integrity, the circuitry performs a precautionary refresh on entry to such a mode.
In an embodiment, an integrated circuit (IC) and a memory device are configured to operate in at least one “normal” mode and at least one self refresh mode. The normal mode (or “functional” mode or “operational” mode) may be a mode in which the IC may read and write locations in the memory device. The IC may also generate refresh commands according to a refresh interval during normal mode. The self refresh mode may be a mode in which the interface between the IC and memory device is inactive (and the IC may even be powered down). The memory device may internally be responsible for refresh during the self refresh mode. The IC may ensure that the amount of time that has expired in the current refresh interval prior to entering self refresh mode is retained, so that a remaining amount of time may expire after self refresh mode is exited prior to generating the initial refresh command after exiting self refresh mode. Similarly, the memory device may retain the amount of time that has expired in the current self refresh interval prior to exiting self refresh, so that a remaining amount of time may expire after self refresh mode is entered again prior to performing an initial self refresh.
The following detailed description makes reference to the accompanying drawings, which are now briefly described.
While embodiments described in this disclosure may be susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and detailed description thereto are not intended to limit the embodiments to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to.
Within this disclosure, different entities (which may variously be referred to as “units,” “circuits,” other components, etc.) may be described or claimed as “configured” to perform one or more tasks or operations. This formulation—[entity] configured to [perform one or more tasks]—is used herein to refer to structure (i.e., something physical, such as an electronic circuit). More specifically, this formulation is used to indicate that this structure is arranged to perform the one or more tasks during operation. A structure can be said to be “configured to” perform some task even if the structure is not currently being operated. A “clock circuit configured to generate an output clock signal” is intended to cover, for example, a circuit that performs this function during operation, even if the circuit in question is not currently being used (e.g., power is not connected to it). Thus, an entity described or recited as “configured to” perform some task refers to something physical, such as a device, circuit, memory storing program instructions executable to implement the task, etc. This phrase is not used herein to refer to something intangible. In general, the circuitry that forms the structure corresponding to “configured to” may include hardware circuits. The hardware circuits may include any combination of combinatorial logic circuitry, clocked storage devices such as flops, registers, latches, etc., finite state machines, memory such as static random access memory or embedded dynamic random access memory, custom designed circuitry, analog circuitry, programmable logic arrays, etc. Similarly, various units/circuits/components may be described as performing a task or tasks, for convenience in the description. Such descriptions should be interpreted as including the phrase “configured to.”
The term “configured to” is not intended to mean “configurable to.” An unprogrammed FPGA, for example, would not be considered to be “configured to” perform some specific function, although it may be “configurable to” perform that function. After appropriate programming, the FPGA may then be configured to perform that function.
Reciting in the appended claims a unit/circuit/component or other structure that is configured to perform one or more tasks is expressly intended not to invoke 35 U.S.C. § 112(f) interpretation for that claim element. Accordingly, none of the claims in this application as filed are intended to be interpreted as having means-plus-function elements. Should Applicant wish to invoke Section 112(f) during prosecution, it will recite claim elements using the “means for” [performing a function] construct.
In an embodiment, hardware circuits in accordance with this disclosure may be implemented by coding the description of the circuit in a hardware description language (HDL) such as Verilog or VHDL. The HDL description may be synthesized against a library of cells designed for a given integrated circuit fabrication technology, and may be modified for timing, power, and other reasons to result in a final design database that may be transmitted to a foundry to generate masks and ultimately produce the integrated circuit. Some hardware circuits or portions thereof may also be custom-designed in a schematic editor and captured into the integrated circuit design along with synthesized circuitry. The integrated circuits may include transistors and may further include other circuit elements (e.g. passive elements such as capacitors, resistors, inductors, etc.) and interconnect between the transistors and circuit elements. Some embodiments may implement multiple integrated circuits coupled together to implement the hardware circuits, and/or discrete elements may be used in some embodiments. Alternatively, the HDL design may be synthesized to a programmable logic array such as a field programmable gate array (FPGA) and may be implemented in the FPGA.
As used herein, the term “based on” or “dependent on” is used to describe one or more factors that affect a determination. This term does not foreclose the possibility that additional factors may affect the determination. That is, a determination may be solely based on specified factors or based on the specified factors as well as other, unspecified factors. Consider the phrase “determine A based on B.” This phrase specifies that B is a factor is used to determine A or that affects the determination of A. This phrase does not foreclose that the determination of A may also be based on some other factor, such as C. This phrase is also intended to cover an embodiment in which A is determined based solely on B. As used herein, the phrase “based on” is synonymous with the phrase “based at least in part on.”
This specification includes references to various embodiments, to indicate that the present disclosure is not intended to refer to one particular implementation, but rather a range of embodiments that fall within the spirit of the present disclosure, including the appended claims. Particular features, structures, or characteristics may be combined in any suitable manner consistent with this disclosure.
Turning now to
The memory controller 14 may be configured to interface to the DRAMs 12A-12B over an external interface between the IC 10 and the DRAMs 12A-12B. For example, the external interface may be an industry standard interface implemented by a variety of DRAM device vendors. The memory controller 14 may be configured to transmit read and write commands to the DRAMs 12A-12B, and to transmit and receive data, over the interface. Additionally, the memory controller 14 may be configured to transmit refresh commands over the interface to cause refreshes in the DRAMs 12A-12B. In another embodiment, the DRAMs 12A-12B may be integrated into the IC 10 (e.g. using embedded DRAM technology), and self-refresh may still be in the DRAM in various power saving modes. A similar mechanism to that described below may be implemented in the integrated case as well.
The memory controller 14 may be configured to track a refresh interval using the refresh timer register 16. For example, the refresh timer register 16 may be loaded with a value representing the refresh interval, and the memory controller 14 may decrement the value to zero. When zero is reached, the memory controller 14 may be configured to generate a refresh command and reload the refresh timer register 16 with the value. The value may be based on the clock that is supplied to the memory controller 14 to clock various digital circuitry therein, or may be based on a clock that is supplied separately and that is a constant frequency during operation (where the memory controller 14 may be clocked at different frequencies depending on the power state of the IC 10). Alternatively, the refresh timer register 16 may be reset to zero and incremented to reach the value representing the refresh interval.
The memory controller 14 may track the refresh interval during normal mode, when the interface to the DRAMs 12A-12B may be active and the memory controller 14 may be able to transmit read/write commands to the DRAMs 12A-12B. At certain points, power management circuitry in the IC 10 or in a separate IC (not shown) may be determine that the IC 10 is to enter a low power mode (e.g. clock gated, power gated, etc.). The IC 10 may have various subsections (clock domains/power domains) for which power management decisions may be made independently. If the domain including the memory controller 14 is to be clock gated and/or power gated, or if the IC 10 is entering a mode in which external memory accesses to the DRAMs 12A-12B are not permitted, the memory controller 14 may transmit a command to the DRAMs 12A-12B to enter self refresh mode. Additionally, in response to self refresh mode entry, the memory controller 14 may be configured to freeze the value of the refresh timer register 16. For example, if the memory controller 14 is to be powered down, the refresh timer register 16 may be placed on retention voltage to ensure the power is maintained. The memory controller 14 may ensure that the value is not incremented or decremented during self-refresh mode. Accordingly, when self refresh mode is exited and the refresh timer updates restart, the correct amount of time during normal mode may pass prior to the next refresh even if the interval is interrupted by time in self refresh mode.
Similarly, the control circuit 20 may track the self refresh interval in the self refresh timer register 22 (e.g. load value and decrement or clear value and increment as discussed above for the refresh timer register 16). The control circuit 20 may freeze the value in the self refresh timer register 22 during normal mode. Accordingly, the amount of time between self refreshes may be correctly determined even if the interval is interrupted by time in normal mode.
Viewed in another way, the memory controller 14 may be configured to trigger refreshes over a refresh interval measured during normal mode (and excluding time in self refresh mode) while the control circuit 20 may be configured to trigger self refreshes over a self refresh interval measured during self refresh mode (and excluding time in normal mode). Thus, the overall self refresh frequency may be at least the required frequency and data may be protected. Additionally, excessive refreshing may be minimized. Accordingly, power that would be lost performing excessive refreshes may be conserved.
The refresh command from the memory controller 14 to the DRAMs 12A-12B may have any format. It may include at least the command to perform the refresh. Optionally, the refresh command may indicate the memory location to be refreshed (and optionally a bank, in banked versions of DRAMs 12A-12B). Banked versions may also support an “all banks” refresh command that concurrently refreshes each bank. Alternatively, the DRAMs 12A-12B may track which memory locations to refresh (and may increment the refresh address after each refresh/self refresh is complete) and thus the refreshes may march through consecutive memory addresses over time. In an embodiment, the “all banks” refresh command may be used for both refresh commands issued by the IC 10 and the self refresh commands generated internally by the DRAMs 12A-12B. Other embodiments may use single bank refresh commands or a mix of refresh command types.
It is noted that the refresh interval tracked by the refresh timer register 16 and the self refresh interval tracked by the self refresh timer register 22 may refer to approximately the same amount of real time, within the granularity of the respective clock frequencies used to update the registers 16 and 22. However, the values tracked may differ because the frequencies of the clocks used by the DRAMs 12A-12B and the IC 10 to manage the updates may differ.
In some embodiments, the IC 10 may include additional circuitry with the memory controller 14. For example, the IC 10 may be a system on a chip (SOC) including one or more processors serving as central processing units (CPUs) and optionally included various other peripheral devices and/or interface circuits. Any functionality may be integrated with the memory controller 14 on the IC 10 in various embodiments.
The DRAMs 12A-12B may be packaged in any desired fashion. For example, the DRAMs 12A-12B may be packaged in a chip on chip or package on package technology with the IC 10. Alternatively, a multichip module may be used, or the IC 10 may be packaged separately from the DRAMs 12A-12B (which may be on a dual inline memory module (DIMM), single inline memory module (SIMM), discrete chips on a board with the IC 10, etc.).
While in some cases in
Since self refresh mode is being entered, the IC 10 (and more particularly, the memory controller 14) may freeze the refresh timer register 16, holding the value steady while the apparatus is in self refresh mode (block 60). The DRAMs 12A-12B (and more particularly the control circuit 20) may enable the self refresh timer register 22 (block 62). Additionally, in some embodiments, the DRAMs 12A-12B/control circuit 20 may be configured to adjust the self refresh timer register 22 (block 74). The adjustment may be performed to: compensate for quantization error in the counting of clock pulses at a given frequency; account for time lost during the mode change (e.g. about 200 nanoseconds in one embodiment); and/or account for any other sources of error in a given implementation. For example, the adjustment may be to increment the self refresh timer register 22 (e.g. incrementing by one tick).
If the self refresh timer expires (decision block 64, “yes” leg), the DRAMs 12A-12B/control circuit 20 may generate a self refresh (block 66) and reset the self refresh timer register 22 (block 68). If a self refresh exit is detected (e.g. a command from the IC 10 is received indicating self-refresh exit—decision block 70, “yes” leg), then the flow chart may exit to normal mode as shown in
If the self refresh timer does not expire (decision block 64, “no” leg), the DRAMs 12A-12B/control circuit 20 may update the self refresh timer register 22 (block 76). The update may be conditional on another tick of the clock that is used to update the self refresh timer register 22 being detected. For example, ticks may occur on the order of every 500 nanoseconds (nsec) or 1 microsecond. In other embodiments, higher or lower frequencies may be used. A check for self refresh exit may be performed (decision block 70) as discussed above.
Since self refresh mode is being exited, the DRAMs 12A-12B/control circuit 20 may freeze the self refresh timer register 22, holding the value steady while the apparatus is in normal mode (block 80). The IC 10/memory controller 14 may enable the refresh timer register 16 (block 82). Additionally, in some embodiments, the IC 10/memory controller 14 may be configured to adjust the refresh timer register 16 (block 84). The adjustment may be performed to: compensate for quantization error in the counting of clock pulses at a given frequency; account for time lost during the mode change (e.g. about 200 nanoseconds in one embodiment); and/or account for any other sources of error in a given implementation. For example, the adjustment may be to increment the refresh timer register 16 by 2 (e.g. incrementing by two ticks).
If the refresh timer expires (decision block 86, “yes” leg), the IC 10/memory controller 14 may generate a refresh command to the memory controller 14 (block 88) and reset the refresh timer register 16 (block 90). If a self refresh entry is detected (e.g. the power management circuitry controller the IC 10 indicates that self refresh mode is desired, and thus the IC 10 transmits a self refresh command to the DRAMs 12A-12B—decision block 92, “yes” leg), then the flow chart may exit to self refresh entry as shown in
If the refresh timer does not expire (decision block 86, “no” leg), the IC 10/memory controller 14 may update the self refresh timer register 16 (block 94). The update may be conditional on detecting another tick (e.g. rising edge) of the clock that is used to update the refresh timer register 16. For example, ticks may occur on the order of every 41.67 nanoseconds (nsec) in an embodiment. In other embodiments, higher or lower frequencies may be used. A check for self refresh exit may be performed (decision block 86) as discussed above.
The peripherals 154 may include any desired circuitry, depending on the type of system 150. For example, in one embodiment, the system 150 may be a computing device (e.g., personal computer, laptop computer, etc.), a mobile device (e.g., personal digital assistant (PDA), smart phone, tablet, etc.). In various embodiments of the system 150, the peripherals 154 may include devices for various types of wireless communication, such as wifi, Bluetooth, cellular, global positioning system, etc. The peripherals 154 may also include additional storage, including RAM storage, solid state storage, or disk storage. The peripherals 154 may include user interface devices such as a display screen, including touch display screens or multitouch display screens, keyboard or other input devices, microphones, speakers, etc. In other embodiments, the system 150 may be any type of computing system (e.g. desktop personal computer, laptop, workstation, net top etc.).
The external memory 158 may include any type of memory. For example, the external memory 158 may be SRAM, dynamic RAM (DRAM) such as synchronous DRAM (SDRAM), double data rate (DDR, DDR2, DDR3, etc.) SDRAM, RAMBUS DRAM, low power versions of the DDR DRAM (e.g. LPDDR, mDDR, etc.), etc. The DRAMs 12A-12B may be any type of such DRAM as listed above. The external memory 158 may include one or more memory modules to which the memory devices are mounted, such as single inline memory modules (SIMMs), dual inline memory modules (DIMMs), etc. Alternatively, the external memory 158 may include one or more memory devices that are mounted on the IC 10 in a chip-on-chip or package-on-package implementation.
Generally, the electronic descriptions 162 and 164 stored on the computer accessible storage medium 160 may be a database which can be read by a program and used, directly or indirectly, to fabricate the hardware comprising the IC 10/DRAMs 12A-12B. For example, the description may be a behavioral-level description or register-transfer level (RTL) description of the hardware functionality in a high level design language (HDL) such as Verilog or VHDL. The description may be read by a synthesis tool which may synthesize the description to produce a netlist comprising a list of gates from a synthesis library. The netlist comprises a set of gates which also represent the functionality of the hardware comprising the IC 10/DRAMs 12A-12B. The netlist may then be placed and routed to produce a data set describing geometric shapes to be applied to masks. The masks may then be used in various semiconductor fabrication steps to produce a semiconductor circuit or circuits corresponding to the IC 10/DRAMs 12A-12B. Alternatively, the descriptions 162-164 on the computer accessible storage medium 300 may be the netlist (with or without the synthesis library) or the data set, as desired.
While the computer accessible storage medium 160 stores a description 162 of the IC 10 and a description 164 of the DRAMs 12A-12B, other embodiments may store a description 162 of any portion of the IC 10 and/or a description 164 of any portion of the DRAMs 12A-12B, as desired (e.g. the memory controller 14 and/or the control circuit 20 as mentioned above).
Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.
Number | Date | Country | |
---|---|---|---|
62380530 | Aug 2016 | US |