JP2010092342A - Interface circuit - Google Patents

Interface circuit Download PDF

Info

Publication number
JP2010092342A
JP2010092342A JP2008262792A JP2008262792A JP2010092342A JP 2010092342 A JP2010092342 A JP 2010092342A JP 2008262792 A JP2008262792 A JP 2008262792A JP 2008262792 A JP2008262792 A JP 2008262792A JP 2010092342 A JP2010092342 A JP 2010092342A
Authority
JP
Japan
Prior art keywords
address
data
read
flash memory
serial flash
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008262792A
Other languages
Japanese (ja)
Inventor
Shuji Katsuki
木 修 二 勝
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008262792A priority Critical patent/JP2010092342A/en
Publication of JP2010092342A publication Critical patent/JP2010092342A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Microcomputers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an interface circuit allowing data access to a serial flash memory to be performed as quickly as possible. <P>SOLUTION: The interface circuit accesses the serial flash memory wherein a program is stored, on the basis of a request of a CPU core executing the program and includes: an automatic command generation circuit which generates a read command and an address set to be issued to the serial flash memory, on the basis of a read signal and an address signal output from the CPU core; a control unit which issues the read command and the address set to the serial flash memory; and a word register wherein data read out from the serial flash memory in accordance with the read command and the address set is stored. Furthermore, the control unit is configured so as to output data which is read out from the serial flash memory and is stored in the word register, to the CPU core. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、インターフェース回路、例えばシリアルフラッシュメモリにアクセスするためのインターフェース回路に関する。   The present invention relates to an interface circuit, for example, an interface circuit for accessing a serial flash memory.

従来、マイクロコンピュータ(以下、マイコンともいう。)のプログラムを記憶するデバイスをプログラムROMという。このプログラムROMに用いられるデバイスとして、マイコンに内蔵されるマスクROM(内蔵マスクROM)や、マイコンとパラレル接続されるメモリ(例えば、NOR型パラレルフラッシュメモリ)が用いられることが殆どである。   Conventionally, a device that stores a program of a microcomputer (hereinafter also referred to as a microcomputer) is called a program ROM. As a device used for the program ROM, a mask ROM (built-in mask ROM) incorporated in the microcomputer and a memory (for example, NOR type parallel flash memory) connected in parallel with the microcomputer are mostly used.

しかし、いずれのデバイスを用いても次のような問題がある。即ち、内蔵マスクROMを用いる場合は、大容量化するにつれてマイコンのチップサイズが増えてしまい、マイコンチップのコストが増大するという問題がある。一方、NOR型パラレルフラッシュメモリを用いる場合は、マイコンとフラッシュメモリ間の信号線の数が多いため、基板上の他の部品が発生するノイズの影響を受けやすいという問題がある。その他、NOR型パラレルフラッシュメモリのコストが高いという問題もある。   However, the following problems occur regardless of which device is used. That is, when the built-in mask ROM is used, there is a problem that the chip size of the microcomputer increases as the capacity increases and the cost of the microcomputer chip increases. On the other hand, when the NOR type parallel flash memory is used, there is a problem that the number of signal lines between the microcomputer and the flash memory is large, so that it is easily affected by noise generated by other components on the board. In addition, there is a problem that the cost of the NOR type parallel flash memory is high.

近年、比較的低コストで大容量化に対応可能なNOR型シリアルフラッシュメモリ(以下、シリアルフラッシュメモリという。)が登場している。このシリアルフラッシュメモリは、パラレルフラッシュメモリに比べて格段に少ない信号線でマイコンと接続されるため、上記のノイズの問題を回避し易い。   In recent years, a NOR type serial flash memory (hereinafter referred to as a serial flash memory) that can cope with an increase in capacity at a relatively low cost has appeared. Since this serial flash memory is connected to the microcomputer with significantly fewer signal lines than the parallel flash memory, it is easy to avoid the noise problem.

従来、シリアルフラッシュメモリを利用することで、デバイスの端子数を減らしたマイコンが開示されている(特許文献1)。
特開2004−38560号公報
Conventionally, a microcomputer in which the number of device terminals is reduced by using a serial flash memory has been disclosed (Patent Document 1).
JP 2004-38560 A

本発明は、シリアルフラッシュメモリに対するデータアクセスを可及的に高速に行うことが可能なインターフェース回路を提供することを目的とする。   An object of the present invention is to provide an interface circuit capable of performing data access to a serial flash memory as fast as possible.

本発明の一態様によれば、プログラムを実行するCPUコアの要求に基づいて、前記プログラムを格納するシリアルフラッシュメモリにアクセスするインターフェース回路であって、前記CPUコアから出力されたリード信号及びアドレス信号に基づいて、前記シリアルフラッシュメモリに発行するためのリードコマンド及びアドレスセットを生成する、自動コマンド生成回路と、前記リードコマンド及びアドレスセットを前記シリアルフラッシュメモリに発行する、制御部と、前記リードコマンド及びアドレスセットに応じて前記シリアルフラッシュメモリから読み出されたデータを格納する、ワードレジスタと、を備え、前記制御部は、さらに、前記シリアルフラッシュメモリから読み出され前記ワードレジスタに格納されたデータを、前記CPUコアに出力するものとして構成されている、ことを特徴とするインターフェース回路が提供される。   According to one aspect of the present invention, an interface circuit that accesses a serial flash memory that stores the program based on a request of a CPU core that executes a program, the read signal and the address signal output from the CPU core An automatic command generation circuit for generating a read command and an address set to be issued to the serial flash memory, a control unit for issuing the read command and an address set to the serial flash memory, and the read command And a word register that stores data read from the serial flash memory according to an address set, and the control unit further reads the data read from the serial flash memory and stored in the word register The Serial and is configured as outputting to the CPU core, the interface circuit is provided, characterized in that.

本発明によれば、シリアルフラッシュメモリに対するデータアクセスを可及的に高速に行うことができる。   According to the present invention, data access to the serial flash memory can be performed as fast as possible.

本発明の実施形態について説明する前に、本発明者が本発明をなすに至った経緯について説明する。   Before describing the embodiments of the present invention, the background of how the present inventor made the present invention will be described.

上記のように、シリアルフラッシュメモリは、大容量化が比較的容易でありノイズの影響が少ないプログラムROMとして利用できる可能性がある。そのためには、マイコンからシリアルフラッシュメモリに対して、ある程度高速にランダムアクセスできる必要がある。しかし、シリアルフラッシュメモリにアクセスするには、リード、ライトなどのコマンド及びアドレスセットを生成する。このコマンド及びアドレスセットはシリアルフラッシュメモリのベンダー毎に異なる。さらに、生成されたコマンド及びアドレスセットをシリアル信号に変換して、シリアルフラッシュメモリに発行する必要がある。このため、命令フェッチなどに伴うデータアクセス時間が、パラレルフラッシュメモリに比べて大幅に増大してしまうという問題があった。   As described above, there is a possibility that the serial flash memory can be used as a program ROM that is relatively easy to increase in capacity and is less affected by noise. For this purpose, it is necessary to be able to randomly access the serial flash memory from the microcomputer at a certain high speed. However, in order to access the serial flash memory, commands such as read and write and an address set are generated. This command and address set are different for each serial flash memory vendor. Furthermore, it is necessary to convert the generated command and address set into a serial signal and issue it to the serial flash memory. For this reason, there has been a problem that the data access time associated with instruction fetching and the like is significantly increased as compared with the parallel flash memory.

この問題への対策の一つとして、SDRAM(Synchronous Dynamic Random Access Memory)又はDDR SDRAM(Double Data Rate SDRAM)など高速アクセス可能なメモリをマイコンに接続し、立ち上げ時にシリアルフラッシュメモリのデータを、この高速メモリに展開しておく方法がある。この方法によれば、マイコンはデータ展開後、高速なメモリにアクセスすればよいので、アクセス時間を短縮することができる。しかし、この場合、部品数の増加により、回路規模、基板面積が増大するという問題がある。   As one of the countermeasures against this problem, a high-speed accessible memory such as SDRAM (Synchronous Dynamic Random Access Memory) or DDR SDRAM (Double Data Rate SDRAM) is connected to the microcomputer. There is a method of expanding to high-speed memory. According to this method, since the microcomputer only needs to access a high-speed memory after data expansion, the access time can be shortened. However, in this case, there is a problem that the circuit scale and the board area increase due to an increase in the number of components.

また、別の対策として、マイコンにキャッシュSRAMを内蔵してアクセスを速くする方法がある。しかし、この場合、マイコンチップのコストが増大するという問題がある。   As another countermeasure, there is a method of speeding up access by incorporating a cache SRAM in the microcomputer. However, in this case, there is a problem that the cost of the microcomputer chip increases.

したがって、回路規模、基板面積、コストに対する要求が厳しい用途では、上記の方法を採ることができなかった。   Therefore, the above method cannot be used in applications where the requirements for circuit scale, substrate area, and cost are severe.

そこで、本発明者は、シリアルフラッシュメモリへのアクセスを可及的に高速化することにより上記の問題を解決しようと考え、シリアルフラッシュメモリにアクセスするためのインターフェース回路(以下、SFインターフェース回路という。)に着目した。即ち、シリアルフラッシュメモリの仕様(各種コマンド、アドレス)がベンダー毎に異なっており、仕様に適合したコマンド及びアドレスセットへの変換に時間がかかることから、この変換をSFインターフェース内のハードウェアで行うことを考えた。   Therefore, the present inventor considered to solve the above problem by speeding up access to the serial flash memory as much as possible, and referred to as an interface circuit (hereinafter referred to as an SF interface circuit) for accessing the serial flash memory. ). In other words, the specifications (various commands and addresses) of the serial flash memory are different for each vendor, and it takes time to convert the command and address set conforming to the specifications, so this conversion is performed by hardware in the SF interface. I thought.

さらに、本発明者は、シリアルフラッシュメモリは、あるアドレスのリードコマンドを受け付けると、それ以降のアドレスのデータを自動的に出力する仕様となっていることに着目した。そして、この仕様を利用して、これらのデータを廃棄せずにSFインターフェース内のレジスタに格納しておき、そのアドレスに対するリード要求を受ければ直ちに、レジスタに格納されたデータを出力する方法に思い至った。これにより、命令フェッチなどのデータアクセス時間を大幅に短縮することができる。   Furthermore, the present inventor has noted that the serial flash memory is designed to automatically output data at subsequent addresses when a read command at a certain address is received. Then, using this specification, the data is stored in a register in the SF interface without being discarded, and the data stored in the register is output immediately upon receiving a read request for the address. It came. Thereby, the data access time such as instruction fetch can be greatly shortened.

また、本発明者は、マイコンの初期化などの例外要因が発生した場合に、その例外要因が解除されたときに必要となるデータをSFインターフェース内のレジスタに格納しておくことにより、例外要因が解除されたときのデータアクセス時間を大幅に短縮する方法に想到した。   In addition, when an exception factor such as initialization of a microcomputer occurs, the present inventor stores the data required when the exception factor is released in a register in the SF interface, thereby causing the exception factor. I came up with a method to greatly shorten the data access time when the is released.

次に、本発明に係る実施形態を説明する前に、SFインターフェース回路を備えるマイクロコンピュータの概略構成と、シリアルフラッシュメモリにアクセスする際の動作の概略について説明する。   Next, before describing an embodiment according to the present invention, a schematic configuration of a microcomputer including an SF interface circuit and an outline of an operation when accessing a serial flash memory will be described.

図1を参照して、マイクロコンピュータ100の概略構成について説明する。図1は、マイクロコンピュータ100と、それに接続されたシリアルフラッシュメモリ200を示している。図1からわかるように、このマイクロコンピュータ100は、専用バスを介して外部のシリアルフラッシュメモリ200と接続されている。なお、この専用バスは、例えば、4本のI/O線、1本のクロック線及び1本のチップイネーブル線からなる。   A schematic configuration of the microcomputer 100 will be described with reference to FIG. FIG. 1 shows a microcomputer 100 and a serial flash memory 200 connected thereto. As can be seen from FIG. 1, the microcomputer 100 is connected to an external serial flash memory 200 via a dedicated bus. The dedicated bus is composed of, for example, four I / O lines, one clock line, and one chip enable line.

このマイクロコンピュータ100は、SFインターフェース回路10と、CPUコア20と、バスインターフェース回路30と、内蔵メモリ40とを備える。図1からわかるように、これらの構成要素はメモリデータバス(MDバス)で互いに接続されている。   The microcomputer 100 includes an SF interface circuit 10, a CPU core 20, a bus interface circuit 30, and a built-in memory 40. As can be seen from FIG. 1, these components are connected to each other by a memory data bus (MD bus).

CPUコア20とSFインターフェース回路10は、制御信号(BSTART信号、MRD信号、MWR信号、MACK信号)を伝達する制御線、及びメモリアドレス信号(MADR信号)を伝達するメモリアドレスバス(MADRバス)で接続されている。   The CPU core 20 and the SF interface circuit 10 are a control line for transmitting control signals (BSTART signal, MRD signal, MWR signal, MACK signal) and a memory address bus (MADR bus) for transmitting a memory address signal (MADR signal). It is connected.

また、マイクロコンピュータ100は、一般バスを介して他のデバイス(図示せず)と接続されている。   The microcomputer 100 is connected to other devices (not shown) via a general bus.

次に、マイクロコンピュータ100の構成要素ごとにその機能を説明する。   Next, the function of each component of the microcomputer 100 will be described.

SFインターフェース回路10は、CPUコア20の要求に応じて、シリアルフラッシュメモリ200にアクセスする。   The SF interface circuit 10 accesses the serial flash memory 200 in response to a request from the CPU core 20.

CPUコア20は、シリアルフラッシュメモリ200に格納されたプログラムを実行する。   The CPU core 20 executes a program stored in the serial flash memory 200.

バスインターフェース回路30は、CPUコア20の要求に応じて、一般バスに接続されたデバイスにアクセスする。   The bus interface circuit 30 accesses a device connected to the general bus in response to a request from the CPU core 20.

内蔵メモリ40は、CPUコア20が使用するワークRAMである。   The built-in memory 40 is a work RAM used by the CPU core 20.

なお、上記のマイクロコンピュータ100内の各構成要素にはシステムクロックが供給されており、各構成要素はこのシステムクロックに同期して動作する。   A system clock is supplied to each component in the microcomputer 100, and each component operates in synchronization with the system clock.

次に、マイクロコンピュータ100が外部のシリアルフラッシュメモリ200に格納されたデータをリードする方法について説明する。
(1)CPUコア20は、所定のプログラムに従って、シリアルフラッシュメモリ200の仕様に適合したコマンド及びアドレスセットを生成する。
(2)次に、CPUコア20は、BSTART信号(Bus Start)及びMRD信号(Memory Read)をアサートし、リードオペレーションを開始する。それと同時に、このCPUコア20は、生成されたコマンド及びアドレスセットを、SFインターフェース回路10に出力する。
(3)次に、SFインターフェース回路10は、受信したコマンド及びアドレスセットを、専用バス経由でシリアルフラッシュメモリ200に発行する。シリアルフラッシュメモリ200からリードされたデータは、ワードレジスタに格納される。そして、1ワード(例えば32ビット)分のデータが揃うと、SFインターフェース回路10は、MDバスに(CPUコア20に)リードしたデータを出力し、MACK信号(Memory Acknowledge)をアサートする。MACK信号をアサートすることにより、CPUコア20にリード要求が完了したことを伝える。
(4)MACK信号がアサートされると、CPUコア20は、MDバスに出力されたデータを取り込む。その後、CPUコア20はBSTART信号をデアサートして、リードオペレーションを終了する。
Next, a method for reading data stored in the external serial flash memory 200 by the microcomputer 100 will be described.
(1) The CPU core 20 generates a command and address set conforming to the specification of the serial flash memory 200 according to a predetermined program.
(2) Next, the CPU core 20 asserts the BSTART signal (Bus Start) and the MRD signal (Memory Read), and starts the read operation. At the same time, the CPU core 20 outputs the generated command and address set to the SF interface circuit 10.
(3) Next, the SF interface circuit 10 issues the received command and address set to the serial flash memory 200 via the dedicated bus. Data read from the serial flash memory 200 is stored in a word register. When data for one word (for example, 32 bits) is prepared, the SF interface circuit 10 outputs the read data to the MD bus (to the CPU core 20), and asserts a MACK signal (Memory Acknowledge). By asserting the MACK signal, the CPU core 20 is informed that the read request has been completed.
(4) When the MACK signal is asserted, the CPU core 20 takes in the data output to the MD bus. Thereafter, the CPU core 20 deasserts the BSTART signal and ends the read operation.

以下、本発明に係る4つの実施形態について図面を参照しながら説明する。 同一の機能を有する構成要素には同一の符号を付し、重複する説明は適宜省略する。   Hereinafter, four embodiments according to the present invention will be described with reference to the drawings. Constituent elements having the same function are denoted by the same reference numerals, and redundant description is omitted as appropriate.

(第1の実施形態)
第1の実施形態について説明する。本実施形態は、自動コマンド生成回路を備え、従来CPUコアで行っていたコマンド及びアドレスセットの生成をSFインターフェース回路で行うことで、データアクセスを高速化するものである。
(First embodiment)
A first embodiment will be described. This embodiment includes an automatic command generation circuit, and speeds up data access by generating a command and an address set that are conventionally performed by a CPU core using an SF interface circuit.

図2は、本実施形態に係るSFインターフェース回路10Aの構成を示している。図2からわかるように、このSFインターフェース回路10Aは、自動コマンド生成回路1と、制御部7Aと、ワードレジスタ8とを備えている。   FIG. 2 shows a configuration of the SF interface circuit 10A according to the present embodiment. As can be seen from FIG. 2, the SF interface circuit 10 </ b> A includes an automatic command generation circuit 1, a control unit 7 </ b> A, and a word register 8.

この自動コマンド生成回路1は、CPUコア20が出力するリード信号(MRD信号)及びメモリアドレス信号(MADR信号)に基づいて、シリアルフラッシュメモリ200の仕様に適合したリードコマンドとアドレスセットを生成する。また、ライト信号(MWR信号)及びメモリアドレス信号(MADR信号)に基づいて、シリアルフラッシュメモリ200の仕様に適合したライトコマンドとアドレスを生成する。   The automatic command generation circuit 1 generates a read command and an address set conforming to the specifications of the serial flash memory 200 based on a read signal (MRD signal) and a memory address signal (MADR signal) output from the CPU core 20. Further, based on the write signal (MWR signal) and the memory address signal (MADR signal), a write command and an address conforming to the specification of the serial flash memory 200 are generated.

ワードレジスタ8は、リードコマンド及びアドレスセットに応じてシリアルフラッシュメモリ200から読み出されたデータを格納する。このワードレジスタ8のサイズは、例えば32ビットであり、一つの32ビット長の命令を格納する。   The word register 8 stores data read from the serial flash memory 200 according to the read command and the address set. The size of the word register 8 is, for example, 32 bits, and stores one 32-bit long instruction.

制御部7Aは、後述のように、シリアルフラッシュメモリ200にコマンド及びアドレスセットを発行し、また、読出されたデータをCPUコア20に出力する。   The controller 7A issues a command and an address set to the serial flash memory 200 and outputs the read data to the CPU core 20 as will be described later.

本実施形態における、マイクロコンピュータ100のシリアルフラッシュメモリ200のデータをリードする方法について説明する。
(1)CPUコア20は、BSTART信号及びMRD信号をアサートし、リードオペレーションを開始する。それと同時に、このCPUコア20は、MADRバスにMADR信号を出力する。
なお、このメモリアドレス信号の示すアドレス値はシリアルフラッシュメモリ200の仕様に適合したものではない。
(2)次に、自動コマンド生成回路1は、MRD信号及びMADR信号をデコードして、シリアルフラッシュメモリ200の仕様に適合したリードコマンド及びアドレスセットを生成する。具体的には、このアドレスセットは、パラレルのMADR信号を、パラレル−シリアル変換(P/S変換)によりシリアル信号に変換し、適当なオフセット値を加えることによって生成される。
(3)次に、制御部7Aは、自動コマンド生成回路1によって生成されたリードコマンド及びアドレスセットを、専用バス経由でシリアルフラッシュメモリ200に発行する。読み出されたデータがワードレジスタ8に格納され1ワード(例えば32ビット)分のデータが揃うと、この制御部7Aは、そのデータをMDバスに(CPUコア20に)出力し、MACK信号をアサートする。
(4)MACK信号がアサートされると、CPUコア20は、MDバスに出力されたデータを取り込む。その後、CPUコア20はBSTART信号をデアサートして、リードオペレーションを終了する。
A method for reading data in the serial flash memory 200 of the microcomputer 100 in this embodiment will be described.
(1) The CPU core 20 asserts the BSTART signal and the MRD signal, and starts a read operation. At the same time, the CPU core 20 outputs a MADR signal to the MADR bus.
The address value indicated by the memory address signal does not conform to the specification of the serial flash memory 200.
(2) Next, the automatic command generation circuit 1 decodes the MRD signal and the MADR signal to generate a read command and an address set that conform to the specifications of the serial flash memory 200. Specifically, this address set is generated by converting a parallel MADR signal into a serial signal by parallel-serial conversion (P / S conversion) and adding an appropriate offset value.
(3) Next, the control unit 7A issues the read command and address set generated by the automatic command generation circuit 1 to the serial flash memory 200 via the dedicated bus. When the read data is stored in the word register 8 and data for one word (for example, 32 bits) is prepared, the control unit 7A outputs the data to the MD bus (to the CPU core 20) and outputs a MACK signal. Assert.
(4) When the MACK signal is asserted, the CPU core 20 takes in the data output to the MD bus. Thereafter, the CPU core 20 deasserts the BSTART signal and ends the read operation.

次に、シリアルフラッシュメモリ200にデータをライトする場合について説明する。この場合のアクセス方法は以下の通りである。
(1)CPUコア20は、BSTART信号及びMWR信号をアサートし、ライトオペレーションを開始する。それと同時に、このCPUコア20は、MADRバスにMADR信号を、MDバスに書込みデータをそれぞれ出力する。なお、このメモリアドレス信号の示すアドレス値はシリアルフラッシュメモリ200の仕様に適合したものではない。
(2)次に、自動コマンド生成回路1は、MWR信号及びMADR信号をデコードして、シリアルフラッシュメモリ200の仕様に適合したライトコマンド及びアドレスを生成する。
(3)次に、制御部7Aは、自動コマンド生成回路1によって生成されたライトコマンド及びアドレスを、専用バス経由でシリアルフラッシュメモリ200に発行する。そして、所望のアドレスにデータが書き込まれると、制御部7AはMACK信号をアサートする。
(4)MACK信号がアサートされると、CPUコア20はBSTART信号をデアサートして、ライトオペレーションを終了する。
Next, a case where data is written to the serial flash memory 200 will be described. The access method in this case is as follows.
(1) The CPU core 20 asserts the BSTART signal and the MWR signal, and starts a write operation. At the same time, the CPU core 20 outputs a MADR signal to the MADR bus and write data to the MD bus. The address value indicated by the memory address signal does not conform to the specification of the serial flash memory 200.
(2) Next, the automatic command generation circuit 1 decodes the MWR signal and the MADR signal, and generates a write command and an address conforming to the specification of the serial flash memory 200.
(3) Next, the control unit 7A issues the write command and address generated by the automatic command generation circuit 1 to the serial flash memory 200 via the dedicated bus. When data is written at a desired address, the control unit 7A asserts a MACK signal.
(4) When the MACK signal is asserted, the CPU core 20 deasserts the BSTART signal and ends the write operation.

本実施形態によれば、シリアルフラッシュメモリの仕様に適合したコマンド及びアドレスセットは、CPUコアで実行されるプログラムにより生成されるのではなく、自動コマンド生成回路のハードウェアにより生成される。これにより、コマンド及びアドレスセットの生成時間が短縮され、シリアルフラッシュメモリに対するデータアクセスを可及的に高速に行うことができる。また、コマンド及びアドレスセットの生成プログラムが不要となるため、プログラムのサイズを小さくでき、シリアルフラッシュメモリのプログラムエリアを有効活用することができる。   According to the present embodiment, the command and address set conforming to the specifications of the serial flash memory are not generated by the program executed by the CPU core, but are generated by the hardware of the automatic command generation circuit. Thereby, the generation time of the command and address set is shortened, and data access to the serial flash memory can be performed as fast as possible. Further, since the command and address set generation program is not required, the program size can be reduced, and the program area of the serial flash memory can be effectively used.

(第2の実施形態)
次に、第2の実施形態について説明する。本実施形態は、複数のワードレジスタを有するデータバッファを備える。このデータバッファは、CPUコアからリード要求されたアドレスのデータ、及びリード要求されたアドレスと順次連続する複数のアドレスにおける複数のデータからなるデータ群を格納する。これにより、前回リードしたアドレスと連続するアドレスに対してCPUコアからリード要求があった場合に、データバッファに格納されたデータをCPUコアに出力することで、リードコマンド及びアドレスセットの生成及び発行を不要とし、データアクセスを可及的に高速化するものである。
(Second Embodiment)
Next, a second embodiment will be described. The present embodiment includes a data buffer having a plurality of word registers. The data buffer stores data of an address requested to be read from the CPU core and a data group composed of a plurality of data at a plurality of addresses sequentially consecutive with the address requested to be read. As a result, when there is a read request from the CPU core for an address continuous with the address read last time, the data stored in the data buffer is output to the CPU core, thereby generating and issuing a read command and an address set. The data access is made as fast as possible.

図3は、本実施形態に係るSFインターフェース回路10Bの構成を示している。この図からわかるように、SFインターフェース回路10Bは、自動コマンド生成回路1と、連続アドレス判定回路2Bと、データバッファ管理回路3と、データバッファ4と、制御部7Bとを備える。   FIG. 3 shows a configuration of the SF interface circuit 10B according to the present embodiment. As can be seen from this figure, the SF interface circuit 10B includes an automatic command generation circuit 1, a continuous address determination circuit 2B, a data buffer management circuit 3, a data buffer 4, and a control unit 7B.

連続アドレス判定回路2Bは、CPUコア20から今回リード要求されたアドレス(CPUコア20からMADRバスに出力されたアドレス信号に対応するアドレス)が前回要求されたアドレスと連続であるか否かを判定する。つまり、今回リード要求されたアドレスをady、前回リード要求されたアドレスをadxとしたとき、アドレスadyがアドレスadx+1に等しいか否かを判定する。   The continuous address determination circuit 2B determines whether or not the address requested this time by the CPU core 20 (the address corresponding to the address signal output from the CPU core 20 to the MADR bus) is continuous with the previously requested address. To do. That is, it is determined whether the address ady is equal to the address adx + 1 when the address requested to be read this time is ady and the address last requested to be read is adx.

データバッファ4は、第1ワードレジスタ〜第Nワードレジスタを有する。この第1〜第Nワードレジスタは、それぞれnビットのレジスタである。なお、1つのワードレジスタには、例えば1つの命令が格納される。1つの命令が32ビット長の場合、n=32である。また、ワードレジスタの数は、マイコンの用途(デジカメやファクシミリなど)に応じて適当に決められる。例えば、N=6である。   The data buffer 4 has a first word register to an Nth word register. Each of the first to Nth word registers is an n-bit register. For example, one instruction is stored in one word register. If one instruction is 32 bits long, n = 32. The number of word registers is appropriately determined according to the application of the microcomputer (digital camera, facsimile, etc.). For example, N = 6.

データバッファ管理回路3は、第1ワードレジスタに格納されたデータがMDバスに(CPUコア20に)出力されると、第2〜第Nワードレジスタに格納されたデータを、第1〜第N−1ワードレジスタにそれぞれ移動する。即ち、データバッファ4の各ワードレジスタに格納されたデータをワードレジスタ一つ分だけ詰める。さらに、このデータバッファ管理回路3は、データバッファ4が一杯になったか否かを判定する。即ち、第Nワードレジスタまでデータが格納されたか否かを判定する。データバッファ4が一杯になったと判定されると、専用バスのチップイネーブルがデアサートされてリード動作は中止される。   When the data stored in the first word register is output to the MD bus (to the CPU core 20), the data buffer management circuit 3 converts the data stored in the second to Nth word registers into the first to Nth. Move to the -1 word register respectively. That is, the data stored in each word register of the data buffer 4 is packed by one word register. Further, the data buffer management circuit 3 determines whether or not the data buffer 4 is full. That is, it is determined whether data has been stored up to the Nth word register. When it is determined that the data buffer 4 is full, the chip enable of the dedicated bus is deasserted and the read operation is stopped.

以下、シリアルフラッシュメモリ200のデータをリードする際における、SFインターフェース回路10Bの動作について説明する。
CPUコア20から、アドレスadyに格納されたデータD(ady)のリード要求があったとする。
(1)連続アドレス判定回路2Bは、アドレスadyが、前回リード要求のあったアドレスadxと連続か否かを判定する。
(2)連続アドレス判定の結果、アドレスadyがアドレスadxと連続である場合、制御部7Bは、データバッファ4の第1ワードレジスタに格納されているデータD(ady)をMDバスに(CPUコア20に)出力し、MACK信号をアサートする。データバッファ管理回路3は、データバッファ4の各ワードレジスタに格納されたデータを、ワードレジスタ一つ分詰める。
一方、連続アドレス判定の結果、アドレスadyがアドレスadxと連続でない場合、制御部7Bは、自動コマンド生成回路1に、リードコマンド、及びアドレスadyに対応するアドレスセットを新たに生成させる。そして、この制御部7Bは、生成されたリードコマンド及びアドレスセットをシリアルフラッシュメモリ200に発行する。読み出されたデータはデータバッファ4の第1ワードレジスタに格納される。そして、1ワード分のデータが揃うと、この制御部7Bは、データD(ady)をMDバスに(CPUコア20に)出力し、MACK信号をアサートする。
(3)MACK信号がアサートされると、CPUコア20は、MDバスに出力されたデータを取り込む。
前述のように、シリアルフラッシュメモリ200は、データD(ady)に続いて、アドレスady+1,ady+2,・・・にそれぞれ格納されたデータD(ady+1),D(ady+2),・・・を自動的に出力する。これらのデータは、データバッファ4の各ワードレジスタに順次格納される。このとき、ワードレジスタは、以前に読出したデータを格納していたとしても、新たに読み出されたデータにより上書きされる。
上記のように、本実施形態に係るSFインターフェース回路10Bは、リード要求されたアドレスのデータだけでなく、シリアルフラッシュメモリ200から自動的に読み出される、リード要求されたアドレスと順次連続する複数のアドレスにおけるデータも、データバッファ4に格納する。それにより、CPUコア20が前回と連続するアドレスについてリード要求したとき、新たにコマンド及びアドレスセットを生成及び発行することなく、データバッファ4に格納されたデータを、要求されたアドレスのデータとして出力することができる。この結果、命令フェッチなどのデータアクセス時間が高速化される。
The operation of the SF interface circuit 10B when reading data from the serial flash memory 200 will be described below.
It is assumed that there is a read request from the CPU core 20 for the data D (ady) stored at the address ady.
(1) The continuous address determination circuit 2B determines whether the address ady is continuous with the address adx for which a previous read request has been made.
(2) If the result of the continuous address determination is that the address ady is continuous with the address adx, the control unit 7B uses the data D (ady) stored in the first word register of the data buffer 4 as the MD bus (CPU core 20) and assert the MACK signal. The data buffer management circuit 3 packs the data stored in each word register of the data buffer 4 by one word register.
On the other hand, if the result of the continuous address determination is that the address ady is not continuous with the address adx, the control unit 7B causes the automatic command generation circuit 1 to newly generate a read command and an address set corresponding to the address ady. Then, the control unit 7B issues the generated read command and address set to the serial flash memory 200. The read data is stored in the first word register of the data buffer 4. When the data for one word is prepared, the control unit 7B outputs the data D (ady) to the MD bus (to the CPU core 20) and asserts the MACK signal.
(3) When the MACK signal is asserted, the CPU core 20 takes in the data output to the MD bus.
As described above, the serial flash memory 200 automatically follows the data D (ady) and subsequently the data D (ady + 1), D (ady + 2),... Stored in the addresses ady + 1, ady + 2,. Output to. These data are sequentially stored in each word register of the data buffer 4. At this time, the word register is overwritten with the newly read data even if previously read data is stored.
As described above, the SF interface circuit 10B according to the present embodiment includes not only the data of the address requested to be read, but also a plurality of addresses that are sequentially read from the serial flash memory 200 and sequentially consecutive with the address requested to be read. The data at is also stored in the data buffer 4. As a result, when the CPU core 20 makes a read request for an address continuous with the previous time, the data stored in the data buffer 4 is output as the data of the requested address without newly generating and issuing a command and address set. can do. As a result, data access time such as instruction fetch is increased.

以上、本実施形態によれば、シリアルフラッシュメモリに対するデータアクセスを可及的に高速に行うことができる。   As described above, according to the present embodiment, data access to the serial flash memory can be performed as fast as possible.

(第3の実施形態)
次に、第3の実施形態について説明する。本実施形態と第2の実施形態の相違点の一つは、本実施形態に係るSFインターフェース回路は、複数のデータバッファを備え、CPUコアによる処理がプログラムの分岐や割り込み等によってそれまでと連続しないアドレスに飛んだ場合でも、データアクセスの高速化を図るものである。
(Third embodiment)
Next, a third embodiment will be described. One of the differences between this embodiment and the second embodiment is that the SF interface circuit according to this embodiment includes a plurality of data buffers, and the processing by the CPU core is continued until then by program branching, interrupts, and the like. Even when the address jumps to a non-address, the data access speed is increased.

図4は、本実施形態に係るSFインターフェース回路10Cの構成を示している。SFインターフェース回路10Cは、自動コマンド生成回路1と、連続アドレス判定回路2Cと、データバッファ管理回路3と、k個のデータバッファ4−1,4−2,・・・,4−kと、k個のアドレス設定レジスタ5−1,5−2,・・・,5−kと、制御部7Cとを備える。   FIG. 4 shows a configuration of the SF interface circuit 10C according to the present embodiment. The SF interface circuit 10C includes an automatic command generation circuit 1, a continuous address determination circuit 2C, a data buffer management circuit 3, k data buffers 4-1, 4-2,. , 5-k and a control unit 7C.

データバッファ4−1,4−2,・・・,4−kは、後述のアドレス設定レジスタ5−1,5−2,・・・,5−kとそれぞれ対応付けられている。   The data buffers 4-1, 4-2,..., 4-k are associated with address setting registers 5-1, 5-2,.

アドレス設定レジスタ5−1,5−2,・・・,5−kは、アドレスを格納するレジスタである。リード要求されたアドレス(CPUコア20からMADRバスに出力されたアドレス信号に対応するアドレス)は、このアドレス設定レジスタ5−1,5−2,・・・,5−kのうちのいずれかに格納される。   Address setting registers 5-1, 5-2,..., 5-k are registers for storing addresses. The address requested to be read (the address corresponding to the address signal output from the CPU core 20 to the MADR bus) is stored in any one of the address setting registers 5-1, 5-2,. Stored.

連続アドレス判定回路2Cは、リード要求されたアドレスと連続するアドレスが、アドレス設定レジスタ5−1,5−2,・・・,5−kのうちのいずれかに格納されているか否かを判定する。   The continuous address determination circuit 2C determines whether or not an address continuous with the read requested address is stored in any of the address setting registers 5-1, 5-2,. To do.

以下、シリアルフラッシュメモリ200のデータをリードする際における、SFインターフェース回路10Cの動作について説明する。
CPUコア20から、アドレスadyに格納されたデータD(ady)のリード要求があったとする。
(1)連続アドレス判定回路2Cは、アドレスadyが、アドレス設定レジスタ5−1,5−2,・・・,5−kに格納されたアドレスのいずれかと連続するか否かを判定する。
(2)連続アドレス判定回路2Cによる判定の結果、アドレスadyがあるアドレス設定レジスタ(ここではアドレス設定レジスタ5−iとする。)に格納されたアドレスと連続する場合、制御部7Cは、アドレス設定レジスタ5−iにアドレスadyを格納し、データバッファ4−iの第1ワードレジスタに格納されているデータD(ady)をMDバスに(CPUコア20に)出力し、MACK信号をアサートする。
データバッファ管理回路3は、データバッファ4−iの各ワードレジスタに格納されたデータを、ワードレジスタ一つ分詰める。これにより、データD(ady+1)が第1ワードレジスタに格納される。つまり、データバッファ4−iの第1ワードレジスタに格納されたデータのアドレス(ady+1)は、アドレス設定レジスタ5−iに格納されたアドレス(ady)を1だけ増加させたものになる。
一方、連続アドレス判定回路2Cによる判定の結果、アドレスadyがアドレス設定レジスタ5−1,5−2,・・・,5−kに格納されたアドレスのいずれとも連続しない場合、制御部7Cは、あるアドレス設定レジスタ(ここではアドレス設定レジスタ5−iとする。)にアドレスadyを格納し、自動コマンド生成回路1に、リードコマンド、及びアドレスadyに対応するアドレスセットを新たに生成させる。そして、この制御部7Cは、生成されたリードコマンド及びアドレスセットをシリアルフラッシュメモリ200に発行する。読み出されたデータは、アドレス設定レジスタ5−iに対応するデータバッファ4−iの第1ワードレジスタに格納される。そして、1ワード分のデータが揃うと、この制御部7Cは、データD(ady)をMDバスに(CPUコア20に)出力し、MACK信号をアサートする。その後、データバッファ管理回路3は、データバッファ4−iの各ワードレジスタに格納されたデータを、ワードレジスタ一つ分詰める。これにより、データD(ady+1)が第1ワードレジスタに格納される。つまり、データバッファ4−iの第1ワードレジスタに格納されたデータのアドレス(ady+1)は、アドレス設定レジスタ5−iに格納されたアドレス(ady)を1だけ増加させたものになる。
なお、連続するアドレスがない場合に用いるアドレス設定レジスタとしては、例えば、アドレスが格納されていないアドレス設定レジスタのうち、最も符号の数の小さいものを使用する。即ち、アドレス設定レジスタ5−1,5−2にアドレスが格納されており、アドレス設定レジスタ5−3,5−4,5−5にアドレスが格納されていない場合、アドレス設定レジスタ5−3を使用する。また、もし空いているアドレス設定レジスタがなければ、例えば、アドレス設定レジスタ5−1を使用する。
(3)MACK信号がアサートされると、CPUコア20は、MDバスに出力されたデータを取り込む。
前述のように、シリアルフラッシュメモリ200は、データD(ady)に続いて、アドレスady+1,ady+2,・・・にそれぞれ格納されたデータD(ady+1),D(ady+2),・・・を自動的に出力する。これらのデータは、データバッファ4−iの各ワードレジスタに順次格納される。このとき、ワードレジスタは、以前に読出したデータを格納していたとしても、新たに読み出されたデータにより上書きされる。
以上の説明からわかるように、本実施形態によれば、例えば割り込み動作のように、アドレスがそれまでと連続しないアドレスにジャンプし、その後元のアドレスに戻るような場合であっても、リード要求されたアドレスのデータを即座にCPUコア20に出力することができる。
Hereinafter, the operation of the SF interface circuit 10C when reading data from the serial flash memory 200 will be described.
It is assumed that there is a read request from the CPU core 20 for the data D (ady) stored at the address ady.
(1) The continuous address determination circuit 2C determines whether the address ady is continuous with any of the addresses stored in the address setting registers 5-1, 5-2,.
(2) As a result of the determination by the continuous address determination circuit 2C, when the address “ady” is continuous with an address stored in an address setting register (here, address setting register 5-i), the control unit 7C sets the address. The address ady is stored in the register 5-i, the data D (ady) stored in the first word register of the data buffer 4-i is output to the MD bus (to the CPU core 20), and the MACK signal is asserted.
The data buffer management circuit 3 packs the data stored in each word register of the data buffer 4-i by one word register. As a result, data D (ady + 1) is stored in the first word register. That is, the address (ady + 1) of the data stored in the first word register of the data buffer 4-i is obtained by incrementing the address (ady) stored in the address setting register 5-i by 1.
On the other hand, as a result of the determination by the continuous address determination circuit 2C, when the address ady is not continuous with any of the addresses stored in the address setting registers 5-1, 5-2,. The address ady is stored in a certain address setting register (herein referred to as the address setting register 5-i), and the automatic command generation circuit 1 newly generates a read command and an address set corresponding to the address ady. The control unit 7C issues the generated read command and address set to the serial flash memory 200. The read data is stored in the first word register of the data buffer 4-i corresponding to the address setting register 5-i. When the data for one word is prepared, the control unit 7C outputs the data D (ady) to the MD bus (to the CPU core 20) and asserts the MACK signal. Thereafter, the data buffer management circuit 3 packs the data stored in each word register of the data buffer 4-i by one word register. As a result, data D (ady + 1) is stored in the first word register. That is, the address (ady + 1) of the data stored in the first word register of the data buffer 4-i is obtained by incrementing the address (ady) stored in the address setting register 5-i by 1.
As the address setting register used when there are no consecutive addresses, for example, the one having the smallest number of codes among the address setting registers in which no address is stored is used. That is, if the address is stored in the address setting registers 5-1 and 5-2 and no address is stored in the address setting registers 5-3, 5-4, and 5-5, the address setting register 5-3 is stored. use. If there is no free address setting register, for example, the address setting register 5-1 is used.
(3) When the MACK signal is asserted, the CPU core 20 takes in the data output to the MD bus.
As described above, the serial flash memory 200 automatically follows the data D (ady) and subsequently the data D (ady + 1), D (ady + 2),... Stored in the addresses ady + 1, ady + 2,. Output to. These data are sequentially stored in each word register of the data buffer 4-i. At this time, the word register is overwritten with the newly read data even if previously read data is stored.
As can be seen from the above description, according to the present embodiment, even when the address jumps to a non-contiguous address and then returns to the original address, such as an interrupt operation, the read request is returned. The addressed data can be immediately output to the CPU core 20.

以上、本実施形態によれば、第2の実施形態と同様の効果が得られ、さらに、不連続なアドレスへのジャンプが発生する場合でも、データアクセスの速度を可及的に高速に行うことができる。   As described above, according to this embodiment, the same effect as that of the second embodiment can be obtained, and even when a jump to a discontinuous address occurs, the data access speed is made as high as possible. Can do.

(第4の実施形態)
次に、第4の実施形態について説明する。本実施形態は、リセット判定回路を備える。そして、例外要因(例えばマイクロコンピュータの初期化や省電力モードへの遷移)が発生した際に、その例外要因が解除された時に実行するプログラムを、予めデータバッファに格納しておく。これにより、例外要因が解除された時におけるデータアクセスを高速化するものである。
(Fourth embodiment)
Next, a fourth embodiment will be described. The present embodiment includes a reset determination circuit. When an exception factor (for example, initialization of the microcomputer or transition to the power saving mode) occurs, a program to be executed when the exception factor is canceled is stored in the data buffer in advance. This speeds up data access when the exception factor is canceled.

図5は、本実施形態に係るSFインターフェース回路10Dの構成を示している。この図からわかるように、SFインターフェース回路10Dは、自動コマンド生成回路1と、データバッファ管理回路3と、k個のデータバッファ4−1,4−2,・・・,4−kと、k個のアドレス設定レジスタ5−1,5−2,・・・,5−kと、リセット判定回路6と、制御部7Dとを備える。   FIG. 5 shows a configuration of the SF interface circuit 10D according to the present embodiment. As can be seen from this figure, the SF interface circuit 10D includes an automatic command generation circuit 1, a data buffer management circuit 3, k data buffers 4-1, 4-2,..., 4-k, and k. , 5-k, a reset determination circuit 6, and a control unit 7D.

以下、本実施形態に係るSFインターフェース回路10Dの動作を説明する。
(1)RESET信号がアサートされ、リセット判定回路6がそれを感知する。このリセット判定回路6は、RESET信号の示す要因(例外要因)に応じて、その例外要因が解除された際に読み出すことになるアドレス(以下、例外アドレスという。)を出力する。
(2)制御部7Dは、あるアドレス設定レジスタ(ここでは、アドレス設定レジスタ5−jとする。)に例外アドレスを格納する。
(3)制御部7Dは、自動コマンド生成回路1に、例外アドレスのデータをリードするためのリードコマンド及びアドレスセットを生成させ、生成されたリードコマンド及びアドレスセットをシリアルフラッシュメモリ200に発行する。
(4)例外アドレスに格納されたデータ、及び例外アドレスと順次連続する複数のアドレスにおける複数のデータは、アドレス設定レジスタ5−jと対応付けられたデータバッファ4−jの第1ワードレジスタから順に格納される。
なお、データバッファ管理回路3によりデータバッファ4−jが一杯になったと判定されると、続きのデータはデータバッファ4−(j+1)の第1ワードレジスタから順に格納される。このようにして、例外要因が解除された時に必要なデータをデータバッファに格納する。
(5)例外要因が解除されると、制御部7Dは、CPUコア20の要求を受けて、データバッファに格納しておいたデータをMDバスに(CPUコア20に)出力し、MACK信号をアサートする。
(6)MACK信号がアサートされると、CPUコア20は、MDバスに出力されたデータを取り込む。
なお、上記のアドレス設定レジスタ5−jとしては、例えば、アドレスが格納されていないアドレス設定レジスタのうち、最も符号の数の小さいものを使用する。即ち、アドレス設定レジスタ5−1,5−2にアドレスが格納されており、アドレス設定レジスタ5−3,5−4,5−5にアドレスが格納されていない場合、アドレス設定レジスタ5−3を使用する。もし空いているアドレス設定レジスタがなければ、例えば、アドレス設定レジスタ5−1を使用する。
また、上記の説明では、アドレス設定レジスタ及びデータバッファは複数設けられているが、第2の実施形態のように1つでもよい。
以上、本実施形態によれば、例外要因が解除された時に必要となるデータを、例外要因を感知した際に予めデータバッファに格納しておくことにより、例外要因が解除された時のデータアクセスを可及的に高速に行うことができる。
Hereinafter, the operation of the SF interface circuit 10D according to the present embodiment will be described.
(1) The RESET signal is asserted, and the reset determination circuit 6 senses it. The reset determination circuit 6 outputs an address (hereinafter referred to as an exception address) to be read when the exception factor is canceled according to the factor (exception factor) indicated by the RESET signal.
(2) The control unit 7D stores the exception address in a certain address setting register (in this case, the address setting register 5-j).
(3) The control unit 7D causes the automatic command generation circuit 1 to generate a read command and an address set for reading the data of the exception address, and issues the generated read command and address set to the serial flash memory 200.
(4) The data stored at the exception address and the plurality of data at a plurality of addresses sequentially consecutive with the exception address are sequentially from the first word register of the data buffer 4-j associated with the address setting register 5-j. Stored.
When the data buffer management circuit 3 determines that the data buffer 4-j is full, the subsequent data is sequentially stored from the first word register of the data buffer 4- (j + 1). In this way, data necessary when the exception factor is canceled is stored in the data buffer.
(5) When the exception factor is canceled, the control unit 7D receives the request from the CPU core 20, outputs the data stored in the data buffer to the MD bus (to the CPU core 20), and outputs the MACK signal. Assert.
(6) When the MACK signal is asserted, the CPU core 20 takes in the data output to the MD bus.
As the above address setting register 5-j, for example, the one having the smallest number of codes among the address setting registers in which no address is stored is used. That is, if the address is stored in the address setting registers 5-1 and 5-2 and no address is stored in the address setting registers 5-3, 5-4, and 5-5, the address setting register 5-3 is stored. use. If there is no free address setting register, for example, the address setting register 5-1 is used.
In the above description, a plurality of address setting registers and data buffers are provided, but one may be used as in the second embodiment.
As described above, according to the present embodiment, data access when an exception factor is canceled is stored in the data buffer in advance when the exception factor is detected, so that data access when the exception factor is canceled is stored. Can be performed as fast as possible.

マイクロコンピュータの概略構成を示す図である。It is a figure which shows schematic structure of a microcomputer. 第1の実施形態に係るSFインターフェース回路の構成を示す図である。It is a figure which shows the structure of SF interface circuit which concerns on 1st Embodiment. 第2の実施形態に係るSFインターフェース回路の構成を示す図である。It is a figure which shows the structure of SF interface circuit which concerns on 2nd Embodiment. 第3の実施形態に係るSFインターフェース回路の構成を示す図である。It is a figure which shows the structure of SF interface circuit which concerns on 3rd Embodiment. 第4の実施形態に係るSFインターフェース回路の構成を示す図である。It is a figure which shows the structure of the SF interface circuit which concerns on 4th Embodiment.

符号の説明Explanation of symbols

1・・・自動コマンド生成回路、2B,2C・・・連続アドレス判定回路、3・・・データバッファ管理回路、4・・・データバッファ、5・・・アドレス設定レジスタ、6・・・リセット判定回路、7A,7B,7C,7D・・・制御部、8・・・ワードレジスタ、10,10A,10B,10C,10D・・・SFインターフェース回路、20・・・CPUコア、30・・・バスインターフェース回路、40・・・内蔵メモリ、100・・・マイクロコンピュータ、200・・・シリアルフラッシュメモリ DESCRIPTION OF SYMBOLS 1 ... Automatic command generation circuit, 2B, 2C ... Continuous address determination circuit, 3 ... Data buffer management circuit, 4 ... Data buffer, 5 ... Address setting register, 6 ... Reset determination Circuit, 7A, 7B, 7C, 7D ... Control unit, 8 ... Word register, 10,10A, 10B, 10C, 10D ... SF interface circuit, 20 ... CPU core, 30 ... Bus Interface circuit, 40 ... built-in memory, 100 ... microcomputer, 200 ... serial flash memory

Claims (5)

プログラムを実行するCPUコアの要求に基づいて、前記プログラムを格納するシリアルフラッシュメモリにアクセスするインターフェース回路であって、
前記CPUコアから出力されたリード信号及びアドレス信号に基づいて、前記シリアルフラッシュメモリに発行するためのリードコマンド及びアドレスセットを生成する、自動コマンド生成回路と、
前記リードコマンド及びアドレスセットを前記シリアルフラッシュメモリに発行する、制御部と、
前記リードコマンド及びアドレスセットに応じて前記シリアルフラッシュメモリから読み出されたデータを格納する、ワードレジスタと、
を備え、
前記制御部は、さらに、前記シリアルフラッシュメモリから読み出され前記ワードレジスタに格納されたデータを、前記CPUコアに出力するものとして構成されている、
ことを特徴とするインターフェース回路。
An interface circuit that accesses a serial flash memory that stores the program based on a request of a CPU core that executes the program,
An automatic command generation circuit that generates a read command and an address set to be issued to the serial flash memory based on a read signal and an address signal output from the CPU core;
A controller that issues the read command and address set to the serial flash memory;
A word register for storing data read from the serial flash memory in response to the read command and address set;
With
The control unit is further configured to output data read from the serial flash memory and stored in the word register to the CPU core.
An interface circuit characterized by that.
プログラムを実行するCPUコアから出力されたリード信号及びアドレス信号に基づいて、前記プログラムを格納するシリアルフラッシュメモリにアクセスするインターフェース回路であって、
前記CPUコアから出力された前記アドレス信号に対応するアドレスが、前回出力された前記アドレス信号に対応するアドレスと連続であるか否かの判定を行う、連続アドレス判定回路と、
前記CPUコアから出力された前記リード信号及びアドレス信号に基づいて、前記シリアルフラッシュメモリに発行するためのリードコマンド及びアドレスセットを生成する、自動コマンド生成回路と、
第1乃至第Nのワードレジスタを有するデータバッファであって、前記データバッファは、前記リードコマンド及びアドレスセットに応じて前記シリアルフラッシュメモリから読み出されたデータと、前記データに続いて前記シリアルフラッシュメモリから自動的に読み出される、前記アドレス信号に対応するアドレスと順次連続する複数のアドレスにおける複数のデータと、からなるデータ群によって内容が更新される、データバッファと、
前記判定の結果がアドレスは連続することを示す場合、前記自動コマンド生成回路を動作させずに、前記データバッファの前記第1のワードレジスタに格納されたデータを前記CPUコアに出力し、一方、前記判定の結果がアドレスは連続しないことを示す場合、前記自動コマンド生成回路を動作させることによって生成されたリードコマンド及びアドレスセットを前記シリアルフラッシュメモリに発行し、これにより内容の更新された前記データバッファの前記第1のワードレジスタに格納されたデータを前記CPUコアに出力する、制御部と、
を備えることを特徴とするインターフェース回路。
An interface circuit that accesses a serial flash memory that stores the program based on a read signal and an address signal output from a CPU core that executes the program,
A continuous address determination circuit that determines whether an address corresponding to the address signal output from the CPU core is continuous with an address corresponding to the address signal output last time;
An automatic command generation circuit that generates a read command and an address set to be issued to the serial flash memory based on the read signal and the address signal output from the CPU core;
A data buffer having first to Nth word registers, the data buffer including data read from the serial flash memory in response to the read command and an address set, and the serial flash following the data A data buffer whose contents are updated by a data group consisting of an address corresponding to the address signal and a plurality of data at a plurality of consecutive addresses that are automatically read from the memory;
If the result of the determination indicates that the addresses are continuous, the data stored in the first word register of the data buffer is output to the CPU core without operating the automatic command generation circuit, When the determination result indicates that the addresses are not continuous, the read command and the address set generated by operating the automatic command generation circuit are issued to the serial flash memory, and the data whose contents are updated thereby A controller that outputs the data stored in the first word register of the buffer to the CPU core; and
An interface circuit comprising:
プログラムを実行するCPUコアから出力されたリード信号及びアドレス信号に基づいて、前記プログラムを格納するシリアルフラッシュメモリにアクセスするインターフェース回路であって、
前記CPUコアから出力された前記リード信号及びアドレス信号に基づいて、前記シリアルフラッシュメモリに発行するためのリードコマンド及びアドレスセットを生成する、自動コマンド生成回路と、
複数のアドレス設定レジスタであって、前記複数のアドレス設定レジスタのうちのいずれかに、前記CPUコアから出力された前記アドレス信号に対応するアドレスであるリード要求アドレスを格納する、複数のアドレス設定レジスタと、
それぞれが第1乃至第Nのワードレジスタを有する複数のデータバッファであって、前記各データバッファは複数の前記アドレス設定レジスタとそれぞれ対応付けられており、前記リード要求アドレスの格納された前記アドレス設定レジスタに対応する前記データバッファは、前記リードコマンド及びアドレスセットに応じて前記シリアルフラッシュメモリから読み出されたデータと、前記データに続いて前記シリアルフラッシュメモリから自動的に読み出される、前記アドレス信号に対応するアドレスと順次連続する複数のアドレスにおける複数のデータと、からなるデータ群によって内容が更新される、複数のデータバッファと、
前記リード要求アドレスと連続するアドレスが複数の前記アドレス設定レジスタのうちのいずれかに格納されているか否かの判定を行う、連続アドレス判定回路と、
前記判定の結果が連続するアドレスは存在することを示す場合、前記自動コマンド生成回路を動作させずに、前記リード要求アドレスと連続するアドレスを格納しているアドレス設定レジスタに前記リード要求アドレスを格納し、そのアドレス設定レジスタと対応付けられた前記データバッファの前記第1のワードレジスタに格納されたデータを前記CPUコアに出力し、一方、前記判定の結果が連続するアドレスは存在しないことを示す場合、前記リード要求アドレスを複数の前記アドレス設定レジスタのうちのいずれかに格納し、前記自動コマンド生成回路を動作させることによって生成されたリードコマンド及びアドレスセットを前記シリアルフラッシュメモリに発行し、これにより内容の更新された、前記リード要求アドレスが格納された前記アドレス設定レジスタに対応する前記データバッファの前記第1のワードレジスタに格納されたデータを、前記CPUコアに出力する、制御部と、
を備えることを特徴とするインターフェース回路。
An interface circuit that accesses a serial flash memory that stores the program based on a read signal and an address signal output from a CPU core that executes the program,
An automatic command generation circuit that generates a read command and an address set to be issued to the serial flash memory based on the read signal and the address signal output from the CPU core;
A plurality of address setting registers, each of which stores a read request address that is an address corresponding to the address signal output from the CPU core. When,
A plurality of data buffers each having first to Nth word registers, each of the data buffers being associated with a plurality of the address setting registers, and the address setting storing the read request address The data buffer corresponding to the register receives data read from the serial flash memory in response to the read command and address set, and the address signal automatically read from the serial flash memory following the data. A plurality of data buffers whose contents are updated by a data group consisting of a plurality of data at a plurality of addresses sequentially consecutive with corresponding addresses;
A continuous address determination circuit that determines whether an address that is continuous with the read request address is stored in any of the plurality of address setting registers;
When the determination result indicates that there are consecutive addresses, the read request address is stored in an address setting register that stores an address continuous with the read request address without operating the automatic command generation circuit. The data stored in the first word register of the data buffer associated with the address setting register is output to the CPU core, while the determination result indicates that there is no continuous address. The read request address is stored in one of the plurality of address setting registers, and a read command and an address set generated by operating the automatic command generation circuit are issued to the serial flash memory. The read request address whose contents have been updated by is stored. A controller that outputs the data stored in the first word register of the data buffer corresponding to the address setting register to the CPU core;
An interface circuit comprising:
プログラムを実行するCPUコアの要求に基づいて、前記プログラムを格納するシリアルフラッシュメモリにアクセスするインターフェース回路であって、
リセット信号を感知し、前記リセット信号の示す例外要因に応じて、前記例外要因が解除された際に読み出すことになる例外アドレスを出力する、リセット判定回路と、
前記リセット判定回路から出力された前記例外アドレスのデータを読み出すべく、前記シリアルフラッシュメモリに発行するためのリードコマンド及びアドレスセットを生成する、自動コマンド生成回路と、
第1乃至第Nのワードレジスタを有するデータバッファであって、前記データバッファは、前記リードコマンド及びアドレスセットに応じて前記シリアルフラッシュメモリから読み出されたデータと、前記データに続いて前記シリアルフラッシュメモリから自動的に読み出される、前記アドレス信号に対応するアドレスと連続するアドレスのデータと、からなるデータ群によって内容が更新される、データバッファと、
前記自動コマンド生成回路により生成されたリードコマンド及びアドレスセットを前記シリアルフラッシュメモリに発行し、これにより内容の更新された前記データバッファに格納されたデータを、前記例外要因が解除されたときに前記CPUコアに出力する、制御部と、
を備えることを特徴とするインターフェース回路。
An interface circuit that accesses a serial flash memory that stores the program based on a request of a CPU core that executes the program,
A reset determination circuit that senses a reset signal and outputs an exception address to be read when the exception factor is canceled according to the exception factor indicated by the reset signal;
An automatic command generation circuit that generates a read command and an address set to be issued to the serial flash memory in order to read the data of the exception address output from the reset determination circuit;
A data buffer having first to Nth word registers, the data buffer including data read from the serial flash memory in response to the read command and an address set, and the serial flash following the data A data buffer whose contents are updated by a data group consisting of an address corresponding to the address signal and data of a continuous address that is automatically read from the memory;
The read command and the address set generated by the automatic command generation circuit are issued to the serial flash memory, whereby the data stored in the data buffer whose contents have been updated are released when the exception factor is canceled. A control unit for outputting to the CPU core;
An interface circuit comprising:
請求項2乃至4のいずれかに記載のインターフェース回路であって、
前記第1のワードレジスタに格納されたデータが前記CPUコアに出力されると、前記第2乃至第Nのワードレジスタに格納されたデータを前記第1乃至第N−1のワードレジスタにそれぞれ移動する、データバッファ管理回路をさらに備える、
ことを特徴とするインターフェース回路。
The interface circuit according to any one of claims 2 to 4,
When the data stored in the first word register is output to the CPU core, the data stored in the second to Nth word registers is moved to the first to N−1th word registers, respectively. Further comprising a data buffer management circuit;
An interface circuit characterized by that.
JP2008262792A 2008-10-09 2008-10-09 Interface circuit Pending JP2010092342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008262792A JP2010092342A (en) 2008-10-09 2008-10-09 Interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008262792A JP2010092342A (en) 2008-10-09 2008-10-09 Interface circuit

Publications (1)

Publication Number Publication Date
JP2010092342A true JP2010092342A (en) 2010-04-22

Family

ID=42254978

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008262792A Pending JP2010092342A (en) 2008-10-09 2008-10-09 Interface circuit

Country Status (1)

Country Link
JP (1) JP2010092342A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111796771A (en) * 2020-06-30 2020-10-20 深圳大普微电子科技有限公司 Flash memory controller, solid state disk and controller thereof, and flash memory command management method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111796771A (en) * 2020-06-30 2020-10-20 深圳大普微电子科技有限公司 Flash memory controller, solid state disk and controller thereof, and flash memory command management method
CN111796771B (en) * 2020-06-30 2024-01-26 深圳大普微电子科技有限公司 Flash memory controller, solid state disk, controller thereof and flash memory command management method

Similar Documents

Publication Publication Date Title
JP4936506B2 (en) Memory control circuit and memory control method
US20120239873A1 (en) Memory access system and method for optimizing SDRAM bandwidth
US8169852B2 (en) Memory control circuit, control method, and storage medium
US8504743B2 (en) Information processing system and data transfer method
JP5428687B2 (en) Memory control device
JP2009015832A (en) Inter-access arbitration circuit, semiconductor device, and inter-access arbitration method
JP2008033721A (en) Dma transfer control device
WO2022068149A1 (en) Data loading and storage system and method
JP6004463B2 (en) Storage device and control method thereof
JPWO2012081085A1 (en) Interrupt factor management device and interrupt processing system
JP2005196782A (en) Embedded mcu which can be tested at high speed with memory emulation module, and test method therefor
JP2006243811A (en) Dma transfer system and dma transfer method
JP4757582B2 (en) Data transfer operation end detection circuit and semiconductor memory device including the same
JP2000020451A (en) Device and method for processing information and provision method
JP2010092342A (en) Interface circuit
JP6370953B1 (en) Multi-rank SDRAM control method and SDRAM controller
EP2735927A2 (en) Data processing apparatus and method in PLC system
JP5423483B2 (en) Data transfer control device
JP5528939B2 (en) Microcomputer
JP2004038705A (en) Memory controller and memory accessing method
JP2010061498A (en) Memory control device, semiconductor test apparatus and memory control method
JP2008041142A (en) Memory access method
JP2005141682A (en) High-speed memory access control device
JP5226161B2 (en) Semiconductor memory device and information processing system
JP2002366509A (en) Direct memory access controller and its access control method