CN100524170C - Controller for controlling memory to low power consumption mode and control method therefor - Google Patents
Controller for controlling memory to low power consumption mode and control method therefor Download PDFInfo
- Publication number
- CN100524170C CN100524170C CNB2006100905292A CN200610090529A CN100524170C CN 100524170 C CN100524170 C CN 100524170C CN B2006100905292 A CNB2006100905292 A CN B2006100905292A CN 200610090529 A CN200610090529 A CN 200610090529A CN 100524170 C CN100524170 C CN 100524170C
- Authority
- CN
- China
- Prior art keywords
- memory
- low power
- mode
- power consumption
- controller
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 230000015654 memory Effects 0.000 title claims abstract description 136
- 238000000034 method Methods 0.000 title claims abstract description 23
- 230000001360 synchronised effect Effects 0.000 claims description 3
- 230000006870 function Effects 0.000 abstract description 15
- 230000008569 process Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 5
- 238000005265 energy consumption Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Power Sources (AREA)
Abstract
本发明提供一种控制存储器进入低功耗模式的控制器和控制方法,其关键在于,状态控制器可以在CPU完成对具有低功耗功能的存储器读/写操作之后,自动产生低功耗模式控制信号,控制存储器进入低功耗模式。当读/写操作结束之后,状态控制器向中断产生器输出复位信号,中断产生器根据复位信号开始进行计时,并在到达预设时间值时向状态控制器输出中断信号,状态控制器根据中断信号产生低功耗模式控制信号,并发送给存储器。应用本发明方案,可以在使用存储器的过程中,降低存储器空闲时的功耗,进一步节约移动设备电池能量。
The present invention provides a controller and a control method for controlling a memory to enter a low power consumption mode, the key point of which is that the state controller can automatically generate a low power consumption mode after the CPU completes the read/write operation on the memory with low power consumption function The control signal controls the memory to enter the low power consumption mode. When the read/write operation ends, the state controller outputs a reset signal to the interrupt generator, and the interrupt generator starts timing according to the reset signal, and outputs an interrupt signal to the state controller when the preset time value is reached, and the state controller outputs an interrupt signal according to the interrupt The signal generates a low-power mode control signal and sends it to the memory. By applying the scheme of the present invention, the power consumption of the memory when it is idle can be reduced during the process of using the memory, and the battery energy of the mobile device can be further saved.
Description
技术领域 technical field
本发明涉及低功耗技术,特别是涉及一种控制存储器进入低功耗模式的控制器及控制方法。The invention relates to low power consumption technology, in particular to a controller and a control method for controlling a memory to enter a low power consumption mode.
背景技术 Background technique
由于受电池供电的限制,手机等移动设备对存储器,如:同步动态随机存储器(SDRAM)的功耗要求非常高。SDRAM是移动设备中重要的存储器件,可以提供特殊的省电模式或低功耗模式,比如电源关闭(POWERDOWN)模式、自刷新(Selfrefresh)模式等。Due to the limitation of battery power supply, mobile devices such as mobile phones have very high power consumption requirements for memory, such as Synchronous Dynamic Random Access Memory (SDRAM). SDRAM is an important storage device in mobile devices, which can provide special power-saving modes or low-power modes, such as power-off (POWERDOWN) mode, self-refresh (Selfrefresh) mode, etc.
一般来说,SDRAM等具有低功耗功能的存储器只提供低功耗模式,而控制存储器进入低功耗模式则需要由专门的软件来实现。利用软件控制存储器进入低功耗模式的基本思想是:实时检测移动设备是否需要使用存储器,如果需要,则控制存储器进入正常工作模式;否则,控制存储器进入低功耗模式。这里所述的使用存储器是指移动设备实现某功能的过程中,需要存储器参与。比如:MP4的视频数据存储在SDRAM中,当移动设备实现MP4功能时,将不可避免地使用SDRAM,即需要SDRAM参与。此时,当软件检测到移动设备启动MP4视频功能时,将向SDRAM发送一条进入正常工作模式的指令;当软件检测到移动设备关闭MP4视频功能时,则向SDRAM发送一条进入低功耗模式的指令。当然,实际应用中,软件无法直接向SDRAM发送指令,一般是通过移动设备的CPU执行控制SDRAM进入正常工作模式或进入低功耗模式的指令,由CPU向SDRAM发送控制命令。Generally speaking, memory with low power consumption functions such as SDRAM only provides a low power consumption mode, and special software is required to control the memory to enter the low power consumption mode. The basic idea of using software to control the memory to enter the low-power mode is to detect in real time whether the mobile device needs to use the memory, and if necessary, control the memory to enter the normal working mode; otherwise, control the memory to enter the low-power mode. The use of memory mentioned here means that the mobile device needs memory to participate in the process of implementing a certain function. For example: MP4 video data is stored in SDRAM, when the mobile device implements the MP4 function, it will inevitably use SDRAM, that is, SDRAM is required to participate. At this time, when the software detects that the mobile device starts the MP4 video function, it will send a command to SDRAM to enter the normal working mode; when the software detects that the mobile device turns off the MP4 video function, it will send a command to SDRAM to enter the low power mode instruction. Of course, in practical applications, the software cannot directly send instructions to SDRAM. Generally, the CPU of the mobile device executes the instructions to control SDRAM to enter normal working mode or enter low power consumption mode, and the CPU sends control commands to SDRAM.
实际应用中,当移动设备使用SDRAM时,即软件控制SDRAM进入正常工作模式时,CPU并不是一直对SDRAM进行读/写操作,在连续两次读/写操作之间一般会存在一定的空闲时间。比如:移动设备在播放MP4视频节目的过程中,CPU从SDRAM读取一批数据,并将数据保存在缓存中。之后,CPU直接从缓存中读取数据进行播放,等到播放完缓存中的数据之后,才再次从SDRAM中读取下一批数据,并依此类推。In practical applications, when a mobile device uses SDRAM, that is, when the software controls the SDRAM to enter the normal working mode, the CPU does not always perform read/write operations on the SDRAM, and there is generally a certain amount of idle time between two consecutive read/write operations . For example: when the mobile device is playing an MP4 video program, the CPU reads a batch of data from the SDRAM and stores the data in the cache. Afterwards, the CPU directly reads the data from the cache for playback, and waits until the data in the cache is played before reading the next batch of data from the SDRAM again, and so on.
也就是说,现有技术中,当CPU连续两次从存储器读/写数据之间,存储器实际上处于空闲状态,但由于被软件控制处于工作模式中,功耗仍然比较高。That is to say, in the prior art, when the CPU reads/writes data from/to the memory twice in a row, the memory is actually in an idle state, but the power consumption is still relatively high because it is in the working mode controlled by software.
由此可见,当移动设备需要使用存储器时,现有技术还不能降低存储器空闲时间的功耗。It can be seen that, when the mobile device needs to use the memory, the prior art cannot reduce the power consumption of the memory in idle time.
发明内容 Contents of the invention
有鉴于此,本发明的主要目的在于提供一种控制存储器进入低功耗模式的控制器,可以在使用存储器的过程中,使存储器进入低功耗模式,降低存储器空闲时的功耗。In view of this, the main purpose of the present invention is to provide a controller for controlling the memory to enter the low power consumption mode, which can make the memory enter the low power consumption mode during the use of the memory, and reduce the power consumption of the memory when it is idle.
针对本发明提出的装置,本发明还提供一种控制存储器进入低功耗模式的方法,可以在使用存储器的过程中,使存储器进入低功耗模式,降低存储器空闲时的功耗。For the device proposed by the present invention, the present invention also provides a method for controlling the memory to enter the low power consumption mode, which can make the memory enter the low power consumption mode during the use of the memory, and reduce the power consumption of the memory when it is idle.
针对第一个发明目的,本发明提出的技术方案为:For the first object of the invention, the technical solution proposed by the present invention is:
一种控制存储器进入低功耗模式的控制器,该控制器至少包括:A controller for controlling a memory to enter a low power consumption mode, the controller at least includes:
中断产生器,用于接收来自状态控制器的复位信号并开始计时,在达到预设时间值时向状态控制器输出中断信号;The interrupt generator is used to receive a reset signal from the state controller and start timing, and output an interrupt signal to the state controller when the preset time value is reached;
状态控制器,用于在存储器读写操作结束时向中断产生器输出复位信号,接收来自中断产生器的中断信号,确定存储器要进入的低功耗模式的编号,并根据所述低功耗模式的编号产生低功耗模式控制信号输出给存储器;The state controller is used to output a reset signal to the interrupt generator at the end of the memory read and write operations, receive the interrupt signal from the interrupt generator, determine the number of the low power consumption mode that the memory will enter, and according to the low power consumption mode The serial number generates a low-power mode control signal and outputs it to the memory;
其中,所述状态控制器包括:Wherein, the state controller includes:
核心控制器,用于向所述中断产生器输出复位信号,接收所述中断产生器输入的中断信号,将存储器要进入的低功耗模式的编号输出给控制信号生成器;The core controller is configured to output a reset signal to the interrupt generator, receive the interrupt signal input by the interrupt generator, and output the number of the low power consumption mode to be entered by the memory to the control signal generator;
控制信号生成器,用于根据由核心控制器输入的模式编号产生低功耗模式控制信号,并输出给存储器。The control signal generator is used to generate a low power consumption mode control signal according to the mode number input by the core controller, and output it to the memory.
较佳地,所述中断产生器包括:Preferably, the interrupt generator includes:
计时器,用于接收来自状态控制器的复位信号并开始计时,并在达到由计时器配置寄存器提供的预设时间值时向状态控制器输出中断信号;The timer is used to receive a reset signal from the state controller and start counting, and output an interrupt signal to the state controller when the preset time value provided by the timer configuration register is reached;
计时器配置寄存器,用于保存事先固化在自身或由CPU写入的预设时间值,并将预设时间值提供给计时器。The timer configuration register is used to save the preset time value solidified in itself or written by the CPU in advance, and provide the preset time value to the timer.
较佳地,所述计时器为包括一个或一个以上比较器的计时器;Preferably, the timer is a timer including one or more comparators;
所述计时器配置寄存器为保存一个或一个以上预设时间值的计时器配置寄存器。The timer configuration register is a timer configuration register storing one or more preset time values.
较佳地,所述状态控制器进一步包括:Preferably, the state controller further includes:
存储器状态寄存器,用于记录存储器当前低功耗模式的模式编号;The memory status register is used to record the mode number of the current low power consumption mode of the memory;
所述核心控制器进一步用于从存储器状态寄存器读取存储器当前低功耗模式的模式编号,将当前低功耗模式的编号的下一个编号作为要进入的低功耗模式的编号,并将存储器要进入的低功耗模式的编号输出给存储器状态寄存器。The core controller is further used to read the mode number of the current low power consumption mode of the memory from the memory status register, use the next number of the number of the current low power consumption mode as the number of the low power mode to be entered, and set the memory The number of the low power mode to enter is output to the memory status register.
较佳地,所述存储器为同步动态随机存储器SDRAM。Preferably, the memory is a Synchronous Dynamic Random Access Memory (SDRAM).
针对第二个发明目的,本发明提出的技术方案为:For the second purpose of the invention, the technical solution proposed by the present invention is:
一种控制存储器进入低功耗模式的方法,先设置预设时间值,当存储器读写操作结束时,该方法还包括以下步骤:A method for controlling a memory to enter a low power consumption mode, first setting a preset time value, and when the memory read and write operation ends, the method further includes the following steps:
A、状态控制器向中断产生器发送复位信号;A. The state controller sends a reset signal to the interrupt generator;
B、中断产生器根据复位信号开始进行计时,并在到达预设时间值时向状态控制器发送中断信号;B. The interrupt generator starts timing according to the reset signal, and sends an interrupt signal to the state controller when the preset time value is reached;
C、状态控制器根据中断信号确定存储器要进入的低功耗模式的编号,包括:直接将事先保存在状态控制器中的存储器状态寄存器中的模式编号作为存储器要进入的低功耗模式的编号,或者,先查询状态控制器中的存储器状态寄存器中记录的存储器当前低功耗模式的模式编号,再将当前模式编号的下一个编号作为存储器要进入的低功耗模式的编号;C, the state controller determines the number of the low power consumption mode that the memory will enter according to the interrupt signal, including: directly using the mode number in the memory state register stored in the state controller in advance as the number of the low power consumption mode that the memory will enter , or, first query the mode number of the current low power consumption mode of the memory recorded in the memory state register in the state controller, and then use the next number of the current mode number as the number of the low power consumption mode to be entered by the memory;
根据所述低功耗模式的编号产生低功耗模式控制信号,发送给存储器。Generate a low power mode control signal according to the number of the low power mode and send it to the memory.
较佳地,所述预设时间值为一个或一个以上预设时间值。Preferably, the preset time value is one or more preset time values.
较佳地,所述设置预设时间值的方法为:将预设时间值固化在中断产生器中,或者由CPU写入中断产生器。Preferably, the method for setting the preset time value is: solidifying the preset time value in the interrupt generator, or writing the preset time value into the interrupt generator by the CPU.
较佳地,所述存储器为SDRAM。Preferably, the memory is SDRAM.
综上所述,本发明提出的一种控制存储器进入低功耗模式的控制器及控制方法具有以下优点:In summary, a controller and a control method for controlling a memory to enter a low power consumption mode proposed by the present invention have the following advantages:
(1)由于状态控制器可以在CPU完成对存储器读/写操作之后,向存储器发送低功耗模式控制信号,即控制存储器进入低功耗模式,所以,即使存储器正在被移动设备使用,但只要连续两次读/写操作之间空闲时间达到一定限度,就可以进入低功耗模式,达到进一步节省移动设备电池能量的目的。(1) Since the state controller can send a low-power mode control signal to the memory after the CPU completes the read/write operation to the memory, that is, control the memory to enter the low-power mode, so even if the memory is being used by the mobile device, as long as When the idle time between two consecutive read/write operations reaches a certain limit, it can enter the low power consumption mode, so as to further save the battery energy of the mobile device.
(2)本发明在中断产生器中可以设置多个预设时间值,状态控制器根据存储器空闲时间的不同,控制存储器进入不同的低功耗模式。空闲时间短时,存储器进入功耗较高但过程简单的低功耗模式,空闲时间越长,存储器则进入功耗更低但过程复杂的低功耗模式。这样,如果存储器经过短暂空闲时间就需要进行读/写操作,可以很快退出低功耗模式进入正常工作模式;如果存储器的空闲时间很长,就可以进入功耗更低的低功耗模式,达到最大限度降低功耗的目的。(2) In the present invention, a plurality of preset time values can be set in the interrupt generator, and the state controller controls the memory to enter different low power consumption modes according to the difference in the idle time of the memory. When the idle time is short, the memory enters a low-power mode with high power consumption but a simple process. The longer the idle time, the memory enters a low-power mode with lower power consumption but a complicated process. In this way, if the memory needs to be read/written after a short idle time, it can quickly exit the low power mode and enter the normal working mode; if the memory is idle for a long time, it can enter the low power mode with lower power consumption, To achieve the purpose of minimizing power consumption.
(3)中断产生器中的预设时间值不但可以事先固化,还可以由CPU写入,可以灵活设置控制存储器进入低功耗模式的条件。(3) The preset time value in the interrupt generator can not only be solidified in advance, but also can be written by the CPU, which can flexibly set the conditions for controlling the memory to enter the low power consumption mode.
附图说明 Description of drawings
图1是控制存储器进入低功耗模式的控制器所在的系统结构示意图;FIG. 1 is a schematic diagram of a system structure where a controller that controls a memory to enter a low power consumption mode is located;
图2是本发明中控制存储器进入低功耗模式的控制器的基本结构示意图;FIG. 2 is a schematic diagram of the basic structure of a controller that controls a memory to enter a low power consumption mode in the present invention;
图3是装置实施例一的基本结构示意图;Fig. 3 is a schematic diagram of the basic structure of the first embodiment of the device;
图4是本发明方案的流程图;Fig. 4 is the flowchart of the scheme of the present invention;
图5是应用本发明方案的方案实施例的流程图。Fig. 5 is a flowchart of an embodiment of a scheme applying the scheme of the present invention.
具体实施方式 Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图及具体实施例对本发明作进一步地详细描述。In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
本发明中,低功耗模式控制器是在CPU完成对存储器读/写操作之后,产生低功耗模式控制信号,控制存储器进入相应的低功耗模式。In the present invention, the low power consumption mode controller generates a low power consumption mode control signal after the CPU finishes reading/writing the memory, and controls the memory to enter a corresponding low power consumption mode.
图1显示了本发明中低功耗模式控制器所在的系统结构示意图。如图1所示,该系统包括CPU、低功耗模式控制器、存储器。实际应用中,当CPU要对存储器进行读/写时,将向存储器发读/写控制信号,对存储器进行读/写操作,将数据从存储器中读出或将数据写入存储器中。由于读/写控制信号中会指定读/写的字节数,而读/写一个字节的时间一般是固定的,大致几个时钟周期。所以,当CPU对存储器进行读/写操作时,低功耗模式控制器可以确定本次读/写操作结束的准确时间,从而可以在读/写操作结束时控制存储器进入低功耗模式。FIG. 1 shows a schematic structural diagram of a system in which a low power consumption mode controller is located in the present invention. As shown in Figure 1, the system includes a CPU, a low-power mode controller, and a memory. In practical applications, when the CPU wants to read/write the memory, it will send a read/write control signal to the memory, perform a read/write operation on the memory, read data from the memory or write data into the memory. Since the number of bytes to be read/written is specified in the read/write control signal, the time to read/write a byte is generally fixed, approximately several clock cycles. Therefore, when the CPU performs a read/write operation on the memory, the low-power mode controller can determine the exact time when the read/write operation ends, so as to control the memory to enter the low-power mode when the read/write operation ends.
这里所述的存储器为具有省电功能,即能够提供低功耗功能的存储器,如SDRAM、mobile RAM等。The memory described here is a memory with a power saving function, that is, a memory that can provide a low power consumption function, such as SDRAM, mobile RAM, etc.
其中,低功耗模式控制器的基本结构如图2所示。本发明中,低功耗模式控制器至少包括中断产生器201和状态控制器202。Among them, the basic structure of the low power consumption mode controller is shown in Fig. 2 . In the present invention, the low power mode controller includes at least an interrupt
中断产生器201,用于接收来自状态控制器202的复位信号并开始计时,在达到预设时间值时向状态控制器202输出中断信号。The interrupt
状态控制器202,用于对存储器读/写操作结束时向中断产生器201输出复位信号,接收来自中断产生器201的中断信号,产生低功耗模式控制信号并输出给存储器。The
当存储器读/写操作结束时,状态控制器202向中断产生器201输出复位信号;中断产生器201接收到来自状态控制器202的复位信号后就开始计时,并在达到预设时间值时向状态控制器202输出中断信号;状态控制器202接收到来自中断产生器201的中断信号时,产生低功耗模式控制信号并输出给存储器。当状态控制器202将低功耗模式控制信号发送给存储器时,存储器就可以根据所述的低功耗模式控制信号进入相应的低功耗模式。When the memory read/write operation ends, the
实际应用中,具有低功耗功能的存储器可能提供一种或一种以上低功耗模式。如果存储器可以提供一种以上低功耗模式,则状态控制器202将产生指示存储器进入某一种低功耗模式的控制信号。所述的低功耗模式控制信号的形式与具体的存储器相关,只要具有低功耗功能的存储器能够识别状态控制器202发送的低功耗模式控制信号即可。In practical application, a memory with low power consumption function may provide one or more low power consumption modes. If the memory can provide more than one low power consumption mode, the
比如:如果控制SDRAM进入低功耗模式,则状态控制器202向SDRAM发送的低功耗模式控制信号除了遵循电子元件工业联合会JEDEC标准,也支持所使用SDRAM的制造商提出的特定标准等。至于SDRAM如何进入低功耗模式则属于现有技术,本发明不再详细叙述。For example, if the SDRAM is controlled to enter the low power consumption mode, the low power consumption mode control signal sent by the
图3显示了本发明的一种装置实施例的基本结构示意图。本实施例中,低功耗模式控制器要控制SDRAM进入低功耗模式。如图3所示,中断产生器201包括计时器配置寄存器301和计时器302,状态控制器202包括核心控制器303、控制信号生成器304、SDRAM状态寄存器305。其中,Fig. 3 shows a schematic diagram of the basic structure of a device embodiment of the present invention. In this embodiment, the low power mode controller controls the SDRAM to enter the low power mode. As shown in FIG. 3 , the interrupt
计时器配置寄存器301,用于保存由CPU写入的预设时间值,并将预设时间值提供给计时器302。The
计时器302,用于接收来自核心控制器303的复位信号并开始计时,并在达到由计时器配置寄存器301提供的预设时间值时向核心控制器303输出中断信号。The
核心控制器303,用于向计时器302输出复位信号;接收计时器302输入的中断信号,读取SDRAM状态寄存器305中SDRAM当前低功耗模式的模式编号,确定SDRAM下一次要进入低功耗模式的模式编号,将SDRAM下一次要进入低功耗模式的模式编号输出给控制信号生成器304,并将SDRAM下一次要进入低功耗模式的模式编号作为SDRAM的当前状态记录在SDRAM状态寄存器305中。The
控制信号生成器304,用于根据由核心控制器303输入的模式编号产生低功耗模式控制信号,并输出给SDRAM。The
这里所述低功耗模式控制信号是与模式编号一一对应的,可以将模式编号与将要产生的低功耗模式控制信号之间的对应关系事先保存在控制信号生成器304中。当控制信号生成器304接收到核心控制器303输入的模式编号,可以直接根据对应关系产生相应的低功耗模式控制信号。Here, the low power consumption mode control signal is in one-to-one correspondence with the mode number, and the corresponding relationship between the mode number and the low power consumption mode control signal to be generated can be stored in the
SDRAM状态寄存器305,用于记录SDRAM当前低功耗模式的模式编号。The
当SDRAM读写操作结束时,核心控制器303向计时器302输出复位信号;计时器302开始计时,并在达到预设时间值时向核心控制器303输出中断信号;核心控制器303读取SDRAM状态寄存器305中SDRAM当前低功耗模式的模式编号,确定SDRAM下一次要进入低功耗模式的模式编号,将SDRAM下一次要进入低功耗模式的模式编号输出给控制信号生成器304,并将SDRAM下一次要进入低功耗模式的模式编号作为SDRAM的当前状态记录在SDRAM状态寄存器305中;控制信号生成器304根据模式编号产生低功耗模式控制信号,并输出给SDRAM。When the SDRAM read and write operations ended, the
实际应用中,中断产生器201中可以有计时器配置寄存器301,也可以没有计时器配置寄存器301。如果没有计时器配置寄存器301,计时器302可以通过接地和接电源的方式来表示所述的预设时间值。比如:接电源的位表示“1”,接地的位表示“0”。如果预设时间值为5,用二进制表示为101,则可以将计时器输入端的第2位和第0位接电源、第1位接地。此时,计时器302本身就可以充当一个中断产生器。In practical applications, the
如果有计时器配置寄存器301,可以事先将所述的预设时间值固化在计时器配置寄存器301中,并且在控制器工作期间都不改变预设时间值,也可以根据实际情况由CPU写入预设时间值,计时器302根据CPU写入的预设时间值进行工作。之后,CPU还可以根据实际情况向计时器配置寄存器301写入新的预设时间值,计时器302则根据新的预设时间值进行工作。If there is a
实际应用中,SDRAM可以提供一种或一种以上的低功耗模式。如果SDRAM提供一种低功耗模式,则计时器302中只有一个比较器,计时器配置寄存器301中也只有一个预设时间值,而且可以没有SDRAM状态寄存器305。也就是说,当计时器302接收到核心控制器303的复位信号之后,计时器302开始计时,当比较器确定当前计时值与预设时间值相等时,计时器302就向核心控制器303发送中断信号;核心控制器303直接将事先保存在自身中的SDRAM要进入低功耗模式的模式编号输出给控制信号生成器304;控制信号生成器304根据模式编号生成产生低功耗模式控制信号,并输出给SDRAM。这里,由于SDRAM只提供一种低功耗模式,则核心控制器303可以将固定的某个编号发送给控制信号生成器304,而控制信号生成器304也只生成一种低功耗模式控制信号。当然,核心控制器303用什么编号表示低功耗模式可以由应用本发明的用户自行确定,只要控制信号生成器304可以识别即可。In practical applications, SDRAM can provide one or more low power consumption modes. If SDRAM provides a low power consumption mode, there is only one comparator in the
如果SDRAM可以提供一种以上的低功耗模式,则计时器302中包括一个以上的比较器,计时器配置寄存器301中有一个以上的预设时间值,而且需要用于记录SDRAM当前状态的SDRAM状态寄存器305。这里,预设时间值、计时器302中的比较器和低功耗模式之间存在一一对应的关系。以SDRAM可以提供三种低功耗模式为例:计时器302中包括三个比较器,计时器配置寄存器301中有三个预设时间值Ta、Tb和Tc,并且Ta<Tb<Tc。假设预设时间值Ta、比较器1和低功耗模式一之间存在对应关系;预设时间值Tb、比较器2和低功耗模式二之间存在对应关系;预设时间值Tc、比较器3和低功耗模式三之间存在对应关系。当计时器302接收到核心控制器303的复位信号之后,计时器302开始计时,在计时的过程中,Ta提供给比较器1进行比较,Tb提供给比较器2进行比较,Tc提供给比较器3进行比较。当比较器1确定当前计时值与Ta相等时,计时器302就向核心控制器303发送中断信号,核心控制器303控制SDRAM进入低功耗模式一。之后,计时器302仍然继续计时,当比较器2确定当前计时值与Tb相等时,计时器302再向核心控制器303发送中断信号,核心控制器303控制SDRAM进入低功耗模式二,并依次推类。If SDRAM can provide more than one low power consumption mode, more than one comparator is included in the
应用本实施例方案,可以控制SDRAM进入不同的低功耗模式。在实际应用中,也可以控制mobile RAM等其它具有低功耗功能的存储器进入低功耗模式,从而达到进一步节省移动设备电池能量的目的。当然,此时状态控制器202就不是包括SDRAM状态寄存器305,而是更换为记录其它具有低功耗功能存储器状态的存储器状态寄存器305。By applying the solution of this embodiment, the SDRAM can be controlled to enter different low power consumption modes. In practical applications, it can also control mobile RAM and other memories with low power consumption functions to enter low power consumption mode, so as to achieve the purpose of further saving battery energy of mobile devices. Of course, at this time, the
针对本发明提供的装置,本发明还提出一种控制存储器进入低功耗模式的控制方法。For the device provided by the invention, the invention also proposes a control method for controlling the memory to enter the low power consumption mode.
本发明的基本思想是:状态控制器在存储器读/写操作结束后向存储器发送低功耗模式控制信号,控制存储器进入低功耗模式。The basic idea of the present invention is: the state controller sends a low power consumption mode control signal to the memory after the memory read/write operation is completed, and controls the memory to enter the low power consumption mode.
图4显示了本发明的流程图。本发明中,先在中断产生器中预先设置时间值,当CPU对存储器读写操作结束时,本发明控制存储器进入低功耗模式的方法包括以下步骤:Fig. 4 shows a flowchart of the present invention. In the present invention, the time value is preset in the interrupt generator earlier, and when the CPU finishes reading and writing operations on the memory, the method for controlling the memory to enter the low power consumption mode of the present invention includes the following steps:
步骤401:状态控制器向中断产生器输出复位信号;Step 401: the state controller outputs a reset signal to the interrupt generator;
步骤402:中断产生器接收到复位信号后开始进行计时,并在到达预设时间值时向状态控制器输出中断信号;Step 402: The interrupt generator starts timing after receiving the reset signal, and outputs an interrupt signal to the state controller when the preset time value is reached;
步骤403:状态控制器根据中断信号产生低功耗模式控制信号,并发送给存储器。Step 403: The state controller generates a low power consumption mode control signal according to the interrupt signal, and sends it to the memory.
本发明所述的存储器为具有低功耗功能的存储器,如:SDRAM等。The memory described in the present invention is a memory with low power consumption function, such as: SDRAM and the like.
实际应用中,具有低功耗功能的存储器可能提供一种或一种以上的低功耗模式,则本发明中,状态控制器根据中断信号产生对应不同低功耗模式的控制信号,存储器可以根据不同的低功耗模式控制信号进入不同的低功耗模式。所述的低功耗模式控制信号的形式与具体的存储器相关,只要具有低功耗功能的存储器能够识别该低功耗模式控制信号即可。In practical applications, a memory with a low power consumption function may provide one or more than one low power consumption mode, then in the present invention, the state controller generates control signals corresponding to different low power consumption modes according to the interrupt signal, and the memory can be based on Different low-power mode control signals enter different low-power modes. The form of the low power consumption mode control signal is related to the specific memory, as long as the memory with low power consumption function can recognize the low power consumption mode control signal.
比如:向SDRAM发送的低功耗模式控制信号除了遵循电子元件工业联合会JEDEC标准外,还要遵循所使用的SDRAM厂商的标准。至于SDRAM等存储器如何进入低功耗模式则属于现有技术,本发明不再详细叙述。For example, the low power consumption mode control signal sent to SDRAM should follow the standard of the used SDRAM manufacturer in addition to the JEDEC standard of the Electronic Components Industry Association. As for how memory such as SDRAM enters the low power consumption mode, it belongs to the prior art, and will not be described in detail in the present invention.
实际应用中,事先设置的预设时间值的个数和大小可以由应用本发明方案的用户自行确定。一般来说,预设时间值的个数与存储器提供低功耗模式的个数相等。如:存储器提供三种低功耗模式,则需要设置三个预设时间值,并且每一个预设时间值对应一种低功耗模式。预设时间值的大小则可以根据CPU对存储器相邻两次读/写操作时间间隔T等实际情况确定。一般来说,至少有一个预设时间值应该小于存储器相邻两次读/写操作时间间隔。当然,如果存储器相邻两次读/写操作时间间隔比较长,则可以将一个以上的时间预设值都设置为小于存储器相邻两次读/写操作时间间隔的值。In practical applications, the number and size of preset time values set in advance can be determined by the user who applies the solution of the present invention. Generally, the number of preset time values is equal to the number of low power consumption modes provided by the memory. For example, if the memory provides three low power consumption modes, three preset time values need to be set, and each preset time value corresponds to a low power consumption mode. The value of the preset time can be determined according to actual conditions such as the time interval T between two adjacent read/write operations of the CPU on the memory. Generally speaking, at least one preset time value should be shorter than the time interval between two adjacent read/write operations of the memory. Certainly, if the time interval between two adjacent read/write operations of the memory is relatively long, more than one time preset value may be set to a value shorter than the time interval between two adjacent read/write operations of the memory.
图5显示了本发明方法的一种实施例的流程图。本实施例中,低功耗模式控制器将向SDRAM发送低功耗模式控制信号,即控制SDRAM进入不同的低功耗模式。SDRAM可以提供三种低功耗模式,即模式一、模式二和模式三;CPU事先将三个预设时间值写入中断产生器,这三个预设时间值分别为Ta、Tb和Tc,并且Ta<Tb<Tc。本实施例中,Ta对应模式一,Tb对应模式二,Tc对应模式三。也就是说,如果计时值达到Ta,状态控制将控制SDRAM进入第一种低功耗模式;如果计时值达到Tb,状态控制将控制SDRAM进入第二种低功耗模式;如果计时值达到Tc,状态控制将控制SDRAM进入第三种低功耗模式。Figure 5 shows a flow chart of one embodiment of the method of the present invention. In this embodiment, the low-power mode controller will send a low-power mode control signal to the SDRAM, that is, control the SDRAM to enter different low-power modes. SDRAM can provide three low power consumption modes, namely mode 1, mode 2 and mode 3; the CPU writes three preset time values into the interrupt generator in advance, and these three preset time values are Ta, Tb and Tc respectively, And Ta<Tb<Tc. In this embodiment, Ta corresponds to mode one, Tb corresponds to mode two, and Tc corresponds to mode three. That is to say, if the timing value reaches Ta, the state control will control the SDRAM to enter the first low-power mode; if the timing value reaches Tb, the state control will control the SDRAM to enter the second low-power mode; if the timing value reaches Tc, The state control will control SDRAM to enter the third low power consumption mode.
另外,本实施例中,SDRAM的低功耗模式用编号来表示,即:用000表示正常工作模式,001表示模式一,010表示模式二,011表示模式三。当CPU对SDRAM进行读/写操作时,状态控制器将SDRAM的当前状态记录为000;当控制SDRAM进入不同的低功耗模式时,则将SDRAM的当前状态记录为001、010或011。In addition, in this embodiment, the low power consumption mode of the SDRAM is represented by numbers, that is, 000 represents the normal working mode, 001 represents the mode one, 010 represents the mode two, and 011 represents the mode three. When the CPU performs read/write operations on SDRAM, the state controller records the current state of SDRAM as 000; when controlling SDRAM to enter different low power consumption modes, it records the current state of SDRAM as 001, 010 or 011.
如图5所示,当CPU对SDRAM的读/写结束时,本实施例控制SDRAM进入低功耗模式的方法包括以下步骤:As shown in Figure 5, when the reading/writing of the SDRAM by the CPU ends, the method for controlling the SDRAM to enter the low power consumption mode in this embodiment includes the following steps:
步骤501:状态控制器向中断产生器发送复位信号,中断产生器开始进行计时;Step 501: the state controller sends a reset signal to the interrupt generator, and the interrupt generator starts timing;
步骤502:中断产生器在当前计时值达到预设时间值时向状态控制器发送中断信号;Step 502: the interrupt generator sends an interrupt signal to the state controller when the current timing value reaches the preset time value;
步骤503:状态控制器查询记录SDRAM当前低功耗模式的模式编号,再将当前模式编号的下一个编号作为SDRAM下一次要进入低功耗模式的模式编号;Step 503: the state controller inquires and records the mode number of the current low power consumption mode of the SDRAM, and then uses the next number of the current mode number as the mode number of the SDRAM to enter the low power consumption mode next time;
步骤504:状态控制器根据模式编号生成低功耗模式控制信号,并发送给SDRAM。Step 504: The state controller generates a low power consumption mode control signal according to the mode number, and sends it to the SDRAM.
本实施例有三个不同的预设时间值Ta、Tb和Tc,根据CPU相邻两次对SDRAM进行读/写操作时间的间隔T的大小,则控制SDRAM进入低功耗模式有以下三种不同的情况:This embodiment has three different preset time values Ta, Tb, and Tc. According to the size of the interval T between the CPU reading/writing operations on the SDRAM twice adjacently, the SDRAM is controlled to enter the low power consumption mode with the following three differences: Case:
如果Ta<T<Tb,只需执行步骤502~步骤504一次。也就是说,中断产生器在复位后开始计时,并在计时到达Ta时向状态控制器发送中断信号;状态控制器查询记录SDRAM当前低功耗模式的模式编号,确定SDRAM当前模式编号为000,将当前模式编号的下一个编号,即001作为SDRAM下一次要进入低功耗模式的模式编号;状态控制器根据模式编号001生成相应的低功耗模式控制信号,发送给SDRAM,控制SDRAM进入模式一。当SDRAM进入模式一之后,中断产生器将继续计时,但由于在未到达Tb时间时CPU向SDRAM发起读/写操作,则SARAM立即被控制进入工作模式,SDRAM当前模式编号重新被记录为000。If Ta<T<Tb, steps 502 to 504 only need to be performed once. That is to say, the interrupt generator starts timing after reset, and sends an interrupt signal to the state controller when the timing reaches Ta; the state controller inquires and records the mode number of the current low power consumption mode of SDRAM, and determines that the current mode number of SDRAM is 000, Use the next number of the current mode number, namely 001, as the mode number for SDRAM to enter the low-power mode next time; the state controller generates a corresponding low-power mode control signal according to the mode number 001, and sends it to SDRAM to control SDRAM to enter the mode one. After SDRAM enters mode 1, the interrupt generator will continue to count, but since the CPU initiates a read/write operation to SDRAM before Tb time is reached, SARAM is immediately controlled to enter the working mode, and the current mode number of SDRAM is re-recorded as 000.
如果Tb<T<Tc,则需要重复执行步骤502~步骤504一次。也就是说,先按照上述第一种情况控制SDRAM进入低功耗模式一以后,由于CPU还未发起对SDRAM的读/写操作,则中断产生器将继续计时,等到计时到达Tb时再次向状态控制器发送中断信号;状态控制器再次查询记录SDRAM当前低功耗模式的模式编号,确定SDRAM当前模式编号为001,并将下一个编号,即010作为SDRAM下一次要进入低功耗模式的模式编号;状态控制器根据模式编号010生成相应的低功耗模式控制信号,发送给SDRAM,控制SDRAM进入模式二。当SDRAM进入模式二之后,中断产生器将继续计时,但由于在未到达Tc时间时CPU向SDRAM发起读/写操作,则SARAM立即被控制进入工作模式,SDRAM当前模式编号又重新被记录为000。If Tb<T<Tc, it is necessary to repeat
如果Tb<T<Tc,则需要重复执行步骤502~步骤504两次,即SDRAM将先进入低功耗模式一,再进入低功耗模式二,最后进入低功耗模式三。也就是说,按照上述第二种情况控制SDRAM进入低功耗模式二以后,由于CPU还未发起对SDRAM的读/写操作,则中断产生器将继续计时,等到计时到达Tc时再次向状态控制器发送中断信号;状态控制器再次查询记录SDRAM当前低功耗模式的模式编号,确定SDRAM当前模式编号为010,并将下一个编号,即011作为SDRAM下一次要进入低功耗模式的模式编号;状态控制器根据模式编号011生成相应的低功耗模式控制信号,发送给SDRAM,控制SDRAM进入模式三。当进入模式三之后,SDRAM将一直处于低功耗状态,直到CPU对SDRAM发起读/写操作为止。If Tb<T<Tc, step 502 to step 504 need to be repeated twice, that is, the SDRAM will first enter low power consumption mode 1, then low power consumption mode 2, and finally low power consumption mode 3. That is to say, after the SDRAM is controlled to enter the low power mode 2 according to the above second situation, since the CPU has not yet initiated the read/write operation to the SDRAM, the interrupt generator will continue to count, and when the timing reaches Tc, it will switch to the state control again. The device sends an interrupt signal; the state controller queries and records the mode number of the current low-power mode of SDRAM again, determines that the current mode number of SDRAM is 010, and uses the next number, that is, 011, as the mode number for SDRAM to enter the low-power mode next time ; The state controller generates a corresponding low-power mode control signal according to the mode number 011, and sends it to the SDRAM to control the SDRAM to enter mode three. After entering mode 3, SDRAM will always be in a low power consumption state until the CPU initiates a read/write operation to SDRAM.
实际应用中,各预设时间值对应SDRAM的哪种低功耗模式,可以由应用本发明方案的用户自行确定。一般来说,耗能越少的模式越复杂,从低功耗模式退回正常模式也越耗时。所以,可以将耗能低的模式与比较大的预设时间值对应。也就是说,SDRAM可以先进入耗能高但比较简单的低功耗模式,等到较长时间CPU仍然未进行读/写时,SDRAM再进入耗能低但比较复杂的低功耗模式。这样,如果SDRAM经过短暂空闲时间就需要进行读/写操作,可以很快退出低功耗模式进入正常工作模式;如果SDRAM的空闲时间很长,就可以进入功耗更低的低功耗模式,达到最大限度降低功耗的目的。In practical applications, which low power consumption mode of the SDRAM each preset time value corresponds to can be determined by the user applying the solution of the present invention. Generally speaking, the mode that consumes less power is more complex, and the transition from low power mode to normal mode is more time-consuming. Therefore, the mode with low energy consumption can be associated with a relatively large preset time value. That is to say, SDRAM can first enter a high-energy-consuming but relatively simple low-power mode, and wait until the CPU is still not reading/writing for a long time, and then SDRAM enters a low-energy but relatively complex low-power mode. In this way, if the SDRAM needs to perform read/write operations after a short idle time, it can quickly exit the low power mode and enter the normal working mode; if the SDRAM idle time is very long, it can enter the low power mode with lower power consumption, To achieve the purpose of minimizing power consumption.
实际应用中,如果SDRAM只提供一种低功耗模式,则状态控制器无需记录SDRAM当前处于哪一种低功耗模式,只需要在接收到中断信号后,直接向SDRAM发固定的模式编号,即直接将事先保存在自身中的模式编号作为SDRAM下一次要进入低功耗模式的编号。比如:可以规定“1”为SDRAM的低功耗模式编号,当状态控制器接收到中断信号后,直接根据编号“1”产生低功耗模式控制信号。In practical applications, if SDRAM only provides one low-power mode, the state controller does not need to record which low-power mode SDRAM is currently in, and only needs to send a fixed mode number to SDRAM directly after receiving an interrupt signal. That is, directly use the mode number stored in itself in advance as the number for the SDRAM to enter the low power consumption mode next time. For example: "1" can be specified as the low-power mode number of SDRAM, and when the state controller receives the interrupt signal, it will directly generate a low-power mode control signal according to the number "1".
另外,实际应用中,当状态控制器接收到来自CPU的读/写控制信号,可以立即向SDRAM发送退出低功耗模式的控制信号,然后进入正常工作模式控制信号,控制对SDRAM的读/写操作。In addition, in practical applications, when the state controller receives the read/write control signal from the CPU, it can immediately send the control signal to SDRAM to exit the low power consumption mode, and then enter the normal working mode control signal to control the read/write to SDRAM operate.
综上所述,以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。To sum up, the above are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100905292A CN100524170C (en) | 2006-06-27 | 2006-06-27 | Controller for controlling memory to low power consumption mode and control method therefor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100905292A CN100524170C (en) | 2006-06-27 | 2006-06-27 | Controller for controlling memory to low power consumption mode and control method therefor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1877493A CN1877493A (en) | 2006-12-13 |
CN100524170C true CN100524170C (en) | 2009-08-05 |
Family
ID=37509949
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006100905292A Expired - Fee Related CN100524170C (en) | 2006-06-27 | 2006-06-27 | Controller for controlling memory to low power consumption mode and control method therefor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100524170C (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100458663C (en) * | 2007-04-24 | 2009-02-04 | 北京中星微电子有限公司 | Control method for low-power consumption RAM and RAM control module |
CN101639725B (en) * | 2008-07-31 | 2013-07-17 | 国际商业机器公司 | Device and method for processing instruction and executive control device used by same |
US8417979B2 (en) * | 2010-12-23 | 2013-04-09 | Western Digital Technologies, Inc. | Method and system for progressive power reduction of inactive device while maintaining ready status with host |
US8463970B2 (en) * | 2011-01-04 | 2013-06-11 | Qualcomm Incorporated | Method and system for managing sleep states of interrupt controllers in a portable computing device |
KR20140122567A (en) * | 2013-04-10 | 2014-10-20 | 에스케이하이닉스 주식회사 | Semiconductor memory device including power on reset circuit |
CN112234698A (en) * | 2020-08-03 | 2021-01-15 | 青岛鼎信通讯股份有限公司 | Design scheme for quickly entering low power consumption during power failure of electric energy meter |
-
2006
- 2006-06-27 CN CNB2006100905292A patent/CN100524170C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN1877493A (en) | 2006-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6169658B2 (en) | Directed automatic refresh synchronization | |
CN100524170C (en) | Controller for controlling memory to low power consumption mode and control method therefor | |
US10409505B2 (en) | Ultra-deep power down mode control in a memory device | |
JP5321189B2 (en) | Memory control device | |
CN100369156C (en) | Semiconductor memory and its control method | |
CN112259142B (en) | Ultra-low power mass data storage method for self-contained instruments | |
TWI239531B (en) | Ripple refresh circuit and method for sequentially refreshing a semiconductor memory system | |
TW201735024A (en) | Memory apparatus and energy-saving controlling method thereof | |
JP2006018797A (en) | Method for reducing standby electricity of integrated circuit device, method for operating memory array with cache of integrated circuit, and integrated circuit device | |
TWI533135B (en) | Methods for accessing memory and controlling access of memory, memory device and memory controller | |
US11681352B2 (en) | Standby current reduction in memory devices | |
CN113223566A (en) | Control system and control method of memory | |
CN101013596A (en) | Semiconductor memory, memory controller and control method for semiconductor memory | |
JPH09180438A (en) | Memory control device | |
US10289492B2 (en) | System for data retention and method of operating system | |
CN100403246C (en) | Device and method for simulating hard disk | |
JP2009037403A (en) | Effective use of core memory in multi-core processors | |
JP2004171678A (en) | Apparatus, method, and program for storing information | |
JP2002230970A (en) | Memory control device | |
JP2009059412A (en) | Refresh controller and method thereof | |
CN112148365B (en) | Control module, method and microcontroller chip | |
US7565476B2 (en) | Memory device | |
CN111459560A (en) | RISC-V architecture based multi-core processor wake-up system | |
US11181967B2 (en) | Power management and transitioning cores within a multicore system from idle mode to operational mode over a period of time | |
CN115599194B (en) | Design system and method for enabling Embedded Flash to quickly enter low power consumption |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
ASS | Succession or assignment of patent right |
Owner name: WUXI VIMICRO CO., LTD. Free format text: FORMER OWNER: BEIJING ZHONGXING MICROELECTRONICS CO., LTD. Effective date: 20110117 |
|
C41 | Transfer of patent application or patent right or utility model | ||
COR | Change of bibliographic data |
Free format text: CORRECT: ADDRESS; FROM: 100083 15/F, SHI NING BUILDING, NO.35, XUEYUAN ROAD, HAIDIAN DISTRICT, BEIJING TO: 214028 610, NATIONAL IC DESIGN PARK (CHUANGYUAN BUILDING), NO.21-1, CHANGJIANG ROAD, NEW DISTRICT, WUXI CITY, JIANGSU PROVINCE |
|
TR01 | Transfer of patent right |
Effective date of registration: 20110117 Address after: 214028 national integrated circuit design (21-1), Changjiang Road, New District, Jiangsu, Wuxi, China, China (610) Patentee after: Wuxi Vimicro Co., Ltd. Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 35, Nanjing Ning building, 15 Floor Patentee before: Beijing Vimicro Corporation |
|
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090805 Termination date: 20130627 |