JP2007108882A - Memory controller, memory-controlling method, and information processing device - Google Patents

Memory controller, memory-controlling method, and information processing device Download PDF

Info

Publication number
JP2007108882A
JP2007108882A JP2005296958A JP2005296958A JP2007108882A JP 2007108882 A JP2007108882 A JP 2007108882A JP 2005296958 A JP2005296958 A JP 2005296958A JP 2005296958 A JP2005296958 A JP 2005296958A JP 2007108882 A JP2007108882 A JP 2007108882A
Authority
JP
Japan
Prior art keywords
memory
read
access
bus master
bus
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.)
Withdrawn
Application number
JP2005296958A
Other languages
Japanese (ja)
Inventor
Toshiaki Minami
利秋 南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2005296958A priority Critical patent/JP2007108882A/en
Publication of JP2007108882A publication Critical patent/JP2007108882A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To elimite the need for read-return buffers to be provided in a plurality of slaves when a master simultaneously access the slaves inside a system LSI. <P>SOLUTION: A memory controller receives an access request to a memory from a bus master and accesses a memory. When data read out from the memory are transmitted to the bus master when the read access request to the memory from the bus master is made, a command issuing control part 606' determines, based on command-issue timing information, whether the transmission collides with reading responses to the bus master from other slaves. When determined that the collision occurs, the command issuing control part 606' delays access to the memory. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、バスマスタからメモリへのアクセスを制御するメモリコントローラ及びそのメモリ制御方法と、このメモリコントローラを具備する情報処理装置に関するものである。   The present invention relates to a memory controller that controls access from a bus master to a memory, a memory control method therefor, and an information processing apparatus including the memory controller.

半導体技術、マイクロプロセッサ技術の進歩により、プロセッサやメモリからなる組込みシステムの応用分野は拡大の一途を辿っており、例えば、家電製品、AV機器、OA機器、自動車、通信機器などに組込みシステムが使われている。近年特徴的なのは、LSIの集積度が向上した結果、組み込み機器のコントローラ機能が一つのLSIに集積される、所謂、システムLSIが一般的になってきていることである。このようなシステムLSIを用いることにより、省面積、低コスト化、低消費電力化、高信頼化を実現可能になる。   Due to advances in semiconductor technology and microprocessor technology, the application fields of embedded systems consisting of processors and memories are steadily expanding. For example, embedded systems are used in home appliances, AV equipment, OA equipment, automobiles, and communication equipment. It has been broken. What is characteristic in recent years is that the so-called system LSI, in which the controller function of the embedded device is integrated into one LSI, is becoming common as a result of the increased integration of the LSI. By using such a system LSI, it is possible to realize area saving, cost reduction, low power consumption, and high reliability.

図1は、特許文献1で開示されるシステムLSIを用いて、OA機器の組み込みシステムを実現する構成の一例を示す図である。図1において、110は組み込みシステム基板であり、システムLSI100、メモリ101、各種I/Oインターフェースが実装される。システムLSI100は、より詳細にはプロセッサコア、プロセッサ周辺コントローラ、メモリコントローラ、スキャナコントローラ、プリンタコントローラ、PCIインターフェース、USBデバイスインターフェース等を内蔵したシングルチップ・スキャニング・プリンティングエンジンである。   FIG. 1 is a diagram illustrating an example of a configuration that implements an embedded system of OA equipment using a system LSI disclosed in Patent Document 1. In FIG. In FIG. 1, reference numeral 110 denotes an embedded system board on which a system LSI 100, a memory 101, and various I / O interfaces are mounted. More specifically, the system LSI 100 is a single-chip scanning / printing engine including a processor core, a processor peripheral controller, a memory controller, a scanner controller, a printer controller, a PCI interface, a USB device interface, and the like.

組み込み基板110に備えられるI/Oインターフェースは、スキャナI/F131,FAXI/F132,USBI/F134、プリンタI/F133等がある。それぞれスキャナ121,FAX122,PC124、プリンタ123と接続され、システム全体を構成している。更に、システムLSI100にはPCIバスI/F136が備えられている。これを用い、PCI−IDEブリッジ102を介してIDEバス135に接続されるハードディスク(HDD)125を使用することができる。   Examples of the I / O interface provided in the embedded substrate 110 include a scanner I / F 131, a FAX I / F 132, a USB I / F 134, and a printer I / F 133. Each is connected to a scanner 121, FAX 122, PC 124, and printer 123 to constitute the entire system. Further, the system LSI 100 is provided with a PCI bus I / F 136. By using this, a hard disk (HDD) 125 connected to the IDE bus 135 via the PCI-IDE bridge 102 can be used.

図2は、このシステムLSI100を、より詳細に説明するブロック図である。   FIG. 2 is a block diagram illustrating the system LSI 100 in more detail.

プロセッサ201には、最大でインストラクション、データそれぞれ16Kバイトの計32Kバイトのキャッシュメモリ、FPU(浮動小数点演算ユニット)、MMU(メモリ管理ユニット)、ユーザ定義可能なコプロセッサ等を内蔵することが可能である。またPCIバスインターフェース232を有するので、PCIバススロットを有するコンピュータシステムと共に用いることができる。また、PCIサテライト構成に加え、PCIホストバスブリッジ構成にてPCIバスコンフィギュレーションを発行することが可能である。更に、安価なPCI周辺デバイスと組み合わせることにより、マルチファンクションペリフェラル(複合機能周辺機器)のメインエンジンとして使用することも可能である。更に、PCIバスインターフェースを有するレンダリングエンジン、圧縮・伸長エンジンと組み合わせることも可能である。   The processor 201 can contain a maximum of 32 Kbytes of instruction, 16 Kbytes of data each, a total of 32 Kbytes of cache memory, FPU (floating point arithmetic unit), MMU (memory management unit), user-definable coprocessor, etc. is there. Further, since it has the PCI bus interface 232, it can be used with a computer system having a PCI bus slot. In addition to the PCI satellite configuration, a PCI bus configuration can be issued in a PCI host bus bridge configuration. Furthermore, by combining with an inexpensive PCI peripheral device, it can be used as a main engine of a multifunction peripheral (multifunctional peripheral device). Furthermore, a rendering engine having a PCI bus interface and a compression / decompression engine can be combined.

チップ内部に汎用IOコアを接続するIOバス(Bバス)221、及び、画像データ転送に最適化したグラフィックバス(Gバス:Graphic Bus)220の2系統の独立したバスを有している。そして、メモリ204、プロセッサ201とこれらのバスをクロスバスイッチであるシステムバスブリッジ203を介して接続することにより、マルチファンクションシステムにおける同時動作に必須の、並列性の高い高速データ転送を実現している。また画像データに代表される、連続したデータ列のアクセスに対しコストパフォーマンスの高いシンクロナスDRAM(SDRAM)をサポートするメモリコントローラ202を内蔵している。その他には、スキャナコントローラ205、プリンタコントローラ206,PCIコントローラ207,USBコントローラ208,UART209、タイマ・GPIO機能含むMISCモジュール210、LANコントローラ211等を内蔵している。230〜236はそれぞれ205〜211のI/Oインターフェースであり、図1の同名のインターフェースと同一のものである。   There are two independent buses, an IO bus (B bus) 221 for connecting a general-purpose IO core inside the chip, and a graphic bus (G bus) 220 optimized for image data transfer. Then, by connecting these buses to the memory 204 and the processor 201 via a system bus bridge 203 that is a crossbar switch, high-speed data transfer that is essential for simultaneous operation in a multi-function system is realized. . In addition, a memory controller 202 that supports a synchronous DRAM (SDRAM) having high cost performance with respect to continuous data string access represented by image data is incorporated. In addition, a scanner controller 205, a printer controller 206, a PCI controller 207, a USB controller 208, a UART 209, a MISC module 210 including a timer / GPIO function, a LAN controller 211, and the like are incorporated. Reference numerals 230 to 236 denote 205/211 I / O interfaces, which are the same as the interfaces having the same names in FIG.

ここでメモリコントローラ202は、DDR−SDRAMヘのオープンページポリシーでのアクセスをサポートしている。このオープンページポリシーでは、一旦あるページをオープン(RASコマンド)すると、続くCASコマンドによるメモリアクセスが終了しても直ちにはクローズ(プリチャージ)しない。後続のメモリアクセスが同一ページへのアクセスであれば(ページヒット)、RASコマンドを発行することなく、CASコマンドだけで連続してアクセスすることができ、このときにメモリデバイスの供給するバンド幅は最大になる。   Here, the memory controller 202 supports access to the DDR-SDRAM with an open page policy. In this open page policy, once a certain page is opened (RAS command), it is not immediately closed (precharged) even if the memory access by the subsequent CAS command is completed. If the subsequent memory access is an access to the same page (page hit), the CAS device can be accessed continuously without issuing the RAS command. At this time, the bandwidth supplied by the memory device is Become the maximum.

一方、後続のメモリアクセスが同一バンクで別のページ(RASアドレス)に対するものであれば、一旦ページをクローズするためにプリチャージコマンドを発行し、その後、当該ページをオープンするためにRASコマンドを発行しなければならない。このような状況ではメモリデバイスの供給できるバンド幅は低下することになる。   On the other hand, if the subsequent memory access is for another page (RAS address) in the same bank, a precharge command is issued to close the page, and then a RAS command is issued to open the page. Must. In such a situation, the bandwidth that the memory device can supply decreases.

クローズページポリシーを採用し、メモリアクセスが終了すると直ちにページをクローズ(プリチャージ)すれば、ページミスが頻発するようなアクセスパターンに対してはオープンページポリシーよりも高いバンド幅を供給できることが知られている。しかしページヒットが多いアクセスパターンでは、オープンページポリシーに比べて不利になる。   It is known that if the closed page policy is adopted and the page is closed (precharged) immediately after the memory access is completed, a higher bandwidth than the open page policy can be supplied for an access pattern in which page misses frequently occur. ing. However, the access pattern with many page hits is disadvantageous compared to the open page policy.

ここで典型的な複合動作のシーケンスを考える。スキャナ121で原稿をスキャンしながら、その読み取った原稿画像をプリンタ123により印刷する、所謂コピー動作を例に説明する。原稿をスキャンすることによって得られた画像データは、スキャナ121からスキャナインターフェース230(131)を介してシステムLSI100が内蔵するスキャナコントローラ205に送られる。スキャナコントローラ205は、その受け取った画像データをDMAによってメモリ204に格納する。次いでプリンタコントローラ206は、この画像データをDMAによりメモリ204から読み出し、プリンタインターフェース231を介してプリンタ123に送出して印刷する。   Now consider a typical sequence of complex operations. A so-called copying operation in which the scanned original image is printed by the printer 123 while the original is scanned by the scanner 121 will be described as an example. Image data obtained by scanning the document is sent from the scanner 121 to the scanner controller 205 built in the system LSI 100 via the scanner interface 230 (131). The scanner controller 205 stores the received image data in the memory 204 by DMA. Next, the printer controller 206 reads the image data from the memory 204 by DMA, and sends it to the printer 123 via the printer interface 231 for printing.

このとき更に、PC124からUSBインターフェース233(134)を介してPDLデータが送信される。このPDLデータはUSBデバイスコントローラ208によって受信され、DMAによって一旦メモリ204に格納される。その後、システムLSI100のプロセッサ201によって解釈され、展開された画像イメージが再度メモリ204に格納される。最後に、プリンタコントローラ206によりメモリ204から読み出され、プリンタインターフェース231を介してプリンタ123に送られて印刷される。   At this time, PDL data is further transmitted from the PC 124 via the USB interface 233 (134). This PDL data is received by the USB device controller 208 and temporarily stored in the memory 204 by DMA. Thereafter, the image image interpreted and developed by the processor 201 of the system LSI 100 is stored in the memory 204 again. Finally, the data is read from the memory 204 by the printer controller 206, sent to the printer 123 via the printer interface 231 and printed.

図3は、このときのプロセッサ201が扱うメモリの物理アドレス空間を説明する図である。   FIG. 3 is a diagram for explaining the physical address space of the memory handled by the processor 201 at this time.

実際にはプロセッサ201は、MIPS−R4000互換であり、プロセッサ201のソフトウェアは仮想アドレスを用いて動作している。プロセッサ201は常にカーネルモードで動作しており、物理アドレス「0x0000_0000」〜「0x1fff_ffff」番地が、仮想アドレス「0x8000_0000」〜「0x9fff_ffff」番地(kseg0: cached)及び「0xa000_0000」〜「0xbfff_ffff」番地(kseg1: uncached)に対応付けられている。   Actually, the processor 201 is compatible with MIPS-R4000, and the software of the processor 201 operates using a virtual address. The processor 201 always operates in the kernel mode, and the physical addresses “0x0000_0000” to “0x1fff_ffff” are the virtual addresses “0x8000_0000” to “0x9fff_ffff” (kseg0: cached) and “0xa000_0000” to “0xbfff_ffff” (kseg1 : uncached).

この従来例においては、メモリ204の容量は32MBであり、16bit×4bank×4M word構成の256MビットのSDRAMが1個が実装されている。従って、RAMとして利用可能な物理アドレス空間は、「0x0000_0000」〜「0x01ff_ffff」番地までである。   In this conventional example, the capacity of the memory 204 is 32 MB, and one 256 Mbit SDRAM of 16 bit × 4 bank × 4 M word configuration is mounted. Therefore, the physical address space that can be used as the RAM is from “0x0000_0000” to “0x01ff_ffff”.

複合動作が行われる場合、プロセッサ201上で動作するソフトウェアが各ハードウェアが利用するメモリ204のバッファ領域を管理する。通常はソフトウェアで動的にメモリ領域を確保する場合と同じように、Heap領域にメモリアロケート関数(OSが提供するシステム関数:malloc等)を用いて必要なサイズの領域を確保する。この例の場合では、スキャナコントローラ205がDMAで書き込み、プリンタコントローラ206がDMAで読み出すバッファ領域は同じである。もしこのバッファ領域が1つしかない場合、スキャナコントローラ205が書き込んだアドレスを後からプリンタコントローラ206が読み出す。しかし通常、スキャナ121から読み込む速度とプリンタ123が印刷する速度は異なるため、スキャナコントローラ205とプリンタコントローラ206との間で同期を取る仕組みが無い限り、途中で読み出しアドレスが書き込みアドレスを追い越す可能性がある。   When composite operation is performed, software operating on the processor 201 manages the buffer area of the memory 204 used by each hardware. Normally, a memory area is allocated in the Heap area using a memory allocation function (system function provided by the OS: malloc, etc.) as in the case of dynamically allocating a memory area by software. In the case of this example, the buffer areas that the scanner controller 205 writes by DMA and the printer controller 206 reads by DMA are the same. If there is only one buffer area, the printer controller 206 reads the address written by the scanner controller 205 later. However, since the reading speed from the scanner 121 is different from the printing speed of the printer 123, there is a possibility that the reading address may overtake the writing address in the middle unless there is a mechanism for synchronization between the scanner controller 205 and the printer controller 206. is there.

これを避けるため、一般にバッファを二重に持つことが行われる。即ち、スキャナコントローラ205がDMAで一方のバッファ領域に書き込んでいる間、プリンタコントローラ206はもう一方のバッファ領域からDMAで読み出す。こうして双方のDMA転送が終了した時点で、それぞれの使用するバッファを入れ替え、次のDMAを開始する。例えばスキャナ121からスキャナコントローラ205に対して1MBのデータが連続して送られてくる場合、まずメモリアロケート関数を引数を1MBにしてコールする。そして返されたアドレスを(仮想アドレスなので物理アドレスに変換して)スキャナコントローラ205のDMA開始アドレスとして設定する。ここでは「0x0080_0000」〜「0x008f_ffff」番地が確保され、先頭番地である「0x800_0000」番地がDMA開始アドレスとして設定される。次いでデータが到着するとスキャナコントローラ205は、DMAで当該開始アドレスから連続してデータを格納していく。このDMAが終了すると、プリンタコントローラ206に「0x0080_0000」番地がDMA開始アドレスとして設定される。その後、DMAの開始がソフトウェアにより指示されると、プリンタインターフェース231の信号に従って設定された開始アドレスから順次データを読み出し、プリンタインターフェース231を介してプリンタ123にデータを転送する。それと同時に、スキャナコントローラ205に対して次のDMAが設定される。そして再度メモリアロケート関数を引数を1MBにしてコールし、「0x0090_0000」〜「0x009f_ffff」番地が確保されると、先頭番地である「0x0090_0000」番地がDMA開始アドレスとして設定される。これによりスキャナインターフェース230よりデータが到着すると、スキャナコントローラ205はDMAにより当該開始アドレスから連続してデータを格納していく。このようにして、スキャナコントローラ205とプリンタコントローラ206との間で、2つの領域「0x0080_0000」〜「0x008f_ffff」番地と「0x0090_0000」〜「0x009f_ffff」番地を交互に使用しながら繰り返しDMA動作が行われる。   To avoid this, it is common to have double buffers. In other words, while the scanner controller 205 is writing to one buffer area by DMA, the printer controller 206 reads from the other buffer area by DMA. When both DMA transfers are completed in this way, the buffers to be used are replaced and the next DMA is started. For example, when 1 MB of data is continuously sent from the scanner 121 to the scanner controller 205, the memory allocation function is first called with an argument of 1 MB. The returned address is converted into a physical address because it is a virtual address, and is set as the DMA start address of the scanner controller 205. Here, addresses “0x0080_0000” to “0x008f_ffff” are secured, and the address “0x800_0000” which is the head address is set as the DMA start address. Next, when data arrives, the scanner controller 205 stores data continuously from the start address by DMA. When this DMA is completed, the address “0x0080_0000” is set in the printer controller 206 as the DMA start address. Thereafter, when the start of DMA is instructed by software, the data is sequentially read from the start address set in accordance with the signal of the printer interface 231, and the data is transferred to the printer 123 via the printer interface 231. At the same time, the next DMA is set for the scanner controller 205. Then, the memory allocation function is called again with an argument of 1 MB, and when addresses “0x0090_0000” to “0x009f_ffff” are secured, the address “0x0090_0000” which is the head address is set as the DMA start address. As a result, when data arrives from the scanner interface 230, the scanner controller 205 stores data continuously from the start address by DMA. In this manner, the DMA operation is repeatedly performed between the scanner controller 205 and the printer controller 206 while alternately using the two areas “0x0080_0000” to “0x008f_ffff” and “0x0090_0000” to “0x009f_ffff”.

一方、USBコントローラ208の場合は、「0x00b0_0000」〜「0x00bf_ffff」番地が確保され、先頭番地である「0x00b0_0000」番地がDMA開始アドレスとして設定される。PC(USBホスト)124からPDLデータが送られてくるとUSBコントローラ208はDMAにより当該開始アドレスから連続してデータを格納していく。全ての転送が終了すると、割り込みによりソフトウェアに通知され、次いでソフトウェアによってPDLデータが解釈され、プリントイメージデータが生成される。この最終的に生成されたプリントイメージデータは、新たに確保されたバッファ領域に格納される。これには再びメモリアロケート関数が呼ばれ、3MBの領域「0x00c0_0000」〜「0x00ef_ffff」番地が確保される。次に「0x00c0_0000」番地をDMAの先頭アドレスとしてプリンタコントローラ206が起動される。このときのプリンタコントローラ206のDMA転送は、前述のスキャナプリンタ動作時のプリンタコントローラ206のDMA転送とは排他的に行われる。このように、スキャナ121とプリンタ123、HDD125へのアクセスが同時に起こる場合、システムLSI100の内部では複数のハードウェアがメモリ204に対して同時にDMAアクセスを行っている。   On the other hand, in the case of the USB controller 208, addresses “0x00b0_0000” to “0x00bf_ffff” are secured, and the address “0x00b0_0000” that is the head address is set as the DMA start address. When PDL data is sent from the PC (USB host) 124, the USB controller 208 stores data continuously from the start address by DMA. When all transfers are completed, the software is notified by an interrupt, and then the PDL data is interpreted by the software and print image data is generated. The finally generated print image data is stored in a newly secured buffer area. In this case, the memory allocation function is called again, and 3 MB areas “0x00c0_0000” to “0x00ef_ffff” are secured. Next, the printer controller 206 is activated with the address “0x00c0_0000” as the start address of the DMA. The DMA transfer of the printer controller 206 at this time is performed exclusively with the DMA transfer of the printer controller 206 during the above-described scanner printer operation. As described above, when access to the scanner 121, the printer 123, and the HDD 125 occurs simultaneously, a plurality of pieces of hardware within the system LSI 100 are simultaneously performing DMA access to the memory 204.

この場合は、一つのハードウェアが単独でアクセスする場合に比べて、メモリデバイスにおいてページヒットする確率が低くなる。なぜなら、個別のハードウェアからのメモリ204アクセスが連続的なものであっても、複数のハードウェアが交互にメモリ204にアクセスすることにより、メモリコントローラ202からメモリに対するアクセスは連続していないからである。このように同時にメモリ204にアクセスするハードウェアが増加するに従い、メモリデバイスへのアクセスパターンはランダムアクセスに近づいていく。ランダムアクセスでは、アクセス毎にほぼ毎回ページミスが生じ、従ってメモリコントローラ202は、ページクローズ(プリチャージ)、ページオープン(RAS)コマンドを発行しなければならない。これにより、メモリの供給できるバンド幅はピーク時(ページヒット時)に比べて大幅に低下してしまう。   In this case, the probability of a page hit in the memory device is lower than when one piece of hardware accesses alone. This is because even if the memory 204 access from individual hardware is continuous, access to the memory from the memory controller 202 is not continuous by a plurality of hardware accessing the memory 204 alternately. is there. As hardware that simultaneously accesses the memory 204 increases in this way, the access pattern to the memory device approaches random access. In random access, a page miss occurs almost every time access is performed, and therefore the memory controller 202 must issue a page close (precharge) and page open (RAS) command. As a result, the bandwidth that can be supplied by the memory is greatly reduced compared to the peak time (when the page hits).

スキャナコントローラ205、プリンタコントローラ206、USBコントローラに割り当てられたバッファ領域が全て同一バンク内で、かつ全て別ページにある。従って各々が同時に交互にDMA転送を行った場合、それぞれのDMA転送はメモリにおいて必ずページミスを起こす。そのためメモリバンド幅が低下することによりシステム性能が低下してしまい、プリンタ123が必要とする速度で印刷データを供給できなくなり、印刷速度を制限してしまう可能性がある。   The buffer areas assigned to the scanner controller 205, printer controller 206, and USB controller are all in the same bank and all on different pages. Accordingly, when each DMA transfer is alternately performed at the same time, each DMA transfer always causes a page miss in the memory. For this reason, the system performance is lowered due to the reduction in the memory bandwidth, and print data cannot be supplied at a speed required by the printer 123, which may limit the printing speed.

上述の例は、物理アドレス(Addr[31:0])と、メモリ204のバンクアドレス・ロウアドレス・カラムアドレスの関係が図4に示すように、上位ビットからこの順番で連続的にアサインされている場合に生じる。   In the above example, the relationship between the physical address (Addr [31: 0]) and the bank address / row address / column address of the memory 204 is continuously assigned in this order from the upper bits as shown in FIG. Occurs when

これを解決するため、図5に示すように、物理アドレスとメモリ204のバンクアドレス・ロウアドレス・カラムアドレスの関係を固定的に取り替える方法が取られる。図5のように物理アドレスとメモリ204のバンクアドレス・ロウアドレス・カラムアドレスの関係をアサインすると、バスマスタから連続する物理アドレスにDMAアクセスするとき、ページ境界で必ずバンクが入れ替わる。このときページミスが起こるのは図5の場合と同様である。しかし、前述のように、複数のバスマスタが同時にDMAアクセスを起こしている状態では、各バスマスタがアクセスするバンクはランダムに切り替わる。メモリ204の各バンクは独立にアクセス可能であるため、一つのバンクでページミスが生じ、ページクローズ、オープンの処理を行う際にも、別バンクに対してアクセスできるため、ページミスのオーバーヘッドを隠蔽することが可能となる。但し、メモリコントローラ202が、各バスマスタからのメモリアクセス要求を受け付けた順番で処理する場合は、同一バンクに対するアクセス要求が連続すると、先のアクセスの処理が終了するまで後続のアクセスを処理できない。この結果、ページミスが生じたときのオーバーヘッドを隠蔽することができない。これはバンク数が4つの場合は1/4の確率で生じ、ページミスの多い状況では性能に与える影響が大きい。   In order to solve this, as shown in FIG. 5, a method is adopted in which the relationship between the physical address and the bank address / row address / column address of the memory 204 is fixedly replaced. If the relationship between the physical address and the bank address / row address / column address of the memory 204 is assigned as shown in FIG. 5, when the DMA access is performed from the bus master to the continuous physical address, the bank is always changed at the page boundary. At this time, a page miss occurs as in the case of FIG. However, as described above, in a state where a plurality of bus masters simultaneously cause DMA access, the banks accessed by each bus master are switched randomly. Since each bank of the memory 204 can be accessed independently, a page miss occurs in one bank, and even when a page close or open process is performed, another bank can be accessed, so the page miss overhead is hidden. It becomes possible to do. However, if the memory controller 202 processes the memory access requests from the respective bus masters in the order in which they are received, if the access requests for the same bank are consecutive, subsequent accesses cannot be processed until the previous access processing is completed. As a result, the overhead when a page miss occurs cannot be concealed. This occurs with a probability of 1/4 when the number of banks is four, and has a large effect on performance in a situation where there are many page misses.

メモリデバイスに対して、オウトオブオーダーでアクセスする機能を備えたメモリコントローラであれば、この状況を改善することができる。   This situation can be improved if the memory controller has a function of accessing the memory device in an out-of-order manner.

図6は、従来のメモリコントローラの構成の一例を示すブロック図である。   FIG. 6 is a block diagram showing an example of the configuration of a conventional memory controller.

図6において、601はバスインターフェースであり、システムバス610と接続され、バスマスタからのリード・ライト要求を受け付ける。より具体的にはアドレスバス信号、リード・ライト信号等のコマンド信号を受け、コマンドキュー602にアドレス情報とリード・ライト情報を組にして格納する。更に、データの書込みの場合はデータバス信号にドライブされているデータをライトデータバッファ603に格納する。またデータの読出しの場合は、リードデータバッファ604に保持されているデータをデータバス信号にドライブする。メモリ制御回路605は、コマンドキュー602から必要なコマンドを読み出し、メモリデバイスに対して当該コマンドに応じCS,RAS,CAS,WE信号を適当なタイミングでドライブする。データ書込みの場合は、ライトデータバッファ604から当該ライトコマンドに対応する書き込むデータを読み出し、メモリデバイスに対し書き込み動作を行う。データの読出しの場合は、メモリデバイスから読み出されたデータをリードデータバッファ604に格納する。このリードバッファはシステムLSI内部に複数のメモリコントローラを備える場合、後述の理由により必要である。   In FIG. 6, reference numeral 601 denotes a bus interface, which is connected to the system bus 610 and receives a read / write request from a bus master. More specifically, a command signal such as an address bus signal and a read / write signal is received, and the address information and the read / write information are stored in the command queue 602 as a set. Further, when data is written, the data driven by the data bus signal is stored in the write data buffer 603. When reading data, the data held in the read data buffer 604 is driven to the data bus signal. The memory control circuit 605 reads a necessary command from the command queue 602, and drives the CS, RAS, CAS, and WE signals to the memory device according to the command at an appropriate timing. In the case of data writing, the write data corresponding to the write command is read from the write data buffer 604, and a write operation is performed on the memory device. In the case of reading data, the data read from the memory device is stored in the read data buffer 604. This read buffer is necessary for the reason described later when a plurality of memory controllers are provided in the system LSI.

コマンドキュー602及びライトデータバッファ603は、バスインターフェース601がキューイングした順番に拘わらず、保持している情報を任意の順番で読み出すことができるように構成されている。コマンド発行制御部606は、メモリ204の4つのバンクが独立して動作可能であることを利用して、1乃至複数のバンクがアクセス中であっても、アクセスされていないバンクがある場合は、コマンドキュー602から当該バンクに対するコマンドを選別する。存在すれば他のバンクへのアクセスが終了するのを待たず、直ちに当該バンクへのアクセスを開始できるようにコマンドキュー602よりコマンドを選択してメモリ制御回路605に渡す。このようにして複数のバンクへコンカレントにアクセスすることにより、仮にページミスが続いた場合にも、一つのバンクがページクローズ、オープン動作を行っている間に他のバンクへのアクセスが可能となり、オーバーヘッドを隠蔽でき、メモリアクセス効率を向上させることができる。   The command queue 602 and the write data buffer 603 are configured to be able to read the stored information in any order regardless of the order in which the bus interface 601 queues. The command issuance control unit 606 uses the fact that the four banks of the memory 204 can operate independently, and even when one or more banks are being accessed, there are banks that are not being accessed. A command for the bank is selected from the command queue 602. If it exists, the command is selected from the command queue 602 and transferred to the memory control circuit 605 so that the access to the bank can be started immediately without waiting for the access to the other bank to end. By accessing a plurality of banks in a concurrent manner, even if a page miss continues, it is possible to access other banks while one bank is performing page close and open operations. Overhead can be concealed and memory access efficiency can be improved.

上述のようにメモリアクセス効率を向上させるためコマンドの発行順をスケジューリングする手段としては、前述のバンクの衝突を回避する以外にもいくつかの方法が存在する。例えば、Sonics社のMemMaxTM(登録商標)ではコマンドのバンク間、スレッド間、チップセレクト間、リードライト間等の6つの条件に基づいたスケジューリングをサポートしている。   As described above, there are several methods for scheduling the command issue order in order to improve the memory access efficiency, in addition to avoiding the bank collision described above. For example, Sonics' MemMax ™ (registered trademark) supports scheduling based on six conditions such as command bank, thread, chip select, and read / write.

バンク間のスケジューリングは、上述したように連続して発行されるコマンドが異なるバンクにアクセスするものである。スレッド間のスケジューリングは、スレッド毎に優先度を設け、最も優先度の高いスレッドを先に発行する。チップセレクト間のスケジューリングは、連続して発行されるコマンドが異なるチップセレクトに割り当てられたメモリデバイスにアクセスする。リードライト間のスケジューリングは、連続して発行されるコマンドが、なるべくリード同士、ライト同士になるようにする。即ち、リードからライト、ライトからリードへの切り替わりを最小にするようにスケジューリングする。MemMaxTMにおいてはこれらのスケジューリングを組み合わせコマンドキューから最適な順にコマンドを取り出しメモリにアクセスできるようにする。   As described above, the bank-to-bank scheduling is to access banks in which commands issued successively are different. In scheduling between threads, a priority is set for each thread, and the thread with the highest priority is issued first. Scheduling between chip selects is performed by accessing a memory device assigned to a chip select in which commands issued successively are different. Scheduling between read and write is performed so that commands issued continuously are read and written as much as possible. That is, scheduling is performed so as to minimize switching from read to write and from write to read. In MemMaxTM, these schedulings are combined to retrieve commands from the command queue in an optimal order so that the memory can be accessed.

しかしながら、メモリコントローラにおいてメモリアクセスコマンドをリオーダリングし、メモリ利用効率を向上させたとしても、まだ必要なメモリバンド幅が得られない場合には、さらなる手段を講じる必要がある。一つの方法はメモリの動作周波数を上げることであるが、同じ半導体プロセス技術を用いて動作周波数を大幅に向上することは容易なことではない。より簡単な方法は、メモリの系統数を例えば2つに増やすことである。   However, even if the memory access command is reordered in the memory controller and the memory utilization efficiency is improved, if the required memory bandwidth is not yet obtained, further measures must be taken. One method is to increase the operating frequency of the memory, but it is not easy to significantly increase the operating frequency using the same semiconductor process technology. A simpler method is to increase the number of memory systems to, for example, two.

図7は、メモリデバイスを2系統備えるシステムLSIの構成例を示す図である。この図7では、図2との比較のため、同一の構成要素には数字に’をつけて示している。図7において図2と異なる点は、メモリコントローラ240及びメモリ241が追加されている点にある。このようにシステムにメモリを2系統備えることで簡単にシステムの総メモリバンド幅を倍増させることができ、システム性能を向上できる。
特開2000−211216号公報
FIG. 7 is a diagram illustrating a configuration example of a system LSI having two memory devices. In FIG. 7, for comparison with FIG. 2, the same component is indicated with a numeral “′”. 7 is different from FIG. 2 in that a memory controller 240 and a memory 241 are added. Thus, by providing two systems of memory in the system, the total memory bandwidth of the system can be easily doubled, and the system performance can be improved.
JP 2000-21112 A

このようにシステム内にメモリコントローラが複数ある場合、考慮しなければならない問題が存在する。それは1つのマスタから複数のメモリコントローラに対して同時にリードアクセスを行う場合、それぞれのメモリコントローラからのリード応答時間は固定でなく、ある時間範囲を取る。このため、複数のメモリコントローラからのリード応答が衝突する可能性がある。特に前述のように複雑なスケジューラを用いる場合には応答時間の予測はさらに困難になる。この問題に対処するため、従来から取られてきた手法が2つある。   Thus, when there are a plurality of memory controllers in the system, there is a problem that must be considered. In the case where a single master performs read access to a plurality of memory controllers at the same time, the read response time from each memory controller is not fixed but takes a certain time range. For this reason, read responses from a plurality of memory controllers may collide. In particular, when a complex scheduler is used as described above, it is more difficult to predict the response time. There are two approaches that have been taken in the past to address this problem.

第1の手法は、1つのマスタから複数のメモリコントローラに対し同時にリードアクセスを行うことを禁止する方法である。しかしながらこの方法では、マスタのメモリアクセスに対する自由度を著しく低下させてしまう。マスタはアクセスしようとするリードアドレスが、どのメモリコントローラに割り当てられているのかを常に意識していなければならない。もし次にリードするアドレスが現在リード中のメモリコントローラとは別のメモリコントローラに割り当てられているならば、現在のリードが完了するまで次のリードコマンドの発行を待たなければならない。   The first method is a method for prohibiting simultaneous read access from a single master to a plurality of memory controllers. However, this method significantly reduces the degree of freedom of the master for memory access. The master must always be aware of which memory controller the read address to be accessed is assigned to. If the next read address is assigned to a memory controller different from the currently read memory controller, the next read command must be issued until the current read is completed.

第2の手法は、それぞれのメモリコントローラに十分な容量のリードリターンバッファを備え、もしリード応答が衝突する場合はそれらの間を調停する。また、別のメモリコントローラがマスタに対して転送を行っている間は、リード応答をリードリターンバッファに滞留させる。更に、マスタに対する転送が許可された時点でリードリターンバッファからリード応答を取り出してマスタに対して転送する。この方法では、各々のメモリコントローラに保持すべきリードリターンバッファの回路規模が問題となる。   In the second method, each memory controller is provided with a read / return buffer having a sufficient capacity, and if read responses collide with each other, arbitration is performed between them. Further, while another memory controller is transferring data to the master, the read response is retained in the read / return buffer. Further, when transfer to the master is permitted, the read response is extracted from the read / return buffer and transferred to the master. In this method, the circuit scale of the read / return buffer to be held in each memory controller becomes a problem.

メモリコントローラは、メモリ利用効率を最大化するためにパイプライン動作している。いま、一つのリードコマンドがコマンドキューから取り出され、メモリデバイスに対するアクセスが行われると、その結果はリード応答としてマスタに転送されることになる。このとき、このリード応答が他のメモリコントローラのリード応答と衝突し、調停された結果、リードリターンバッファに滞留しなければならなくなったとする。この場合メモリコントローラは、パイプライン動作しているので、この時点で既に後続の複数のコマンドがコマンドキューから取り出されメモリデバイスに対してアクセスされていると考えられる。更に、これらは先行するリードコマンドと同一のマスタから発行されたリードコマンドであり得る。メモリデバイスに対するアクセスは途中で止めることができないため、これら後続のリードコマンドに対応するリード応答も同様にリードリターンバッファに滞留される必要がある。   The memory controller is pipelined to maximize memory utilization efficiency. Now, when one read command is taken out from the command queue and the memory device is accessed, the result is transferred to the master as a read response. At this time, it is assumed that this read response collides with the read response of another memory controller, and as a result of arbitration, the read response must stay in the read return buffer. In this case, since the memory controller is performing a pipeline operation, it is considered that a plurality of subsequent commands are already taken out from the command queue and accessed to the memory device at this point. Furthermore, these may be read commands issued from the same master as the preceding read command. Since access to the memory device cannot be stopped halfway, the read response corresponding to these subsequent read commands needs to stay in the read return buffer as well.

従って、第2の手法を取る場合、必要なリードリターンバッファの容量は、一連の複数のリードコマンドにより読み出されるデータの最大数分だけ確保しなければならない。例えば、メモリバス幅が64ビットのメモリデバイスを4ビート・バースト転送を用いてアクセスする場合、一度のアクセス当たりの64ビット×4=256ビットが転送される。メモリデバイスにDDR−SDRAMを用いる場合、1クロック当たり2ビートの転送が行われる。このため、この4ビート・バーストアクセスに必要なクロックサイクルは2クロックである。リードの場合を考えると、メモリバス上で4ビートの転送が行われるのに先立って、CASレイテンシ・サイクル前にリードコマンドが発行される必要がある。CASレイテンシは、一般的に2〜2.5〜3が用いられる。CASレイテンシが3の場合を考えると、リードコマンドが発行されてからデータが読み出されるまでのサイクル数は、結局3+2=5サイクルとなる。このリードが終わるのを待って次のリードコマンドを発行していたのでは5サイクル当たりメモリバスは2クロックサイクルしか利用できない。そこで、メモリの利用効率を上げるためには、この間にも次のリードコマンドを発行し、パイプライン動作をさせるようにする。1つのコマンド当たりメモリバスは2クロック占有されるため、メモリ利用効率を最大にするためには、2クロックに一度リードコマンドを発行する必要がある。従って、5クロックサイクルの間に更に2つのリードコマンドを発行することができる。メモリデバイスからのリードが終了し、マスタに当該リードデータを転送できるようになるまで、通常更に数サイクルを必要とする。このため、この間パイプライン発行されるリードコマンドの数は更に多くなることがある。最初のリード応答が他のスレーブからのリード応答と衝突し、調停の結果リードリターンバッファに滞留することになったとき、これら後続のリードコマンドも全て同一のマスタからのコマンドであることがあり得る。よって、それら後続のリードコマンドのリード応答も全てリードリターンバッファに滞留されることが起こり得る。このような事態は実際にはほとんど起こらないとしても、完全な動作を保証するためにはこのような最悪の場合にも対処できなければならない。その結果、各メモリコントローラには少なくとも256ビット×4=1024ビット分もの容量を持つリードリターンバッファを備える必要が生じる。   Therefore, when the second method is adopted, the necessary capacity of the read / return buffer must be secured by the maximum number of data read by a series of a plurality of read commands. For example, when a memory device having a memory bus width of 64 bits is accessed using 4-beat burst transfer, 64 bits × 4 = 256 bits per access are transferred. When DDR-SDRAM is used for the memory device, transfer of 2 beats per clock is performed. For this reason, the clock cycle required for this 4-beat burst access is 2 clocks. Considering the case of reading, it is necessary to issue a read command prior to the CAS latency cycle prior to the transfer of 4 beats on the memory bus. The CAS latency is generally 2 to 2.5 to 3. Considering the case where the CAS latency is 3, the number of cycles from when the read command is issued to when the data is read is 3 + 2 = 5 cycles. If the next read command is issued after this read is completed, the memory bus can use only 2 clock cycles per 5 cycles. Therefore, in order to increase the memory utilization efficiency, the next read command is issued during this time to cause a pipeline operation. Since the memory bus is occupied by two clocks per command, it is necessary to issue a read command once every two clocks in order to maximize the memory utilization efficiency. Therefore, two more read commands can be issued during five clock cycles. Usually several more cycles are required until the read from the memory device is completed and the read data can be transferred to the master. For this reason, the number of read commands issued in the pipeline during this period may further increase. When the first read response collides with a read response from another slave and the result of the arbitration is that it stays in the read return buffer, these subsequent read commands may all be commands from the same master. . Therefore, it is possible that all read responses of the subsequent read commands are also retained in the read return buffer. Even though such a situation rarely actually occurs, it must be able to cope with such a worst case in order to guarantee full operation. As a result, each memory controller needs to be provided with a read return buffer having a capacity of at least 256 bits × 4 = 1024 bits.

本発明の目的は上記従来の問題点を解決することにある。   An object of the present invention is to solve the above conventional problems.

本発明の特徴は、バスマスタに対するリードリターンバッファを不要にして、複数のバススレーブからのリード応答の衝突を防止する技術を提供することにある。   A feature of the present invention is to provide a technique that eliminates the need for a read return buffer for a bus master and prevents collision of read responses from a plurality of bus slaves.

上記目的を達成するために本発明の一態様に係るメモリコントローラは以下のような構成を備える。即ち、
バスマスタからのメモリへのアクセス要求を受付けて当該メモリにアクセスするメモリコントローラであって、
前記バスマスタからの前記メモリへのアクセス要求を受け付けると前記メモリに対してアクセスするアクセス手段と、
前記メモリへのアクセス要求がリードの場合、前記メモリから読取ったデータを前記バスマスタに転送する転送手段と、
前記転送手段による前記データの転送時、前記バスマスタに対する他のバススレーブからの読出し応答と衝突するか否かを判断する判断手段と、
前記判断手段により衝突すると判断した場合には、前記メモリに対する前記アクセス手段によるアクセスを遅延させる遅延手段と、
を有することを特徴とする。
In order to achieve the above object, a memory controller according to an aspect of the present invention has the following arrangement. That is,
A memory controller that accepts an access request to a memory from a bus master and accesses the memory,
An access means for accessing the memory upon receiving an access request to the memory from the bus master;
When the access request to the memory is a read, transfer means for transferring data read from the memory to the bus master;
Determining means for determining whether or not there is a collision with a read response from another bus slave to the bus master when the data is transferred by the transfer means;
A delay means for delaying access by the access means to the memory, when the determination means determines that there is a collision;
It is characterized by having.

上記目的を達成するために本発明の一態様に係る情報処理装置は以下のような構成を備える。即ち、
少なくとも一つのバスマスタと、
請求項1乃至7のいずれか1項に記載のメモリコントローラをそれぞれ含む複数のバススレーブと、
少なくとも1系統のメモリと、
を有することを特徴とする。
In order to achieve the above object, an information processing apparatus according to an aspect of the present invention has the following arrangement. That is,
At least one bus master,
A plurality of bus slaves each including the memory controller according to any one of claims 1 to 7,
At least one memory;
It is characterized by having.

更に上記目的を達成するために本発明の一態様に係るメモリ制御方法は以下のような工程を備える。即ち、
バスマスタからのメモリへのアクセス要求を受付けて当該メモリにアクセスするメモリ制御方法であって、
前記バスマスタからの前記メモリへのアクセス要求を受け付けると前記メモリに対してアクセスするアクセス工程と、
前記メモリへのアクセス要求がリードの場合、前記メモリから読取ったデータを前記バスマスタに転送する転送工程と、
前記転送工程による前記データの転送時、前記バスマスタに対する他のバススレーブからの読出し応答と衝突するか否かを判断する判断工程と、
前記判断工程で衝突すると判断した場合には、前記メモリに対する前記アクセス工程によるアクセスを遅延させる遅延工程と、
を有することを特徴とする。
In order to achieve the above object, a memory control method according to an aspect of the present invention includes the following steps. That is,
A memory control method for receiving an access request to a memory from a bus master and accessing the memory,
An access step of accessing the memory upon receiving an access request to the memory from the bus master;
When the access request to the memory is a read, a transfer step of transferring data read from the memory to the bus master;
A determination step of determining whether or not there is a collision with a read response from another bus slave to the bus master when the data is transferred by the transfer step;
If it is determined that there is a collision in the determination step, a delay step for delaying access by the access step to the memory;
It is characterized by having.

本発明によれば、バスマスタに対するリード応答が他のスレーブからのリード応答と衝突することを防ぐことができ、従来のメモリコントローラに備えられていたリードリターンバッファを不要にできる。   According to the present invention, it is possible to prevent a read response to the bus master from colliding with a read response from another slave, and a read return buffer provided in a conventional memory controller can be eliminated.

以下、添付図面を参照して本発明の好適な実施の形態を詳しく説明する。尚、以下の実施の形態は特許請求の範囲に係る本発明を限定するものでなく、また本実施の形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the present invention according to the claims, and all combinations of features described in the present embodiments are essential to the solution means of the present invention. Not exclusively.

[実施の形態1]
図8は、本発明の実施の形態1に係るシステム構成を説明するブロック図である。
[Embodiment 1]
FIG. 8 is a block diagram illustrating a system configuration according to Embodiment 1 of the present invention.

図において、800はシステムLSIであり、プロセッサ、メモリコントローラ、DMA機能を備える複数のハードウェアエンジン、更には、説明の簡単のため図示されない複数の機能モジュールを内蔵している。メモリ801及び802は、このシステムLSI800に内蔵されるメモリコントローラによって制御されるメモリで、4バンク構成の256Mビット4個が2組実装されている。803〜806は外部I/Oインターフェースである。ここで803はスキャナインターフェース、804はプリンタインターフェース、805はPCIインターフェース、806がUSBインターフェースであり、それぞれがシステムLSI800の内部において複数のハードウェアエンジンと接続される。スキャナ810は、スキャナインターフェース802によってシステムLSI800と接続される。プリンタエンジン811は、プリンタインターフェース804によってシステムLSI800と接続されている。USBホスト812は、USBインターフェース806によってシステムLSI800と接続される。PCI拡張スロット813は、PCIインターフェース805によってシステムLSI800と接続される。   In the figure, reference numeral 800 denotes a system LSI, which includes a processor, a memory controller, a plurality of hardware engines having a DMA function, and a plurality of functional modules not shown for simplicity of explanation. The memories 801 and 802 are controlled by a memory controller built in the system LSI 800, and two sets of four 256M bits having a 4-bank configuration are mounted. Reference numerals 803 to 806 denote external I / O interfaces. Here, reference numeral 803 denotes a scanner interface, 804 denotes a printer interface, 805 denotes a PCI interface, and 806 denotes a USB interface, which are connected to a plurality of hardware engines inside the system LSI 800. The scanner 810 is connected to the system LSI 800 by a scanner interface 802. The printer engine 811 is connected to the system LSI 800 by a printer interface 804. The USB host 812 is connected to the system LSI 800 via the USB interface 806. The PCI expansion slot 813 is connected to the system LSI 800 via the PCI interface 805.

このハードウェアエンジンは、より具体的には、スキャナコントローラ、プリンタコントローラ、PCIインターフェース、USBデバイスインターフェース等である。しかし必ずしもI/Oインターフェースと関係しているものだけではなく、画像処理、画像符号化複合化、データ圧縮伸張等を行うハードウェアエンジンも含まれている。これらは、リード用のDMAコントローラとライト用のDMAコントローラの両方を備えている。これを図9を用いて詳細に説明する。   More specifically, the hardware engine is a scanner controller, a printer controller, a PCI interface, a USB device interface, or the like. However, not only those related to the I / O interface, but also a hardware engine that performs image processing, image coding and decoding, data compression / decompression, and the like. These include both a read DMA controller and a write DMA controller. This will be described in detail with reference to FIG.

図9は、本実施の形態1に係るシステムLSI800のより具体的な構成を説明する図である。   FIG. 9 is a diagram for explaining a more specific configuration of the system LSI 800 according to the first embodiment.

図9において、プロセッサ901は、MIPS−R4000互換の機能を有する。スキャナコントローラ906は、スキャナインターフェース930を介して外部のスキャナと接続される。プリンタコントローラ907は、プリンタインターフェース931を介して外部のプリンタエンジンと接続される。USBデバイスコントローラ909は、USBインターフェース933を介し外部のUSBホストと接続される。PCIコントローラ908は、PCIホストブリッジ機能を備え、PCIインターフェース932を介して外部の1乃至複数のPCIターゲットデバイスと接続される。   In FIG. 9, a processor 901 has a function compatible with MIPS-R4000. The scanner controller 906 is connected to an external scanner via the scanner interface 930. The printer controller 907 is connected to an external printer engine via the printer interface 931. The USB device controller 909 is connected to an external USB host via the USB interface 933. The PCI controller 908 has a PCI host bridge function, and is connected to one or more external PCI target devices via the PCI interface 932.

メモリ904及び905は、それぞれ総容量は128MBであり、16ビット×4バンク×4Mワード構成の256MビットのDDRSDRAM1個により構成されている。JPEG圧縮・伸張エンジン910は、メモリ904或は905上のJPEG符号データをリードDMAにより読み出し、復号した後、生画像データをライトDMAによりメモリ904或は905に書き込む。またメモリ904,905上の生画像データをリードDMAにより読み出し、符号化した後、符号データをライトDMAによりメモリ904或は905に書き込むことができる。システムバス920は、バスマスタであるプロセッサ、各ハードウェアエンジンとバススレーブであるメモリコントローラ、その他とを接続する。共有バスではなく、複数のバスマスタと複数のバススレーブ間を多重に接続可能なマルチレイヤ構造をとっている。メモリコントローラ902及び903は、DDR−SDRAMをサポートしており、これらは本実施の形態1においては全く同一の構成をとる。これらは図6に示されるメモリコントローラと構成はほぼ同一であるが本実施の形態では変更されている。   Each of the memories 904 and 905 has a total capacity of 128 MB, and is composed of one 256 Mbit DDR SDRAM of 16 bits × 4 banks × 4M words. The JPEG compression / decompression engine 910 reads JPEG code data in the memory 904 or 905 by read DMA, decodes it, and writes the raw image data in the memory 904 or 905 by write DMA. Further, after the raw image data on the memories 904 and 905 is read and encoded by the read DMA, the code data can be written into the memory 904 or 905 by the write DMA. The system bus 920 connects a processor that is a bus master, each hardware engine, a memory controller that is a bus slave, and the like. Instead of a shared bus, a multi-layer structure is employed that allows multiple connections between multiple bus masters and multiple bus slaves. The memory controllers 902 and 903 support DDR-SDRAM, and these have the same configuration in the first embodiment. These are substantially the same in configuration as the memory controller shown in FIG. 6, but are changed in the present embodiment.

図10は、本実施の形態1に係るメモリコントローラ902及び903をより詳細に説明する図である。ここでは図6との比較のため、同一の構成要素には数字に’を付加して示している。   FIG. 10 is a diagram for explaining the memory controllers 902 and 903 according to the first embodiment in more detail. Here, for comparison with FIG. 6, the same component is indicated by adding a '.

図6と比較して図10が大きく異なる点は、図10では、リードデータバッファ604が除去されている点にある。またコマンド発行制御部606'にはコマンド発行タイミング情報620が入力され、またコマンド発行制御部606'からコマンド発行タイミング情報621が出力されている点が異なっている。これらの情報620,621は、メモリコントローラ902と903の間で互いにやりとりされる。その効果については後述する。   FIG. 10 is significantly different from FIG. 6 in that the read data buffer 604 is removed in FIG. Also, the command issue control unit 606 ′ receives command issue timing information 620, and the command issue control unit 606 ′ outputs command issue timing information 621. These pieces of information 620 and 621 are exchanged between the memory controllers 902 and 903. The effect will be described later.

図11及び図12は、本実施の形態に係るシステムバス920のバスプロトコルを説明する図で、図11はリード転送を示し、図12はライト転送を示している。前述のようにシステムバス920はマルチレイヤ構成であり、バスマスタからみた場合に任意のバススレーブとの間で1対1で接続されているようにみなすことができる。このシステムバス920は以下の信号により構成される。
clk システムバスクロック
ts Bus Transaction Start Master(マスタ)→Slave(スレーブ)
addr[31:2] Address Bus Master→Slave
mid[3:0] Master ID Master→Slave
rd_not_wr Read(H)/Write(L) Master→Slave
b_size[3:0] Access Size Master→Slave
rd_byteen[3:0] Read Data Byte Enable Master→Slave
wr_data[31:0] Write Data Bus Master→Slave
wr_byteen[3:0] Write Data Byte Enable Master→Slave
srdy Slave Ready Slave→Master
rrdy Read Return Ready Slave→Master
rmid[3:0] Return Master ID Slave→Master
rd_data[31:0] Read Data Bus Slave→Master
rd_error Read Error Slave→Master
clk システムバスクロック
システムバス920は同期バスであり、システムバス920の全ての信号のアサート/デアサートは本信号の立ち上がりエッジに同期して行なわれる。
ts[slave_num-1:0] Transaction Start Master→Slave
各バスマスタがバス転送を開始したいときにアサートを開始し、srdy(スレーブ・レディ)がアサートされるまでアサートを続ける。そしてsrdyがアサートされた次のクロック(Clock)サイクルでデアサートする。ts(バストランザクション開始)とsrdyの両方がアサートされているサイクルでバス転送を開始する。バスマスタは次のバス転送のためにtsの1サイクルのデアサート期間の後、再びアサートすることができる。この信号はスレーブ毎に独立した信号である。
addr[31:2] Address Bus(アドレスバス) Master→Slave
tsと同時に確定させ、tsのデアサートの1サイクル後のサイクルまで保持する。
mid[3:0] Master ID Master→Slave
アクセスを行なうバスマスタのIDである。tsと同時に確定させ、tsのデアサートの1サイクル後のサイクルまで保持する。
rd_not_wr Read(H)/Write(L) Master→Slave
バス転送のリード(Read)/ライト(Write)を示す。tsと同時に確定させ、tsのデアサートの1サイクル後のサイクルまで保持する。ハイレベル(High)はリードを示し、ロウレベルはライトを示す。
b_size[3:0] Burst size Master→Slave
システムバス920上のバス転送のバースト数を示す。1から16ビートまで指定可能である。tsと同時に確定させ、tsのデアサートの1サイクル後のサイクルまで保持する。「0000」は1ビート(beat)を示す。以下、「0001」は2beat、…「1111」は16beatを示している。
rd_byteen[3:0] Read Data Byte Enable Master→Slave
リード時のバイトイネーブルを示す。b_size[3:0]がシングルを示している時、その32ビットの中でどのバイト位置へのリードであるかを示す。b_sizeが2beat burst以上を示している時は、本信号は無効で、全てイネーブルとして扱われる。
wr_byteen[3:0]は、書込み時のData Phaseで有効であるが、本信号はリード時のAddress Phaseで有効である。tsと同時に確定させ、tsのデアサートの1サイクル後のサイクルまで保持する。
wr_data[31:0] Write Data Bus Master→Slave
32ビットのデータバスに出力される、マスタからスレーブへの書込みデータである。tsとsrdyの両方がアサートされたサイクルの次のサイクルから有効となる。Single Transaction時は最初の1beat目のデータのみ、2beat Burst Transaction時は、1beat目と2beat目の両方のデータが有効である。どのバイトが有効かは、wr_byteen[3:0]によって示される。システムバス920は、Big Endian Busなので、MSB側が0番地となる。
wr_byteen[3:0] Write Data Byte Enable Master→Slave
書込みデータのどのバイト位置が有効かを示す。wr_data[31:0]と同じく、tsとsrdyの両方がアサートされたサイクルの次のサイクルから有効となる。Single Transaction時は最初の1beat目のみ、2beat Burst 以上の転送時は全てのビートで有効である。
11 and 12 are diagrams for explaining the bus protocol of the system bus 920 according to the present embodiment. FIG. 11 shows read transfer, and FIG. 12 shows write transfer. As described above, the system bus 920 has a multi-layer configuration, and can be regarded as being connected one-to-one with an arbitrary bus slave when viewed from the bus master. The system bus 920 includes the following signals.
clk system bus clock
ts Bus Transaction Start Master → Master
addr [31: 2] Address Bus Master → Slave
mid [3: 0] Master ID Master → Slave
rd_not_wr Read (H) / Write (L) Master → Slave
b_size [3: 0] Access Size Master → Slave
rd_byteen [3: 0] Read Data Byte Enable Master → Slave
wr_data [31: 0] Write Data Bus Master → Slave
wr_byteen [3: 0] Write Data Byte Enable Master → Slave
srdy Slave Ready Slave → Master
rrdy Read Return Ready Slave → Master
rmid [3: 0] Return Master ID Slave → Master
rd_data [31: 0] Read Data Bus Slave → Master
rd_error Read Error Slave → Master
clk System Bus Clock The system bus 920 is a synchronous bus, and all signals of the system bus 920 are asserted / deasserted in synchronization with the rising edge of this signal.
ts [slave_num-1: 0] Transaction Start Master → Slave
Each bus master starts asserting when it wants to initiate a bus transfer and continues asserting until srdy (slave ready) is asserted. Then, it is deasserted in the next clock (Clock) cycle in which srdy is asserted. The bus transfer is started in a cycle in which both ts (bus transaction start) and srdy are asserted. The bus master can assert again after a deassertion period of ts for the next bus transfer. This signal is an independent signal for each slave.
addr [31: 2] Address Bus Master → Slave
It is determined at the same time as ts and held until the cycle one cycle after deassertion of ts.
mid [3: 0] Master ID Master → Slave
This is the ID of the bus master performing access. It is determined at the same time as ts and held until the cycle one cycle after deassertion of ts.
rd_not_wr Read (H) / Write (L) Master → Slave
Indicates bus transfer read / write. It is determined at the same time as ts and held until the cycle one cycle after deassertion of ts. A high level (High) indicates read, and a low level indicates write.
b_size [3: 0] Burst size Master → Slave
The number of bus transfer bursts on the system bus 920 is shown. 1 to 16 beats can be specified. It is determined at the same time as ts and held until the cycle one cycle after deassertion of ts. “0000” indicates one beat. Hereinafter, “0001” indicates 2 beats,..., “1111” indicates 16 beats.
rd_byteen [3: 0] Read Data Byte Enable Master → Slave
Indicates byte enable when reading. When b_size [3: 0] indicates single, it indicates to which byte position the 32 bits are read. When b_size indicates 2 beat burst or more, this signal is invalid and all are treated as enabled.
wr_byteen [3: 0] is valid in the Data Phase at the time of writing, but this signal is valid in the Address Phase at the time of reading. It is determined at the same time as ts and held until the cycle one cycle after deassertion of ts.
wr_data [31: 0] Write Data Bus Master → Slave
Write data from the master to the slave that is output to a 32-bit data bus. It becomes valid from the cycle following the cycle in which both ts and srdy are asserted. In the single transaction, only the first beat data is valid. In the 2 beat burst transaction, both the first and second beat data are valid. Which byte is valid is indicated by wr_byteen [3: 0]. Since the system bus 920 is a Big Endian Bus, the MSB side is 0 address.
wr_byteen [3: 0] Write Data Byte Enable Master → Slave
Indicates which byte position of the write data is valid. Similar to wr_data [31: 0], it is valid from the cycle following the cycle in which both ts and srdy are asserted. In single transaction, only the first beat is valid for all beats when transferring 2 beat bursts or more.

このwr_byteen[3:0]とwr_dataとの対応は以下の通りである。
wr_byteen[3] wr_data[31:24]
wr_byteen[2] wr_data[23:16]
wr_byteen[1] wr_data[15:8]
wr_byteen[0] wr_data[7:0]
srdy[slave_num-1:0] Slave Ready Slave→Master
スレーブのバッファがマスタからのバス転送を受け取る準備ができていることを示す。本信号がアサートされていれば、マスタはいつでもバス転送を始めることができ、スレーブは必ずそのバス転送を受け取らなければならない。この信号はtsに対応しスレーブ毎に独立した信号である。
rrdy Read Return Ready Slave→Master
スレーブからのリードリターン(Read Return)を示す信号である。スレーブはリードデータの準備ができたら本信号をアサートし、リードリターンを開始する。この信号はいつでもアサートしてよい。本信号のアサートと同じサイクルでリードデータが返される。2beat Burstの場合は、本信号が2サイクル期間アサートされ、2beat分のリードデータが返される。その際、本信号は連続してアサートされる必要は無く、間にウェイトサイクルを挟むことができる。
rmid[3:0] Return Master ID Slave→Master
リードリターンを受けるべきマスタのIDを示す。リード要求を受け付けた時にアサートされたmid[3:0]を保持しておき、同じIDを返す。マスタはtsのアサート時の本信号をデコードし、自分のマスタIDである場合に、そのリードリターンを自分へのリードリターンであると判断する。このrmid[3:0]は、rrdy(リードリターンレディ)と同時にアサートされる。
rd_data[31:0] Read Data Bus Slave→Master
32ビットのデータバスで、スレーブからマスタへのリードデータである。rrdy がアサートされるサイクルで有効なデータが返される。
rd_error Read Error Slave→Master
スレーブからのエラーをマスタに通知する。エラーが発生した場合、スレーブは、リードリターン時に、rrdyと同じサイクルでアサートする。
Transaction type
(a) write transaction
基本プロトコル
(1) サイクル-2:マスタはライト(書込み)バス転送を開始する際には、対象となるスレーブに対応したts(バストランザクション開始)をアサートする。同時に、b_size[3:0], rd_not_wr, mid[3:0], addr[31:2] をアサートする。
(2) サイクル-3:対象となるスレーブに対応したsrdyがアサートされているので、ライトバス転送の開始となり、tsをデアサートする。また、wr_data[31:0], wr_byteen[3:0]をアサートし、1Beat目のライトデータを出力する。
(3) サイクル-4: b_size[3:0], rd_not_wr, mid[3:0], addr[31:2] をデアサートする。また、wr_data[31:0], wr_byteen[3:0]を切り替え、2beat目のライトデータを出力する。
(4) サイクル-5,6:3beat目、4beat目の転送を行う。
(5) サイクル-7:ライトバス転送終了
(6) サイクル-7,8:マスタがtsをアサートしても、srdyがデアサートされていた場合は、マスタはtsをアサートし続ける。
(7) サイクル-10:srdyがアサートされると、tsをデアサートする。
(8) サイクル-11:マスタは次のバス転送を開始するために、tsの1サイクルのデアサート期間の後、再びアサートすることができる。
The correspondence between wr_byteen [3: 0] and wr_data is as follows.
wr_byteen [3] wr_data [31:24]
wr_byteen [2] wr_data [23:16]
wr_byteen [1] wr_data [15: 8]
wr_byteen [0] wr_data [7: 0]
srdy [slave_num-1: 0] Slave Ready Slave → Master
Indicates that the slave buffer is ready to accept bus transfers from the master. If this signal is asserted, the master can initiate a bus transfer at any time and the slave must accept the bus transfer. This signal corresponds to ts and is an independent signal for each slave.
rrdy Read Return Ready Slave → Master
This signal indicates a read return from the slave. The slave asserts this signal when read data is ready and starts a read return. This signal may be asserted at any time. Read data is returned in the same cycle as this signal is asserted. In the case of 2 beat burst, this signal is asserted for 2 cycles and read data for 2 beats is returned. At this time, this signal does not need to be continuously asserted, and a wait cycle can be interposed therebetween.
rmid [3: 0] Return Master ID Slave → Master
Indicates the ID of the master that should receive a read return. It holds mid [3: 0] asserted when a read request is accepted, and returns the same ID. The master decodes this signal when ts is asserted, and determines that the read return is a read return to itself when it is its own master ID. This rmid [3: 0] is asserted simultaneously with rrdy (read return ready).
rd_data [31: 0] Read Data Bus Slave → Master
Read data from a slave to a master on a 32-bit data bus. Valid data is returned in the cycle where rrdy is asserted.
rd_error Read Error Slave → Master
Notify the master of errors from the slave. If an error occurs, the slave asserts in the same cycle as rrdy on a read return.
Transaction type
(a) write transaction
Basic protocol
(1) Cycle-2: When a master starts a write (write) bus transfer, it asserts ts (bus transaction start) corresponding to the target slave. At the same time, b_size [3: 0], rd_not_wr, mid [3: 0], and addr [31: 2] are asserted.
(2) Cycle-3: Since srdy corresponding to the target slave is asserted, write bus transfer starts and ts is deasserted. Also, wr_data [31: 0] and wr_byteen [3: 0] are asserted to output the 1st bit write data.
(3) Cycle-4: b_size [3: 0], rd_not_wr, mid [3: 0], addr [31: 2] are deasserted. Also, wr_data [31: 0] and wr_byteen [3: 0] are switched and the second beat write data is output.
(4) Cycles 5 and 6: Transfer 3rd and 4th beats.
(5) Cycle-7: Write bus transfer end
(6) Cycles 7, 8: Even if the master asserts ts, if srdy is deasserted, the master continues to assert ts.
(7) Cycle-10: When srdy is asserted, ts is deasserted.
(8) Cycle-11: The master can assert again after a deassertion period of one cycle of ts to initiate the next bus transfer.

ライトバス転送が連続した場合で、もっとも各バス転送間が詰まった状態では、間隔を空けずにデータを書込み続けることができる。
(b) Read transaction
リードバス転送は、マスタからスレーブへのリードコマンドのバス転送と、スレーブからマスタへのリードデータのリードリターンに分かれている。それぞれは独立しており、信号線も独立したものとなっている。
基本Protocol
(1) サイクル-2:マスタはリードバス転送を開始する際には、対象となるスレーブに対応したtsをアサートする。同時に、b_size[3:0],rd_not_wr, rd_byteen[3:0], mid[3:0], addr[31:2] をアサートする。
(2) サイクル-3:対象となるスレーブに対応したsrdyがアサートされているので、リードバス転送の開始となり、tsをデアサートする。
(3) サイクル-4: b_size[3:0], rd_not_wr, rd_byteen[3:0], mid[3:0], addr[31:2] をデアサートする。
In the case where the write bus transfer is continuous and the interval between the bus transfers is most congested, it is possible to continue writing data without leaving an interval.
(b) Read transaction
The read bus transfer is divided into a read command bus transfer from the master to the slave and a read return of read data from the slave to the master. Each is independent, and the signal lines are also independent.
Basic Protocol
(1) Cycle-2: When the master starts a read bus transfer, it asserts ts corresponding to the target slave. At the same time, b_size [3: 0], rd_not_wr, rd_byteen [3: 0], mid [3: 0], and addr [31: 2] are asserted.
(2) Cycle-3: Since srdy corresponding to the target slave is asserted, read bus transfer starts and ts is deasserted.
(3) Cycle-4: b_size [3: 0], rd_not_wr, rd_byteen [3: 0], mid [3: 0], addr [31: 2] are deasserted.

リードバス転送のリードコマンドバス転送終了
(4) サイクル-6:スレーブは、リードデータの準備ができたら、rrdyとrmid[3:0]をアサートしてリードリターンを開始する。rmid[3:0]には、リードコマンドでマスタから受けとったマスタIDをのせる。また、rd_data[31:0]をアサートし、1Beat目のリードデータを出力する。
(5) サイクル-7,8,9:2〜4beat目の転送を行う。
(6) サイクル-9:rrdyをデアサートする。rmid[3:0]をデアサートする。
(7) サイクル-10:リードリターン終了
マスタがtsをアサートしても、srdyがデアサートされていた場合(サイクル-8,9)は、マスタはtsをアサートし続ける。そして、srdyがアサートされるとtsをデアサートする(サイクル-10)。
(8) サイクル-11:マスタは、次のバス転送を開始するために、tsの1サイクルのデアサート期間の後、再びアサートすることができる。
(9) サイクル-13:rrdyは連続してアサートする必要はなく任意のウェイトサイクルを入れることができる。
(10) サイクル-16:スレーブは、更にリターンすべきデータがある場合は、次のリードリターンを開始するためにrrdyを連続してアサートすることができる。リードバス転送が連続した場合には、リードデータバス上で間隔を空けずにデータをリードし続けることができる。
Read command bus transfer end of read bus transfer
(4) Cycle-6: When read data is ready, the slave asserts rrdy and rmid [3: 0] and starts read return. In rmid [3: 0], the master ID received from the master by the read command is placed. Also, rd_data [31: 0] is asserted, and the 1st Beat read data is output.
(5) Cycles 7, 8, 9: Transfer 2nd to 4th beats.
(6) Cycle-9: Deassert rrdy. Deassert rmid [3: 0].
(7) Cycle-10: Read return completed If srdy is deasserted even if the master asserts ts (cycles-8 and 9), the master continues to assert ts. When srdy is asserted, ts is deasserted (cycle-10).
(8) Cycle-11: The master can assert again after a deassertion period of one cycle of ts to initiate the next bus transfer.
(9) Cycle-13: rrdy does not need to be continuously asserted, and any wait cycle can be inserted.
(10) Cycle-16: If there is more data to return, the slave can continuously assert rrdy to initiate the next read return. When the read bus transfer is continuous, it is possible to continue reading data without leaving an interval on the read data bus.

次に、実際の動作を例に挙げて本発明の一実施の形態の説明を行う。   Next, an embodiment of the present invention will be described by taking an actual operation as an example.

図13は、図9においてプロセッサ901が同時にメモリコントローラ902及び903からリードを行う場合のタイミングチャートを示したものである。物理アドレスとメモリデバイスのバンクアドレス、ロウアドレス、カラムアドレスとの対応は図5と同様である。以下、プロセッサ901をマスタ、メモリコントローラ902をスレーブ1、メモリコントローラ903をスレーブ2と呼ぶ。   FIG. 13 shows a timing chart when the processor 901 reads data from the memory controllers 902 and 903 in FIG. 9 at the same time. The correspondence between the physical address and the bank address, row address, and column address of the memory device is the same as in FIG. Hereinafter, the processor 901 is called a master, the memory controller 902 is called a slave 1, and the memory controller 903 is called a slave 2.

図13において、初めにマスタがts信号をアサートして(1300)データ転送を開始する(サイクル1)。これに対してスレーブ1はsrdyをアサートし(1301)、このコマンドを受け付ける(サイクル2)。この場合のアドレスは「0x00000400」番地である。紙面の都合で図示されないが、このコマンドはリード(rd_not_wr = 1)であり、かつ8ビート(b_size = 0111)である。引き続きマスタは再度ts信号をアサートし(1302)、2番目の転送を開始する(サイクル4)。これに対してスレーブ2は、srdyをアサートし(1303)、このコマンドを受け付ける(サイクル5)。このときのアドレスは「0x00037bfc」番地である。このコマンドも8ビートのリードコマンドである。   In FIG. 13, the master first asserts the ts signal (1300) and starts data transfer (cycle 1). On the other hand, slave 1 asserts srdy (1301) and accepts this command (cycle 2). In this case, the address is “0x00000400”. Although not shown due to space limitations, this command is read (rd_not_wr = 1) and 8 beats (b_size = 0111). Subsequently, the master asserts the ts signal again (1302), and starts the second transfer (cycle 4). On the other hand, the slave 2 asserts srdy (1303) and accepts this command (cycle 5). The address at this time is “0x00037bfc”. This command is also an 8-beat read command.

メモリコントローラ902は、プロセッサ901からのこれらリードコマンドを受け付けると、一旦、コマンドキュー(図10の602')に格納する。ここでバンク衝突の判定を行う。この例ではコマンドキュー602'にはコマンドが一つしかなく、かつバンク衝突も無い。よって、このリードコマンドは直ちにメモリ制御回路605'に送られ、メモリ904に対しリードアクセスを行う。もしこのコマンドがバンク衝突を起こしている場合は、当該バンクが再度アクセス可能になるまで、そのリードコマンドはコマンドキュー602'に滞留される。この間、コマンドキュー602'に他のコマンドが入力され、そのコマンドがバンク衝突を起こさなければ、そのコマンドが先に発行される。   Upon receiving these read commands from the processor 901, the memory controller 902 temporarily stores them in the command queue (602 ′ in FIG. 10). Here, the bank collision is judged. In this example, the command queue 602 ′ has only one command and there is no bank collision. Therefore, this read command is immediately sent to the memory control circuit 605 ′ to perform read access to the memory 904. If this command causes a bank collision, the read command stays in the command queue 602 ′ until the bank becomes accessible again. During this time, another command is input to the command queue 602 ′, and if the command does not cause a bank collision, the command is issued first.

メモリ904は、リードアクセスの結果、その読み出したデータを順次メモリコントローラ902に返す。メモリコントローラ902はこれを受け取ると直ちにマスタ(プロセッサ901)に対して転送する(サイクル9〜サイクル16)。   As a result of the read access, the memory 904 sequentially returns the read data to the memory controller 902. Upon receiving this, the memory controller 902 transfers it to the master (processor 901) (cycle 9 to cycle 16).

本実施の形態では、システムバスは32ビットで構成されているので、マスタはシステムバス上は32ビット単位でのアクセスを行うことになる。ここでメモリ904のバス幅は16ビットであるから、システムバス上の8ビート転送に対応してメモリコントローラ902及び903は、メモリ904又は905に対して16ビートのリードアクセスを発行する。そして、その読み出した結果を32ビット毎にマスタに返すように動作する。   In this embodiment, since the system bus is composed of 32 bits, the master accesses the system bus in units of 32 bits. Here, since the bus width of the memory 904 is 16 bits, the memory controllers 902 and 903 issue 16-beat read access to the memory 904 or 905 in response to 8-beat transfer on the system bus. The read result is returned to the master every 32 bits.

ここでメモリ904がDDRーSDRAMにより構成されていることに注意する必要がある。即ち、メモリ904に対する2ビートのアクセスに対して、システムバスクロックの1クロックでデータが転送される。従って、システムバス920で8ビートのデータが転送されるのに要する時間と、メモリバスで16ビートのデータが転送されるのに要する時間は等しい。   Here, it should be noted that the memory 904 is composed of DDR-SDRAM. That is, for a 2-beat access to the memory 904, data is transferred with one system bus clock. Therefore, the time required to transfer 8-beat data on the system bus 920 is equal to the time required to transfer 16-beat data on the memory bus.

もし、メモリコントローラ902がメモリ904に対して行うように、メモリコントローラ903もリードコマンドを受け取ると直ちにメモリ905に対してリードアクセスを行うと、互いのリード応答は衝突することになる。これは図13において明らかである。図13において、スレーブ1がマスタからコマンドを受け取ってからリード応答の1ビート目をマスタに転送するまでに6クロックかかっている。これにより、同一の条件であれば、スレーブ2がマスタからコマンドを受け取ったサイクル5から数えて6クロック後のサイクル12(1304)からスレーブ2がリード応答を返すことになる。しかし、これではリード応答が衝突することになる。   If the memory controller 903 also performs a read access to the memory 905 as soon as the memory controller 903 receives a read command, like the memory controller 902 performs for the memory 904, the read responses collide with each other. This is evident in FIG. In FIG. 13, it takes 6 clocks from when the slave 1 receives a command from the master to when the first beat of the read response is transferred to the master. Thus, under the same conditions, the slave 2 returns a read response from the cycle 12 (1304) after 6 clocks from the cycle 5 in which the slave 2 receives the command from the master. However, this leads to collision of read responses.

これを回避するため本実施の形態では、前述のようにメモリコントローラ902と903の間でコマンド発行タイミング情報をやりとりするように構成している。このコマンド発行タイミング情報には、一例として、マスタ毎のリードコマンド発行禁止期間情報が含まれている。   In order to avoid this, in the present embodiment, the command issue timing information is exchanged between the memory controllers 902 and 903 as described above. As an example, the command issue timing information includes read command issue prohibition period information for each master.

本実施の形態において、このリードコマンド発行禁止期間情報は、同一構成のメモリコントローラと同一タイプのメモリデバイスを用い、更に、クローズページポリシーを採用しているため、全てのタイミングが相似になることから容易に生成できる。即ち、データのバースト長の期間、コマンドの発行を禁止すれば良いことになる。   In the present embodiment, the read command issuance prohibition period information uses the same type of memory controller and the same type of memory device, and further adopts a close page policy, so all timings are similar. Can be easily generated. That is, it is only necessary to prohibit the issuance of commands during the data burst length period.

図14は、これらの関係を説明するシーケンス図である。   FIG. 14 is a sequence diagram illustrating these relationships.

スレーブ1は、マスタからリードコマンドを受け取ると、メモリ1に対しリードアクセスを開始すると同時に、スレーブ2に対しリードコマンド発行禁止期間情報を出力する。スレーブ2は、このコマンド発行禁止期間情報を受け取ると、内部のマスタ毎に保持するダウンカウンタに保持しサイクル毎にダウンカウントを行う。スレーブ2は、マスタからリードコマンドを受け取ると、このリードコマンド発行禁止期間の間、即ち、カウンタが減算されて「0」になるまでの間、メモリ2に対するリードアクセスの開始を遅らせる。このようにして2つのスレーブからのリード応答が衝突することを防ぐことができる。その結果、従来メモリコントローラに備えられていたリードリターンバッファを不要にすることが可能となる。   When the slave 1 receives a read command from the master, the slave 1 starts read access to the memory 1 and outputs read command issue prohibition period information to the slave 2 at the same time. When the slave 2 receives this command issuance prohibition period information, the slave 2 holds it in a down counter held for each internal master, and counts down every cycle. When the slave 2 receives the read command from the master, the slave 2 delays the start of the read access to the memory 2 during this read command issuance prohibition period, that is, until the counter is decremented to “0”. In this way, it is possible to prevent the read responses from the two slaves from colliding. As a result, it is possible to eliminate the need for the read / return buffer provided in the conventional memory controller.

尚、ここでコマンド発行禁止期間を設けることにより直ちにメモリ利用効率が低下するわけではないことに注意すべきである。即ち、このコマンド発行禁止期間においても他のマスタからのコマンドや同一マスタからのライトコマンドが発行可能である。結局、順不同で発行可能なコマンドキューのスケジューリングの一条件としてコマンド発行禁止期間を用いれば良いことになる。   It should be noted that the memory use efficiency does not immediately decrease by providing the command issuance prohibition period here. That is, commands from other masters and write commands from the same master can be issued even during this command issuance prohibited period. After all, the command issue prohibition period may be used as a condition for scheduling command queues that can be issued out of order.

以上において、本発明が特定の実施の形態に関して図示されかつ説明されたが、さらに他の修正及び改善が可能であることは言うまでもない。   While the invention has been illustrated and described with respect to specific embodiments, it will be appreciated that other modifications and improvements are possible.

例えば、本実施の形態においては、システムLSI内に2つのメモリコントローラを備える場合で説明したが、メモリの系統数は、この数に限定されるものではなく、またスレーブとしてメモリコントローラに限定するものでもない。また例えば、本実施の形態においては、システムバスとして特定の信号、プロトコルを備えるバスを使用する場合について説明したが、本発明はもちろんこれに限定するものではなく、任意のバスをシステムバスとして利用し構成しても良い。   For example, in the present embodiment, the case where two memory controllers are provided in the system LSI has been described. However, the number of memory systems is not limited to this number, and is limited to memory controllers as slaves. not. For example, in the present embodiment, the case where a bus having a specific signal and protocol is used as the system bus has been described. However, the present invention is not limited to this, and any bus is used as the system bus. It may be configured.

また例えば、本実施の形態においては、説明の簡単のため、マスタ間の優先度の設定方法については詳細には説明しなかったが、例えばプライオリティ信号を備えるシステムバスを利用して、転送単位で優先度を与えるようにしても良い。   Also, for example, in this embodiment, for the sake of simplicity, the priority setting method between masters has not been described in detail, but for example, in units of transfer using a system bus including a priority signal. You may make it give a priority.

また例えば、本実施の形態においては、メモリデバイスとしてDDR−SDRAMを用いる場合を例にとって説明したが、もちろんこれに限定されるものではないことは言うまでもない。   For example, in this embodiment, the case where a DDR-SDRAM is used as a memory device has been described as an example, but it is needless to say that the present invention is not limited to this.

また例えば、本実施の形態においては、メモリデバイスにアクセスする際のビート長が8の場合で説明したが、任意のビート長について適用できることは言うまでもない。   For example, in the present embodiment, the case where the beat length when accessing the memory device is 8 has been described, but it goes without saying that the present invention can be applied to any beat length.

以上説明したように本実施の形態1によれば、メモリコントローラがリードコマンドを発行するタイミングを必要に応じて遅延させる。これにより、バスマスタに対するメモリコントローラからのリード応答と、他のスレーブからのリード応答とが衝突することを防ぐことができる。これにより、従来のメモリコントローラに備えられていたリードリターンバッファを不要にでき、メモリコントローラを含むシステムLSIの回路規模を削減し安価に実現することが可能となる。   As described above, according to the first embodiment, the timing at which the memory controller issues the read command is delayed as necessary. Thereby, it is possible to prevent the read response from the memory controller to the bus master from colliding with the read response from another slave. As a result, the read / return buffer provided in the conventional memory controller can be eliminated, and the circuit scale of the system LSI including the memory controller can be reduced and realized at low cost.

[実施の形態2]
次に本発明の実施の形態2について説明する。尚、本実施の形態2に係るシステムのハードウェア構成は前述の実施の形態1の場合と同様であるため、その説明を省略する。
[Embodiment 2]
Next, a second embodiment of the present invention will be described. Since the hardware configuration of the system according to the second embodiment is the same as that of the first embodiment, the description thereof is omitted.

図15は、本実施の形態2に係るメモリコントローラ902及び903をより詳細に説明する図である。ここでは前述の実施の形態1に係る図6との比較のため、同一の構成要素には数字に’を付加して示している。   FIG. 15 is a diagram for explaining the memory controllers 902 and 903 according to the second embodiment in more detail. Here, for comparison with FIG. 6 according to the above-described first embodiment, the same components are indicated by adding a '.

この図15が図6と大きく異なる点は、図15では、リードリターンバッファ604が除去されている点にある。更に図15では、リザーブキュー607が追加されている。その効果については後述する。   15 differs greatly from FIG. 6 in that the read / return buffer 604 is removed in FIG. Further, in FIG. 15, a reserve queue 607 is added. The effect will be described later.

図16及び図17は、本実施の形態2に係るシステムバス920のバスプロトコルを説明する図である。ここで図16はリード転送を示し、図17はライト転送を示している。前述のようにシステムバス920はマルチレイヤ構成であり、バスマスタからみた場合に任意のバススレーブとの間で1対1に接続されているようにみなせる。このシステムバス920を構成する信号は、前述の実施の形態1の場合と同様であるため、その説明を省略する。但し、この実施の形態2では、
rd_accept Read Accept Master → Slave
が追加される。これはマスタがスレーブからのリードリターンを受け取り可能であることを示す。
16 and 17 are diagrams for explaining the bus protocol of the system bus 920 according to the second embodiment. Here, FIG. 16 shows read transfer, and FIG. 17 shows write transfer. As described above, the system bus 920 has a multi-layer structure, and can be regarded as being connected one-to-one with an arbitrary bus slave when viewed from the bus master. Since signals constituting the system bus 920 are the same as those in the first embodiment, the description thereof is omitted. However, in this second embodiment,
rd_accept Read Accept Master → Slave
Is added. This indicates that the master can receive a read return from the slave.

この実施の形態2では、Read transactionが前述の実施の形態1と少し異なっているため、そのプロトコルを説明する。   In the second embodiment, the read transaction is slightly different from that of the first embodiment, and the protocol will be described.

Read transaction
リードバス転送は、マスタからスレーブへのリードコマンドのバス転送と、スレーブからマスタへのリードデータのリードリターンに分かれている。それぞれは独立しており、信号線も独立したものとなっている。
基本Protocol
(1) サイクル-2:マスタはリードバス転送を開始する際には、対象となるスレーブに対応したtsをアサートする。同時に、b_size[3:0],rd_not_wr, rd_byteen[3:0], mid[3:0], addr[31:2] をアサートする。
(2) サイクル-3:対象となるスレーブに対応したsrdyがアサートされているので、リードバス転送の開始となり、tsをデアサートする。
(3) サイクル-4: b_size[3:0], rd_not_wr, rd_byteen[3:0], mid[3:0], addr[31:2] をデアサートする。
Read transaction
The read bus transfer is divided into a read command bus transfer from the master to the slave and a read return of read data from the slave to the master. Each is independent, and the signal lines are also independent.
Basic Protocol
(1) Cycle-2: When the master starts a read bus transfer, it asserts ts corresponding to the target slave. At the same time, b_size [3: 0], rd_not_wr, rd_byteen [3: 0], mid [3: 0], and addr [31: 2] are asserted.
(2) Cycle-3: Since srdy corresponding to the target slave is asserted, read bus transfer starts and ts is deasserted.
(3) Cycle-4: b_size [3: 0], rd_not_wr, rd_byteen [3: 0], mid [3: 0], addr [31: 2] are deasserted.

リードバス転送のリードコマンドバス転送終了
(4) サイクル-5:スレーブはリードデータの準備ができたら、rrdy(リードリターンレディ)をアサートする。
(5) サイクル-6:rmid[3:0]をアサートして、リードリターンを開始する。rmid[3:0]にはリードコマンドでマスタから受けとったマスタIDをのせる。また、rd_data[31:0]をアサートし、1Beat目のリードデータを出力する。rd_acceptがアサートされているためこの転送はマスタに受領される。
(6) サイクル-7,8,9:2beat目、3beat目、4beat目の転送を行う。同様にrd_acceptがアサートされているため、これらの転送はマスタに受領される。
(7) サイクル-9:rrdyをデアサートする。
(8) サイクル-10:rmid[3:0]をデアサートする。転送終了。
Read command bus transfer end of read bus transfer
(4) Cycle-5: The slave asserts rrdy (read return ready) when read data is ready.
(5) Cycle-6: Assert rmid [3: 0] and start read return. In rmid [3: 0], the master ID received from the master by the read command is placed. Also, rd_data [31: 0] is asserted, and the 1st Beat read data is output. Since rd_accept is asserted, this transfer is accepted by the master.
(6) Cycles 7, 8, and 9: The second beat, the third beat, and the fourth beat are transferred. Similarly, since rd_accept is asserted, these transfers are received by the master.
(7) Cycle-9: Deassert rrdy.
(8) Deassert cycle-10: rmid [3: 0]. End of transfer.

マスタがtsをアサートしても、srdyがデアサートされていた場合(サイクル-7,8)は、マスタはtsをアサートし続ける。そして、srdyがアサートされるとtsをデアサートする(サイクル-10)
(9) マスタは、次のバス転送を開始するためにtsの1サイクルのデアサート期間の後、再びアサートすることができる。rrdyは連続してアサートする必要はなく、任意のウェイトサイクルを入れることができる(サイクル-13)
(10) サイクル-15:スレーブは、さらにリターンすべきデータがある場合は、次のリードリターンを開始するために、rrdyを連続してアサートすることができる。リードバス転送が連続した場合には、リードデータバス上で間隔を空けずにデータを読み込み続けることができる。
If the master asserts ts but srdy is deasserted (cycles-7, 8), the master continues to assert ts. When srdy is asserted, ts is deasserted (cycle -10)
(9) The master can assert again after a deassertion period of one cycle of ts to initiate the next bus transfer. rrdy does not need to be continuously asserted and can have any wait cycle (cycle-13)
(10) Cycle-15: If there is more data to return, the slave can continuously assert rrdy to initiate the next read return. When the read bus transfer is continuous, data can be continuously read on the read data bus without any interval.

次にrd_accept信号がどのように生成されるかを説明する。   Next, how the rd_accept signal is generated will be described.

図18は、リードリターン調停回路を示すブロック図である。   FIG. 18 is a block diagram showing a read / return arbitration circuit.

リードリターン調停回路は、システムバス920内にマスタの数分備えられている。これは各スレーブからマスタに対しリード応答が転送される経路上に配置され、複数のスレーブから返されるリード応答のうち一つを選択する。こうして選択したリード応答を発信したスレーブに対してはrd_acceptをアサートし、それ以外のスレーブに対してはrd_acceptをデアサートする。複数のリード応答が同時にリードリターン調停回路に到達した場合は、予め定められた優先度に従ってそれらの内の一つのみを選択する。   As many read return arbitration circuits as the number of masters are provided in the system bus 920. This is arranged on a path through which a read response is transferred from each slave to the master, and selects one of the read responses returned from a plurality of slaves. Rd_accept is asserted for the slave that has transmitted the read response thus selected, and rd_accept is deasserted for the other slaves. When a plurality of read responses reach the read return arbitration circuit at the same time, only one of them is selected according to a predetermined priority.

次に、実際の動作を例に挙げて本発明の実施の形態2を説明する。   Next, the second embodiment of the present invention will be described by taking an actual operation as an example.

図19は、図9においてプロセッサ901が同時にメモリコントローラ902及び903からリードを行う場合のタイミングチャートである。物理アドレスとメモリデバイスのバンクアドレス、ロウアドレス、カラムアドレスとの対応は前述の図5と同様である。以下、プロセッサ901をマスタ、メモリコントローラ902をスレーブ1、メモリコントローラ903をスレーブ2と呼ぶ。   FIG. 19 is a timing chart when the processor 901 reads from the memory controllers 902 and 903 at the same time in FIG. The correspondence between the physical address and the bank address, row address, and column address of the memory device is the same as in FIG. Hereinafter, the processor 901 is called a master, the memory controller 902 is called a slave 1, and the memory controller 903 is called a slave 2.

図19において、初めにマスタがts信号をアサートし転送を開始する(1901)。これによりスレーブ1はsrdyをアサートし(1902)、このコマンドを受け付ける。このときのアドレスは「0x00000400」番地である。紙面の都合で図示されないが、このコマンドはリード(rd_not_wr = 1)であり、かつ8ビート(b_size = 0111)である。引き続きマスタは、再度ts信号をアサートして2番目の転送を開始する(1903)。これによりスレーブ2はsrdyをアサートし、このコマンドを受け付ける(1904)。このときのアドレスは「0x00037bfc」番地である。このコマンドも8ビートのリードコマンドである。   In FIG. 19, first, the master asserts the ts signal and starts transfer (1901). As a result, slave 1 asserts srdy (1902) and accepts this command. The address at this time is “0x00000400”. Although not shown due to space limitations, this command is read (rd_not_wr = 1) and 8 beats (b_size = 0111). Subsequently, the master asserts the ts signal again and starts the second transfer (1903). As a result, the slave 2 asserts srdy and accepts this command (1904). The address at this time is “0x00037bfc”. This command is also an 8-beat read command.

メモリコントローラ902は、このリードコマンドを受け付けると一旦コマンドキュー(図15の602')に格納する。ここでバンク衝突の判定を行う。この例ではコマンドキュー602'にはコマンドが一つしかなく、かつバンク衝突も無いため直ちにメモリ制御回路605'に送られメモリ904に対しリードアクセスを行う。このとき、当該リードコマンドをリザーブキュー607に格納しておく。もしこのコマンドがバンク衝突を起こしている場合は、このバンクが再度アクセス可能になるまで、そのコマンドはコマンドキュー602'内で滞留される。この間コマンドキュー602'内に他のコマンドが入力され、かつそのコマンドがバンク衝突を起こさなければ、そのコマンドが先に発行されることになる。メモリ904は、リードアクセスの結果読み出されたデータを順次メモリコントローラ902に返す。メモリコントローラ902はこれを受け取ると直ちにマスタに対し転送する(サイクル9〜サイクル16)。このときrd_acceptがアサートされているため、これらリード応答の転送はマスタによって受領される。これによりメモリコントローラ902は、リザーブキュー607から、そのリードコマンドを消去する。   When accepting this read command, the memory controller 902 temporarily stores it in the command queue (602 ′ in FIG. 15). Here, the bank collision is judged. In this example, since there is only one command in the command queue 602 ′ and there is no bank collision, it is immediately sent to the memory control circuit 605 ′ to perform read access to the memory 904. At this time, the read command is stored in the reserve queue 607. If this command has caused a bank collision, the command will remain in the command queue 602 ′ until the bank becomes accessible again. During this time, if another command is input into the command queue 602 ′ and the command does not cause a bank collision, the command is issued first. The memory 904 sequentially returns the data read as a result of the read access to the memory controller 902. Upon receiving this, the memory controller 902 transfers it to the master (cycle 9 to cycle 16). Since rd_accept is asserted at this time, transfer of these read responses is received by the master. As a result, the memory controller 902 deletes the read command from the reserve queue 607.

本実施の形態2では、システムバスは32ビットで構成されているので、マスタはシステムバス上は32ビット単位でアクセスすることになる。これに対してメモリ904のバス幅は16ビットであるから、システムバス上の8ビート転送に対応し、メモリコントローラ902及び903はメモリ904又は905に対して16ビートリードアクセスを発行する。こうしてリードした結果を32ビット毎にマスタに返すよう動作する。ここでメモリ904がDDRーSDRAMにより構成されていることに注意する必要がある。即ち、メモリ904に対する2ビートのアクセスは、システムバスクロックの1クロックでデータ転送される。従って、システムバス上で8ビートのデータが転送されるのに要する時間とメモリバス上で16ビートのデータが転送されるのに要する時間が等しいなる。   In the second embodiment, since the system bus is composed of 32 bits, the master accesses the system bus in units of 32 bits. On the other hand, since the bus width of the memory 904 is 16 bits, it corresponds to 8-beat transfer on the system bus, and the memory controllers 902 and 903 issue a 16-beat read access to the memory 904 or 905. The read result is returned to the master every 32 bits. Here, it should be noted that the memory 904 is composed of DDR-SDRAM. That is, in the 2-beat access to the memory 904, data is transferred by one clock of the system bus clock. Accordingly, the time required for transferring 8-beat data on the system bus is equal to the time required for transferring 16-beat data on the memory bus.

メモリコントローラ902がメモリ904に対して行うように、メモリコントローラ903もリードコマンドを受け取ると直ちにメモリ905に対してリードアクセスを行う。このとき互いのリード応答は衝突することになることは図19おいて明らかである。   As the memory controller 902 performs access to the memory 904, the memory controller 903 also performs read access to the memory 905 immediately upon receiving the read command. At this time, it is clear in FIG. 19 that the read responses collide with each other.

図19において、スレーブ1がマスタからコマンドを受け取ってからリード応答の1ビート目をマスタに転送するまでに6クロックを要している。従って、同一の条件であれば、スレーブ2がマスタからコマンドを受け取ったサイクル5から数えて6クロック後のサイクル12からスレーブ2はリード応答を返すことになる。   In FIG. 19, 6 clocks are required from when the slave 1 receives a command from the master to when the first beat of the read response is transferred to the master. Therefore, under the same condition, the slave 2 returns a read response from the cycle 12 after 6 clocks from the cycle 5 in which the slave 2 receives the command from the master.

しかしながら図19において、サイクル12ではrd_acceptが「0」になっている。このことからメモリコントローラ903はリード応答の衝突を認識し、メモリから読み出したデータはマスタに転送することなく破棄する。DDR−SDRAMメモリは一度読み出しを開始すると途中で中断することができない性質を持っているので、これはサイクル12〜19の間続くことになる。   However, in FIG. 19, rd_accept is “0” in cycle 12. Therefore, the memory controller 903 recognizes the collision of the read response, and discards the data read from the memory without transferring it to the master. Since the DDR-SDRAM memory has a property that once reading is started, it cannot be interrupted halfway, so this continues for cycles 12-19.

このときメモリコントローラ903は、この時のリードコマンドをリザーブキュー607に保持している。そこでメモリコントローラ903は、リード応答の衝突を認識した時点で再スケジューリングを行う。これにより、サイクル20からリード応答をマスタに転送できるように、リザーブキュー607から当該リードコマンドを取り出してメモリ905に対して、サイクル20で再度リードアクセスを行う。この場合、サイクル20においてrd_acceptが「1」であるため、このリード応答はマスタに転送されることになる。   At this time, the memory controller 903 holds the read command at this time in the reserve queue 607. Therefore, the memory controller 903 performs rescheduling when it recognizes a read response collision. Thus, the read command is extracted from the reserve queue 607 so that the read response can be transferred from the cycle 20 to the master, and the memory 905 is read-accessed again in the cycle 20. In this case, since rd_accept is “1” in cycle 20, this read response is transferred to the master.

以上説明したように本実施の形態2では、メモリコントローラを含む複数のスレーブからのリード応答が衝突する場合であっても、メモリコントローラは、そのリード応答を一旦破棄し、メモリに対して同じリードアクセスを繰り返し行う。これにより、リード応答が衝突するタイミングをずらすことができる。その結果、従来のメモリコントローラに備えられていたリードリターンバッファを不要にすることが可能となる。   As described above, in the second embodiment, even when read responses from a plurality of slaves including the memory controller collide, the memory controller once discards the read responses and performs the same read to the memory. Repeat access. Thereby, the timing at which the read response collides can be shifted. As a result, the read / return buffer provided in the conventional memory controller can be eliminated.

以上において、本発明が特定の実施の形態に関して図示されかつ説明されたが、さらに他の修正および改善が可能であることは言うまでもない。   While the invention has been illustrated and described with respect to particular embodiments, it will be appreciated that other modifications and improvements are possible.

例えば、本実施の形態2では、システムLSI内に2つのメモリコントローラを持つ場合について説明したが、メモリの系統数を限定するものではなく、またスレーブとしてメモリコントローラに限定するものでもない。また例えば、本実施の形態2では、システムバスとして特定の信号、プロトコルを備えるバスを使用する場合について説明したが、もちろんこれに限定するものではなく、任意のバスをシステムバスとして利用し構成しても良い。   For example, in the second embodiment, the case where two memory controllers are provided in the system LSI has been described. However, the number of memory systems is not limited, and the memory controller is not limited to a memory controller. Further, for example, in the second embodiment, the case where a bus having a specific signal and protocol is used as the system bus has been described. However, the present invention is not limited to this, and any bus may be used as the system bus. May be.

また例えば、本実施の形態2では、説明の簡単のため、マスタ間の優先度の設定方法については詳細には説明しなかったが、例えばプライオリティ信号を備えるシステムバスを利用して、転送単位で優先度を与えるようにしても良い。   Further, for example, in the second embodiment, the method for setting the priority between masters has not been described in detail for the sake of simplicity. However, for example, by using a system bus including a priority signal, a transfer unit is used. You may make it give a priority.

また例えば、本実施の形態2では、メモリデバイスとしてDDR−SDRAMを用いる場合を例にして説明したが、もちろんこれに限定されるものではないことは言うまでもない。   For example, in the second embodiment, the case where a DDR-SDRAM is used as a memory device has been described as an example, but it is needless to say that the present invention is not limited to this.

また例えば、本実施の形態2では、メモリデバイスにアクセスする際のビート長が8である場合について説明したが、任意のビート長について適用できる。   Further, for example, in the second embodiment, the case where the beat length when accessing the memory device is 8 has been described, but any beat length can be applied.

また本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタ等)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置等)に適用しても良い。   Further, the present invention can be applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), or an apparatus composed of a single device (for example, a copier, a facsimile machine, etc.). It may be applied.

また本発明の目的は、前述した実施形態の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体をシステム或は装置に装着し、その記憶媒体からインストールされたプログラムコードを読み出して実行することによっても達成される。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現される。またそのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。   Another object of the present invention is to mount a storage medium recording software program codes for realizing the functions of the above-described embodiments in a system or apparatus, and read and execute the installed program codes from the storage medium. Is also achieved. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, the functions of the above-described embodiment are realized by executing the program code read by the computer. In addition, the operating system (OS) running on the computer performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. It is.

更に、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれ、本体のCPUが処理の一部又は全部を実行して本実施形態の機能が実現されても良い。   Furthermore, the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, and the CPU of the main body executes part or all of the processing. Thus, the functions of this embodiment may be realized.

またプログラムを供給するための記憶媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード等がある。更に、ROM、DVD(DVD−ROM,DVD−R)も含まれる。   The storage medium for supplying the program includes, for example, a floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, and nonvolatile memory. There are cards. Furthermore, ROM and DVD (DVD-ROM, DVD-R) are also included.

またクライアントコンピュータのブラウザを用いてインターネットのホームページに接続し、該ホームページから本発明のコンピュータプログラムそのもの、或は圧縮され自動インストール機能を含むファイルを記憶媒体にダウンロードしても良い。また本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも本発明のクレームに含まれるものである。   Alternatively, the browser of the client computer may be used to connect to a homepage on the Internet, and the computer program itself of the present invention or a compressed file including an automatic installation function may be downloaded from the homepage to a storage medium. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the claims of the present invention.

以上、本発明を実施の形態に基づき具体的に説明したが、本発明は前述した実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更することが可能である。   Although the present invention has been specifically described above based on the embodiments, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention.

従来のシステムLSIを用いて、OA機器の組み込みシステムを実現する構成の一例を示す図である。It is a figure which shows an example of a structure which implement | achieves the embedded system of OA apparatus using the conventional system LSI. 従来例のシステムLSIをより詳細に説明するブロック図である。It is a block diagram explaining the system LSI of a prior art example in detail. 従来例におけるプロセッサが扱うメモリの物理アドレス空間を説明する図である。It is a figure explaining the physical address space of the memory which the processor in a prior art example handles. 従来例における物理アドレスとバンクアドレス、ロウアドレス、カラムアドレスの関係の一例を説明する図である。It is a figure explaining an example of the relationship between the physical address in a prior art example, a bank address, a row address, and a column address. 従来例における物理アドレスとバンクアドレス、ロウアドレス、カラムアドレスの関係の別の一例を説明する図である。It is a figure explaining another example of the relationship between the physical address in a prior art example, a bank address, a row address, and a column address. 従来のメモリコントローラの構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the conventional memory controller. メモリデバイスを2系統備えるシステムLSIの構成例を示す図である。It is a figure which shows the structural example of system LSI provided with two memory devices. 本発明の実施の形態1に係るシステム構成を説明するブロック図である。It is a block diagram explaining the system configuration | structure which concerns on Embodiment 1 of this invention. 本実施の形態1に係るシステムLSIのより具体的な構成を説明する図である。It is a figure explaining the more specific structure of the system LSI which concerns on this Embodiment 1. FIG. 本実施の形態に係るメモリコントローラの構成をより詳細に説明する図である。It is a figure explaining the structure of the memory controller which concerns on this Embodiment in detail. , 本実施の形態1に係るシステムバスのバスプロトコルを説明する図である。It is a figure explaining the bus protocol of the system bus concerning this Embodiment 1. FIG. 図9のプロセッサが同時にメモリコントローラからリードを行う場合のタイミングチャートである。10 is a timing chart when the processor of FIG. 9 simultaneously reads from the memory controller. 本実施の形態1に係るマスタとスレーブの動作を説明するシーケンス図である。It is a sequence diagram explaining operation | movement of the master and slave which concern on this Embodiment 1. FIG. 本実施の形態2に係るメモリコントローラの構成をより詳細に説明する図である。It is a figure explaining the structure of the memory controller which concerns on this Embodiment 2 in detail. , 本実施の形態2に係るシステムバスのバスプロトコルを説明する図である。It is a figure explaining the bus protocol of the system bus concerning this Embodiment 2. FIG. 本実施の形態2に係るリードリターン調停回路の構成を示すブロック図である。It is a block diagram which shows the structure of the read return arbitration circuit which concerns on this Embodiment 2. 本実施の形態2に係るプロセッサが同時に2つのメモリコントローラからのリードを制御する場合を示すタイミングチャートである。10 is a timing chart illustrating a case where the processor according to the second embodiment controls reading from two memory controllers simultaneously.

Claims (15)

バスマスタからのメモリへのアクセス要求を受付けて当該メモリにアクセスするメモリコントローラであって、
前記バスマスタからの前記メモリへのアクセス要求を受け付けると前記メモリに対してアクセスするアクセス手段と、
前記メモリへのアクセス要求がリードの場合、前記メモリから読取ったデータを前記バスマスタに転送する転送手段と、
前記転送手段による前記データの転送時、前記バスマスタに対する他のバススレーブからの読出し応答と衝突するか否かを判断する判断手段と、
前記判断手段により衝突すると判断した場合には、前記メモリに対する前記アクセス手段によるアクセスを遅延させる遅延手段と、
を有することを特徴とするメモリコントローラ。
A memory controller that accepts an access request to a memory from a bus master and accesses the memory,
An access means for accessing the memory upon receiving an access request to the memory from the bus master;
When the access request to the memory is a read, transfer means for transferring data read from the memory to the bus master;
Determining means for determining whether or not there is a collision with a read response from another bus slave to the bus master when the data is transferred by the transfer means;
A delay means for delaying access by the access means to the memory, when the determination means determines that there is a collision;
A memory controller comprising:
前記バスマスタから受け付けたアクセス要求を順に格納するコマンドキューと、
前記コマンドキューから取り出したコマンドに応じて前記アクセス手段によるアクセスを実行させる手段とを有し、
前記遅延手段は、前記コマンドキューからの前記コマンドの取り出しを禁止することにより前記メモリへのアクセスを遅延させることを特徴とする請求項1に記載のメモリコントローラ。
A command queue for sequentially storing access requests received from the bus master;
Means for executing access by the access means in response to a command taken out from the command queue,
The memory controller according to claim 1, wherein the delay unit delays access to the memory by prohibiting the extraction of the command from the command queue.
前記転送手段は、読取ったデータを前記バスマスタに転送する際に当該バスマスタの識別子を付して転送することを特徴とする請求項1又は2に記載のメモリコントローラ。   3. The memory controller according to claim 1, wherein the transfer unit transfers the read data with the identifier of the bus master when transferring the read data to the bus master. 前記判断手段は、他のバススレーブからのリードアクセスタイミング情報に基づいて前記衝突するか否かを判断することを特徴とする請求項1乃至3のいずれか1項に記載のメモリコントローラ。   4. The memory controller according to claim 1, wherein the determination unit determines whether or not the collision occurs based on read access timing information from another bus slave. バスマスタからのメモリへのアクセス要求を受付けて当該メモリにアクセスするメモリコントローラであって、
前記バスマスタからの前記メモリへのアクセス要求を受け付けると前記メモリに対してアクセスするアクセス手段と、
前記メモリへのアクセス要求を保存する保存手段と、
前記メモリへのアクセス要求がリードの場合に、前記メモリから読取ったデータを前記バスマスタに転送する転送手段と、
前記転送手段による前記データの転送時、前記バスマスタに対する他のバススレーブからの読出し応答と衝突した場合には、前記保存手段に保存されているアクセス要求に基づいて前記メモリに対する前記アクセス手段によるアクセスを実行させる再実行手段と、
を有することを特徴とするメモリコントローラ。
A memory controller that accepts an access request to a memory from a bus master and accesses the memory,
An access means for accessing the memory upon receiving an access request to the memory from the bus master;
Storage means for storing an access request to the memory;
Transfer means for transferring data read from the memory to the bus master when the access request to the memory is read;
When the data is transferred by the transfer unit, if there is a collision with a read response from another bus slave to the bus master, the access unit accesses the memory based on the access request stored in the storage unit. Re-execution means to be executed;
A memory controller comprising:
前記転送手段は、読取ったデータを前記バスマスタに転送する際に当該バスマスタの識別子を付して転送することを特徴とする請求項5に記載のメモリコントローラ。   6. The memory controller according to claim 5, wherein the transfer unit transfers the read data with an identifier of the bus master when transferring the read data to the bus master. 前記バスマスタからのリード応答受領信号に応じて、前記保存手段に保存されているアクセス要求を削除する手段を更に有することを特徴とする請求項5又は6に記載のメモリコントローラ。   7. The memory controller according to claim 5, further comprising means for deleting an access request stored in the storage means in response to a read response receipt signal from the bus master. 少なくとも一つのバスマスタと、
請求項1乃至7のいずれか1項に記載のメモリコントローラをそれぞれ含む複数のバススレーブと、
少なくとも1系統のメモリと、
を有することを特徴とする情報処理装置。
At least one bus master,
A plurality of bus slaves each including the memory controller according to any one of claims 1 to 7,
At least one memory;
An information processing apparatus comprising:
バスマスタからのメモリへのアクセス要求を受付けて当該メモリにアクセスするメモリ制御方法であって、
前記バスマスタからの前記メモリへのアクセス要求を受け付けると前記メモリに対してアクセスするアクセス工程と、
前記メモリへのアクセス要求がリードの場合、前記メモリから読取ったデータを前記バスマスタに転送する転送工程と、
前記転送工程による前記データの転送時、前記バスマスタに対する他のバススレーブからの読出し応答と衝突するか否かを判断する判断工程と、
前記判断工程で衝突すると判断した場合には、前記メモリに対する前記アクセス工程によるアクセスを遅延させる遅延工程と、
を有することを特徴とするメモリ制御方法。
A memory control method for receiving an access request to a memory from a bus master and accessing the memory,
An access step of accessing the memory upon receiving an access request to the memory from the bus master;
When the access request to the memory is a read, a transfer step of transferring data read from the memory to the bus master;
A determination step of determining whether or not there is a collision with a read response from another bus slave to the bus master when the data is transferred by the transfer step;
If it is determined that there is a collision in the determination step, a delay step for delaying access by the access step to the memory;
A memory control method comprising:
前記バスマスタから受け付けたアクセス要求を順に格納するコマンドキューと、
前記コマンドキューから取り出したコマンドに応じて前記メモリにアクセスする工程とを有し、
前記遅延工程では、前記コマンドキューからの前記コマンドの取り出しを禁止することにより前記メモリへのアクセスを遅延させることを特徴とする請求項9に記載のメモリ制御方法。
A command queue for sequentially storing access requests received from the bus master;
Accessing the memory in response to a command retrieved from the command queue,
The memory control method according to claim 9, wherein in the delaying step, access to the memory is delayed by prohibiting the extraction of the command from the command queue.
前記転送工程では、読取ったデータを前記バスマスタに転送する際に当該バスマスタの識別子を付して転送することを特徴とする請求項9又は10に記載のメモリ制御方法。   11. The memory control method according to claim 9, wherein in the transfer step, when the read data is transferred to the bus master, the identifier is assigned to the bus master. 前記判断工程では、他のバススレーブからのリードアクセスタイミング情報に基づいて前記衝突するか否かを判断することを特徴とする請求項9乃至11のいずれか1項に記載のメモリ制御方法。   12. The memory control method according to claim 9, wherein in the determination step, it is determined whether or not the collision occurs based on read access timing information from another bus slave. バスマスタからのメモリへのアクセス要求を受付けて当該メモリにアクセスするメモリ制御方法であって、
前記バスマスタからの前記メモリへのアクセス要求を受け付けると前記メモリに対してアクセスするアクセス工程と、
前記メモリへのアクセス要求を保存する保存工程と、
前記メモリへのアクセス要求がリードの場合に、前記メモリから読取ったデータを前記バスマスタに転送する転送工程と、
前記転送工程による前記データの転送時、前記バスマスタに対する他のバススレーブからの読出し応答と衝突した場合には、前記保存工程で保存されているアクセス要求に基づいて前記メモリに対する前記アクセス工程によるアクセスを実行させる再実行工程と、
を有することを特徴とするメモリ制御方法。
A memory control method for receiving an access request to a memory from a bus master and accessing the memory,
An access step of accessing the memory upon receiving an access request to the memory from the bus master;
A storage step of storing an access request to the memory;
A transfer step of transferring data read from the memory to the bus master when the access request to the memory is a read;
During the transfer of the data in the transfer step, if there is a collision with a read response from another bus slave to the bus master, the access to the memory is accessed based on the access request stored in the storage step. A re-execution step to be executed;
A memory control method comprising:
前記転送工程では、読取ったデータを前記バスマスタに転送する際に当該バスマスタの識別子を付して転送することを特徴とする請求項13に記載のメモリ制御方法。   14. The memory control method according to claim 13, wherein in the transfer step, when the read data is transferred to the bus master, the identifier is assigned to the bus master. 前記バスマスタからのリード応答受領信号に応じて、前記保存工程で保存されているアクセス要求を削除する手段を更に有することを特徴とする請求項13又は14に記載のメモリ制御方法。   15. The memory control method according to claim 13, further comprising means for deleting an access request stored in the storage step in response to a read response reception signal from the bus master.
JP2005296958A 2005-10-11 2005-10-11 Memory controller, memory-controlling method, and information processing device Withdrawn JP2007108882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005296958A JP2007108882A (en) 2005-10-11 2005-10-11 Memory controller, memory-controlling method, and information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005296958A JP2007108882A (en) 2005-10-11 2005-10-11 Memory controller, memory-controlling method, and information processing device

Publications (1)

Publication Number Publication Date
JP2007108882A true JP2007108882A (en) 2007-04-26

Family

ID=38034715

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005296958A Withdrawn JP2007108882A (en) 2005-10-11 2005-10-11 Memory controller, memory-controlling method, and information processing device

Country Status (1)

Country Link
JP (1) JP2007108882A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010009557A (en) * 2008-06-30 2010-01-14 Canon Inc Memory controller
JP2011154556A (en) * 2010-01-27 2011-08-11 Toshiba Corp Semiconductor storage device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010009557A (en) * 2008-06-30 2010-01-14 Canon Inc Memory controller
JP2011154556A (en) * 2010-01-27 2011-08-11 Toshiba Corp Semiconductor storage device

Similar Documents

Publication Publication Date Title
US8117359B2 (en) Memory control apparatus and method
JP3524337B2 (en) Bus management device and control device for multifunction device having the same
US5524235A (en) System for arbitrating access to memory with dynamic priority assignment
US7650453B2 (en) Information processing apparatus having multiple processing units sharing multiple resources
EP0617365B1 (en) Fully pipelined and highly concurrent memory controller
US5596741A (en) Computer system which overrides write protection status during execution in system management mode
US6836829B2 (en) Peripheral device interface chip cache and data synchronization method
US7127573B1 (en) Memory controller providing multiple power modes for accessing memory devices by reordering memory transactions
JP2002532779A (en) Queue-based memory controller
EP0663087A1 (en) Method and apparatus for non-snoop window reduction
JP2000216935A (en) Information processing system for composite equipment
JP2000211216A (en) Information processing method and system for composite device
JP3976927B2 (en) Bus control device
US5890216A (en) Apparatus and method for decreasing the access time to non-cacheable address space in a computer system
US6360305B1 (en) Method and apparatus for optimizing memory performance with opportunistic pre-charging
JP2000148650A (en) Controller for composite equipment
JP2000215149A (en) Controller for composite device
JP2007108882A (en) Memory controller, memory-controlling method, and information processing device
JP7468112B2 (en) INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application
JP5094050B2 (en) Memory control device, memory control method, and embedded system
JP2009037639A (en) Dmac issue mechanism via streaming identification method
JP4726187B2 (en) Semiconductor integrated circuit
JP3425421B2 (en) Multiprocessor system
JP2004046851A (en) Bus management device, and controller for composite apparatus including the same
JP3206656B2 (en) Prefetch device and prefetch method on bus

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090106