JP2021152811A - Memory control device - Google Patents
Memory control device Download PDFInfo
- Publication number
- JP2021152811A JP2021152811A JP2020053324A JP2020053324A JP2021152811A JP 2021152811 A JP2021152811 A JP 2021152811A JP 2020053324 A JP2020053324 A JP 2020053324A JP 2020053324 A JP2020053324 A JP 2020053324A JP 2021152811 A JP2021152811 A JP 2021152811A
- Authority
- JP
- Japan
- Prior art keywords
- read
- ahead
- host
- address
- access
- 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.)
- Pending
Links
Images
Abstract
Description
本発明はメモリ制御装置に関する。 The present invention relates to a memory control device.
従来、プログラムやデータを格納する記録装置としてFlashROMなどが利用されているが、CPUの実行速度に比べ、記録装置の転送速度は低速であるため性能のボトルネックになることがあった。そのため、昔から記録装置の転送速度を隠蔽するための種々の工夫が考えられており、次にアクセスが行われるデータを予測し、先読みしてキャッシュメモリ等に格納しておく技術などが一般的に知られている。 Conventionally, a Flash ROM or the like has been used as a recording device for storing programs and data, but since the transfer speed of the recording device is slower than the execution speed of the CPU, it may become a performance bottleneck. Therefore, various measures have been considered for a long time to hide the transfer speed of the recording device, and a technology of predicting the data to be accessed next, pre-reading it, and storing it in a cache memory or the like is common. Is known for.
例えば、特許文献1では、ホストからの読み出し命令に応じて、記録装置からデータを読み出して、命令元のホストにデータを送信する制御回路において、一度のリード要求のデータサイズを記録しておき、前記データサイズ分を先読みすることで無駄な先読みを抑制する技術が開示されている。
For example, in
しかしながら、上述の特許文献に開示された従来技術では、記録装置からの先読み中にホストから新たな読み出し命令が発行された場合、先読みアクセスが完了するまで、ホストからのメインアクセスが待たされてしまい性能が低下してしまう恐れがある。 However, in the prior art disclosed in the above-mentioned patent document, when a new read instruction is issued from the host during read-ahead from the recording device, the main access from the host is waited until the read-ahead access is completed. There is a risk of performance degradation.
そこで、本発明の目的は、ホストからのメインアクセスの待ち時間を削減し、性能を劣化させずに先読みを行うことを可能にすることである。 Therefore, an object of the present invention is to reduce the waiting time for main access from the host and to enable pre-reading without deteriorating the performance.
上記課題を解決するために、本発明のメモリ制御装置は、ホストからの読み出し命令に応じて、記録装置からデータを読み出して、命令元のホストにデータを送信する制御回路であって、上記記録装置へのアクセスを制御し、上記ホストからの読み出し命令に続けて、ホストからの読み出し命令がなくても、前記読み出し命令の連続アドレスへの先読みを行う機能を持つアクセス制御部と、上記アクセス制御部が先読みした値とアドレスを記録する先読み記録部と、読み出し命令のアドレスと上記先読み記録部に記録されているアドレスを比較するアドレス比較部とを有し、上記アクセス制御部が行う先読みは、前記読み出し命令よりも小さいサイズでアクセスを繰り返し、先読み中に前記読み出し命令とは不連続なアドレスの読み出し命令をホストから受け取った場合、先読みを中止し、ホストからの読み出し命令のアドレスにアクセスするようにした。 In order to solve the above problems, the memory control device of the present invention is a control circuit that reads data from a recording device and transmits the data to the instruction source host in response to a read command from the host. An access control unit that controls access to the device and has a function of pre-reading the continuous address of the read instruction even if there is no read instruction from the host following the read instruction from the host, and the access control. The read-ahead recording unit that records the pre-read value and the address, and the address comparison unit that compares the address of the read instruction with the address recorded in the pre-reading recording unit, and the pre-reading performed by the access control unit is performed by the access control unit. If access is repeated with a size smaller than the read instruction and a read instruction with an address discontinuous from the read instruction is received from the host during read-ahead, the read-ahead is stopped and the address of the read instruction from the host is accessed. I made it.
本発明によれば、ホストからのメインアクセスの待ち時間を削減し、性能を劣化させずに先読みを行うことを可能にする。 According to the present invention, it is possible to reduce the waiting time for main access from the host and perform look-ahead without degrading the performance.
以下に、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
以下、図1を参照して、本発明の実施例1におけるメモリコントローラーを搭載した制御装置について説明する。CPU100は一般的なCPUであり、ROM103に記録されているプログラムを実行する機能を有する。101は一般的なバスであり、バス101を介してCPU100はメモリコントローラー102と情報のやりとりを行う機能を有する。
Hereinafter, the control device equipped with the memory controller according to the first embodiment of the present invention will be described with reference to FIG. The
102はメモリコントローラーであり、ROM103に対してデータの読み書き行う機能を有しており、アクセス制御部1020、アドレス比較部1021、先読み記録部1022から構成される。アクセス制御部1020は、ROM103の転送プロトコルに沿ったデータ転送を行う機能を有する。また、CPU100からのアクセス要求がなくてもROM103から先読みを行い、先読みしたデータを先読み記録部1022に格納する機能も有する。
アドレス比較部1021は、CPU100からのアクセス要求先のアドレスが先読み記録部1022に既に格納しているか否かを判断する。もし格納されていれば、先読み記録部1022からデータを読み出しCPU100にデータを返し、格納されていなければ、アクセス制御部1020を介してROM103から読み出したデータをCPU100にデータを返す機能を有する。
The
先読み記録部1022は、先読みしたデータとそのアドレスを格納しておく機能を有し、SRAMなどで構成されるがこれに限定されない。ROM103は、プログラムやデータを格納する機能を有している。ここで、本実施例においては、連続したアドレスへのREADアクセスを効率よく行うことができるROMを想定しており、SerialNORFlashROM(以下、SROMと記す)などが該当する。効率がよいとは、通常SROMにREADアクセスを行う際は、コマンド/アドレスを発行すると、所定サイクル後にデータが読み出される。しかし、連続したアドレスへ続けてアクセスを行う場合は、クロックを供給するだけでインクリメントされたアドレスのデータが読み出されるため、コマンド/アドレスの発行が省略でき効率的なアクセスが可能となる。
The look-ahead
図1に明示していないが、ROM103にアクセスを行うホストモジュールはCPU100以外に存在していてもよく、バス101の制御によって複数のホストモジュールがアクセス可能である。
Although not explicitly shown in FIG. 1, the host module that accesses the
次に、図2のフローチャートを参照して、実施例1による、ホストからのメインアクセスの待ち時間を削減し、性能を劣化させずに先読みを行う例を説明する。まず、ステップS201において、CPU100がROM103に対するREADアクセス要求を発行する。次に、ステップS202において、前記アクセス要求を受け取ったアドレス比較部1021は、既に先読み記録部1022が記録しているデータかどうかを、アクセス先のアドレスを比較することで判定する。先読み記録部1022にデータがなければステップS203へ進み、データが存在した場合はステップS204へ進む。
Next, with reference to the flowchart of FIG. 2, an example of reducing the waiting time of the main access from the host and performing look-ahead without deteriorating the performance according to the first embodiment will be described. First, in step S201, the
次に、ステップS203において、アクセス制御部1020がROM103からデータREADを行い、CPU100にREADデータを返信する。先読み記録部1022にデータが存在した場合は、ステップS204において、アドレス比較部1021が先読み記録部1022からデータをREADし、CPU100にREADデータを返信し、処理を終了する。
Next, in step S203, the
次に、ステップS205において、次のアクセス要求があるか否かを判定する。判定の方法については、アドレス比較部1021がアクセス要求を複数受け取ることができる構成にしてもよいし、READデータをCPU100に返した後、数サイクル待つことで次の要求があるか否かを判定してもよく限定されない。次のアクセス要求があると判定された場合は、ステップS202へ戻り、先読み記録部にデータがあるか否かを判定する。一方、次のアクセス要求がないと判定された場合はステップS206へ進む。
Next, in step S205, it is determined whether or not there is the next access request. The determination method may be such that the
次に、ステップS206において、アクセス制御部1020がステップS203でアクセスを行ったアドレスの連続したアドレスからREADを行う。この際、アクセス可能な最小バイト単位でのアクセスを行う。SROMの場合は1バイト単位でのランダムアクセスが可能なため1バイト単位でのアクセスを行い、READデータを先読み記録部1022に記録する。
Next, in step S206, the
次に、ステップS207において、アクセス制御部1020が先読みが完了したか否かを判定する。判定方法は、先読みするデータサイズをレジスタ等で設定できるようにしてもよいし、CPU100からのアクセス要求と同じサイズ分先読みしてもよく限定されない。先読みが完了したと判定された場合は処理を終了し、完了していない場合はステップS205へ戻り、CPU100から新しいアクセス要求が発生していないかを判定する。以上で、図2のフローチャートの説明を終了する。
Next, in step S207, the
以上説明したように、先読みを最小バイト単位で繰り返し行うことで、CPU100から新しいアクセス要求があった場合でも、最小バイト単位の先読みアクセスが終わる時間だけ待てばよいため、メインアクセスの待ち時間を削減することができる。
As described above, by repeating the look-ahead in the minimum byte unit, even if there is a new access request from the
以下、図3を参照して、実施例2による、ホストからのメインアクセスの待ち時間を削減し、性能を劣化させずに先読みを行うフローを説明する。なお、ブロック図に関しては図1と同一なため説明を割愛する。 Hereinafter, with reference to FIG. 3, a flow of reducing the waiting time for main access from the host and performing look-ahead without degrading the performance will be described according to the second embodiment. Since the block diagram is the same as that in FIG. 1, the description is omitted.
まず、ステップS301〜ステップS305は、実施例1のフローチャート図2における、ステップS201〜ステップS205と同様の処理を行うため、説明は省略する。次に、ステップ306において、アクセス制御部1020がステップS303でアクセスを行ったアドレスの連続したアドレスからREADを行う。この際、先読みを行う単位としては、READデータをラッチしてからCPU100にREADデータを返信するまでの時間と、新しいアクセス要求があるか否かとアドレスの連続性の判定に掛かる時間でREAD可能なバイト単位で行う。それは、回路構成によっては上記処理に数サイクル掛かる場合があり、その間もSROMからデータを読み続けた方が最小バイト単位で先読みを行うよりも効率的な場合があるからである。
First, since steps S301 to S305 perform the same processing as steps S201 to S205 in the flowchart FIG. 2 of the first embodiment, the description thereof will be omitted. Next, in step 306, the
図4のタイミングチャートを参照して説明する。CPU100からのREAD要求400に従ってREADDATA402が読み出されCPU100に返信されるが、図4中(1)の期間がREADDATA401をラッチしてからCPU100に返信するまでの期間である。また(2)の期間で、新しいアクセス要求があるか否かの判定とアドレスの連続性の判定を行っており、新しいアクセス要求がないため先読み要求410が実行される。このとき、先読み要求410が発行されるまで、SROMとのデータ転送を行わないのは非効率的であるため、(1)と(2)の期間で可能な単位で予め先読み行い、先読みDATA411を読み出している。また(3)のタイミングにおいては、新しいアクセス要求としてREAD要求450(READ要求400とは不連続なアドレスとする)が存在しているため、先読みをすぐに中断し、READ要求450のアクセスをSROMに対し行っている。
This will be described with reference to the timing chart of FIG. The
ステップS307は、実施例1のフローチャート図2における、ステップS207と同様の処理を行うため、説明は省略する。以上で、図3のフローチャートの説明を終了する。 Since step S307 performs the same processing as step S207 in FIG. 2 of the flowchart of the first embodiment, the description thereof will be omitted. This is the end of the explanation of the flowchart of FIG.
以上説明したように、先読みの単位を調整することで、SROMへのアクセスの効率化と、メインアクセスの待ち時間を削減することができる。 As described above, by adjusting the read-ahead unit, it is possible to improve the efficiency of access to the SROM and reduce the waiting time for the main access.
以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。 Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and modifications can be made within the scope of the gist thereof.
100 CPU
101 バス
102 メモリコントローラー
103 ROM
1020 アクセス制御部
1021 アドレス比較部
1022 先読み記録部
100 CPU
1020
Claims (5)
前記メモリへのアクセスを制御し、前記ホストからの読み出し命令に続けて、ホストからの読み出し命令がなくても、前記読み出し命令の連続アドレスへの先読みを行う機能を持つアクセス制御部と、
前記アクセス制御部が先読みした値とアドレスを記録する先読み記録部と、
読み出し命令のアドレスと前記先読み記録部に記録されているアドレスを比較するアドレス比較部とを有し、
前記アクセス制御部が行う先読みは、前記読み出し命令よりも小さいサイズでアクセスを繰り返し、先読み中に前記読み出し命令とは不連続なアドレスの読み出し命令をホストから受け取った場合、先読みを中止し、ホストからの読み出し命令のアドレスにアクセスすることを特徴とするメモリ制御装置。 A memory control device that reads data from a memory and sends the data to the host that is the command source in response to a read command from the host.
An access control unit having a function of controlling access to the memory and performing a read-ahead to a continuous address of the read instruction even if there is no read instruction from the host following the read instruction from the host.
A look-ahead recording unit that records the value and address read-ahead by the access control unit,
It has an address comparison unit that compares the address of the read instruction with the address recorded in the look-ahead recording unit.
The look-ahead performed by the access control unit repeats access with a size smaller than that of the read instruction, and when a read command with an address discontinuous from the read command is received from the host during the look-ahead, the look-ahead is stopped and the read-ahead is stopped from the host. A memory control device characterized by accessing the address of a read instruction of.
前記メモリから読み出されたデータのラッチ処理と、
ホストから次の読み出し命令が有るか否かの判定と、
ホストからの次の読み出し命令が前記読み出し命令の連続したアドレスへのアクセスか否かの判定と、
の少なくとも1つを実行中に、前記メモリから読み出し可能なサイズとすることを特徴とする請求項1に記載のメモリ制御装置。 As an access with a size smaller than the read instruction
Latch processing of the data read from the memory and
Determining whether or not there is the next read instruction from the host,
Determining whether the next read instruction from the host is an access to the consecutive addresses of the read instruction,
The memory control device according to claim 1, wherein the memory has a size that can be read from the memory while at least one of the above is being executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020053324A JP2021152811A (en) | 2020-03-24 | 2020-03-24 | Memory control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020053324A JP2021152811A (en) | 2020-03-24 | 2020-03-24 | Memory control device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2021152811A true JP2021152811A (en) | 2021-09-30 |
Family
ID=77886558
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020053324A Pending JP2021152811A (en) | 2020-03-24 | 2020-03-24 | Memory control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2021152811A (en) |
-
2020
- 2020-03-24 JP JP2020053324A patent/JP2021152811A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11379381B2 (en) | Main memory device having heterogeneous memories, computer system including the same, and data management method thereof | |
US20080270634A1 (en) | Management of Transfer of Commands | |
US20050114559A1 (en) | Method for efficiently processing DMA transactions | |
US11500797B2 (en) | Computer memory expansion device and method of operation | |
KR20050081769A (en) | Controller for controlling nonvolatile memory | |
CN108139994B (en) | Memory access method and memory controller | |
US20190384529A1 (en) | Enhanced read-ahead capability for storage devices | |
US20090049232A1 (en) | Execute-in-place implementation for a nand device | |
JP2021152811A (en) | Memory control device | |
JPH076088A (en) | Information storage device | |
KR102334473B1 (en) | Adaptive Deep Learning Accelerator and Method thereof | |
JP4431492B2 (en) | Data transfer unit that supports multiple coherency granules | |
CN114168495A (en) | Enhanced read-ahead capability for memory devices | |
JP2000227895A (en) | Device and method for transferring image data | |
JPH10283302A (en) | Method and system for supplying data to bus connected to plural processors | |
JP4583981B2 (en) | Image processing device | |
JP3161422B2 (en) | Microcomputer | |
JPH0844659A (en) | Data transfer controller | |
JPH11110342A (en) | Method and device for connecting bus | |
JP2001229074A (en) | Memory controller and information processor and memory control chip | |
KR0181487B1 (en) | Driving apparatus and method of program using buffer ram | |
JPH0628309A (en) | Method and apparatus for usage of 8-bit- width buffer memory on 8-bit-width local bus, for high-speed readout, interfaced with isa bus in 16-bit-width mode | |
KR19990069073A (en) | Cache Reference and Correction Device Using Write Buffer | |
JPH07152650A (en) | Cache control unit | |
KR100690597B1 (en) | Single mode direct memory access application method using cpu applying dual mode direct memory access |