WO2011012032A1 - System and method for adjusting dram operating frequency - Google Patents

System and method for adjusting dram operating frequency Download PDF

Info

Publication number
WO2011012032A1
WO2011012032A1 PCT/CN2010/074220 CN2010074220W WO2011012032A1 WO 2011012032 A1 WO2011012032 A1 WO 2011012032A1 CN 2010074220 W CN2010074220 W CN 2010074220W WO 2011012032 A1 WO2011012032 A1 WO 2011012032A1
Authority
WO
WIPO (PCT)
Prior art keywords
dram
operating frequency
module
frequency
signal
Prior art date
Application number
PCT/CN2010/074220
Other languages
French (fr)
Chinese (zh)
Inventor
林川
Original Assignee
北京中星微电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京中星微电子有限公司 filed Critical 北京中星微电子有限公司
Priority to CA2707914A priority Critical patent/CA2707914A1/en
Publication of WO2011012032A1 publication Critical patent/WO2011012032A1/en

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C11/00Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
    • G11C11/21Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements
    • G11C11/34Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices
    • G11C11/40Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors
    • G11C11/401Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors forming cells needing refreshing or charge regeneration, i.e. dynamic cells
    • G11C11/4063Auxiliary circuits, e.g. for addressing, decoding, driving, writing, sensing or timing
    • G11C11/407Auxiliary circuits, e.g. for addressing, decoding, driving, writing, sensing or timing for memory cells of the field-effect type
    • G11C11/4076Timing circuits
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C2207/00Indexing scheme relating to arrangements for writing information into, or reading information out from, a digital store
    • G11C2207/22Control and timing of internal memory operations
    • G11C2207/2254Calibration

Definitions

  • the present invention relates to the field of dynamic random access memories (DRAMs), and more particularly to a DRAM operating frequency adjustment system and method.
  • DRAMs dynamic random access memories
  • DRAM Dynamic Random-Access Memory
  • DRAM Dynamic Random-Access Memory
  • DRAM can only keep data for a short time.
  • DRAM uses capacitor storage and must be refreshed at intervals to maintain the data stored therein. This refresh is handled by the DRAM controller.
  • the refresh operation of the DRAM consumes a relatively large amount of power, and the required battery capacity is large.
  • a multimedia chip system has multiple functional modules, such as processors, hardware accelerators, and the like. These function modules operate independently and access various memory resources as needed. Since some functional modules of the multimedia chip system generally store files or temporary data in an external DRAM during data processing, the system cost is reduced. For complex multimedia chip systems, different tasks may have very large differences in memory bandwidth requirements. For example, when playing streaming media files in high-definition format, the multimedia chip system needs the processor and hardware accelerator to run at full speed, and the running frequency of DRAM is above 166MHz. When playing MP3, the computing capacity of the multimedia chip system and the required memory bandwidth are drastically reduced, DRAM Running at 50MHz will meet the requirements. As such, the power requirements of the multimedia chip are increased.
  • a technical problem that needs to be solved urgently by those skilled in the art is: how to creatively provide a method for adjusting the operating frequency of the DRAM to adjust the balance between the performance and the power consumption of the DRAM, thereby ensuring the chip system. While running at a high speed, it effectively improves the power consumption of the DRAM.
  • the technical problem to be solved by the present invention is to provide a solution capable of adjusting the operating frequency of a DRAM and a DRAM operating frequency adjustment system using the solution to adjust the DRAM. A balance of performance and power consumption.
  • the present invention provides a DRAM operating frequency adjustment system, which includes:
  • the statistics module calculates the effective working state of the DRAM in the preset time interval
  • a parameter configuration module generating a target operating frequency according to statistics of an effective working state of the DRAM
  • a frequency switching controller that adjusts a current operating frequency of the DRAM to the target operating frequency.
  • the invention also provides a method for adjusting the operating frequency of a DRAM, comprising:
  • the current DRAM operating frequency is adjusted to the target operating frequency.
  • the present invention has the following advantages:
  • the invention obtains the bandwidth utilization rate of the current DRAM operating frequency by counting the effective working state of the DRAM in the preset time interval, and adjusts the current DRAM operating frequency to the appropriate when the bandwidth utilization is not suitable for the operating condition of the current application scenario.
  • the operating frequency of the current application scenario Specifically, in the case of low DRAM operating frequency and high bandwidth utilization, the current operating frequency of the DRAM can be improved according to the current application scenario; in the case of high DRAM operating frequency and low bandwidth utilization, the current application scenario can be reduced. Current operating frequency of DRAM. This way of dynamically adjusting the operating frequency based on bandwidth utilization is more conducive to balancing the operating efficiency and power consumption of the DRAM.
  • FIG. 1 is a structural block diagram of an embodiment of a DRAM operating frequency adjustment system
  • Figure 2 is a diagram showing the operation state of the DRAM
  • FIG. 3 is a structural block diagram of an embodiment of a statistical module
  • FIG. 4 is a structural block diagram of an embodiment of a parameter configuration module
  • FIG. 5 is a structural block diagram of another embodiment of a DRAM operating frequency adjustment system
  • Figure 6 is a timing diagram of DRAM operation; 7 is a structural block diagram of another embodiment of a parameter configuration module;
  • Figure 8 is a block diagram showing the structure of an embodiment of a frequency switching controller
  • Figure 9 is a block diagram showing the structure of an embodiment of a DRAM controller
  • Figure 10 is a flow chart of an embodiment of a DRAM operating frequency adjustment method.
  • the DRAM operating frequency adjustment system 100 includes a statistic module 11, a parameter configuration module 12, and a frequency switching controller 13.
  • the statistical module 11 counts the effective working state of the DRAM, and can obtain the current bandwidth utilization of the DRAM by counting the effective working state of the DRAM, that is, the bandwidth utilization of the DRAM at the current operating frequency.
  • the parameter configuration module 12 generates a target operating frequency suitable for the current operating environment based on the statistics made by the statistical module.
  • the frequency switching controller 13 adjusts the current operating frequency of the DRAM to the target operating frequency.
  • the statistics module 11 can calculate the working state of the DRAM in a preset time interval, and calculate the current DRAM in a preset time interval according to the statistical result of the working state of the DRAM in the preset time interval. Bandwidth utilization at operating frequency.
  • the operating state of the DRAM is determined by the data access commands of the DRAM. These commands are all generated by the finite state machine 910 in the DRAM controller 91. Referring to FIG. 2, corresponding to these data access commands, the working state of the finite state machine generally includes waiting (IDLE), pre-charging (PRE), activating (ACT), reading (READ), writing (WRIT), and the like. Therefore, the statistics module 11 can obtain the statistics of the effective working state of the DRAM by counting the non-waiting working state of the finite state machine 910. The statistic module 11 determines the real-time bandwidth utilization of the DRAM by counting the non-waiting operation state of the finite state machine 910 within a predetermined time interval, and determines whether the DRAM frequency needs to be adjusted.
  • the preset time interval may be configured according to a current application scenario.
  • the statistics module 11 may use a certain
  • the parameter configuration module 12 is notified by the parameter configuration module 12 to generate a target operating frequency suitable for the current application scenario according to the actual required bandwidth utilization.
  • the frequency switching controller 13 adjusts the current operating frequency of the DRAM to the target operating frequency. In this way, by dynamically counting the bandwidth utilization and adjusting the operating frequency of the DRAM in real time, the operating efficiency and power consumption of the DRAM are at a good balance point.
  • the statistics module 11 may include an effective working status statistics sub-module 111 and an interrupt control module 112.
  • the valid working state statistics sub-module 111 accumulates the non-waiting working state of the finite state machine 910 in the DRAM controller 91 within the preset time interval to obtain the effective working state of the DRAM.
  • the non-waiting operating state includes pre-charging, activating, reading, writing, and the like working states of the finite state machine 910 corresponding to various data access commands.
  • the interrupt control module 112 generates an interrupt signal that adjusts the operating frequency of the DRAM based on the bandwidth utilization of the DRAM at the current operating frequency.
  • the interrupt signal includes a first interrupt signal and a second interrupt signal.
  • the interrupt control module 112 At the end of the preset time interval, when the current bandwidth utilization is lower than the actually required bandwidth utilization, the interrupt control module 112 generates a first interrupt signal indicating that the operating frequency of the DRAM needs to be reduced;
  • the interrupt control module 112 generates a second interrupt signal indicating that the operating frequency of the DRAM needs to be increased.
  • the valid working status statistics sub-module 111 may further include a statistical time interval register 1110, a time counter 1112, a status counter 1113, and a cumulative status register 1114.
  • the statistical time interval register 1110 configures the preset time interval.
  • the time counter 1112 counts during the preset time interval and automatically clears its timing value when a predetermined time interval ends.
  • the status counter 1113 accumulates the non-waiting operation state of the finite state machine 910 in the DRAM controller 91 in real time during the preset time interval, and the timing value of the time counter 1112 is equal to the configuration of the statistical time interval register 1110. At the time interval, the status counter 1113 copies its count value to the accumulation status register 1114 while automatically clearing its count value. That is, the count value of the status counter 1113 changes over time within the preset time interval.
  • the timing value of the time counter 1112 is equal to the time configured by the statistical time interval register 1110
  • the count value of the state counter 1113 is the cumulative result of the non-waiting operation state of the finite state machine 910 within the preset time interval.
  • the accumulation status register 1114 stores the count value of the status counter 1113 when the timing value of the time counter 1112 is equal to the time interval configured by the statistical time interval register 1110.
  • the bandwidth utilization of the DRAM during the time interval can be determined based on the count value of the accumulated status register 1114.
  • the interrupt control module 112 can further include an interrupt condition threshold register 1121 and an interrupt control logic module 1123.
  • the Interrupt Condition Threshold Register 1121 configures the bandwidth utilization threshold.
  • the interrupt control logic module 1123 issues an interrupt signal based on the count value of the status counter 1113 within the preset time interval and the bandwidth utilization threshold, or based on the count value held by the cumulative status register 1114.
  • the interrupt control logic module 1123 includes a first interrupt control unit 1123a and a second interrupt control unit 1123b.
  • the first interrupt control unit 1123a determines, at the end of the preset time interval, whether the bandwidth utilization of the DRAM at the current operating frequency is low according to the count value of the cumulative status register 1114, and the bandwidth of the DRAM at the current operating frequency. The utilization is lower than the demand value, and a first interrupt signal indicating that the operating frequency of the DRAM needs to be reduced is generated.
  • the second interrupt control unit 1123b determines, according to the count value of the state counter 1113 and the bandwidth utilization threshold, whether the bandwidth utilization of the DRAM at the current operating frequency is high during the preset time interval, and when the DRAM is currently When the bandwidth utilization rate at the operating frequency is too high, that is, the bandwidth utilization of the DRAM at the current operating frequency exceeds the bandwidth utilization threshold, a second interrupt signal indicating that the operating frequency of the DRAM needs to be increased is generated.
  • the parameter configuration module 12 includes a target operating frequency configuration sub-module 121, and the target operating frequency configuration sub-module 121 includes:
  • the first configuration unit 1211 generates a target operating frequency lower than the current DRAM operating frequency according to the first interrupt signal
  • the second configuration unit 1212 generates a target operating frequency higher than the current DRAM operating frequency according to the second interrupt signal.
  • the interrupt signal generation includes two cases. In one case, at the preset At the end of the time interval, when the bandwidth utilization of the DRAM determined according to the count value of the accumulated status register value 1114 is lower than the actual required bandwidth utilization, the interrupt control logic module 1123 may issue a first interrupt signal to the system indicating the current operation of the DRAM. The frequency is too high. In another case, the interrupt control logic module 1123 determines the real-time bandwidth utilization of the DRAM according to the count value of the state counter value in real time during a preset time interval, when the real-time bandwidth utilization exceeds the bandwidth utilization threshold. Then, the interrupt control logic module 1123 will issue a first interrupt signal indicating that the current operating frequency of the DRAM is low.
  • Figure 2 shows several operating states of the DRAM.
  • the other operating states are the active operating states of the DRAM, i.e., the non-waiting state of the finite state machine 910.
  • the current operating frequency of DRAM is 120MHz
  • the DRAM is SDRAM 16bit memory.
  • the bandwidth utilization can be considered stable. If it is considered that the bandwidth utilization is 60%, the interrupt control module 112 issues a first interrupt signal, and the parameter configuration module 12 configures the target operating frequency of the DRAM to be 384/16/60% MHz, that is, 40 MHz.
  • the frequency switching controller 13 switches the operating frequency of the DRAM to 40 MHz. At this time, the effective bandwidth is also 40*16*60% Mbps, which is 384 Mbps, but the operating frequency of the DRAM is reduced, saving the power consumption of the DRAM.
  • the current DRAM runs at 40MHz and the DRAM is a SDRAM 16bit memory.
  • the bandwidth utilization threshold set for the current application scenario is 60%. If the bandwidth utilization obtained by the statistic module 11 is 80% and the bandwidth utilization threshold (60%) is exceeded, the interrupt control module 112 will issue a second interrupt signal. If it is considered that the bandwidth utilization is 40% in the current application scenario, the parameter configuration module 12 configures the target operating frequency of the DRAM to be (40*16*80%) /16/40% MHz, that is, 80 MHz. The frequency switching controller 13 switches the operating frequency of the DRAM to 80 MHz. In this way, the operating efficiency of the DRAM is improved.
  • the DRAM operating frequency adjustment system 100 may further include a clock control module 15.
  • Clock The control module 15 is configured to control the DRAM to perform a refresh operation according to an internal clock when the frequency switching controller 13 is in operation, and to control the DRAM to perform a refresh operation according to the system clock after the frequency switching controller 13 completes the operation.
  • DRAM refresh operations there are two types of DRAM refresh operations: Auto Refresh (AR) and Self Refresh (SR). Accordingly, DRAM has two modes of operation, AR mode and SR mode. In AR mode, DRAM is refreshed according to the system clock. In SR mode, DRAM no longer relies on the system clock to operate, but refreshes according to the internal clock. After the DRAM enters the SR mode, it is not necessary to provide the system clock for the DRAM, so the system clock frequency can be switched at this time, that is, the current operating frequency of the DRAM is adjusted to the target operating frequency. After exiting the SR mode, the DRAM will operate at the target operating frequency.
  • AR mode DRAM is refreshed according to the system clock.
  • SR mode DRAM no longer relies on the system clock to operate, but refreshes according to the internal clock.
  • the system clock frequency can be switched at this time, that is, the current operating frequency of the DRAM is adjusted to the target operating frequency.
  • the DRAM will operate at the target operating frequency.
  • CLK is the system clock supplied to the DRAM, and the frequency before the time T2 and the frequency after the time Tn+1 may be different.
  • the system clock frequency before ⁇ 2 is the current DRAM operating frequency, and the frequency switching operation is performed within the timing of T2 ⁇ Tn+l.
  • the system clock frequency after time Tn+1 is the target operating frequency.
  • the system clock can be determined by the timing check parameters.
  • the DRAM operating frequency adjustment system 100 may further include a timing check parameter validation module 16.
  • the timing check parameter validation module 16 is configured to obtain a corresponding timing check parameter according to the target operating frequency.
  • the timing check parameters are linear with the system clock frequency of the DRAM. For example, assuming a DRAM refresh interval of 10 ⁇ 8, then at 100 MHz, the timing check parameter needs to be configured to 1000; at 10 MHz, the timing check parameter needs to be configured to 100.
  • the clock control module 15 and the timing check parameter validation module 16 may be located in the DRAM controller or external to the DRAM controller.
  • the DRAM operating frequency adjustment system 100 can also include the frequency The DRAM controller 91 to which the controller is connected is switched.
  • the parameter configuration module 12 may further include:
  • the frequency switching request signal configuration sub-module 122 is configured to configure a frequency switching request signal whose default value is invalid;
  • the handshake signal configuration sub-module 123 is configured to configure a handshake signal whose default value is invalid; and a timing check parameter configuration sub-module 124 configured to respectively configure corresponding timing check parameters for the DRAM operating frequency.
  • the frequency switching controller 13 may include a frequency switching request generating module 131, a frequency switching module 133, and an invalid request signal setting module 135.
  • the frequency switching request generation module 131 is configured to generate a frequency switching request and set the frequency switching request signal to be valid.
  • the frequency switching module 133 is configured to switch the current DRAM operating frequency to the target operating frequency according to the valid handshake signal.
  • the invalid request signal setting module 135 is configured to restore the frequency switching request signal to be invalid after the frequency switching module completes the frequency switching.
  • the DRAM controller 91 may further include a self-refresh control module 912, a handshake signal triggering module 913, a timing check parameter determining module 914, a self-refresh exiting module 915, and a handshake signal closing module 916.
  • the self-refresh control module 912 is configured to issue a first control command for the DRAM to refresh according to the internal clock according to the valid signal of the frequency switching request.
  • the handshake signal triggering module 913 is configured to assert the handshake signal after issuing the first control command.
  • the timing check parameter determining module 914 is configured to extract a timing check parameter corresponding to the target operating frequency when the frequency switching request signal is restored to be invalid.
  • the self-refresh exit module 915 is configured to determine a system clock according to the timing check parameter, and issue a second control command that the DRAM refreshes according to the system clock.
  • the handshake signal closing module 916 is configured to restore the handshake signal to be invalid after issuing the second control command.
  • the DRAM control can further include:
  • the data request suspension module 917 is configured to: after receiving the valid signal of the frequency switching request, execute the received data request, and stop responding to the new data request before issuing the first control command; and the data request execution module 918, configured to: When the handshake signal is restored to be invalid, a new data request is received.
  • the DRAM controller 91 accepts external data access requests to the DRAM.
  • the DRAM controller 91 can first complete all current data access requests that have entered the DRAM controller 91 prior to frequency switching without simultaneously responding to new data access requests, i.e., preventing the functional modules from accessing the DRAM. In this way, the situation of data loss during the frequency adjustment process is avoided.
  • the target operating frequency has been generated by the target operating frequency configuration sub-module 121; the frequency switching request signal configuration sub-module 122 configures the frequency switching request signal clock_switch_request (frequency switching request signal clock_switch_request
  • the default value of csr is used, and the default value of the frequency switching request signal csr is invalid, that is, the default value of the frequency switching request signal csr is set to binary code
  • the handshake signal configuration sub-module configuration 123 handshake signal sdrc_lock handshake signal sdrc_lock
  • the default value of the handshake signal si is invalid, that is, the default value of the handshake signal si is set to binary code 0.
  • Timing Check Parameters The configuration sub-module pin 124 configures the corresponding timing check parameters for the current operating frequency of the DRAM and the target operating frequency.
  • the process of switching the current operating frequency of the DRAM to the target operating frequency may include the following steps:
  • Step S101 the frequency switching request generating module 131 generates a frequency switching request signal csr, and sets the value of the frequency switching request signal csr to an active state, that is, the value of the frequency switching request signal csr is set to binary code 1;
  • Step S102 after detecting that the value of csr is 1, the self-refresh control module 912 issues a DRAM. a first control command for performing a refresh operation according to an internal clock;
  • Step S103 the handshake signal triggering module 913 sets the value of the handshake signal si to an active state, that is, the value of the handshake signal si is set to binary code 1;
  • Step S104 after detecting that the value of the handshake signal si is 1, the frequency switching module 133 switches the current DRAM operating frequency to the target operating frequency;
  • Step S105 after completing the frequency switching, the invalid request signal setting module 135 restores the value of the frequency switching request signal csr to 0;
  • Step S106 After detecting that the value of the frequency switching request signal csr is 0, the timing check parameter determining module 914 extracts the timing check parameter corresponding to the target operating frequency;
  • Step S107 The self-refresh exit module 915 determines a system clock according to the timing check parameter, and issues a second control command that the DRAM performs a refresh operation according to the system clock.
  • Step S108 The handshake signal closing module 916 restores the value of the handshake signal si from 1 to 0.
  • the above-mentioned DRAM controller 91 and the frequency switching controller 13 use the frequency switching request signal and the handshake signal interaction mode only as an example, and any interaction mode is feasible by those skilled in the art as needed.
  • the invention can be applied to a multimedia chip system.
  • a function module such as a processor or a hardware accelerator of a multimedia chip system accesses DRAM
  • the DRAM operating frequency can be automatically adjusted according to the characteristics of the multimedia task.
  • FIG. 10 a flow chart of an embodiment of a DRAM operating frequency adjustment method according to the present invention is shown, which may specifically include:
  • Step 401 Count the effective working state of the DRAM in the preset time interval, and obtain the bandwidth utilization ratio of the DRAM at the current operating frequency;
  • Step 402 Generate a target running frequency when the bandwidth utilization is not suitable for the running condition of the current application scenario.
  • Step 403 Adjust the current DRAM operating frequency to the target operating frequency.
  • Sub-step A1 accumulating the non-waiting working state of the finite state machine in the DRAM controller during the preset time interval, and obtaining the effective working state of the DRAM;
  • Sub-step A2 at the end of the preset time interval, according to the effective working state of the DRAM, Determining the current bandwidth utilization of the DRAM; when the current bandwidth utilization of the DRAM is low, generating a first interrupt signal that needs to reduce the operating frequency of the DRAM; when the current bandwidth utilization of the DRAM exceeds the pre-predetermined time interval
  • a second interrupt signal that increases the operating frequency of the DRAM is generated.
  • the generating step of the target operating frequency may include:
  • the DRAM operating frequency adjustment method may further include:
  • the DRAM is controlled to refresh according to the internal clock, and when the frequency adjustment is completed, the DRAM is controlled to refresh according to the system clock.
  • the system clock is determined by a timing check parameter, and the method may further include:
  • the method may further include:
  • the preset default value is an invalid frequency switching request signal, the default value is an invalid handshake signal, and timing check parameters corresponding to various DRAM operating frequencies;
  • the operating frequency adjustment step may include the following sub-steps:
  • Sub-step Bl generating a frequency switching request, and setting the frequency switching request signal to be valid; sub-step B2, issuing a first control command for performing a refresh operation of the DRAM according to the internal clock according to the valid signal of the frequency switching request;
  • Sub-step B3 after the first control command is issued, the handshake signal is set to be valid; sub-step B4, according to the valid handshake signal, the current DRAM operating frequency is switched to the target operating frequency;
  • Sub-step B5 after the frequency switching is completed, the frequency switching request signal is restored to be invalid; sub-step B6, when the frequency switching request signal is restored to be invalid, the timing check parameter corresponding to the target operating frequency is extracted;
  • Sub-step B7 determining a system clock according to the timing check parameter, and issuing a DRAM according to Sub-step B8, after the second control command is issued, the handshake signal is restored to be invalid.
  • the method may further include: after receiving the valid signal of the frequency switching request, executing the received data request, and stopping before issuing the first control command Respond to new data requests;
  • the description is relatively simple, and the relevant parts can be referred to the description of the device embodiment.
  • the DRAM operating frequency adjustment system and a DRAM operating frequency adjustment method provided by the present invention are described in detail.
  • the principle and implementation manner of the present invention are described in the following.
  • the description of the above embodiment is only The method for understanding the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in specific embodiments and application scopes. The description should not be construed as limiting the invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Hardware Design (AREA)
  • Dram (AREA)

Abstract

A system and a method for adjusting dynamic random access memory (DRAM) operating frequency are provided. The DRAM operating frequency adjusting system comprises: a statistics module, for counting the effective operating state of DRAM in a predetermined time interval to acquire bandwidth utilization of current DRAM operating frequency; a parameter configuration module, including a target operating frequency configuration sub-module which is used for generating a target operating frequency; a frequency switch controller, for adjusting the current DRAM operating frequency to a target operating frequency. The system adjusts the performance power consumption balance point of the DRAM so as to improve operating speed of the chip system and save power consumption effectively.

Description

DRAM运行频率调整系统及方法 技术领域  DRAM operating frequency adjustment system and method
本发明涉及动态随机存取存储器 (DRAM) 的技术领域, 特别是涉及一 种 DRAM运行频率调整系统及方法。  The present invention relates to the field of dynamic random access memories (DRAMs), and more particularly to a DRAM operating frequency adjustment system and method.
背景技术 Background technique
DRAM (Dynamic Random-Access Memory), 即动态随机存取存储器。 DRAM (Dynamic Random-Access Memory), which is a dynamic random access memory.
DRAM只能将数据保持很短的时间。 DRAM使用电容存储, 必须隔一段时间 刷新一次, 以便保持存储其中的数据, 这种刷新是由 DRAM控制器操作的。 DRAM的刷新操作消耗了相对大量的功率, 要求的电池容量较大。 DRAM can only keep data for a short time. DRAM uses capacitor storage and must be refreshed at intervals to maintain the data stored therein. This refresh is handled by the DRAM controller. The refresh operation of the DRAM consumes a relatively large amount of power, and the required battery capacity is large.
作为一种典型的片上集成系统(SOC), 多媒体芯片系统具有多个功能模 块, 如处理器, 硬件加速器等。 这些功能模块独立运行, 根据需要访问各种 存储器资源。 由于多媒体芯片系统的一些功能模块在进行数据处理时一般将 文件或临时数据存放于外部 DRAM来降低系统成本。对于复杂的多媒体芯片 系统, 不同的任务对于存储器的带宽要求可能有非常大的差别。 如播放高清 格式的流媒体文件时, 多媒体芯片系统需要处理器和硬件加速器全速运行, DRAM的运行频率在 166MHz以上; 而播放 MP3时, 多媒体芯片系统的运 算量和需要的存储器带宽急剧减少, DRAM运行在 50MHz即可满足要求。 如此, 多媒体芯片对功耗的要求就提高了。  As a typical on-chip integrated system (SOC), a multimedia chip system has multiple functional modules, such as processors, hardware accelerators, and the like. These function modules operate independently and access various memory resources as needed. Since some functional modules of the multimedia chip system generally store files or temporary data in an external DRAM during data processing, the system cost is reduced. For complex multimedia chip systems, different tasks may have very large differences in memory bandwidth requirements. For example, when playing streaming media files in high-definition format, the multimedia chip system needs the processor and hardware accelerator to run at full speed, and the running frequency of DRAM is above 166MHz. When playing MP3, the computing capacity of the multimedia chip system and the required memory bandwidth are drastically reduced, DRAM Running at 50MHz will meet the requirements. As such, the power requirements of the multimedia chip are increased.
传统的多媒体芯片系统没有充分考虑到这些任务的特点, 只能在特殊的 阶段, 如系统启动时通过软件预先配置 DRAM的运行频率, 很难找到一个正 确的性能和功耗的平衡点。  Traditional multimedia chip systems do not fully take into account the characteristics of these tasks. It is difficult to find a correct balance between performance and power consumption at a special stage, such as when the system is pre-configured with DRAM operating frequency at system startup.
因而, 目前需要本领域技术人员迫切解决的一个技术问题就是: 如何能 够创造性地提供一种调整 DRAM运行频率的方法, 以调整 DRAM的性能和 功耗之间的平衡点,从而在保证芯片系统的运行速度的同时,有效改善 DRAM 的功耗问题。  Therefore, a technical problem that needs to be solved urgently by those skilled in the art is: how to creatively provide a method for adjusting the operating frequency of the DRAM to adjust the balance between the performance and the power consumption of the DRAM, thereby ensuring the chip system. While running at a high speed, it effectively improves the power consumption of the DRAM.
发明内容 Summary of the invention
本发明所要解决的技术问题是提供一种能够调整 DRAM运行频率的解 决方案以及应用该解决方案的 DRAM运行频率调整系统, 以调整 DRAM的 性能和功耗的平衡点。 The technical problem to be solved by the present invention is to provide a solution capable of adjusting the operating frequency of a DRAM and a DRAM operating frequency adjustment system using the solution to adjust the DRAM. A balance of performance and power consumption.
为了解决上述技术问题, 本发明提供一种 DRAM运行频率调整系统, 包 括:  In order to solve the above technical problem, the present invention provides a DRAM operating frequency adjustment system, which includes:
统计模块, 统计预设时间间隔内 DRAM的有效工作状态;  The statistics module calculates the effective working state of the DRAM in the preset time interval;
参数配置模块, 根据 DRAM的有效工作状态的统计生成目标运行频率; 及  a parameter configuration module, generating a target operating frequency according to statistics of an effective working state of the DRAM; and
频率切换控制器,将所述 DRAM的当前运行频率调整至所述目标运行频 率。  And a frequency switching controller that adjusts a current operating frequency of the DRAM to the target operating frequency.
本发明还提供了一种 DRAM运行频率调整方法, 包括:  The invention also provides a method for adjusting the operating frequency of a DRAM, comprising:
统计预设时间间隔内 DRAM的有效工作状态, 获得当前 DRAM运行频 率的带宽利用率;  Count the effective working state of the DRAM in the preset time interval, and obtain the bandwidth utilization rate of the current DRAM operating frequency;
在所述带宽利用率不适于当前应用场景的运行状况时, 生成目标运行频 率;  Generating a target operating frequency when the bandwidth utilization is not suitable for the running condition of the current application scenario;
将所述当前 DRAM运行频率调整至所述目标运行频率。  The current DRAM operating frequency is adjusted to the target operating frequency.
与现有技术相比, 本发明具有以下优点:  Compared with the prior art, the present invention has the following advantages:
本发明通过统计预设时间间隔内 DRAM 的有效工作状态来获得当前 DRAM运行频率的带宽利用率, 并在所述带宽利用率不适于当前应用场景的 运行状况时, 将当前 DRAM运行频率调整至适于当前应用场景的运行频率。 具体而言, 在 DRAM运行频率低、 带宽利用率高的情形下, 可以根据当前应 用场景提高当前 DRAM的运行频率; 在 DRAM运行频率高、 带宽利用率低 的情形下, 可以根据当前应用场景降低当前 DRAM的运行频率。这种依据带 宽利用率动态调整运行频率的方式更利于平衡 DRAM的运行效率和功耗。 附图说明  The invention obtains the bandwidth utilization rate of the current DRAM operating frequency by counting the effective working state of the DRAM in the preset time interval, and adjusts the current DRAM operating frequency to the appropriate when the bandwidth utilization is not suitable for the operating condition of the current application scenario. The operating frequency of the current application scenario. Specifically, in the case of low DRAM operating frequency and high bandwidth utilization, the current operating frequency of the DRAM can be improved according to the current application scenario; in the case of high DRAM operating frequency and low bandwidth utilization, the current application scenario can be reduced. Current operating frequency of DRAM. This way of dynamically adjusting the operating frequency based on bandwidth utilization is more conducive to balancing the operating efficiency and power consumption of the DRAM. DRAWINGS
图 1是 DRAM运行频率调整系统实施例的结构框图;  1 is a structural block diagram of an embodiment of a DRAM operating frequency adjustment system;
图 2是 DRAM的工作状态分布图;  Figure 2 is a diagram showing the operation state of the DRAM;
图 3是统计模块实施例的结构框图;  3 is a structural block diagram of an embodiment of a statistical module;
图 4是参数配置模块的一实施例的结构框图;  4 is a structural block diagram of an embodiment of a parameter configuration module;
图 5是 DRAM运行频率调整系统另一实施例的结构框图;  5 is a structural block diagram of another embodiment of a DRAM operating frequency adjustment system;
图 6是一种 DRAM工作时序图; 图 7是参数配置模块的另一实施例的结构框图; Figure 6 is a timing diagram of DRAM operation; 7 is a structural block diagram of another embodiment of a parameter configuration module;
图 8是频率切换控制器的实施例的结构框图;  Figure 8 is a block diagram showing the structure of an embodiment of a frequency switching controller;
图 9是 DRAM控制器的实施例的结构框图;  Figure 9 is a block diagram showing the structure of an embodiment of a DRAM controller;
图 10是 DRAM运行频率调整方法实施例的流程图。  Figure 10 is a flow chart of an embodiment of a DRAM operating frequency adjustment method.
具体实施方式 detailed description
为使本发明的上述目的、 特征和优点能够更加明显易懂, 下面结合附图 和具体实施方式对本发明作进一步详细的说明。  The present invention will be further described in detail with reference to the accompanying drawings and specific embodiments.
参考图 1, 示出了本发明一种 DRAM运行频率调整系统 100实施例的结 构框图。 DRAM运行频率调整系统 100包括统计模块 11、 参数配置模块 12 及频率切换控制器 13。  Referring to Figure 1, there is shown a block diagram of an embodiment of a DRAM operating frequency adjustment system 100 of the present invention. The DRAM operating frequency adjustment system 100 includes a statistic module 11, a parameter configuration module 12, and a frequency switching controller 13.
统计模块 11统计 DRAM的有效工作状态,并可以通过对 DRAM的有效 工作状态的统计而获得 DRAM当前的带宽利用率,即 DRAM在当前运行频 率下的带宽利用率。  The statistical module 11 counts the effective working state of the DRAM, and can obtain the current bandwidth utilization of the DRAM by counting the effective working state of the DRAM, that is, the bandwidth utilization of the DRAM at the current operating frequency.
参数配置模块 12 根据统计模块所作的统计生成适合当前运行环境的目 标运行频率。  The parameter configuration module 12 generates a target operating frequency suitable for the current operating environment based on the statistics made by the statistical module.
频率切换控制器 13将 DRAM当前的运行频率调整至所述目标运行频率。 在实际应用中, 统计模块 11可以在一个预设时间间隔内统计 DRAM的 工作状态,根据在所述预设时间间隔内 DRAM的工作状态的统计结果计算出 在某一预设时间间隔内 DRAM当前运行频率下的带宽利用率。  The frequency switching controller 13 adjusts the current operating frequency of the DRAM to the target operating frequency. In an actual application, the statistics module 11 can calculate the working state of the DRAM in a preset time interval, and calculate the current DRAM in a preset time interval according to the statistical result of the working state of the DRAM in the preset time interval. Bandwidth utilization at operating frequency.
DRAM的工作状态由 DRAM的数据访问命令决定。 这些命令都是通过 DRAM控制器 91中的有限状态机 910来产生。 请参考图 2, 与这些数据访 问命令相对应地, 有限状态机的工作状态一般包括等待 (IDLE) , 预充电 (PRE), 激活 (ACT), 读 (READ ) , 写 (WRIT) 等。 因此, 统计模块 11通 过统计有限状态机 910的非等待工作状态即可以获得 DRAM有效工作状态的 统计。统计模块 11就是通过在某一预设的时间间隔内统计有限状态机 910的 非等待工作状态, 来确定 DRAM的实时的带宽利用率, 决定 DRAM的频率 是否需要调整。  The operating state of the DRAM is determined by the data access commands of the DRAM. These commands are all generated by the finite state machine 910 in the DRAM controller 91. Referring to FIG. 2, corresponding to these data access commands, the working state of the finite state machine generally includes waiting (IDLE), pre-charging (PRE), activating (ACT), reading (READ), writing (WRIT), and the like. Therefore, the statistics module 11 can obtain the statistics of the effective working state of the DRAM by counting the non-waiting working state of the finite state machine 910. The statistic module 11 determines the real-time bandwidth utilization of the DRAM by counting the non-waiting operation state of the finite state machine 910 within a predetermined time interval, and determines whether the DRAM frequency needs to be adjusted.
所述预设时间间隔可根据当前应用场景配置。当 DRAM在当前运行频率 下的带宽利用率不适于当前应用场景的运行状况时,所述统计模块 11会以某 种方式(如中断的方式)通知所述参数配置模块 12, 由所述参数配置模块 12 根据实际需要的带宽利用率, 生成适合当前应用场景的目标运行频率。 频率 切换控制器 13将 DRAM当前的运行频率调整至所述目标运行频率。 如此, 通过动态统计带宽利用率而实时调整 DRAM的运行频率的方式,使得 DRAM 的运行效率和功耗之间处于较好的平衡点。 The preset time interval may be configured according to a current application scenario. When the bandwidth utilization of the DRAM at the current operating frequency is not suitable for the running condition of the current application scenario, the statistics module 11 may use a certain The parameter configuration module 12 is notified by the parameter configuration module 12 to generate a target operating frequency suitable for the current application scenario according to the actual required bandwidth utilization. The frequency switching controller 13 adjusts the current operating frequency of the DRAM to the target operating frequency. In this way, by dynamically counting the bandwidth utilization and adjusting the operating frequency of the DRAM in real time, the operating efficiency and power consumption of the DRAM are at a good balance point.
请参照图 3在本发明的一种优选实施例中,所述统计模块 11可以包括有 效工作状态统计子模块 111和中断控制模块 112。  Referring to FIG. 3, in a preferred embodiment of the present invention, the statistics module 11 may include an effective working status statistics sub-module 111 and an interrupt control module 112.
有效工作状态统计子模块 111累计预设时间间隔内 DRAM控制器 91中 的有限状态机 910的非等待工作状态, 获得 DRAM的有效工作状态。所述非 等待工作状态包括有限状态机 910 与各种数据访问命令对应的预充电、 激 活、 读、 写等工作状态。  The valid working state statistics sub-module 111 accumulates the non-waiting working state of the finite state machine 910 in the DRAM controller 91 within the preset time interval to obtain the effective working state of the DRAM. The non-waiting operating state includes pre-charging, activating, reading, writing, and the like working states of the finite state machine 910 corresponding to various data access commands.
中断控制模块 112根据 DRAM在当前运行频率下的带宽利用率产生调整 DRAM的运行频率的中断信号。 该中断信号包括一第一中断信号及一第二中 断信号。 在所述预设时间间隔结束时, 当所述当前带宽利用率低于实际需要 的带宽利用率时, 中断控制模块 112产生表示需要降低 DRAM的运行频率的 第一中断信号; 在所述预设时间间隔内, 当所述有限状态机 910的非等待工 作状态的累计值超出预置的中断条件阈值时, 中断控制模块 112产生表示需 要提高 DRAM的运行频率的第二中断信号。  The interrupt control module 112 generates an interrupt signal that adjusts the operating frequency of the DRAM based on the bandwidth utilization of the DRAM at the current operating frequency. The interrupt signal includes a first interrupt signal and a second interrupt signal. At the end of the preset time interval, when the current bandwidth utilization is lower than the actually required bandwidth utilization, the interrupt control module 112 generates a first interrupt signal indicating that the operating frequency of the DRAM needs to be reduced; During the time interval, when the accumulated value of the non-waiting operating state of the finite state machine 910 exceeds the preset interrupt condition threshold, the interrupt control module 112 generates a second interrupt signal indicating that the operating frequency of the DRAM needs to be increased.
有效工作状态统计子模块 111 进一步可以包括统计时间间隔寄存器 1110、 时间计数器 1112、 状态计数器 1113及累计状态寄存器 1114。  The valid working status statistics sub-module 111 may further include a statistical time interval register 1110, a time counter 1112, a status counter 1113, and a cumulative status register 1114.
统计时间间隔寄存器 1110配置所述预设时间间隔。  The statistical time interval register 1110 configures the preset time interval.
时间计数器 1112在所述预设时间间隔内计时,并在一个预设时间间隔结 束时自动清零其计时值。  The time counter 1112 counts during the preset time interval and automatically clears its timing value when a predetermined time interval ends.
状态计数器 1113在所述预设时间间隔内实时地累计 DRAM控制器 91中 有限状态机 910的非等待工作状态, 以及, 在所述时间计数器 1112的计时值 等于所述统计时间间隔寄存器 1110配置的时间间隔时, 状态计数器 1113将 其计数值复制到累计状态寄存器 1114, 同时自动清零其计数值。 也就是说, 状态计数器 1113 的计数值在所述预设时间间隔内随着时间变化。 当所述 时间计数器 1112的计时值等于所述统计时间间隔寄存器 1110配置的时间 间隔时,状态计数器 1113的计数值为所述预设时间间隔内有限状态机 910 的非等待工作状态的累计结果。 The status counter 1113 accumulates the non-waiting operation state of the finite state machine 910 in the DRAM controller 91 in real time during the preset time interval, and the timing value of the time counter 1112 is equal to the configuration of the statistical time interval register 1110. At the time interval, the status counter 1113 copies its count value to the accumulation status register 1114 while automatically clearing its count value. That is, the count value of the status counter 1113 changes over time within the preset time interval. When the timing value of the time counter 1112 is equal to the time configured by the statistical time interval register 1110 At the time of the interval, the count value of the state counter 1113 is the cumulative result of the non-waiting operation state of the finite state machine 910 within the preset time interval.
累计状态寄存器 1114,在所述时间计数器 1112的计时值等于所述统计时 间间隔寄存器 1110配置的时间间隔时, 存储所述状态计数器 1113的计数值。 根据累计状态寄存器 1114的计数值即可以确定 DRAM在所述时间间隔内的 带宽利用率。  The accumulation status register 1114 stores the count value of the status counter 1113 when the timing value of the time counter 1112 is equal to the time interval configured by the statistical time interval register 1110. The bandwidth utilization of the DRAM during the time interval can be determined based on the count value of the accumulated status register 1114.
中断控制模块 112进一步可以包括中断条件阈值寄存器 1121及中断控制 逻辑模块 1123。  The interrupt control module 112 can further include an interrupt condition threshold register 1121 and an interrupt control logic module 1123.
中断条件阈值寄存器 1121配置带宽利用率阈值。  The Interrupt Condition Threshold Register 1121 configures the bandwidth utilization threshold.
中断控制逻辑模块 1123根据状态计数器 1113在所述预设时间间隔内的 计数值及所述带宽利用率阈值,或者根据累计状态寄存器 1114所保存的计数 值, 发出中断信号。  The interrupt control logic module 1123 issues an interrupt signal based on the count value of the status counter 1113 within the preset time interval and the bandwidth utilization threshold, or based on the count value held by the cumulative status register 1114.
中断控制逻辑模块 1123包括第一中断控制单元 1123a及第二中断控制单 元 1123b。第一中断控制单元 1123a在所述预设时间间隔结束时,根据累计状 态寄存器 1114的计数值判断 DRAM在当前运行频率下的带宽利用率是否偏 低, 及, 当 DRAM在当前运行频率下的带宽利用率低于需求值, 产生表示 需要降低 DRAM的运行频率的第一中断信号。第二中断控制单元 1123b在所 述预设时间间隔内,根据状态计数器 1113的计数值及所述带宽利用率阈值判 断 DRAM在当前运行频率下的带宽利用率是否偏高, 及, 当 DRAM在当前 运行频率下的带宽利用率偏高时,即 DRAM在当前运行频率下的带宽利用率 超出所述带宽利用率阈值,产生表示需要提高 DRAM的运行频率的第二中断 信号。  The interrupt control logic module 1123 includes a first interrupt control unit 1123a and a second interrupt control unit 1123b. The first interrupt control unit 1123a determines, at the end of the preset time interval, whether the bandwidth utilization of the DRAM at the current operating frequency is low according to the count value of the cumulative status register 1114, and the bandwidth of the DRAM at the current operating frequency. The utilization is lower than the demand value, and a first interrupt signal indicating that the operating frequency of the DRAM needs to be reduced is generated. The second interrupt control unit 1123b determines, according to the count value of the state counter 1113 and the bandwidth utilization threshold, whether the bandwidth utilization of the DRAM at the current operating frequency is high during the preset time interval, and when the DRAM is currently When the bandwidth utilization rate at the operating frequency is too high, that is, the bandwidth utilization of the DRAM at the current operating frequency exceeds the bandwidth utilization threshold, a second interrupt signal indicating that the operating frequency of the DRAM needs to be increased is generated.
相应地,请参照图 4,参数配置模块 12包括目标运行频率配置子模块 121, 目标运行频率配置子模块 121包括:  Correspondingly, referring to FIG. 4, the parameter configuration module 12 includes a target operating frequency configuration sub-module 121, and the target operating frequency configuration sub-module 121 includes:
第一配置单元 1211, 依据所述第一中断信号生成低于当前 DRAM运行 频率的目标运行频率; 及  The first configuration unit 1211 generates a target operating frequency lower than the current DRAM operating frequency according to the first interrupt signal; and
第二配置单元 1212, 依据所述第二中断信号生成高于当前 DRAM运行 频率的目标运行频率。  The second configuration unit 1212 generates a target operating frequency higher than the current DRAM operating frequency according to the second interrupt signal.
在本实施例中, 中断信号产生包括两种情形。 一种情形中, 在所述预设 时间间隔结束时, 根据累计状态寄存器值 1114的计数值确定的 DRAM的带 宽利用率低于实际需要的带宽利用率时, 中断控制逻辑模块 1123可以向系统 发出第一中断信号, 表示 DRAM当前的运行频率偏高了。 另一种情形中, 中 断控制逻辑模块 1123在预设时间间隔内,实时地根据状态计数器值的计数值 确定 DRAM实时的带宽利用率,当该实时的带宽利用率超过了所述带宽利用 率阈值, 那么中断控制逻辑模块 1123将发出第一中断信号, 表示 DRAM当 前的运行频率偏低了。 In the present embodiment, the interrupt signal generation includes two cases. In one case, at the preset At the end of the time interval, when the bandwidth utilization of the DRAM determined according to the count value of the accumulated status register value 1114 is lower than the actual required bandwidth utilization, the interrupt control logic module 1123 may issue a first interrupt signal to the system indicating the current operation of the DRAM. The frequency is too high. In another case, the interrupt control logic module 1123 determines the real-time bandwidth utilization of the DRAM according to the count value of the state counter value in real time during a preset time interval, when the real-time bandwidth utilization exceeds the bandwidth utilization threshold. Then, the interrupt control logic module 1123 will issue a first interrupt signal indicating that the current operating frequency of the DRAM is low.
图 2示出了 DRAM的几种工作状态。 在图 2中, 除了 IDLE (空闲) 状 态, 其它工作状态都是 DRAM的有效工作状态, 即有限状态机 910的非等待 工作状态。 假设当前 DRAM运行频率是 160MHz, 状态计数器在一秒内累计 计数 80M 次, 那么当前 DRAM 运行频率的带宽利用率就是 (80/160 ) *100%=50%。  Figure 2 shows several operating states of the DRAM. In Figure 2, except for the IDLE state, the other operating states are the active operating states of the DRAM, i.e., the non-waiting state of the finite state machine 910. Assuming that the current DRAM operating frequency is 160MHz and the status counter accumulates 80M times in one second, the bandwidth utilization of the current DRAM operating frequency is (80/160) *100%=50%.
例如, DRAM当前的运行频率为 120MHz, DRAM为 SDRAM 16bit的存 储器, 统计模块 11获得的带宽利用率的统计结果是 20%, 即 DRAM当前的 有效带宽是 120*16*20% = 384Mbps。在应用场景不改变的前提下, 可以认为 该带宽利用率稳定。 如果认为带宽利用率是 60%是更合适的, 中断控制模块 112发出第一中断信号, 由参数配置模块 12将 DRAM 的目标运行频率配置 为 384/16/60% MHz, 也就是 40MHz。 频率切换控制器 13将 DRAM的运行 频率切换至 40MHz。此时,有效带宽也是 40*16*60% Mbps,也就是 384Mbps, 但 DRAM的运行频率降低了, 节省了 DRAM的功耗。  For example, the current operating frequency of DRAM is 120MHz, and the DRAM is SDRAM 16bit memory. The statistical result of bandwidth utilization obtained by the statistical module 11 is 20%, that is, the current effective bandwidth of the DRAM is 120*16*20%=384Mbps. Under the premise that the application scenario does not change, the bandwidth utilization can be considered stable. If it is considered that the bandwidth utilization is 60%, the interrupt control module 112 issues a first interrupt signal, and the parameter configuration module 12 configures the target operating frequency of the DRAM to be 384/16/60% MHz, that is, 40 MHz. The frequency switching controller 13 switches the operating frequency of the DRAM to 40 MHz. At this time, the effective bandwidth is also 40*16*60% Mbps, which is 384 Mbps, but the operating frequency of the DRAM is reduced, saving the power consumption of the DRAM.
或如, 当前 DRAM的运行频率为 40MHz, DRAM为 SDRAM 16bit的存 储器。针对当前应用场景设置的带宽利用率阈值是 60%。如果统计模块 11获 得的带宽利用率是 80%, 超出了带宽利用率阈值 (60% ), 中断控制模块 112 将发出第二中断信号。 如果认为在当前应用场景下带宽利用率是 40%是更合 适的, 参数配置模块 12 将 DRAM 的目标运行频率配置为 (40*16*80% ) /16/40% MHz, 也就是 80 MHz。 频率切换控制器 13将 DRAM的运行频率切 换至 80MHz。 这样, DRAM的运行效率得到了提升。  Or, for example, the current DRAM runs at 40MHz and the DRAM is a SDRAM 16bit memory. The bandwidth utilization threshold set for the current application scenario is 60%. If the bandwidth utilization obtained by the statistic module 11 is 80% and the bandwidth utilization threshold (60%) is exceeded, the interrupt control module 112 will issue a second interrupt signal. If it is considered that the bandwidth utilization is 40% in the current application scenario, the parameter configuration module 12 configures the target operating frequency of the DRAM to be (40*16*80%) /16/40% MHz, that is, 80 MHz. The frequency switching controller 13 switches the operating frequency of the DRAM to 80 MHz. In this way, the operating efficiency of the DRAM is improved.
请参照图 5, 为了避免在频率调整时 DRAM丢失数据, 在本发明实施例 中, 所述 DRAM运行频率调整系统 100还可以包括时钟控制模块 15。 时钟 控制模块 15用于在所述频率切换控制器 13工作时,控制 DRAM按照内部时 钟进行刷新操作, 以及,在所述频率切换控制器 13完成工作后,控制 DRAM 按照系统时钟进行刷新操作。 Referring to FIG. 5, in order to avoid data loss of the DRAM during frequency adjustment, in the embodiment of the present invention, the DRAM operating frequency adjustment system 100 may further include a clock control module 15. Clock The control module 15 is configured to control the DRAM to perform a refresh operation according to an internal clock when the frequency switching controller 13 is in operation, and to control the DRAM to perform a refresh operation according to the system clock after the frequency switching controller 13 completes the operation.
在实际应用中, DRAM刷新操作分为两种: 自动刷新 (Auto Refresh: AR) 与自刷新 (Self Refresh: SR)。 相应地, DRAM有 AR模式和 SR模式 两种工作模式。 在 AR模式下, DRAM按照系统时钟进行刷新操作; 在 SR 模式下, DRAM不再依靠系统时钟工作, 而是根据内部时钟进行刷新操作。 在 DRAM进入 SR模式后, 不需要为 DRAM提供系统时钟, 所以此时可以 进行系统时钟频率的切换,也即将 DRAM当前运行频率调整至所述目标运行 频率。 而在退出 SR模式后, DRAM会在所述目标运行频率下工作。  In practical applications, there are two types of DRAM refresh operations: Auto Refresh (AR) and Self Refresh (SR). Accordingly, DRAM has two modes of operation, AR mode and SR mode. In AR mode, DRAM is refreshed according to the system clock. In SR mode, DRAM no longer relies on the system clock to operate, but refreshes according to the internal clock. After the DRAM enters the SR mode, it is not necessary to provide the system clock for the DRAM, so the system clock frequency can be switched at this time, that is, the current operating frequency of the DRAM is adjusted to the target operating frequency. After exiting the SR mode, the DRAM will operate at the target operating frequency.
参照图 6所示的 DRAM工作时序图,图中 CLK为提供给 DRAM的系统 时钟, 其在时刻 T2以前的频率和时刻 Tn+1后的频率可以不同。 在本发明实 施例中, Τ2前的系统时钟频率为当前 DRAM运行频率, 在 T2~Tn+l时序内 进行频率切换操作。 时刻 Tn+1后的系统时钟频率则为目标运行频率。  Referring to the DRAM operation timing chart shown in Fig. 6, CLK is the system clock supplied to the DRAM, and the frequency before the time T2 and the frequency after the time Tn+1 may be different. In the embodiment of the present invention, the system clock frequency before Τ2 is the current DRAM operating frequency, and the frequency switching operation is performed within the timing of T2~Tn+l. The system clock frequency after time Tn+1 is the target operating frequency.
由于在 SR模式下除了时钟使能信号 (Clock Enable: CKE) 之外的所有 外部信号都是无效的, 无需外部提供刷新指令, 如此使得 SR模式下的频率 切换操作能够让 DRAM的效率和功耗之间达到了平衡而且不会导致数据的 丢失。  Since all external signals except the clock enable signal (Clock Enable: CKE) are invalid in SR mode, there is no need to externally provide a refresh command, so that the frequency switching operation in SR mode can make DRAM efficiency and power consumption. The balance is reached and does not result in the loss of data.
为保证系统时钟在频率切换完成时生效, 所述系统时钟可由时序检查参 数确定。 请参照图 5, 所述 DRAM运行频率调整系统 100可以进一步包括时 序检查参数生效模块 16。 时序检查参数生效模块 16用于依据所述目标运行 频率获得对应的时序检查参数。  To ensure that the system clock is in effect at the completion of the frequency switching, the system clock can be determined by the timing check parameters. Referring to FIG. 5, the DRAM operating frequency adjustment system 100 may further include a timing check parameter validation module 16. The timing check parameter validation module 16 is configured to obtain a corresponding timing check parameter according to the target operating frequency.
一般来说, 时序检查参数是和 DRAM的系统时钟频率成线性关系的。例 如, 假设 DRAM的刷新间隔是 10μ8, 那么在 100 MHz的频率下, 需要将时 序检查参数配置成 1000; 在 10 MHz的频率下, 需要将时序检查参数配置成 100。  In general, the timing check parameters are linear with the system clock frequency of the DRAM. For example, assuming a DRAM refresh interval of 10μ8, then at 100 MHz, the timing check parameter needs to be configured to 1000; at 10 MHz, the timing check parameter needs to be configured to 100.
所述时钟控制模块 15和时序检查参数生效模块 16可以位于 DRAM控制 器中, 也可以位于 DRAM控制器外部。  The clock control module 15 and the timing check parameter validation module 16 may be located in the DRAM controller or external to the DRAM controller.
可以理解地,所述 DRAM运行频率调整系统 100也可以包括与所述频率 切换控制器连接的 DRAM控制器 91。 It can be understood that the DRAM operating frequency adjustment system 100 can also include the frequency The DRAM controller 91 to which the controller is connected is switched.
请参照图 7, 所述参数配置模块 12还可以包括:  Referring to FIG. 7, the parameter configuration module 12 may further include:
频率切换请求信号配置子模块 122, 用于配置默认值为无效的频率切换 请求信号;  The frequency switching request signal configuration sub-module 122 is configured to configure a frequency switching request signal whose default value is invalid;
握手信号配置子模块 123, 用于配置默认值为无效的握手信号; 及 时序检查参数配置子模块 124, 用于针对 DRAM运行频率分别配置对应 的时序检查参数。  The handshake signal configuration sub-module 123 is configured to configure a handshake signal whose default value is invalid; and a timing check parameter configuration sub-module 124 configured to respectively configure corresponding timing check parameters for the DRAM operating frequency.
请参照图 8, 所述频率切换控制器 13可以包括频率切换请求生成模块 131、 频率切换模块 133及无效请求信号设置模块 135。  Referring to FIG. 8, the frequency switching controller 13 may include a frequency switching request generating module 131, a frequency switching module 133, and an invalid request signal setting module 135.
频率切换请求生成模块 131用于生成频率切换请求, 并将所述频率切换 请求信号置为有效。  The frequency switching request generation module 131 is configured to generate a frequency switching request and set the frequency switching request signal to be valid.
频率切换模块 133用于依据有效的握手信号,将当前 DRAM运行频率切 换为目标运行频率。  The frequency switching module 133 is configured to switch the current DRAM operating frequency to the target operating frequency according to the valid handshake signal.
无效请求信号设置模块 135用于在所述频率切换模块完成频率切换后, 将所述频率切换请求信号恢复为无效。  The invalid request signal setting module 135 is configured to restore the frequency switching request signal to be invalid after the frequency switching module completes the frequency switching.
请参照图 9, 所述 DRAM控制器 91还可以包括自刷新控制模块 912、握 手信号触发模块 913、 时序检查参数确定模块 914、 自刷新退出模块 915及握 手信号关闭模块 916。  Referring to FIG. 9, the DRAM controller 91 may further include a self-refresh control module 912, a handshake signal triggering module 913, a timing check parameter determining module 914, a self-refresh exiting module 915, and a handshake signal closing module 916.
自刷新控制模块 912用于依据频率切换请求的有效信号,发出 DRAM按 照内部时钟进行刷新的第一控制命令。  The self-refresh control module 912 is configured to issue a first control command for the DRAM to refresh according to the internal clock according to the valid signal of the frequency switching request.
握手信号触发模块 913用于在发出所述第一控制命令后, 将所述握手信 号置为有效。  The handshake signal triggering module 913 is configured to assert the handshake signal after issuing the first control command.
时序检查参数确定模块 914用于在所述频率切换请求信号被恢复为无效 时, 提取所述目标运行频率对应的时序检查参数。  The timing check parameter determining module 914 is configured to extract a timing check parameter corresponding to the target operating frequency when the frequency switching request signal is restored to be invalid.
自刷新退出模块 915用于依据所述时序检查参数确定系统时钟, 并发出 DRAM按照所述系统时钟进行刷新的第二控制命令。  The self-refresh exit module 915 is configured to determine a system clock according to the timing check parameter, and issue a second control command that the DRAM refreshes according to the system clock.
握手信号关闭模块 916, 用于在发出第二控制命令后, 将所述握手信号 恢复为无效。  The handshake signal closing module 916 is configured to restore the handshake signal to be invalid after issuing the second control command.
更为优选的, 为避免在频率调整时 DRAM丢失数据, 所述 DRAM控制 器可以进一步包括: More preferably, in order to avoid DRAM loss data during frequency adjustment, the DRAM control The device can further include:
数据请求中止模块 917, 用于在接收到频率切换请求的有效信号后, 发 出第一控制命令前, 执行已接收的数据请求, 并停止响应新的数据请求; 及 数据请求执行模块 918, 用于在所述握手信号恢复为无效时, 接收新的 数据请求。  The data request suspension module 917 is configured to: after receiving the valid signal of the frequency switching request, execute the received data request, and stop responding to the new data request before issuing the first control command; and the data request execution module 918, configured to: When the handshake signal is restored to be invalid, a new data request is received.
在实际中, DRAM控制器 91接受外部对 DRAM的数据访问请求。 DRAM 控制器 91可在频率切换前,首先完成当前所有已经进入 DRAM控制器 91的 数据访问请求, 同时不响应新的数据访问请求, 也即阻止功能模块访问 DRAM。 如此, 避免了出现在频率调整过程中数据丢失的情形。  In practice, the DRAM controller 91 accepts external data access requests to the DRAM. The DRAM controller 91 can first complete all current data access requests that have entered the DRAM controller 91 prior to frequency switching without simultaneously responding to new data access requests, i.e., preventing the functional modules from accessing the DRAM. In this way, the situation of data loss during the frequency adjustment process is avoided.
此外, DRAM在自刷新模式下, 除了时钟使能信号(Clock Enable: CKE) 之外的所有外部信号都是无效的, 无需外部提供刷新指令, 有助于进一步改 善功耗。  In addition, in the self-refresh mode, all external signals except the clock enable signal (Clock Enable: CKE) are invalid, and no external refresh command is required, which helps to further improve power consumption.
为使本领域技术人员更好地理解本发明, 以下基于上述优选实施例对 DRAM运行频率调整系统的工作过程进行说明。  In order to enable those skilled in the art to better understand the present invention, the operation of the DRAM operating frequency adjustment system will be described below based on the above preferred embodiments.
假设在参数配置模块中, 已由目标运行频率配置子模块 121生成了目标 运行频率; 频率切换请求信号配置子模块 122 配置频率切换请求信号 clock—switch—request (频率切换请求信号 clock—switch—request 以下简称为 csr) 的默认值, 频率切换请求信号 csr的默认值表征为无效, 即频率切换请 求信号 csr的默认值设为二进制代码 0,握手信号配置子模块配置 123握手信 号 sdrc_lock (握手信号 sdrc_lock以下简称为 si)的默认值, 握手信号 si的默 认值表征为无效, 即握手信号 si的默认值设为二进制代码 0。 时序检查参数 配置子模块针 124对 DRAM的当前运行频率及目标运行频率分别配置对应的 时序检查参数。  It is assumed that in the parameter configuration module, the target operating frequency has been generated by the target operating frequency configuration sub-module 121; the frequency switching request signal configuration sub-module 122 configures the frequency switching request signal clock_switch_request (frequency switching request signal clock_switch_request Hereinafter, the default value of csr) is used, and the default value of the frequency switching request signal csr is invalid, that is, the default value of the frequency switching request signal csr is set to binary code 0, and the handshake signal configuration sub-module configuration 123 handshake signal sdrc_lock (handshake signal sdrc_lock Hereinafter, the default value of the handshake signal si is invalid, that is, the default value of the handshake signal si is set to binary code 0. Timing Check Parameters The configuration sub-module pin 124 configures the corresponding timing check parameters for the current operating frequency of the DRAM and the target operating frequency.
在这种情况下,将 DRAM的当前运行频率切换至目标运行频率的过程可 以包括以下步骤:  In this case, the process of switching the current operating frequency of the DRAM to the target operating frequency may include the following steps:
步骤 S101、 频率切换请求生成模块 131生成频率切换请求信号 csr, 并 将频率切换请求信号 csr的值设置为有效状态, 即频率切换请求信号 csr的值 设为二进制代码 1 ;  Step S101, the frequency switching request generating module 131 generates a frequency switching request signal csr, and sets the value of the frequency switching request signal csr to an active state, that is, the value of the frequency switching request signal csr is set to binary code 1;
步骤 S102、 在检测到 csr的值为 1后, 自刷新控制模块 912发出 DRAM 按照内部时钟进行刷新操作的第一控制命令; Step S102, after detecting that the value of csr is 1, the self-refresh control module 912 issues a DRAM. a first control command for performing a refresh operation according to an internal clock;
步骤 S103、 握手信号触发模块 913将握手信号 si的值设置为有效状态, 即握手信号 si的值设为二进制代码 1 ;  Step S103, the handshake signal triggering module 913 sets the value of the handshake signal si to an active state, that is, the value of the handshake signal si is set to binary code 1;
步骤 S104、在检测到握手信号 si的值为 1后, 频率切换模块 133将当前 DRAM运行频率切换为目标运行频率;  Step S104, after detecting that the value of the handshake signal si is 1, the frequency switching module 133 switches the current DRAM operating frequency to the target operating frequency;
步骤 S105、 在完成频率切换后, 无效请求信号设置模块 135将频率切换 请求信号 csr的值恢复为 0;  Step S105, after completing the frequency switching, the invalid request signal setting module 135 restores the value of the frequency switching request signal csr to 0;
步骤 S106、 在检测到频率切换请求信号 csr的值为 0后, 时序检查参数 确定模块 914提取所述目标运行频率对应的时序检查参数;  Step S106: After detecting that the value of the frequency switching request signal csr is 0, the timing check parameter determining module 914 extracts the timing check parameter corresponding to the target operating frequency;
步骤 S107、 自刷新退出模块 915依据所述时序检查参数确定系统时钟, 并发出 DRAM按照所述系统时钟进行刷新操作的第二控制命令;  Step S107: The self-refresh exit module 915 determines a system clock according to the timing check parameter, and issues a second control command that the DRAM performs a refresh operation according to the system clock.
步骤 S108、 握手信号关闭模块 916将握手信号 si的值由 1恢复为 0。 当然,上述 DRAM控制器 91和频率切换控制器 13采用频率切换请求信 号和握手信号的交互方式仅仅用作示例, 本领域技术人员根据需要采用任一 交互方式都是可行的。  Step S108: The handshake signal closing module 916 restores the value of the handshake signal si from 1 to 0. Of course, the above-mentioned DRAM controller 91 and the frequency switching controller 13 use the frequency switching request signal and the handshake signal interaction mode only as an example, and any interaction mode is feasible by those skilled in the art as needed.
本发明可以适用于多媒体芯片系统, 当多媒体芯片系统的处理器, 硬件 加速器等功能模块访问 DRAM 时, 能够根据多媒体任务的特点, 自动调整 DRAM运行频率。  The invention can be applied to a multimedia chip system. When a function module such as a processor or a hardware accelerator of a multimedia chip system accesses DRAM, the DRAM operating frequency can be automatically adjusted according to the characteristics of the multimedia task.
参照图 10, 示出了本发明一种 DRAM运行频率调整方法实施例的流程 图, 具体可以包括:  Referring to FIG. 10, a flow chart of an embodiment of a DRAM operating frequency adjustment method according to the present invention is shown, which may specifically include:
步骤 401、统计预设时间间隔内 DRAM的有效工作状态,获得 DRAM在 当前运行频率下的带宽利用率;  Step 401: Count the effective working state of the DRAM in the preset time interval, and obtain the bandwidth utilization ratio of the DRAM at the current operating frequency;
步骤 402、 在所述带宽利用率不适于当前应用场景的运行状况时, 生成 目标运行频率;  Step 402: Generate a target running frequency when the bandwidth utilization is not suitable for the running condition of the current application scenario.
步骤 403、 将所述当前 DRAM运行频率调整至所述目标运行频率。  Step 403: Adjust the current DRAM operating frequency to the target operating frequency.
所述 DRAM的有效工作状态的统计步骤可以包括以下子步骤:  The statistical step of the effective operating state of the DRAM may include the following sub-steps:
子步骤 Al、 累计预设时间间隔内 DRAM控制器中有限状态机的非等待 工作状态, 获得 DRAM的有效工作状态; 及  Sub-step A1, accumulating the non-waiting working state of the finite state machine in the DRAM controller during the preset time interval, and obtaining the effective working state of the DRAM;
子步骤 A2、在所述预设时间间隔结束时, 根据 DRAM的有效工作状态, 确定 DRAM当前的带宽利用率; 当 DRAM当前的带宽利用率较低时, 产生 需要降低 DRAM 的工作频率的第一中断信号;当在所述预设时间间隔内, DRAM当前的带宽利用率超出预置中断条件阈值时, 产生提高 DRAM的工 作频率的第二中断信号。 Sub-step A2, at the end of the preset time interval, according to the effective working state of the DRAM, Determining the current bandwidth utilization of the DRAM; when the current bandwidth utilization of the DRAM is low, generating a first interrupt signal that needs to reduce the operating frequency of the DRAM; when the current bandwidth utilization of the DRAM exceeds the pre-predetermined time interval When the interrupt condition threshold is set, a second interrupt signal that increases the operating frequency of the DRAM is generated.
所述目标运行频率的生成步骤可以包括:  The generating step of the target operating frequency may include:
在第一中断信号产生时,依据所述第一中断信号生成低于当前 DRAM运 行频率的目标运行频率;或者, 在第二中断信号产生时, 依据所述第二中断信 号生成高于当前 DRAM运行频率的目标运行频率。  Generating a target operating frequency lower than a current DRAM operating frequency according to the first interrupt signal when the first interrupt signal is generated; or generating a higher than current DRAM running according to the second interrupt signal when the second interrupt signal is generated The target operating frequency of the frequency.
在本发明的一种优选实施例中,所述 DRAM运行频率调整方法还可以包 括:  In a preferred embodiment of the present invention, the DRAM operating frequency adjustment method may further include:
在频率调整时, 控制 DRAM按照内部时钟进行刷新操作, 以及, 在频率 调整完成时, 控制 DRAM按照系统时钟进行刷新操作。  During frequency adjustment, the DRAM is controlled to refresh according to the internal clock, and when the frequency adjustment is completed, the DRAM is controlled to refresh according to the system clock.
优选的, 所述系统时钟可由时序检查参数确定, 所述方法可以进一步包 括:  Preferably, the system clock is determined by a timing check parameter, and the method may further include:
依据所述目标运行频率获得对应的时序检查参数。  Corresponding timing check parameters are obtained according to the target operating frequency.
在本发明的一种优选实施例中, 所述方法还可以包括:  In a preferred embodiment of the present invention, the method may further include:
预先配置默认值为无效的频率切换请求信号,默认值为无效的握手信号, 以及, 对应各种 DRAM运行频率的时序检查参数;  The preset default value is an invalid frequency switching request signal, the default value is an invalid handshake signal, and timing check parameters corresponding to various DRAM operating frequencies;
所述运行频率调整步骤可以包括以下子步骤:  The operating frequency adjustment step may include the following sub-steps:
子步骤 Bl、 生成频率切换请求, 并将所述频率切换请求信号置为有效; 子步骤 B2、 依据所述频率切换请求的有效信号, 发出 DRAM按照内部 时钟进行刷新操作的第一控制命令;  Sub-step Bl, generating a frequency switching request, and setting the frequency switching request signal to be valid; sub-step B2, issuing a first control command for performing a refresh operation of the DRAM according to the internal clock according to the valid signal of the frequency switching request;
子步骤 B3、 在发出所述第一控制命令后, 将所述握手信号置为有效; 子步骤 B4、 依据有效的握手信号, 将当前 DRAM运行频率切换为目标 运行频率;  Sub-step B3, after the first control command is issued, the handshake signal is set to be valid; sub-step B4, according to the valid handshake signal, the current DRAM operating frequency is switched to the target operating frequency;
子步骤 B5、 在完成频率切换后, 将所述频率切换请求信号恢复为无效; 子步骤 B6、 在所述频率切换请求信号被恢复为无效时, 提取所述目标运 行频率对应的时序检查参数;  Sub-step B5, after the frequency switching is completed, the frequency switching request signal is restored to be invalid; sub-step B6, when the frequency switching request signal is restored to be invalid, the timing check parameter corresponding to the target operating frequency is extracted;
子步骤 B7、 依据所述时序检查参数确定系统时钟, 并发出 DRAM按照 子步骤 B8、 在发出所述第二控制命令后, 将所述握手信号恢复为无效。 在实际中,为避免在频率调整时 DRAM丢失数据,所述方法还可以包括: 在接收到频率切换请求的有效信号后, 发出所述第一控制命令前, 执行 已接收的数据请求, 并停止响应新的数据请求; Sub-step B7, determining a system clock according to the timing check parameter, and issuing a DRAM according to Sub-step B8, after the second control command is issued, the handshake signal is restored to be invalid. In practice, in order to avoid data loss of the DRAM during frequency adjustment, the method may further include: after receiving the valid signal of the frequency switching request, executing the received data request, and stopping before issuing the first control command Respond to new data requests;
在所述握手信号恢复为无效时, 接收新的数据请求。  When the handshake signal is restored to be invalid, a new data request is received.
对于方法实施例而言, 由于其与装置实施例基本相似, 所以描述的比较 简单, 相关之处参见装置实施例的部分说明即可。  For the method embodiment, since it is basically similar to the device embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the device embodiment.
以上对本发明所提供的一种 DRAM运行频率调整系统及一种 DRAM运 行频率调整方法进行了详细介绍, 本文中应用了具体个例对本发明的原理及 实施方式进行了阐述, 以上实施例的说明只是用于帮助理解本发明的方法及 其核心思想; 同时, 对于本领域的一般技术人员, 依据本发明的思想, 在具 体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理 解为对本发明的限制。  The DRAM operating frequency adjustment system and a DRAM operating frequency adjustment method provided by the present invention are described in detail. The principle and implementation manner of the present invention are described in the following. The description of the above embodiment is only The method for understanding the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in specific embodiments and application scopes. The description should not be construed as limiting the invention.

Claims

权利 要 求 书 Claim
1、 一种 DRAM运行频率调整系统, 其特征在于, 包括: A DRAM operating frequency adjustment system, characterized in that:
统计模块, 统计预设时间间隔内 DRAM的有效工作状态;  The statistics module calculates the effective working state of the DRAM in the preset time interval;
参数配置模块, 根据对 DRAM 的有效工作状态的统计生成目标运行频 率; 及  a parameter configuration module that generates a target operating frequency based on statistics on the effective working state of the DRAM;
频率切换控制器,将所述 DRAM的当前运行频率调整至所述目标运行频 率。  And a frequency switching controller that adjusts a current operating frequency of the DRAM to the target operating frequency.
2、 如权利要求 1所述的系统, 其特征在于, 统计模块通过统计 DRAM 中的有限状态机的非等待工作状态而获得 DRAM的有效工作状态的统计。  2. The system of claim 1 wherein the statistics module obtains statistics of the effective operating state of the DRAM by counting non-waiting operating states of the finite state machine in the DRAM.
3、 如权利要求 1所述的系统, 其特征在于, 统计模块包括有效工作状态 统计子模块和中断控制模块, 有效工作状态统计子模块通过累计在预设时间 间隔内 DRAM中的有限状态机的非等待工作状态而获得 DRAM在当前运行 频率下的带宽利用率,中断控制模块根据所述带宽利用率产生调整 DRAM的 运行频率的中断信号。  3. The system according to claim 1, wherein the statistical module comprises an effective working state statistical sub-module and an interrupt control module, and the effective working state statistical sub-module accumulates the finite state machine in the DRAM in a preset time interval. The bandwidth utilization of the DRAM at the current operating frequency is obtained without waiting for the working state, and the interrupt control module generates an interrupt signal for adjusting the operating frequency of the DRAM according to the bandwidth utilization.
4、 如权利要求 3所述的系统, 其特征在于, 有效工作状态统计子模块包 括:  4. The system of claim 3, wherein the valid working status statistics sub-module comprises:
统计时间间隔寄存器, 配置所述预设时间间隔;  a statistical time interval register, configured with the preset time interval;
时间计数器, 所述预设时间间隔内计时, 并在一个预设时间间隔结束时 自动清零其计时值;  a time counter, which is timed within the preset time interval, and automatically clears its timing value at the end of a preset time interval;
状态计数器,在所述预设时间间隔内累计有限状态机的非等待工作状态, 并在所述时间计数器的计时值等于所述统计时间间隔寄存器配置的时间间隔 时, 将其计数值复制给另一寄存器后自动清零其计数值; 及  a status counter that accumulates a non-waiting operating state of the finite state machine during the preset time interval, and copies the count value to another when the time counter of the time counter is equal to the time interval configured by the statistical time interval register Automatically clear its count value after a register; and
累计状态寄存器, 在所述时间计数器的计时值等于所述统计时间间隔寄 存器配置的时间间隔时, 存储所述状态计数器的计数值。  The accumulation status register stores the count value of the status counter when the time value of the time counter is equal to the time interval configured by the statistical time interval register.
5、 如权利要求 3所述的系统, 其特征在于, 所述中断信号包括一第一中 断信号和一第二中断信号;当所述带宽利用率低于实际需要的带宽利用率时, 中断控制模块产生表示需要降低 DRAM的运行频率的第一中断信号;当所述 有限状态机的非等待工作状态的累计值在所述预设时间间隔内超出预置的中 断条件阈值时, 产生表示需要提高 DRAM的运行频率的第二中断信号。5. The system of claim 3, wherein the interrupt signal comprises a first interrupt signal and a second interrupt signal; and when the bandwidth utilization is lower than an actual required bandwidth utilization, the interrupt control The module generates a first interrupt signal indicating that the operating frequency of the DRAM needs to be reduced; when the accumulated value of the non-waiting operating state of the finite state machine exceeds the preset in the preset time interval When the condition threshold is turned off, a second interrupt signal indicating that the operating frequency of the DRAM needs to be increased is generated.
6、 如权利要求 4所述的系统, 其特征在于, 所述中断控制模块包括: 中断条件阈值寄存器, 配置带宽利用率阈值; 及 6. The system of claim 4, wherein the interrupt control module comprises: an interrupt condition threshold register, configured with a bandwidth utilization threshold;
中断控制逻辑模块, 根据状态计数器的计数值及所述带宽利用率阈值, 或者根据累计状态寄存器的计数值, 产生中断信号。  The interrupt control logic module generates an interrupt signal according to the count value of the status counter and the bandwidth utilization threshold, or according to the count value of the accumulated status register.
7、 如权利要求 6所述的系统, 其特征在于, 中断控制逻辑模块包括: 第一中断控制单元, 当 DRAM在当前运行频率下的带宽利用率偏低时, 产生表示需要降低 DRAM的运行频率的第一中断信号; 及  7. The system according to claim 6, wherein the interrupt control logic module comprises: a first interrupt control unit, when the bandwidth utilization of the DRAM at the current operating frequency is low, generating an indication that the operating frequency of the DRAM needs to be reduced First interrupt signal; and
第二中断控制单元, 当 DRAM在当前运行频率下的带宽利用率偏高时, 产生表示需要提高 DRAM的运行频率的第二中断信号。  The second interrupt control unit generates a second interrupt signal indicating that the operating frequency of the DRAM needs to be increased when the bandwidth utilization of the DRAM at the current operating frequency is high.
8、 如权利要求 7所述的系统, 其特征在于, 参数配置模块包括目标运行 频率配置子模块, 该目标运行频率配置子模块包括:  8. The system of claim 7, wherein the parameter configuration module comprises a target operating frequency configuration sub-module, the target operating frequency configuration sub-module comprising:
第一配置单元,依据所述第一中断信号生成低于 DRAM当前运行频率的 目标运行频率; 及  a first configuration unit, configured to generate a target operating frequency lower than a current operating frequency of the DRAM according to the first interrupt signal; and
第二配置单元,依据所述第二中断信号生成高于 DRAM当前运行频率的 目标运行频率。  The second configuration unit generates a target operating frequency higher than a current operating frequency of the DRAM according to the second interrupt signal.
9、 如权利要求 1所述的系统, 其特征在于, 还包括:  9. The system of claim 1 further comprising:
时钟控制模块, 用于在所述频率切换控制器工作时, 控制 DRAM按照内 部时钟进行刷新操作,以及,在所述频率切换控制器完成工作时,控制 DRAM 按照系统时钟进行刷新操作。  And a clock control module, configured to: when the frequency switching controller is in operation, control the DRAM to perform a refresh operation according to the internal clock, and, when the frequency switching controller completes the work, control the DRAM to perform a refresh operation according to the system clock.
10、 如权利要求 9所述的系统, 其特征在于, 所述系统时钟由时序检查 参数确定, 所述系统还包括:  10. The system of claim 9, wherein the system clock is determined by a timing check parameter, the system further comprising:
时序检查参数生效模块, 用于依据所述目标运行频率获得对应的时序检 查参数。  The timing check parameter validation module is configured to obtain a corresponding timing check parameter according to the target running frequency.
11、 如权利要求 9或 10所述的系统, 其特征在于, 所述时钟控制模块和 时序检查参数生效模块位于 DRAM的 DRAM控制器中。  The system of claim 9 or 10, wherein the clock control module and the timing check parameter validation module are located in a DRAM controller of the DRAM.
12、 如权利要求 1所述的系统, 其特征在于, 还包括与所述频率切换控 制器连接的 DRAM控制器;  12. The system of claim 1 further comprising a DRAM controller coupled to said frequency switching controller;
所述参数配置模块还包括: 频率切换请求信号配置子模块, 用于配置默认值为无效的频率切换请求 信号; The parameter configuration module further includes: a frequency switching request signal configuration submodule, configured to configure a frequency switching request signal whose default value is invalid;
握手信号配置子模块, 用于配置默认值为无效的握手信号;  The handshake signal configuration submodule is configured to configure a handshake signal whose default value is invalid;
时序检查参数配置子模块,用于针对 DRAM运行频率分别配置对应的时 序检查参数;  The timing check parameter configuration sub-module is configured to respectively configure corresponding timing check parameters for the DRAM operating frequency;
所述频率切换控制器包括:  The frequency switching controller includes:
频率切换请求生成模块, 用于生成频率切换请求, 并将所述频率切换请 求信号置为有效;  a frequency switching request generating module, configured to generate a frequency switching request, and set the frequency switching request signal to be valid;
频率切换模块, 用于依据有效的握手信号, 将 DRAM的当前运行频率切 换为目标运行频率; 及  a frequency switching module, configured to switch a current operating frequency of the DRAM to a target operating frequency according to a valid handshake signal; and
无效请求信号设置模块, 用于在所述频率切换模块完成频率切换后, 将 所述频率切换请求信号恢复为无效。  The invalid request signal setting module is configured to restore the frequency switching request signal to be invalid after the frequency switching module completes the frequency switching.
13、 如权利要求 12所述的系统, 其特征在于所述 DRAM控制器包括: 自刷新控制模块, 用于依据频率切换请求的有效信号, 发出 DRAM按照 内部时钟进行刷新的第一控制命令;  The system of claim 12, wherein the DRAM controller comprises: a self-refresh control module, configured to issue a first control command for the DRAM to refresh according to an internal clock according to the valid signal of the frequency switching request;
握手信号触发模块, 用于在发出所述第一控制命令后, 将所述握手信号 置为有效;  a handshake signal triggering module, configured to: after the first control command is issued, set the handshake signal to be valid;
时序检查参数确定模块,用于在所述频率切换请求信号被恢复为无效时, 提取所述目标运行频率对应的时序检查参数;  a timing check parameter determining module, configured to extract a timing check parameter corresponding to the target operating frequency when the frequency switching request signal is restored to be invalid;
自刷新退出模块, 用于依据所述时序检查参数确定系统时钟, 并发出 DRAM按照所述系统时钟进行刷新的第二控制命令; 及  a self-refresh exit module, configured to determine a system clock according to the timing check parameter, and issue a second control command that the DRAM refreshes according to the system clock; and
握手信号关闭模块, 用于在发出第二控制命令后, 将所述握手信号恢复 为无效。  The handshake signal closing module is configured to restore the handshake signal to be invalid after issuing the second control command.
14、 如权利要求 13所述的系统, 其特征在于, 所述 DRAM控制器还包 括:  14. The system of claim 13 wherein the DRAM controller further comprises:
数据请求中止模块, 用于在接收到频率切换请求的有效信号后, 发出第 一控制命令前, 执行已接收的数据请求, 并停止响应新的数据请求;  The data request suspension module is configured to: after receiving the valid signal of the frequency switching request, execute the received data request before issuing the first control command, and stop responding to the new data request;
数据请求执行模块, 用于在所述握手信号恢复为无效时, 接收新的数据 请求。 The data request execution module is configured to receive a new data request when the handshake signal is restored to be invalid.
15、 一种 DRAM运行频率调整方法, 其特征在于, 包括: 15. A method for adjusting a DRAM operating frequency, comprising:
统计预设时间间隔内 DRAM的有效工作状态, 获得当前 DRAM运行频 率的带宽利用率;  Count the effective working state of the DRAM in the preset time interval, and obtain the bandwidth utilization rate of the current DRAM operating frequency;
在所述带宽利用率不适于当前应用场景的运行状况时, 生成目标运行频 率;  Generating a target operating frequency when the bandwidth utilization is not suitable for the running condition of the current application scenario;
将所述当前 DRAM运行频率调整至所述目标运行频率。  The current DRAM operating frequency is adjusted to the target operating frequency.
16、 如权利要求 15所述的方法, 其特征在于, 统计 DRAM的有效工作 状态的步骤包括:  16. The method of claim 15 wherein the step of counting the effective operating state of the DRAM comprises:
子步骤 A1 , 累计预设时间间隔内 DRAM的有限状态机的非等待工作状 态, 获得 DRAM的有效工作状态; 及  Sub-step A1, accumulating the non-waiting operation state of the finite state machine of the DRAM in the preset time interval, and obtaining the effective working state of the DRAM;
子步骤 A2, 在所述预设时间间隔结束时, 根据 DRAM的有效工作状态, 确定 DRAM当前的带宽利用率; 当 DRAM当前的带宽利用率较低时, 产生 需要降低 DRAM 的工作频率的第一中断信号; 当在所述预设时间间隔内, DRAM当前的带宽利用率超出预置中断条件阈值时, 产生提高 DRAM的工 作频率的第二中断信号。  Sub-step A2, determining, at the end of the preset time interval, the current bandwidth utilization of the DRAM according to the effective working state of the DRAM; when the current bandwidth utilization of the DRAM is low, generating the first need to reduce the operating frequency of the DRAM The interrupt signal; when the current bandwidth utilization of the DRAM exceeds the preset interrupt condition threshold within the preset time interval, generating a second interrupt signal that increases the operating frequency of the DRAM.
17、 如权利要求 16所述的方法, 其特征在于, 所述目标运行频率的生成 步骤包括:  17. The method according to claim 16, wherein the generating step of the target operating frequency comprises:
在第一中断信号产生时,依据所述第一中断信号生成低于 DRAM当前的 运行频率的目标运行频率; 或者, 在第二中断信号产生时, 依据所述第二中 断信号生成高于当前 DRAM运行频率的目标运行频率。  Generating, according to the first interrupt signal, a target operating frequency lower than a current operating frequency of the DRAM when the first interrupt signal is generated; or generating a higher than current DRAM according to the second interrupt signal when the second interrupt signal is generated The target operating frequency of the running frequency.
18、 如权利要求 15所述的方法, 其特征在于, 还包括:  18. The method of claim 15, further comprising:
在频率调整时, 控制 DRAM按照内部时钟进行刷新操作, 以及, 在频率 调整完成时, 控制 DRAM按照系统时钟进行刷新操作。  During frequency adjustment, the DRAM is controlled to refresh according to the internal clock, and when the frequency adjustment is completed, the DRAM is controlled to refresh according to the system clock.
19、 如权利要求 18所述的方法, 其特征在于, 所述系统时钟由时序检查 参数确定, 所述方法还包括:  The method of claim 18, wherein the system clock is determined by a timing check parameter, the method further comprising:
依据所述目标运行频率获得对应的时序检查参数。  Corresponding timing check parameters are obtained according to the target operating frequency.
20、 如权利要求 15所述的方法, 其特征在于, 还包括:  20. The method of claim 15, further comprising:
预先配置默认值为无效的频率切换请求信号,默认值为无效的握手信号, 以及, 对应各种 DRAM运行频率的时序检查参数; 生成频率切换请求, 并将所述频率切换请求信号置为有效; 依据所述频率切换请求的有效信号,发出 DRAM按照内部时钟进行刷新 操作的第一控制命令; The preset default value is an invalid frequency switching request signal, and the default value is an invalid handshake signal, and a timing check parameter corresponding to various DRAM operating frequencies; Generating a frequency switching request, and setting the frequency switching request signal to be valid; and issuing a first control command for performing a refresh operation of the DRAM according to the internal clock according to the valid signal of the frequency switching request;
在发出所述第一控制命令后, 将所述握手信号置为有效;  After the first control command is issued, the handshake signal is set to be valid;
依据有效的握手信号, 将当前 DRAM运行频率切换为目标运行频率; 在完成频率切换后, 将所述频率切换请求信号恢复为无效;  Switching the current DRAM operating frequency to the target operating frequency according to the effective handshake signal; after completing the frequency switching, restoring the frequency switching request signal to be invalid;
在所述频率切换请求信号被恢复为无效时, 提取所述目标运行频率对应 的时序检查参数;  When the frequency switching request signal is restored to be invalid, extracting a timing check parameter corresponding to the target operating frequency;
依据所述时序检查参数确定系统时钟,并发出 DRAM按照所述系统时钟 进行刷新操作的第二控制命令;  Determining a system clock according to the timing check parameter, and issuing a second control command for the DRAM to perform a refresh operation according to the system clock;
在发出所述第二控制命令后, 将所述握手信号恢复为无效。  After the second control command is issued, the handshake signal is restored to be invalid.
21、 如权利要求 20所述的方法, 其特征在于, 还包括:  The method according to claim 20, further comprising:
在接收到频率切换请求的有效信号后, 发出所述第一控制命令前, 执行 已接收的数据请求, 并停止响应新的数据请求;  After receiving the valid signal of the frequency switching request, executing the received data request and issuing a response to the new data request before issuing the first control command;
在所述握手信号恢复为无效时, 接收新的数据请求。  When the handshake signal is restored to be invalid, a new data request is received.
22、 如权利要求 18所述的方法, 其特征在于, 所述 DRAM的有效工作 状态的统计步骤包括:  22. The method of claim 18, wherein the statistical step of the effective operating state of the DRAM comprises:
累加预设时间间隔内 DRAM控制器中有限状态机的非等待工作状态,获 得 DRAM的有效工作状态;  Accumulating the non-waiting working state of the finite state machine in the DRAM controller within the preset time interval, and obtaining the effective working state of the DRAM;
在所述预设时间间隔到达时,产生需要降低 DRAM的运行频率的第一中 或者, 在所述预设时间间隔内, 所述有限状态机非等待工作状态的累加 值满足预置中断条件阈值时, 产生提高 DRAM的运行频率的第二中断信号; 所述目标运行频率的生成步骤包括:  And when the preset time interval arrives, generating a first middle or a lower limit of the operating frequency of the DRAM, wherein the accumulated value of the non-waiting working state of the finite state machine satisfies a preset interrupt condition threshold And generating a second interrupt signal that increases an operating frequency of the DRAM; and the generating step of the target operating frequency includes:
在第一中断信号产生时,依据所述第一中断信号生成低于当前 DRAM运 行频率的目标运行频率;  Generating a target operating frequency lower than a current DRAM operating frequency according to the first interrupt signal when the first interrupt signal is generated;
或者, 在第二中断信号产生时, 依据所述第二中断信号生成高于当前 DRAM运行频率的目标运行频率。  Alternatively, when the second interrupt signal is generated, a target operating frequency higher than a current DRAM operating frequency is generated according to the second interrupt signal.
PCT/CN2010/074220 2009-07-29 2010-06-22 System and method for adjusting dram operating frequency WO2011012032A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA2707914A CA2707914A1 (en) 2009-07-29 2010-06-22 Operation frequency adjusting system and method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910090175.5 2009-07-29
CN200910090175.5A CN101620883B (en) 2009-07-29 2009-07-29 DRAM run frequency adjustment system and method

Publications (1)

Publication Number Publication Date
WO2011012032A1 true WO2011012032A1 (en) 2011-02-03

Family

ID=41514063

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/074220 WO2011012032A1 (en) 2009-07-29 2010-06-22 System and method for adjusting dram operating frequency

Country Status (2)

Country Link
CN (1) CN101620883B (en)
WO (1) WO2011012032A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620883B (en) * 2009-07-29 2014-07-09 无锡中星微电子有限公司 DRAM run frequency adjustment system and method
CN103731313B (en) * 2012-10-10 2017-07-14 华为技术有限公司 Counter and its implementation based on DDR SDRAM
SG11201908904TA (en) * 2017-04-14 2019-10-30 Huawei Tech Co Ltd Memory refresh technology and computer system
KR102462385B1 (en) * 2017-07-17 2022-11-04 에스케이하이닉스 주식회사 Memory system and operating method thereof
CN110120238B (en) * 2018-02-07 2021-07-23 联发科技股份有限公司 Circuit for controlling memory and related method
CN111796655B (en) * 2020-05-13 2021-11-02 翱捷科技股份有限公司 Automatic frequency conversion method and system for DDR memory controller

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588266A (en) * 2004-09-10 2005-03-02 威盛电子股份有限公司 Processor working state switching method and computer system using said method
CN1877494A (en) * 2006-07-19 2006-12-13 北京天碁科技有限公司 System-on-chip chip and its power consumption control method
CN101482762A (en) * 2009-02-11 2009-07-15 华为技术有限公司 Method and system for regulating CPU clock frequency
CN101620883A (en) * 2009-07-29 2010-01-06 北京中星微电子有限公司 DRAM run frequency adjustment system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588266A (en) * 2004-09-10 2005-03-02 威盛电子股份有限公司 Processor working state switching method and computer system using said method
CN1877494A (en) * 2006-07-19 2006-12-13 北京天碁科技有限公司 System-on-chip chip and its power consumption control method
CN101482762A (en) * 2009-02-11 2009-07-15 华为技术有限公司 Method and system for regulating CPU clock frequency
CN101620883A (en) * 2009-07-29 2010-01-06 北京中星微电子有限公司 DRAM run frequency adjustment system and method

Also Published As

Publication number Publication date
CN101620883B (en) 2014-07-09
CN101620883A (en) 2010-01-06

Similar Documents

Publication Publication Date Title
US10090028B2 (en) Semiconductor device and data processing system with coordinated calibration and refresh operations
JP6169658B2 (en) Directed automatic refresh synchronization
WO2011012032A1 (en) System and method for adjusting dram operating frequency
JP3768993B2 (en) DRAM power management
US9927860B2 (en) Method for reducing power consumption of memory system, and memory controller
JP4922306B2 (en) Self-refresh mechanism at C0
US20110296095A1 (en) Data movement engine and memory control methods thereof
US20050152212A1 (en) Memory controller capable of estimating memory power consumption
US20120079180A1 (en) DRAM Controller and a method for command controlling
EP1836583A1 (en) Dynamic control of memory access speed
TW201407610A (en) Method of operating PSRAM and related memory device
WO2018188083A1 (en) Memory refresh technology and computer system
WO2020155074A1 (en) Processing apparatus, method, and related device
US8438358B1 (en) System-on-chip with memory speed control core
CN103632708B (en) The self refresh control apparatus of synchronous DRAM and method
JP3728468B2 (en) Memory control device
US8407411B2 (en) Operation frequency adjusting system and method
CN101000798B (en) Memory updating method and memory updating system
CN110556139B (en) Circuit for controlling memory and related method
KR20050035699A (en) Energy reduction method for memory system, and the device thereof
US8452993B2 (en) Circuits, systems, and methods for dynamically controlling a power supply configuration in response to load requirements from a digital circuit
US10430096B2 (en) Hybrid storage device, computer, control device, and power consumption reduction method
JP2002230970A (en) Memory control device
CA2707914A1 (en) Operation frequency adjusting system and method
TW201504812A (en) Electronic device, processor and memory control method

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 4720/DELNP/2010

Country of ref document: IN

WWE Wipo information: entry into national phase

Ref document number: 2707914

Country of ref document: CA

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10803865

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10803865

Country of ref document: EP

Kind code of ref document: A1