JP2021174051A - Interface circuit and control method of interface circuit - Google Patents

Interface circuit and control method of interface circuit Download PDF

Info

Publication number
JP2021174051A
JP2021174051A JP2020074713A JP2020074713A JP2021174051A JP 2021174051 A JP2021174051 A JP 2021174051A JP 2020074713 A JP2020074713 A JP 2020074713A JP 2020074713 A JP2020074713 A JP 2020074713A JP 2021174051 A JP2021174051 A JP 2021174051A
Authority
JP
Japan
Prior art keywords
instruction
memory
request
mode
unit
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.)
Granted
Application number
JP2020074713A
Other languages
Japanese (ja)
Other versions
JP7468112B2 (en
Inventor
眞弘 山田
Shinko Yamada
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2020074713A priority Critical patent/JP7468112B2/en
Publication of JP2021174051A publication Critical patent/JP2021174051A/en
Application granted granted Critical
Publication of JP7468112B2 publication Critical patent/JP7468112B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To switch an operation mode of a serial memory while continuing an access to the serial memory.SOLUTION: An interface circuit of controlling an access to a serial memory capable of switching between a serial mode and a parallel mode includes a first instruction holding unit that holds an instruction for access of the serial memory output from a processor executing a program held in the serial memory, and includes: a first interface unit that outputs the instruction held in the first instruction holding unit; a second interface unit that converts a memory access request from the processor into an instruction capable of being received by the serial memory, and outputs the converted instruction; and an arbitration unit that outputs the instruction output by the first or second interface unit to the serial memory, and when conflict occurs between reception of the instruction from the first interface unit and reception of the instruction from the second interface unit, prohibits outputting of the instruction from the second interface unit.SELECTED DRAWING: Figure 5

Description

本発明は、インタフェース回路およびインタフェース回路の制御方法に関する。 The present invention relates to an interface circuit and a method for controlling the interface circuit.

複数組のインタフェース回路とメモリチップとを同一パッケージ内に実装し、外部からの複数のチップセレクト信号のそれぞれに応じて、各インタフェース回路によりメモリチップをアクセス可能にするメモリシステムが開示されている(例えば、特許文献1参照)。この種のメモリシステムでは、シリアルインタフェースのメモリチップを使用することで、メモリチップおよびインタフェース回路を実装する実装基板の面積の増大が抑制される。 A memory system in which a plurality of sets of interface circuits and a memory chip are mounted in the same package and the memory chips can be accessed by each interface circuit according to each of a plurality of chip select signals from the outside is disclosed ( For example, see Patent Document 1). In this type of memory system, the use of a memory chip with a serial interface suppresses an increase in the area of the mounting board on which the memory chip and the interface circuit are mounted.

近時、SPI(Serial Peripheral Interface:登録商標)等のシリアルインタフェースは、1本の信号線を使用してデータを転送するシリアルモードと、複数の信号線を使用してデータを転送するパラレルモードとを有する。また、CPU(Central Processing Unit)等のプロセッサは、様々なインタフェースのシリアルメモリにアクセス可能にするために、インタフェース回路を介してシリアルメモリに接続される。そして、インタフェース回路は、設定レジスタの設定値の変更により、様々な仕様のシリアルメモリのアクセスを制御可能である。 Recently, serial interfaces such as SPI (Serial Peripheral Interface: registered trademark) have a serial mode in which data is transferred using one signal line and a parallel mode in which data is transferred using multiple signal lines. Has. Further, a processor such as a CPU (Central Processing Unit) is connected to the serial memory via an interface circuit in order to make the serial memory of various interfaces accessible. The interface circuit can control access to serial memories having various specifications by changing the set value of the setting register.

この種のシリアルインタフェースを使用してシリアルメモリからプログラム等をリードするCPU(Central Processing Unit)等のプロセッサは、通常、パワーオン時にシリアルモードでプログラムのフェッチを開始する。このため、データ転送レートを高くし、シリアルメモリのアクセス効率を向上するためには、シリアルメモリの動作モードをシリアルモードからパラレルモードに切り替える必要がある。 A processor such as a CPU (Central Processing Unit) that reads a program or the like from a serial memory using this type of serial interface usually starts fetching a program in a serial mode at power-on. Therefore, in order to increase the data transfer rate and improve the access efficiency of the serial memory, it is necessary to switch the operation mode of the serial memory from the serial mode to the parallel mode.

しかしながら、CPUがシリアルメモリからプログラムをフェッチしている最中に動作モードを変更すると、誤動作するおそれがある。誤動作を抑止するためには、例えば、シリアルメモリに格納されているプログラムをRAM等の他のメモリに転送し、他のメモリ上のプログラムをフェッチしている間に、シリアルメモリの動作モードが切り替えられる。この場合、プログラムのRAM等への転送中、シリアルメモリに対するプログラムのフェッチが実行されないため、フェッチ効率が低下する。 However, if the operation mode is changed while the CPU is fetching the program from the serial memory, there is a risk of malfunction. In order to suppress malfunction, for example, the operation mode of the serial memory is switched while the program stored in the serial memory is transferred to another memory such as RAM and the program on the other memory is fetched. Be done. In this case, the fetch efficiency is lowered because the fetch of the program to the serial memory is not executed during the transfer of the program to the RAM or the like.

本発明は、上記の課題に鑑みてなされたものであり、シリアルメモリに対するアクセスを継続しつつ、シリアルメモリの動作モードを切り替えることを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to switch the operation mode of the serial memory while continuing to access the serial memory.

上記技術的課題を解決するため、本発明の一形態のインタフェース回路は、1本の信号線を使用してデータを転送するシリアルモードと複数の信号線を使用してデータを転送するパラレルモードとを切り替え可能なシリアルメモリのアクセスを制御するインタフェース回路であって、前記シリアルメモリに保持されたプログラムを実行するプロセッサから出力される前記シリアルメモリのアクセス用の命令を保持する第1命令保持部を含み、前記第1命令保持部に保持した命令を出力する第1インタフェース部と、前記プロセッサからのメモリアクセス要求を前記シリアルメモリが受け付け可能な命令に変換し、変換した命令を出力する第2インタフェース部と、前記第1インタフェース部または前記第2インタフェース部が出力する命令を前記シリアルメモリに出力し、前記第1インタフェース部からの命令の受信と前記第2インタフェース部からの命令の受信とが競合する場合、前記第2インタフェース部から受信する命令の出力を禁止する調停部と、を有する。 In order to solve the above technical problems, the interface circuit of one embodiment of the present invention includes a serial mode in which data is transferred using one signal line and a parallel mode in which data is transferred using a plurality of signal lines. An interface circuit that controls access to the serial memory that can be switched, and is a first instruction holding unit that holds an instruction for accessing the serial memory output from a processor that executes a program held in the serial memory. A first interface unit that includes and outputs an instruction held in the first instruction holding unit, and a second interface that converts a memory access request from the processor into an instruction that can be accepted by the serial memory and outputs the converted instruction. The unit and the instruction output by the first interface unit or the second interface unit are output to the serial memory, and the reception of the instruction from the first interface unit and the reception of the instruction from the second interface unit conflict with each other. In this case, it has an arbitration unit that prohibits the output of instructions received from the second interface unit.

シリアルメモリに対するアクセスを継続しつつ、シリアルメモリの動作モードを切り替えることすることができる。 It is possible to switch the operation mode of the serial memory while continuing to access the serial memory.

本発明の第1の実施形態に係るSPIコントローラが搭載されるシステムの一例を示すブロック図である。It is a block diagram which shows an example of the system which mounts the SPI controller which concerns on 1st Embodiment of this invention. 図1のシリアルROMのシングルモードでのリード動作の一例を示すタイミング図である。It is a timing diagram which shows an example of the read operation in the single mode of the serial ROM of FIG. 図1のシリアルROMのQPIモードでのリード動作の一例を示すタイミング図である。It is a timing diagram which shows an example of the read operation in the QPI mode of the serial ROM of FIG. 図1のシリアルROMのXIPモードでのリード動作の一例を示すタイミング図である。It is a timing diagram which shows an example of the read operation in the XIP mode of the serial ROM of FIG. 図1のSPIコントローラの一例を示すブロック図である。It is a block diagram which shows an example of the SPI controller of FIG. 図5のシーケンサに設けられるレジスタの設定内容の一例を示す説明図である。It is explanatory drawing which shows an example of the setting contents of the register provided in the sequencer of FIG. 図5のシーケンサと要求調停回路間で授受される信号の一例を示す説明図である。It is explanatory drawing which shows an example of the signal sent and received between the sequencer of FIG. 5 and the demand arbiter circuit. 図5の要求調停回路とプロトコル発生回路間で授受される信号の一例を示す説明図である。It is explanatory drawing which shows an example of the signal sent and received between the request arbitration circuit and the protocol generation circuit of FIG. 図5のプロトコル発生回路の動作の一例を示すタイミング図である。It is a timing diagram which shows an example of the operation of the protocol generation circuit of FIG. 図9のタイミング図において各レジスタに設定される値の一例を示す説明図である。It is explanatory drawing which shows an example of the value set in each register in the timing diagram of FIG. 図5の要求調停回路の動作の一例を示すタイミング図である。It is a timing diagram which shows an example of the operation of the demand arbiter circuit of FIG. 図1のSPIコントローラがシリアルROMをシングルモードからXIPモードに切り替える動作の一例を示すフロー図である。FIG. 5 is a flow chart showing an example of an operation in which the SPI controller of FIG. 1 switches the serial ROM from the single mode to the XIP mode. 図12のフローを実行する場合のメモリマップド用のカレント用制御レジスタの設定例を示す説明図である。It is explanatory drawing which shows the setting example of the current control register for memory-mapped when the flow of FIG. 12 is executed. 図12のフローを実行する場合のメモリマップド用のネクスト用制御レジスタの設定例を示す説明図である。It is explanatory drawing which shows the setting example of the next control register for memory-mapped when the flow of FIG. 12 is executed. 図12のフローを実行する場合のインダイレクト用のカレント用制御レジスタの設定例を示す説明図である。It is explanatory drawing which shows the setting example of the current control register for indirect when the flow of FIG. 12 is executed. 図12のフローを実行する場合のインダイレクト用のネクスト用制御レジスタの設定例を示す説明図である。It is explanatory drawing which shows the setting example of the next control register for indirect when the flow of FIG. 12 is executed. シリアルROMをシングルモードからXIPモードに遷移させる図5のSPIコントローラの動作の一例を示すタイミング図である。FIG. 5 is a timing diagram showing an example of the operation of the SPI controller of FIG. 5 for transitioning the serial ROM from the single mode to the XIP mode. 図17の続きを示すタイミング図である。It is a timing diagram which shows the continuation of FIG. 図18の続きを示すタイミング図である。It is a timing diagram which shows the continuation of FIG. 図19の続きを示すタイミング図である。It is a timing diagram which shows the continuation of FIG. 本発明の第2の実施形態に係るSPIコントローラの一例を示すブロック図である。It is a block diagram which shows an example of the SPI controller which concerns on 2nd Embodiment of this invention. 図21のシーケンサに設けられるレジスタの設定内容の一例を示す説明図である。It is explanatory drawing which shows an example of the setting contents of the register provided in the sequencer of FIG. シリアルROMをシングルモードから命令省略モードに遷移させる図21のSPIコントローラの動作の一例を示すタイミング図である。FIG. 5 is a timing diagram showing an example of the operation of the SPI controller of FIG. 21 for transitioning the serial ROM from the single mode to the instruction omission mode. 図23の続きを示すタイミング図である。It is a timing diagram which shows the continuation of FIG. 図24の続きを示すタイミング図である。It is a timing diagram which shows the continuation of FIG.

以下、図面を参照して実施の形態の説明を行う。なお、各図面において、同一構成部分には同一符号を付し、重複した説明を省略する場合がある。また、信号を示す符号を、端子または信号線を示す符号としても使用する。 Hereinafter, embodiments will be described with reference to the drawings. In each drawing, the same components may be designated by the same reference numerals, and duplicate description may be omitted. In addition, a code indicating a signal is also used as a code indicating a terminal or a signal line.

(第1の実施形態)
図1は、本発明の第1の実施形態に係るSPIコントローラが搭載されるシステムの一例を示すブロック図である。特に限定されないが、図1に示すシステムSYSは、例えば、コピー機能、ファクシミリ機能、プリント機能またはスキャナ機能等を有するMFP(MultiFunction Printer)等の画像形成装置に含まれる。
(First Embodiment)
FIG. 1 is a block diagram showing an example of a system in which the SPI controller according to the first embodiment of the present invention is mounted. Although not particularly limited, the system SYS shown in FIG. 1 is included in, for example, an image forming apparatus such as an MFP (MultiFunction Printer) having a copy function, a facsimile function, a print function, a scanner function, and the like.

システムSYSは、SoC(System on a Chip)100およびシリアルフラッシュメモリ等のシリアルROM200を有する。SoC100は、CPU300、デコーダ400、SPIコントローラ500、RAM(Random Access Memory)600、入出力インタフェース部700およびネットワークインタフェース部800を有する。シリアルROM200は、シリアルメモリの一例であり、SPIコントローラ500は、シリアルROM200のアクセスを制御するインタフェース回路の一例であり、CPU300は、プロセッサの一例である。 The system SYS has a SoC (System on a Chip) 100 and a serial ROM 200 such as a serial flash memory. The SoC 100 includes a CPU 300, a decoder 400, an SPI controller 500, a RAM (Random Access Memory) 600, an input / output interface unit 700, and a network interface unit 800. The serial ROM 200 is an example of a serial memory, the SPI controller 500 is an example of an interface circuit that controls access to the serial ROM 200, and the CPU 300 is an example of a processor.

CPU300は、シリアルROM200に格納されたプログラムをフェッチすることで、動作し、SoC100内の動作の制御と、SoC100に接続される外部装置との通信等を制御する。CPU300は、クロック信号CLKおよびチップセレクト信号/CSをシリアルROM200に出力し、4ビットのデータ信号IO(IO0−IO3)をシリアルROM200に対して入出力する。CPU300からシリアルROM200に出力されるデータ信号IOは、データ信号だけではなく、コマンド信号(命令)またはアドレス信号の場合もある。4ビットのデータ信号IOのうち、何ビットを使用するかは、動作モードに応じて異なる。 The CPU 300 operates by fetching the program stored in the serial ROM 200, and controls the operation in the SoC 100 and the communication with the external device connected to the SoC 100. The CPU 300 outputs the clock signal CLK and the chip select signal / CS to the serial ROM 200, and inputs / outputs the 4-bit data signal IO (IO0-IO3) to the serial ROM 200. The data signal IO output from the CPU 300 to the serial ROM 200 may be not only a data signal but also a command signal (instruction) or an address signal. How many bits of the 4-bit data signal IO are used depends on the operation mode.

なお、CPU300は、シリアルROM200が保持するプログラムをRAM600に展開することなく、シリアルROM200からリードしたプログラム(命令コードおよびオペランド)を直接実行する。プログラムのフェッチ効率を向上するため、例えば、CPU300は、一度フェッチしたプログラムを新しい順に保持する図示しないキャッシュメモリを有してもよい。 The CPU 300 directly executes the program (instruction code and operand) read from the serial ROM 200 without expanding the program held by the serial ROM 200 to the RAM 600. In order to improve the fetch efficiency of the program, for example, the CPU 300 may have a cache memory (not shown) that holds the programs fetched once in the new order.

デコーダ400は、CPU300から出力されるアクセス要求に含まれるアドレスをデコードすることで、アクセス対象のデバイスを特定し、特定したデバイスにアクセスするためのセレクト信号を出力する。アクセス対象のデバイスは、シリアルROM200、RAM600、入出力インタフェース部700に接続される入出力デバイスまたはネットワークインタフェース部800に接続されるネットワークに接続される各種機器である。 The decoder 400 identifies the device to be accessed by decoding the address included in the access request output from the CPU 300, and outputs a select signal for accessing the specified device. The device to be accessed is an input / output device connected to the serial ROM 200, the RAM 600, the input / output interface unit 700, or various devices connected to the network connected to the network interface unit 800.

SPIコントローラ500は、CPU300から出力されるシリアルROM200へのアクセス要求に基づいて、シリアルROM200のアクセスを制御し、例えば、シリアルROM200からプログラムまたはデータをリードする。SPIコントローラ500は、メモリマップドアクセスとインダイレクトアクセスと称するアクセスを実行可能である。 The SPI controller 500 controls access to the serial ROM 200 based on an access request to the serial ROM 200 output from the CPU 300, and reads, for example, a program or data from the serial ROM 200. The SPI controller 500 can perform access called memory-mapped access and indirect access.

メモリマップドアクセスでは、CPU300が発行するリードアクセス要求(リードコマンド)が、SPIコントローラ500によりシリアルROM200のコマンド体系に自動的に変換される。そして、シリアルROM200からリードされたデータは、CPU300がリードコマンドを実行することなく、SPIコントローラ500からCPU300に直接出力される。従って、CPU300は、シリアルROM200のインタフェース仕様を意識することなく、シリアルROM200を、メモリマップ上に割り当てられたメモリとして、アクセスすることができる。例えば、メモリマップドアクセスは、リードアクセスのみに適用される。 In the memory-mapped access, the read access request (read command) issued by the CPU 300 is automatically converted into the command system of the serial ROM 200 by the SPI controller 500. Then, the data read from the serial ROM 200 is directly output from the SPI controller 500 to the CPU 300 without the CPU 300 executing the read command. Therefore, the CPU 300 can access the serial ROM 200 as the memory allocated on the memory map without being aware of the interface specifications of the serial ROM 200. For example, memory-mapped access applies only to read access.

インダイレクトアクセスでは、CPU300によりSPIコントローラ500内のレジスタにライトされた情報に基づいて、SPIコントローラ500がシリアルROM200にライトアクセスまたはリードアクセスする。例えば、インダイレクトアクセスによるライトアクセスは、シリアルROM200の動作モードを切り替えるために使用される。SPIコントローラ500の内部構成の例は、図5で説明する。 In indirect access, the SPI controller 500 makes write access or read access to the serial ROM 200 based on the information written in the register in the SPI controller 500 by the CPU 300. For example, write access by indirect access is used to switch the operating mode of the serial ROM 200. An example of the internal configuration of the SPI controller 500 will be described with reference to FIG.

RAM600は、いわゆるワーキングRAMであり、SoC100の動作に必要な最小限の記憶容量を有する。入出力インタフェース部700は、システムSYSに接続される図示しない入出力装置との間で情報を入出力する。入出力インタフェース部700には、入力装置または出力装置が接続されてもよい。入出力インタフェース部700は、接続される装置毎に設けられてもよい。ネットワークインタフェース部800は、システムSYSに接続される図示しないネットワークを介して他の装置と通信を実行する。 The RAM 600 is a so-called working RAM, and has a minimum storage capacity required for the operation of the SoC 100. The input / output interface unit 700 inputs / outputs information to / from an input / output device (not shown) connected to the system SYS. An input device or an output device may be connected to the input / output interface unit 700. The input / output interface unit 700 may be provided for each device to be connected. The network interface unit 800 communicates with other devices via a network (not shown) connected to the system SYS.

シリアルROM200は、動作モードとして、例えば、シングルモード、デュアルモード、クワッドモード、クワッドパラレル命令モードおよび命令省略モードをサポートしている。シングルモードでは、命令およびアドレスがデータ端子IO0(DI)に入力され、リードデータがデータ端子IO1(DO)から直列に出力される。シングルモードは、1本の信号線(IO0またはIO1)を使用してデータを転送するシリアルモードの一例である。 The serial ROM 200 supports, for example, a single mode, a dual mode, a quad mode, a quad parallel instruction mode, and an instruction omission mode as operation modes. In single mode, instructions and addresses are input to data terminal IO0 (DI) and read data is output in series from data terminal IO1 (DO). The single mode is an example of a serial mode in which data is transferred using one signal line (IO0 or IO1).

デュアルモードでは、命令がデータ端子IO0に入力され、アドレスがデータ端子IO0、IO1に入力され、リードデータがデータ端子IO0、IO1から並列に出力される。クワッドモードでは、命令がデータ端子IO0に入力され、アドレスがデータ端子IO0〜IO3に入力され、リードデータがデータ端子IO0〜IO3から並列に出力される。 In the dual mode, the instruction is input to the data terminals IO0, the address is input to the data terminals IO0 and IO1, and the read data is output in parallel from the data terminals IO0 and IO1. In the quad mode, an instruction is input to the data terminals IO0, an address is input to the data terminals IO0 to IO3, and read data is output in parallel from the data terminals IO0 to IO3.

クワッドパラレル命令モードでは、命令およびアドレスがデータ端子IO0〜IO3に入力され、リードデータがデータ端子IO0〜IO3から並列に出力される。命令省略モードは、命令の入力を省略する動作モードであり、命令省略モードにエンターする以前に入力された命令が引き継がれる。例えば、命令省略モードでは、アドレスがデータ端子IO0〜IO3に入力され、リードデータがデータ端子IO0〜IO3から並列に出力される。デュアルモード、クワッドモードおよび命令省略モードは、複数の信号線を使用してデータを転送するパラレルモードの一例である。 In the quad parallel instruction mode, instructions and addresses are input to data terminals IO0 to IO3, and read data is output in parallel from data terminals IO0 to IO3. The instruction omission mode is an operation mode in which the input of the instruction is omitted, and the instruction input before entering the instruction omission mode is inherited. For example, in the instruction omission mode, the address is input to the data terminals IO0 to IO3, and the read data is output in parallel from the data terminals IO0 to IO3. Dual mode, quad mode, and instruction omission mode are examples of parallel modes in which data is transferred using a plurality of signal lines.

他の動作モードからクワッドパラレル命令モードまたは命令省略モードへの切り替えは、切り替え命令を入力することで行われる。この場合、切り替え命令の入力に使用されるデータ端子IOのビット数は、現在の動作モードに依存する。以下では、クワッドパラレル命令モードは、QPIモードと称し、命令省略モードは、XIPモードと称する。 Switching from another operation mode to the quad parallel instruction mode or the instruction omission mode is performed by inputting a switching instruction. In this case, the number of bits of the data terminal IO used for inputting the switching instruction depends on the current operation mode. Hereinafter, the quad parallel instruction mode is referred to as a QPI mode, and the instruction omission mode is referred to as an XIP mode.

図2は、図1のシリアルROM200のシングルモードでのリード動作の一例を示すタイミング図である。図2および以降のタイミング図において、網掛けはDon't Careを示す。シングルモードでは、チップセレクト信号/CSがロウレベルの期間に、クロック信号CLKに同期して、命令INSおよびアドレスADがシリアルROM200に入力され、シリアルROM200からリードデータRDTが出力される。命令INSおよびアドレスADは、データ端子IO0に入力され、リードデータRDTは、データ端子IO1から出力される。 FIG. 2 is a timing diagram showing an example of the read operation of the serial ROM 200 of FIG. 1 in the single mode. In FIG. 2 and subsequent timing diagrams, shading indicates Don't Care. In the single mode, the instruction INS and the address AD are input to the serial ROM 200 in synchronization with the clock signal CLK while the chip select signal / CS is at the low level, and the read data RDT is output from the serial ROM 200. The instruction INS and the address AD are input to the data terminal IO0, and the read data RDT is output from the data terminal IO1.

図2では、命令INSを03hとしているが、命令コードは03hに限定されない。命令コードの末尾の"h"は、その前の数値が16進数であることを示す。また、命令INS、アドレスAD、リードデータRDTのビット数(それぞれ8ビット、24ビット、32ビット(4バイト))も図示した以外でもよい。以降のタイミング図に示すビット数(バイト数)も同様である。シングルモードでのクロック信号CLKの周波数の上限は、50MHz程度である。クロック信号CLKの周波数は、QPIモードおよびXIPモードに比べて低いため、シングルモードでは、アドレスADとリードデータRDTとの間にダミーサイクルDMY(図3)を挿入しなくてもよい。 In FIG. 2, the instruction INS is set to 03h, but the instruction code is not limited to 03h. The "h" at the end of the instruction code indicates that the number before it is a hexadecimal number. Further, the number of bits of the instruction INS, the address AD, and the read data RDT (8 bits, 24 bits, and 32 bits (4 bytes), respectively) may not be shown. The same applies to the number of bits (number of bytes) shown in the subsequent timing diagrams. The upper limit of the frequency of the clock signal CLK in the single mode is about 50 MHz. Since the frequency of the clock signal CLK is lower than that of the QPI mode and the XIP mode, it is not necessary to insert the dummy cycle DMY (FIG. 3) between the address AD and the read data RDT in the single mode.

図3は、図1のシリアルROM200のQPIモードでのリード動作の一例を示すタイミング図である。チップセレクト信号/CSおよびクロック信号CLKの入力は、図2と同様である。QPIモードでは、4ビットのデータ端子IO0〜IO3が使用される。そして、8ビットの命令INSが2クロックサイクルでシリアルROM200に入力され、24ビットのアドレスADが6クロックサイクルでシリアルROM200に入力される。 FIG. 3 is a timing diagram showing an example of the read operation of the serial ROM 200 of FIG. 1 in the QPI mode. The input of the chip select signal / CS and the clock signal CLK is the same as in FIG. In the QPI mode, 4-bit data terminals IO0 to IO3 are used. Then, the 8-bit instruction INS is input to the serial ROM 200 in 2 clock cycles, and the 24-bit address AD is input to the serial ROM 200 in 6 clock cycles.

アドレスADの入力後、8ビットのモードMDが2クロックサイクルでシリアルROM200に入力され、ダミーサイクルDMYが4クロックサイクル挿入された後、4バイトのリードデータRDTが8クロックサイクルで出力される。 After the address AD is input, the 8-bit mode MD is input to the serial ROM 200 in 2 clock cycles, the dummy cycle DMY is inserted in 4 clock cycles, and then the 4-byte read data RDT is output in 8 clock cycles.

なお、QPIモードは、シングルモードと異なり、4ビットのデータ端子IO0〜IO3を使用して命令をシリアルROM200に供給する。このため、QPIモードを使用するためには、シリアルROM200を予めQPIモードにエンターしておく必要がある。QPIモードへのエンターは、後述する図19に示すFast Read Quad I/O(Enter XIP mode)の命令コード(EBh)を38hとすることで実行される。 In the QPI mode, unlike the single mode, instructions are supplied to the serial ROM 200 using the 4-bit data terminals IO0 to IO3. Therefore, in order to use the QPI mode, it is necessary to enter the serial ROM 200 in the QPI mode in advance. Entering the QPI mode is executed by setting the instruction code (EBh) of the Fast Read Quad I / O (Enter XIP mode) shown in FIG. 19 to be described later to 38h.

図3において、命令INSのEBhは、XIPモードのエンターを示し、モードMDの入力値に応じて、次のチップセレクト信号/CSのアサートサイクルで、命令INSの入力が省略されるか否かが決定される。ダミーサイクルDMYを挿入することで、シリアルROM200内部でのリード動作をダミーサイクルDMYで隠すことができる。これにより、QPIモードでのクロック信号CLKの周波数の上限は、133MHz程度と、シングルモードに比べて高くなる。 In FIG. 3, the EBh of the instruction INS indicates the enter of the XIP mode, and whether or not the input of the instruction INS is omitted in the next chip select signal / CS assert cycle according to the input value of the mode MD. It is determined. By inserting the dummy cycle DMY, the read operation inside the serial ROM 200 can be hidden by the dummy cycle DMY. As a result, the upper limit of the frequency of the clock signal CLK in the QPI mode is about 133 MHz, which is higher than that in the single mode.

図4は、図1のシリアルROM200のXIPモードでのリード動作の一例を示すタイミング図である。例えば、図4に示すXIPモードでのリード動作は、図3のQPIモードでのリード動作において、モードMDが命令INSの省略を示す場合に実行される。 FIG. 4 is a timing diagram showing an example of the read operation of the serial ROM 200 of FIG. 1 in the XIP mode. For example, the read operation in the XIP mode shown in FIG. 4 is executed when the mode MD indicates omission of the instruction INS in the read operation in the QPI mode shown in FIG.

XIPモードでのリード動作は、QPIモードでのリード動作から命令INSが省略されることを除き、QPIモードと同様である。例えば、XIPモードにおいて、モードMDが命令INSの入力の省略を示す場合、次のチップセレクト信号/CSのアサートサイクルでもXIPモードのリード動作が実行される。一方、XIPモードにおいて、モードMDが命令INSの入力を示す場合、次のチップセレクト信号/CSのアサートサイクルでは、命令INSの入力を含むQPIモードのリード動作が実行される。 The read operation in the XIP mode is the same as the read operation in the QPI mode except that the instruction INS is omitted from the read operation in the QPI mode. For example, in the XIP mode, when the mode MD indicates that the input of the instruction INS is omitted, the read operation of the XIP mode is also executed in the assert cycle of the next chip select signal / CS. On the other hand, in the XIP mode, when the mode MD indicates an instruction INS input, the QPI mode read operation including the instruction INS input is executed in the next chip select signal / CS assert cycle.

図5は、図1のSPIコントローラ500の一例を示すブロック図である。SPIコントローラ500は、CPUインタフェース回路510、シーケンサ520、要求調停回路530およびプロトコル発生回路540を有する。CPUインタフェース回路510は、CPUバスを介して図1のCPU300に接続される。 FIG. 5 is a block diagram showing an example of the SPI controller 500 of FIG. The SPI controller 500 includes a CPU interface circuit 510, a sequencer 520, a request arbiter circuit 530, and a protocol generation circuit 540. The CPU interface circuit 510 is connected to the CPU 300 of FIG. 1 via the CPU bus.

CPUインタフェース回路510は、例えば、CPUバスを介してCPU300から受信するリセット信号reset_nをシーケンサ520に出力する。シーケンサ520は、リセット信号reset_nのロウレベル期間にリセットされ、リセット信号reset_nのハイレベルへの変化によりリセットが解除され、動作を開始する。 The CPU interface circuit 510 outputs, for example, a reset signal reset_n received from the CPU 300 via the CPU bus to the sequencer 520. The sequencer 520 is reset during the low level period of the reset signal reset_n, and the reset is released by the change of the reset signal reset_n to the high level, and the operation is started.

シーケンサ520は、メモリマップドアクセス用の制御レジスタ群522と、インダイレクトアクセス用の制御レジスタ群525と、メモリマップドアクセスとインダイレクトアクセスとに共通の共通制御レジスタ528とを有する。制御レジスタ群522は、後述するPhase0〜Phase5で使用される制御レジスタ523と、データバッファ524とを有する。制御レジスタ群525は、後述するPhase0〜Phase5で使用される制御レジスタ526と、データバッファ527とを有する。 The sequencer 520 has a control register group 522 for memory-mapped access, a control register group 525 for indirect access, and a common control register 528 common to memory-mapped access and indirect access. The control register group 522 has a control register 523 used in Phase 0 to Phase 5 described later, and a data buffer 524. The control register group 525 has a control register 526 used in Phase 0 to Phase 5 described later, and a data buffer 527.

制御レジスタ523は、要求調停回路530に出力する命令を保持するカレント用のレジスタと、カレント用のレジスタに転送する命令を保持するネクスト用のレジスタとを有する。制御レジスタ526は、要求調停回路530に出力する命令を保持するカレント用のレジスタと、カレント用のレジスタに転送する命令を保持するネクスト用のレジスタとを有する。制御レジスタ523において、カレント用のレジスタは、第3命令保持部の一例であり、ネクスト用のレジスタは、第2命令保持部の一例である。制御レジスタ526において、カレント用のレジスタは、第1命令保持部の一例である。制御レジスタ群522、525および共通制御レジスタ528の仕様は、図6に示す。 The control register 523 has a current register that holds an instruction to be output to the request arbiter circuit 530 and a next register that holds an instruction to be transferred to the current register. The control register 526 has a current register that holds an instruction to be output to the request arbiter circuit 530 and a next register that holds an instruction to be transferred to the current register. In the control register 523, the current register is an example of the third instruction holding unit, and the next register is an example of the second instruction holding unit. In the control register 526, the current register is an example of the first instruction holding unit. The specifications of the control register group 522, 525 and the common control register 528 are shown in FIG.

シーケンサ520のうち、制御レジスタ群525と、制御レジスタ群525を使用してシリアルROM200のアクセスを制御する要素とは、第1インタフェース部の一例である。シーケンサ520のうち、制御レジスタ群522と、制御レジスタ群522を使用してシリアルROM200のアクセスを制御する要素は、第2インタフェース部の一例である。 In the sequencer 520, the control register group 525 and the element that controls the access of the serial ROM 200 by using the control register group 525 are an example of the first interface unit. The element of the sequencer 520 that controls access to the serial ROM 200 by using the control register group 522 and the control register group 522 is an example of the second interface unit.

シーケンサ520は、CPUインタフェース回路510を介してCPU300から受信するシリアルROM200のアクセス要求に基づいて、シリアルROM200に向けて命令INS等を出力し、シリアルROM200からリードデータRDT等を受信する。 The sequencer 520 outputs an instruction INS or the like to the serial ROM 200 based on an access request of the serial ROM 200 received from the CPU 300 via the CPU interface circuit 510, and receives read data RDT or the like from the serial ROM 200.

要求調停回路530は、シーケンサ520から出力されるメモリマップドアクセス要求と、インダイレクトアクセス要求とを調停し、調停により選択した要求をプロトコル発生回路540に出力する。なお、要求調停回路530は、インダイレクトアクセス要求を受信した場合、メモリマップドアクセス要求の受付をマスクし、インダイレクトアクセス要求をプロトコル発生回路540に出力する。すなわち、要求調停回路530は、インダイレクトアクセス要求は、メモリマップドアクセス要求よりも優先して選択される。要求調停回路530は、調停部の一例である。 The request arbitration circuit 530 arbitrates the memory-mapped access request output from the sequencer 520 and the indirect access request, and outputs the request selected by arbitration to the protocol generation circuit 540. When the request arbitration circuit 530 receives the indirect access request, the request arbitration circuit 530 masks the reception of the memory-mapped access request and outputs the indirect access request to the protocol generation circuit 540. That is, the request arbitration circuit 530 selects the indirect access request in preference to the memory-mapped access request. The required arbiter circuit 530 is an example of the arbitration unit.

プロトコル発生回路540は、図1のシリアルROM200に接続される。プロトコル発生回路540は、要求調停回路530から受信するメモリマップドアクセス要求またはインダイレクトアクセス要求に基づいて、シリアルROM200のインタフェース仕様に応じた信号を生成し、生成した信号をシリアルROM200に出力する。そして、CPU300が発行するアクセス要求に基づいて、シーケンサ520の制御によりシリアルROM200がアクセスされる。 The protocol generation circuit 540 is connected to the serial ROM 200 of FIG. The protocol generation circuit 540 generates a signal according to the interface specifications of the serial ROM 200 based on the memory-mapped access request or the indirect access request received from the request arbitration circuit 530, and outputs the generated signal to the serial ROM 200. Then, the serial ROM 200 is accessed under the control of the sequencer 520 based on the access request issued by the CPU 300.

図6は、図5のシーケンサ520に設けられるレジスタの設定内容の一例を示す説明図である。要求発行レジスタは、メモリマップドアクセス用の制御レジスタ群522と、インダイレクトアクセス用の制御レジスタ群525とにそれぞれ設けられる。シーケンサ520は、要求発行レジスタが"1"に設定された場合、制御レジスタ523(または、526)の設定内容に従ったアクセス要求を要求調停回路530に発行する。シーケンサ520は、アクセス要求を要求調停回路530に発行後、要求発行レジスタを"0"に戻す。 FIG. 6 is an explanatory diagram showing an example of the setting contents of the register provided in the sequencer 520 of FIG. Request issuance registers are provided in the memory-mapped access control register group 522 and the indirect access control register group 525, respectively. When the request issuance register is set to "1", the sequencer 520 issues an access request according to the setting contents of the control register 523 (or 526) to the request arbiter circuit 530. After issuing the access request to the request arbiter circuit 530, the sequencer 520 returns the request issuance register to "0".

なお、メモリマップドアクセスでは、シーケンサ520は、CPU300からのアクセス要求に含まれる情報に応じて、制御レジスタ523にシリアルROM200のアクセス用の情報を設定した後、制御レジスタ群522の要求発行レジスタに"1"をセットする。インダイレクトアクセスでは、制御レジスタ群525の要求発行レジスタは、CPU300が実行するプログラムにより"1"に設定される。要求発行レジスタは、要求発行フラグの一例である。 In the memory-mapped access, the sequencer 520 sets the information for accessing the serial ROM 200 in the control register 523 according to the information included in the access request from the CPU 300, and then sets the request issuance register in the control register group 522. Set "1". In indirect access, the request issuance register of the control register group 525 is set to "1" by the program executed by the CPU 300. The request issuance register is an example of a request issuance flag.

制御レジスタ群522に含まれるシフトイネーブルレジスタ(メモリマップド)は、CPU300により設定される。シーケンサ520は、シフトイネーブルレジスタ(メモリマップド)が"1"の場合、インダイレクトアクセスの実行に応答して、メモリマップド用の制御レジスタ523のネクスト用のレジスタの内容を、カレント用のレジスタにコピーする。シフトイネーブルレジスタ(メモリマップド)は、制御レジスタ526のカレント用からの命令の出力に応答して、制御レジスタ523のネクスト用からカレント用に命令を転送する場合にセットされるシフトフラグの一例である。 The shift enable register (memory-mapped) included in the control register group 522 is set by the CPU 300. When the shift enable register (memory-mapped) is "1", the sequencer 520 sets the contents of the next register of the memory-mapped control register 523 to the current register in response to the execution of indirect access. Copy to. The shift enable register (memory-mapped) is an example of a shift flag set when an instruction is transferred from the next to the current of the control register 523 in response to the output of the instruction from the current of the control register 526. be.

制御レジスタ群525に含まれるシフトイネーブルレジスタ(インダイレクト)は、CPU300により設定される。シーケンサ520は、シフトイネーブルレジスタ(インダイレクト)が"1"の場合、インダイレクトアクセスの実行に応答して、インダイレクト用の制御レジスタ526のネクスト用のレジスタの内容を、カレント用のレジスタにコピーする。 The shift enable register (indirect) included in the control register group 525 is set by the CPU 300. When the shift enable register (indirect) is "1", the sequencer 520 copies the contents of the next register of the indirect control register 526 to the current register in response to the execution of the indirect access. do.

メモリマップドアクセス用の制御レジスタ群522に含まれるデータバッファ524は、シリアルROM200からリードされるリードデータを一時的に蓄積するために使用される。シーケンサ520は、データバッファ524に蓄積したリードデータを、CPU300からのリード要求を受けることなく、CPU300のデータバス幅に合わせてCPU300に出力する。 The data buffer 524 included in the control register group 522 for memory-mapped access is used to temporarily store the read data read from the serial ROM 200. The sequencer 520 outputs the read data stored in the data buffer 524 to the CPU 300 according to the data bus width of the CPU 300 without receiving a read request from the CPU 300.

インダイレクトアクセス用の制御レジスタ群525に含まれるデータバッファ527は、シリアルROM200からリードされるリードデータを蓄積するために使用される。シーケンサ520は、データバッファ527に蓄積したリードデータを、CPU300からのリード要求(ロード命令)に応じて取り出し、取り出したリードデータをCPU300に出力する。すなわち、インダイレクトアクセス用の制御レジスタ群525に保持されたリードデータは、CPU300により明示的にリードされる必要がある。 The data buffer 527 included in the control register group 525 for indirect access is used to store the read data read from the serial ROM 200. The sequencer 520 takes out the read data accumulated in the data buffer 527 in response to a read request (load instruction) from the CPU 300, and outputs the read data taken out to the CPU 300. That is, the read data held in the control register group 525 for indirect access needs to be explicitly read by the CPU 300.

CLKL幅レジスタには、シリアルROM200に供給するクロック信号CLKのロウレベル期間を、例えば、SoC100で使用するシステムクロックの何クロック分にするかが設定される。CLKH幅レジスタは、クロック信号CLKのハイレベル期間を、システムクロックの何クロック分にするかが設定される。 In the CLKL width register, for example, the number of clocks of the system clock used in the SoC100 is set for the low level period of the clock signal CLK supplied to the serial ROM 200. The CLKH width register sets how many clocks of the system clock the high level period of the clock signal CLK is set.

制御レジスタ群522、525の各PhaseN(N=0〜4)の制御レジスタ523、526の構成は、互いに同じである。また、各制御レジスタ523、526のカレント用とネクスト用のレジスタの構成は、互いに同じである。 The configurations of the control registers 523 and 526 of each Phase N (N = 0 to 4) of the control register groups 522 and 525 are the same as each other. Further, the current and next register configurations of the control registers 523 and 526 are the same as each other.

Phase有効レジスタは、"1"の場合、当該Phaseが有効であることを示し、"0"の場合、当該Phaseが無効であることを示す。IO方向レジスタは、"1"の場合、データ信号IOのシリアルROM200への出力を示し、"0"の場合、データ信号IOのシリアルROM200からの入力を示す。なお、図3および図4に示したダミーサイクルDMYのPhaseでは、Phase有効レジスタは、入力でも出力でもない"2"に設定される。 When the Phase valid register is "1", it indicates that the Phase is valid, and when it is "0", it indicates that the Phase is invalid. When the IO direction register is "1", it indicates the output of the data signal IO to the serial ROM 200, and when it is "0", it indicates the input of the data signal IO from the serial ROM 200. In the case of the dummy cycle DMY shown in FIGS. 3 and 4, the Phase valid register is set to "2", which is neither an input nor an output.

IO数レジスタには、有効なデータ端子IOの数より"1"少ない数が設定される。IO数レジスタは、"0"の場合、1ビットが有効であり、"1"の場合、2ビットが有効であり、"3"のとき、4ビットが有効である。 The number of IOs is set to "1" less than the number of valid data terminal IOs. When the IO number register is "0", 1 bit is valid, when it is "1", 2 bits are valid, and when it is "3", 4 bits are valid.

CLK数レジスタには、当該Phaseで使用するクロック信号CLKのクロックサイクル数より"1"少ない数が設定される。例えば、CLK数レジスタが"7"のPhaseは、8クロックサイクルを使用することを示し、CLK数レジスタが"23"のPhaseは、24クロックサイクルを使用することを示す。 A number "1" less than the number of clock cycles of the clock signal CLK used in the Phase is set in the CLK number register. For example, a Phase with a CLK number register of "7" indicates that it uses 8 clock cycles, and a Phase with a CLK number register of "23" indicates that it uses 24 clock cycles.

出力データ選択レジスタは、"0"の場合、データレジスタに保持されたデータをデータ端子IOに出力することを示し、"1"の場合、CPU300からのアクセス要求に含まれるデータをデータ端子IOに出力することを示す。データレジスタは、出力データ選択レジスタが"0"の場合に有効になり、データレジスタに保持されているデータが出力される。 When the output data selection register is "0", it indicates that the data held in the data register is output to the data terminal IO, and when it is "1", the data included in the access request from the CPU 300 is sent to the data terminal IO. Indicates to output. The data register is enabled when the output data selection register is "0", and the data held in the data register is output.

図7は、図5のシーケンサ520と要求調停回路530間で授受される信号の一例を示す説明図である。図8は、図5の要求調停回路530とプロトコル発生回路540間で授受される信号の一例を示す説明図である。 FIG. 7 is an explanatory diagram showing an example of a signal transmitted / received between the sequencer 520 of FIG. 5 and the request arbiter circuit 530. FIG. 8 is an explanatory diagram showing an example of a signal transmitted / received between the request arbitration circuit 530 and the protocol generation circuit 540 of FIG.

図9は、図5のプロトコル発生回路540の動作の一例を示すタイミング図である。図9の信号名の後ろに示す(I)は、入力信号を示し、(O)は、出力信号を示し、(I/O)は、入出力信号を示す。図10は、図9のタイミング図において各レジスタに設定される値の一例を示す説明図である。プロトコル発生回路540は、図10に示すように、Phase0〜Phase4の5セット分の制御パラメータ値を受信し、その制御パラメータに従ってシーケンサとして動作する。 FIG. 9 is a timing diagram showing an example of the operation of the protocol generation circuit 540 of FIG. (I) shown after the signal name in FIG. 9 indicates an input signal, (O) indicates an output signal, and (I / O) indicates an input / output signal. FIG. 10 is an explanatory diagram showing an example of values set in each register in the timing diagram of FIG. As shown in FIG. 10, the protocol generation circuit 540 receives control parameter values for five sets of Phase 0 to Phase 4, and operates as a sequencer according to the control parameters.

図9の(1)において、要求発行信号ACC_REQが論理値1となることでアクセス要求が発行される。この時、パラメータ信号ACC_PARAMは、アクセス要求のパラメータの設定値に確定される。 In (1) of FIG. 9, an access request is issued when the request issuance signal ACC_REF becomes a logical value 1. At this time, the parameter signal ACC_PARAM is fixed to the set value of the parameter of the access request.

(2)において、プロトコル発生回路540は、要求発行信号ACC_REQの論理値1を検知する。この時、ビジー信号ACC_BUSYは論理値0であり、シリアルROM200へのアクセスが可能な状態である。このため、プロトコル発生回路540は、要求許可信号ACC_ACKを論理値1にアサートするとともに、チップセレクト信号/CSを論理値0にアサートし、シリアルROM200へのアクセスを開始する。 In (2), the protocol generation circuit 540 detects the logical value 1 of the request issuance signal ACC_CHECK. At this time, the busy signal ACC_BUSY has a logical value of 0 and is in a state where the serial ROM 200 can be accessed. Therefore, the protocol generation circuit 540 asserts the request permission signal ACC_ACK to the logical value 1 and the chip select signal / CS to the logical value 0 to start access to the serial ROM 200.

プロトコル発生回路540は、最初にPhase0用のパラメータを使用してシリアルROM200へのアクセスを開始する。CLKL幅およびCLKH幅は、1システムクロック(1SYSCLK)を示す値に設定されている。このため、SPIコントローラ500は、システムクロックSYSCLKを2分周したクロック信号CLKを生成する。 The protocol generation circuit 540 first initiates access to the serial ROM 200 using the parameters for Phase 0. The CLKL width and the CLKH width are set to values indicating one system clock (1SYSCLK). Therefore, the SPI controller 500 generates a clock signal CLK obtained by dividing the system clock SYSCLK by two.

Phase0では、1本のデータ端子IOを使用して、データレジスタに設定されているEBhを8クロックサイクルで出力する設定となっている。このため、プロトコル発生回路540は、(11)の期間まで、Fast Read Quad I/O命令を示す03hをシリアルROM200に直列に出力する。 In Phase 0, one data terminal IO is used to output the EBh set in the data register in 8 clock cycles. Therefore, the protocol generation circuit 540 outputs 03h indicating the Fast Read Quad I / O instruction in series to the serial ROM 200 until the period (11).

(11)から(17)までは、Phase1であり、Phase1の設定値に従ってFast Read Quad I/O命令でのアドレスの出力が行われる。なお、メモリマップドアクセスの場合、CPU300からのアクセス要求に含まれるアドレスが使用されるため、出力データ選択レジスタは論理値1に設定される。インダイレクトアクセスの場合、データレジスタ設定の値がアドレスとして使用されるため、出力データ選択レジスタは、論理値0に設定される。 (11) to (17) are Phase 1, and the address is output by the Fast Read Quad I / O instruction according to the set value of Phase 1. In the case of memory-mapped access, since the address included in the access request from the CPU 300 is used, the output data selection register is set to the logical value 1. In the case of indirect access, the value of the data register setting is used as the address, so the output data selection register is set to the logical value 0.

(17)〜(19)までがPhase2であり、Fast Read Quad I/O命令でのモードの論理値がシリアルROM200に出力される。(19)〜(23)までがPhase3であり、Fast Read Quad I/O命令でのダミーサイクルDMYに相当する。ダミーサイクルDMYのクロックサイクル数は、シリアルROM200のインタフェース仕様に合わせて設定される。ダミーサイクルDMYにより、命令(アドレス)をシリアルROM200に出力してからリードデータが出力されるまでの待ち時間が確保される。 (17) to (19) are Phase 2, and the logical value of the mode in the Fast Read Quad I / O instruction is output to the serial ROM 200. (19) to (23) are Phase 3, which corresponds to the dummy cycle DMY in the Fast Read Quad I / O instruction. The number of clock cycles of the dummy cycle DMY is set according to the interface specifications of the serial ROM 200. The dummy cycle DMY secures a waiting time from when the instruction (address) is output to the serial ROM 200 until the read data is output.

(23)〜(31)までがPhase4であり、Fast Read Quad I/O命令において、シリアルROM200からデータが出力される期間である。プロトコル発生回路540は、シリアルROM200から受信したデータを、(25)〜(33)の期間、リードデータ信号ACC_RDとして要求調停回路530を介してシーケンサ520に出力する。また、プロトコル発生回路540は、リードデータ信号ACC_RDによるデータの出力期間に、リードデータ有効信号ACC_RDRDYを論理値1にアサートする。そして、シリアルROM200からリードされたデータは、要求調停回路530を経由して、シーケンサ520のデータバッファ524、527のいずれかに蓄積される。 (23) to (31) are Phase 4, which is a period during which data is output from the serial ROM 200 in the Fast Read Quad I / O instruction. The protocol generation circuit 540 outputs the data received from the serial ROM 200 to the sequencer 520 via the request arbiter circuit 530 as a read data signal ACC_RD during the period (25) to (33). Further, the protocol generation circuit 540 asserts the read data valid signal ACC_RDRDY to the logical value 1 during the data output period by the read data signal ACC_RD. Then, the data read from the serial ROM 200 is stored in any of the data buffers 524 and 527 of the sequencer 520 via the request arbiter circuit 530.

図9に示すPhase1〜Phase4によるシリアルROM200のアクセスの完了後、チップセレクト信号/CSがハイレベルにネゲートされる。例えば、チップセレクト信号/CSは、最終Phase4の終了後、クロック信号CLKの1クロックサイクル(1CLKL幅+1CLKH幅)後にネゲートされる。 After the access to the serial ROM 200 by Phases 1 to 4 shown in FIG. 9 is completed, the chip select signal / CS is negated to a high level. For example, the chip select signal / CS is negated after one clock cycle (1CLKL width + 1CLKH width) of the clock signal CLK after the end of the final Phase 4.

図11は、図5の要求調停回路530の動作の一例を示すタイミング図である。図9と同様に、信号名の後ろに示す(I)は、入力信号を示し、信号名の後ろに示す(O)は、出力信号を示す。また、レジスタ名と同じ名称の信号は、レジスタの設定値と同じ論理値に設定される。 FIG. 11 is a timing diagram showing an example of the operation of the request arbiter circuit 530 of FIG. Similar to FIG. 9, (I) shown after the signal name indicates an input signal, and (O) shown after the signal name indicates an output signal. Further, the signal having the same name as the register name is set to the same logical value as the set value of the register.

まず、(1)において、要求調停回路530は、論理値1にアサートされた要求発行信号MMA_REQをシーケンサ520から受信し、メモリマップドアクセス要求の発生を検出する。また、要求調停回路530は、論理値1にアサートされた要求発行信号IDA_REQをシーケンサ520から受信し、インダイレクトアクセス要求の発生を検出する。すなわち、要求調停回路530は、メモップドアクセス要求とインダイレクトアクセス要求とが同時に発生したことを検出する。 First, in (1), the request arbiter circuit 530 receives the request issuance signal MMA_RQ asserted to the logical value 1 from the sequencer 520, and detects the occurrence of the memory-mapped access request. Further, the request arbiter circuit 530 receives the request issuance signal IDA_RQ asserted to the logical value 1 from the sequencer 520, and detects the occurrence of an indirect access request. That is, the request arbiter circuit 530 detects that the memopped access request and the indirect access request occur at the same time.

(2)において、要求調停回路530は、メモリマップドアクセス要求よりもインダイレクトアクセス要求を優先して調停する。これにより、インダイレクトアクセス要求によるシリアルROM200のアクセス中、メモリマップドアクセス要求によるシリアルROM200のアクセスは禁止される。 In (2), the request arbitration circuit 530 arbitrates the indirect access request in preference to the memory-mapped access request. As a result, while the serial ROM 200 is being accessed by the indirect access request, the access of the serial ROM 200 by the memory-mapped access request is prohibited.

インダイレクトアクセス要求によるアクセスを決定した要求調停回路530は、論理値1にアサートした要求許可信号IDA_ACKをシーケンサ520に出力する。また、要求調停回路530は、シーケンサ520から受信したパラメータ信号IDA_PARAMの内容(IDP_P0)をパラメータ信号ACC_PARAMとしてプロトコル発生回路540に出力する。同時に、要求調停回路530は、論理値1にアサートした要求発行信号ACC_REQをプロトコル発生回路540に出力する。 The request arbiter circuit 530, which determines the access by the indirect access request, outputs the request permission signal IDA_ACK asserted to the logical value 1 to the sequencer 520. Further, the request arbiter circuit 530 outputs the content (IDP_P0) of the parameter signal IDA_PARAM received from the sequencer 520 to the protocol generation circuit 540 as the parameter signal ACC_PARAM. At the same time, the request arbiter circuit 530 outputs the request issuance signal ACC_CHECK asserted to the logical value 1 to the protocol generation circuit 540.

なお、(2)では、要求調停回路530は、論理値1にアサートしたシフト要求信号IDA_NEXTをシーケンサ520に出力し、インダイレクトアクセス要求に対し、ネクストのパラメータをカレントにシフトすることを要求する。これは、シーケンサ520から受信するシフトイネーブル信号IDA_SHIFTが論理値1にアサートされており、かつ、インダイレクトアクセス要求が許可されたためである。論理値1のシフトイネーブル信号IDA_SHIFTは、インダイレクトアクセス要求によるシリアルROM200のアクセス実行に基づいて、インダイレクト用の制御レジスタ526のネクスト用の内容をカレント用にコピーする要求を示す。 In (2), the request arbiter circuit 530 outputs the shift request signal IDA_NEXT asserted to the logical value 1 to the sequencer 520, and requests the indirect access request to shift the next parameter to the current. This is because the shift enable signal IDA_SHIFT received from the sequencer 520 is asserted to the logical value 1 and the indirect access request is permitted. The shift enable signal IDA_SHIFT of the logical value 1 indicates a request to copy the contents for the next of the control register 526 for indirect for the current based on the access execution of the serial ROM 200 by the indirect access request.

(3)において、要求調停回路530は、論理値1にアサートされた要求許可信号ACC_ACKとビジー信号ACC_BUSYとをプロトコル発生回路から受信する。また、要求調停回路530は、パラメータ信号IDA_PARAMの内容(IDP_P1)をシーケンサ520から受信する。 In (3), the request arbiter circuit 530 receives the request permission signal ACC_ACK and the busy signal ACC_BUSY asserted to the logical value 1 from the protocol generation circuit. Further, the request arbiter circuit 530 receives the contents (IDP_P1) of the parameter signal IDA_PARAM from the sequencer 520.

(6)〜(8)の期間において、要求調停回路530は、プロトコル発生回路540を介してシリアルROM200からのリードデータ(RD_IO0、RD_IO1)をリードデータ信号ACC_RDとして受信する。要求調停回路530は、論理値1にアサートされたリードデータ有効信号ACC_RDRDYにより、リードデータ信号ACC_RDが有効なデータであることを検出する。 In the period (6) to (8), the request arbiter circuit 530 receives the read data (RD_IO0, RD_IO1) from the serial ROM 200 as the read data signal ACC_RD via the protocol generation circuit 540. The request arbiter circuit 530 detects that the read data signal ACC_RD is valid data by the read data valid signal ACC_RDRY asserted to the logical value 1.

要求調停回路530は、受信したリードデータ(RD_IO0、RD_IO1)を、(7)〜(9)の期間に、リードデータ信号IDA_RDとしてシーケンサ520に出力する。要求調停回路530は、有効なリードデータ信号IDA_RDを出力している期間、リードデータ有効信号IDA_RDRDYを論理値1にアサートする。リードデータ(RD_IO0、RD_IO1)は、シーケンサ520のインダイレクト用のデータバッファ527に格納される。 The request arbiter circuit 530 outputs the received read data (RD_IO0, RD_IO1) to the sequencer 520 as a read data signal IDA_RD during the period (7) to (9). The request arbiter circuit 530 asserts the read data valid signal IDA_RDRDY to the logical value 1 while the valid read data signal IDA_RD is being output. The read data (RD_IO0, RD_IO1) is stored in the indirect data buffer 527 of the sequencer 520.

(9)において、要求調停回路530は、プロトコル発生回路540からのビジー信号ACC_BUSYのネゲート(論理値0)を検知する。また、要求調停回路530は、このタイミングで、要求発行信号MMA_REQと要求発行信号IDA_REQが共にアサートされていることを検知する。要求調停回路530は、インダイレクトアクセス要求を優先して調停するため、(9)において、要求許可信号IDA_ACKをアサートする。 In (9), the request arbiter circuit 530 detects the negate (logical value 0) of the busy signal ACC_BUSY from the protocol generation circuit 540. Further, the request arbiter circuit 530 detects that both the request issue signal MMA_RQ and the request issue signal IDA_RQ are asserted at this timing. Since the request arbitration circuit 530 preferentially arbitrates the indirect access request, the request permission signal IDA_ACK is asserted in (9).

また、要求調停回路530は、(3)で受信したパラメータ信号IDA_PARAMの内容(IDP_P1)をパラメータ信号ACC_PARAMとしてプロトコル発生回路540に出力し、同時に、要求発行信号ACC_REQをアサートする。これを受け、(10)において、要求調停回路530は、プロトコル発生回路540からアサートされた要求許可信号ACC_ACKとビジー信号ACC_BUSYとを受信する。 Further, the request arbiter circuit 530 outputs the content (IDP_P1) of the parameter signal IDA_PARAM received in (3) to the protocol generation circuit 540 as the parameter signal ACC_PARAM, and at the same time asserts the request issuance signal ACC_CHECK. In response to this, in (10), the request arbiter circuit 530 receives the request permission signal ACC_ACK and the busy signal ACC_BUSY asserted from the protocol generation circuit 540.

また、(10)では、要求調停回路530は、論理値1にアサートしたシフト要求信号MMA_NEXTをシーケンサ520に出力し、メモリマップドアクセス用の制御レジスタ523のネクスト用のパラメータをカレント用にシフトすることを要求する。これは、シーケンサ520から受信するシフトイネーブル信号MMA_SHIFTが論理値1にアサートされており、かつ、インダイレクトアクセス要求が許可されたためである。論理値1のシフトイネーブル信号MMA_SHIFTは、インダイレクトアクセス要求によるシリアルROM200のアクセス実行に基づいて、メモリマップド用の制御レジスタ523のネクスト用の内容をカレント用にコピーする要求を示す。 Further, in (10), the request arbiter circuit 530 outputs the shift request signal MMA_NEXT asserted to the logical value 1 to the sequencer 520, and shifts the next parameter of the memory-mapped access control register 523 to the current value. Demand that. This is because the shift enable signal MMA_SHIFT received from the sequencer 520 is asserted to the logical value 1 and the indirect access request is permitted. The shift enable signal MMA_SHIFT of the logical value 1 indicates a request to copy the contents for the next of the memory-mapped control register 523 for the current based on the access execution of the serial ROM 200 by the indirect access request.

次に、(13)において、要求調停回路530は、プロトコル発生回路540からのビジー信号ACC_BUSYのネゲートを検知する。また、要求調停回路530は、シーケンサ520からの要求発行信号MMA_REQのみのアサートを検知する。この結果、要求調停回路530は、論理値1にアサートした要求許可信号MMA_ACKをプロトコル発生回路540に出力する。 Next, in (13), the request arbiter circuit 530 detects the negate of the busy signal ACC_BUSY from the protocol generation circuit 540. Further, the request arbiter circuit 530 detects the assertion of only the request issuance signal MMA_RQ from the sequencer 520. As a result, the request arbiter circuit 530 outputs the request permission signal MMA_ACK asserted to the logical value 1 to the protocol generation circuit 540.

また、要求調停回路530は、パラメータ信号IDA_PARAMの内容(MMA_P1)をパラメータ信号ACC_PARAMとしてプロトコル発生回路540に出力し、同時に、要求発行信号ACC_REQをアサートする。これを受け、(15)において、要求調停回路530は、プロトコル発生回路540からアサートされた要求許可信号ACC_ACKとビジー信号ACC_BUSYとを受信する。そして、要求調停回路530は、(16)〜(18)において、プロトコル発生回路540を介して、シリアルROM200からのリードデータDR_M10、RD_M11を受信する。 Further, the request arbiter circuit 530 outputs the content (MMA_P1) of the parameter signal IDA_PARAM to the protocol generation circuit 540 as the parameter signal ACC_PARAM, and at the same time asserts the request issuance signal ACC_CHECK. In response to this, in (15), the request arbiter circuit 530 receives the request permission signal ACC_ACK and the busy signal ACC_BUSY asserted from the protocol generation circuit 540. Then, the request arbiter circuit 530 receives the read data DR_M10 and RD_M11 from the serial ROM 200 via the protocol generation circuit 540 in (16) to (18).

図12は、図1のSPIコントローラ500がシリアルROM200をシングルモードからXIPモードに切り替える動作の一例を示すフロー図である。図12は、SPIコントローラ500の制御方法の一例を示す。XIPモードへの切り替えは、CPU300によるシーケンサ520内の制御レジスタ群522、525へのパラメータのライトに基づいて、シーケンサ520により実行される。 FIG. 12 is a flow chart showing an example of an operation in which the SPI controller 500 of FIG. 1 switches the serial ROM 200 from the single mode to the XIP mode. FIG. 12 shows an example of a control method of the SPI controller 500. The switching to the XIP mode is executed by the sequencer 520 based on the parameter writing to the control registers 522 and 525 in the sequencer 520 by the CPU 300.

まず、ステップS10において、CPU300からのライト命令に基づいて、メモリマップドアクセス用の制御レジスタ523のネクスト用に、XIPモードでシリアルROM200からデータをリードするためのパラメータが設定される(Fast Read Quad I/O(XIP))。メモリマップドアクセス用の制御レジスタ523のネクスト用に設定されるパラメータは、XIPモードへのエンター後に最初に実行される命令で使用される。 First, in step S10, a parameter for reading data from the serial ROM 200 in the XIP mode is set for the next of the control register 523 for memory-mapped access based on the write instruction from the CPU 300 (Fast Read Quad). I / O (XIP)). The parameters set for the next of control register 523 for memory-mapped access are used in the first instruction executed after enter into XIP mode.

次に、ステップS12において、CPU300からのライト命令に基づいて、インダイレクトアクセス用の制御レジスタ526のカレント用に、XIPモードにエンターするためのパラメータが設定される(Fast Read Quad I/O(XIP遷移))。例えば、XIPモードへのエンターは、クワッドモードによりシリアルROM200からリードデータをリードするアクセスとともに実施される。 Next, in step S12, a parameter for entering the XIP mode is set for the current of the control register 526 for indirect access based on the write instruction from the CPU 300 (Fast Read Quad I / O (XIP). transition)). For example, the enter to the XIP mode is performed together with the access to read the read data from the serial ROM 200 in the quad mode.

次に、ステップS14において、CPU300からのライト命令に基づいて、シフトイネーブルレジスタ(メモリマップド)に"1"が設定される。次に、ステップS16において、CPU300からのライト命令に基づいて、インダイレクトアクセス用の要求発行レジスタに"1"が設定される。 Next, in step S14, "1" is set in the shift enable register (memory-mapped) based on the write instruction from the CPU 300. Next, in step S16, "1" is set in the request issuance register for indirect access based on the write instruction from the CPU 300.

次に、ステップS18において、シーケンサ520は、ステップS16に基づいて、XIPモードに切り替えるためのリードアクセス要求をシリアルROM200に発行する。そして、シーケンサ520は、XIPモードに切り替えるためのリードアクセス要求に基づいて、シリアルROM200から出力されるリードデータをデータレジスタに格納し、インダイレクトアクセス用の要求発行レジスタを"0"にリセットする。これにより、XIPモードに切り替える動作が完了する。図12に示す動作の完了後、図4に示したXIPモードでのリード動作が繰り返し実行されることで、シリアルROM200からのプログラムのリード効率が向上する。 Next, in step S18, the sequencer 520 issues a read access request for switching to the XIP mode to the serial ROM 200 based on step S16. Then, the sequencer 520 stores the read data output from the serial ROM 200 in the data register based on the read access request for switching to the XIP mode, and resets the request issuing register for indirect access to "0". This completes the operation of switching to the XIP mode. After the operation shown in FIG. 12 is completed, the read operation in the XIP mode shown in FIG. 4 is repeatedly executed, so that the read efficiency of the program from the serial ROM 200 is improved.

図13は、図12のフローを実行する場合のメモリマップド用のカレント用制御レジスタの設定例を示す説明図である。なお、図13に示すメモリマップド用のカレント用制御レジスタは、デフォルト値として設定されている。図13は、図12のフローによる各種レジスタへのパラメータの設定と並行してシングルモードでのリード動作(ノーマルリード)を実行するために、メモリマップド用のカレント用制御レジスタに設定されるパラメータの例を示す。なお、図13に示すレジスタの状態は、シリアルROM200がシングルモードに設定されている場合に、CPU300からのリードアクセス要求に応じて、シーケンサ520により設定する。 FIG. 13 is an explanatory diagram showing an example of setting a memory-mapped current control register when the flow of FIG. 12 is executed. The memory-mapped current control register shown in FIG. 13 is set as a default value. FIG. 13 shows the parameters set in the memory-mapped current control register in order to execute the read operation (normal read) in the single mode in parallel with the parameter setting in the various registers according to the flow of FIG. An example of is shown. The state of the register shown in FIG. 13 is set by the sequencer 520 in response to a read access request from the CPU 300 when the serial ROM 200 is set to the single mode.

図13に示す状態でシリアルROM200に対して実行されるリード動作では、シーケンサ520は、Phase0〜2のレジスタに設定された情報に従って、命令とアドレスをシリアルROM200に出力し、シリアルROM200からリードデータを受信する。そして、図2に示したリード動作が実行される。メモリマップドアクセスでは、シーケンサ520は、シリアルROM200から受信してデータバッファ524に格納したデータを、リードアクセス要求の応答としてCPU300に向けて出力する。 In the read operation executed for the serial ROM 200 in the state shown in FIG. 13, the sequencer 520 outputs an instruction and an address to the serial ROM 200 according to the information set in the registers of Phases 0 to 2, and reads the read data from the serial ROM 200. Receive. Then, the read operation shown in FIG. 2 is executed. In the memory-mapped access, the sequencer 520 outputs the data received from the serial ROM 200 and stored in the data buffer 524 to the CPU 300 as a response to the read access request.

図14は、図12のフローを実行する場合のメモリマップド用のネクスト用制御レジスタの設定例を示す説明図である。図14は、図12のステップS10を実行後のメモリマップドアクセス用の制御レジスタ523のネクスト用の状態を示す。図14に示す状態でシリアルROM200に対して実行されるリード動作の例は、図4に示される。 FIG. 14 is an explanatory diagram showing an example of setting a memory-mapped next control register when the flow of FIG. 12 is executed. FIG. 14 shows the next state of the control register 523 for memory-mapped access after executing step S10 of FIG. An example of a read operation performed on the serial ROM 200 in the state shown in FIG. 14 is shown in FIG.

図15は、図12のフローを実行する場合のインダイレクト用のカレント用制御レジスタの設定例を示す説明図である。図15は、図12のステップS12の実行後のインダイレクトアクセス用の制御レジスタ526のカレント用の状態を示し、シリアルROM200をシングルモードからXIPモードに遷移する場合に設定される。 FIG. 15 is an explanatory diagram showing a setting example of a current control register for indirect when the flow of FIG. 12 is executed. FIG. 15 shows the current state of the control register 526 for indirect access after the execution of step S12 in FIG. 12, and is set when the serial ROM 200 transitions from the single mode to the XIP mode.

図16は、図12のフローを実行する場合のインダイレクト用のネクスト用制御レジスタの設定例を示す説明図である。例えば、インダイレクトアクセス用の制御レジスタ526のネクスト用は、シングルモードからXIPモードへの切り替え時に使用されない。この場合、シーケンサ520は、各レジスタのパラメータを、"0"(無効)または"Don't Care"に維持または設定する。 FIG. 16 is an explanatory diagram showing a setting example of the next control register for indirect when the flow of FIG. 12 is executed. For example, the next control register 526 for indirect access is not used when switching from the single mode to the XIP mode. In this case, the sequencer 520 maintains or sets the parameter of each register to "0" (invalid) or "Don't Care".

図17は、シリアルROM200をシングルモードからXIPモードに遷移させる図5のSPIコントローラ500の動作の一例を示すタイミング図である。図2と同様の動作については、詳細な説明は省略する。図17〜図20に示す動作は、SPIコントローラ500の制御方法の一例を示す。 FIG. 17 is a timing diagram showing an example of the operation of the SPI controller 500 of FIG. 5 for transitioning the serial ROM 200 from the single mode to the XIP mode. A detailed description of the same operation as in FIG. 2 will be omitted. The operations shown in FIGS. 17 to 20 show an example of a control method of the SPI controller 500.

図17に示す動作は、図13に示したパラメータ設定に基づいて、シーケンサ520の制御により実行される。まず、(1)において、リセット信号reset_nが論理値1に解除され、SPIコントローラ500は動作を開始する。以降、リセット信号reset_nはハイレベル"H"に維持される。CPU300は、CPUアクセスに示すように、自分自身の動作のための命令をフェッチするために、メモリマップドアクセス要求(リード要求)を発行する。なお、リセット信号reset_nの解除の直後、シリアルROM200は、シングルモードに設定されている。 The operation shown in FIG. 17 is executed under the control of the sequencer 520 based on the parameter settings shown in FIG. First, in (1), the reset signal reset_n is released to the logical value 1, and the SPI controller 500 starts operation. After that, the reset signal reset_n is maintained at the high level "H". The CPU 300 issues a memory-mapped access request (read request) in order to fetch an instruction for its own operation, as shown in CPU access. Immediately after the reset signal reset_n is released, the serial ROM 200 is set to the single mode.

次に、(2)において、要求調停回路530のステータスは、ロウレベル"L"である。このため、SPIコントローラ500は、CPU300からのメモリマップドアクセス要求により、メモリマップド用の制御レジスタ523の設定値を使用してシングルモードでのリード動作を実行する。ここで、要求調停回路530のステータスを示す要求調停回路ステータスのロウレベル"L"は、インダイレクトアクセス要求が発生しておらず、メモリマップドアクセス要求を禁止していない状態を示す。 Next, in (2), the status of the request arbiter circuit 530 is low level "L". Therefore, the SPI controller 500 executes the read operation in the single mode by using the set value of the memory-mapped control register 523 in response to the memory-mapped access request from the CPU 300. Here, the low level "L" of the request arbitration circuit status indicating the status of the request arbiter circuit 530 indicates a state in which an indirect access request has not occurred and the memory-mapped access request is not prohibited.

メモリマップドアクセス要求に応答するシングルモードでのシリアルROM200のリード動作は、(2)〜(3)で実行され、シリアルROM200からリードされたリードデータRDTがCPU300に返されて、リード動作が完了する。 The read operation of the serial ROM 200 in the single mode in response to the memory-mapped access request is executed in (2) to (3), the read data RDT read from the serial ROM 200 is returned to the CPU 300, and the read operation is completed. do.

CPU300は、後続の命令フェッチのために、(4)でメモリマップドアクセス要求(リード)を発行する。SPIコントローラ500は、このメモリマップドアクセス要求を(5)で許可し、(5)〜(6)において、(2)〜(3)と同様に、シングルモードでのリード動作が実行される。 The CPU 300 issues a memory-mapped access request (read) in (4) for subsequent instruction fetch. The SPI controller 500 permits the memory-mapped access request in (5), and in (5) to (6), the read operation in the single mode is executed in the same manner as in (2) to (3).

次に、図18において、CPU300は、メモリマップド用の制御レジスタ523のネクスト用の設定のためのアクセス要求を発行する。アクセス要求に基づいてシリアルROM200からリードされたメモリマップドアクセス用の各種パラメータは、(7)で、制御レジスタ523のネクスト用に設定される。メモリマップドのネクスト用のパラメータは、XIPモードに切り替わった直後に実行されるXIPモードでのメモリアクセス要求(リード;Fast Read Quad I/O(XIP))である。 Next, in FIG. 18, the CPU 300 issues an access request for setting the next of the memory-mapped control register 523. Various parameters for memory-mapped access read from the serial ROM 200 based on the access request are set in (7) for the next of the control register 523. The parameter for the memory-mapped next is a memory access request (read; Fast Read Quad I / O (XIP)) in the XIP mode that is executed immediately after switching to the XIP mode.

この実施形態では、メモリマップド用の制御レジスタ523のカレント用を使用して、シングルモードでのシリアルROM200のアクセス(プログラムのフェッチ)を実行しながら、XIPモードの命令をネクスト用に予め格納することができる。また、ネクスト用のレジスタからカレント用のレジスタへの命令の転送は、シフトイネーブルレジスタ(メモリマップド)がセットされている場合に、インダイレクト用の制御レジスタ526のカレント用からの命令の出力に基づいて実行される。この結果、図18および図19に示すように、インダイレクトアクセス用の制御レジスタ526のカレントを使用してシリアルROM200をXIPモードに切り替え後、XIPモードの命令を迅速に実行することができる。 In this embodiment, the current version of the memory-mapped control register 523 is used to store the XIP mode instruction in advance for the next while executing the access (program fetch) of the serial ROM 200 in the single mode. be able to. Further, the transfer of the instruction from the next register to the current register is output from the current instruction of the indirect control register 526 when the shift enable register (memory-mapped) is set. It is executed based on. As a result, as shown in FIGS. 18 and 19, after switching the serial ROM 200 to the XIP mode using the current of the control register 526 for indirect access, the instruction of the XIP mode can be executed quickly.

CPU300は、(7)で、インダイレクト用の制御レジスタ526のカレント用の設定のためのアクセス要求を発行する。アクセス要求に基づいてシリアルROM200からリードされたインダイレクトアクセス用の各種パラメータは、(8)で、制御レジスタ526のカレント用に設定される。インダイレクトのカレント用のパラメータは、XIPモードにエンターするためのメモリアクセス要求(リード;Fast Read Quad I/O(Enter XIP mode))である。 In (7), the CPU 300 issues an access request for setting the current of the control register 526 for indirect. Various parameters for indirect access read from the serial ROM 200 based on the access request are set for the current of the control register 526 in (8). The indirect current parameter is a memory access request (read; Fast Read Quad I / O (Enter XIP mode)) for entering the XIP mode.

この実施形態では、メモリマップドアクセス用の制御レジスタ523と、インダイレクトアクセス用の制御レジスタ526とが、互いに独立して設けられる。これにより、制御レジスタ526を使用してXIPモードに切り替わる前に、制御レジスタ526にXIPモード用の命令を予め格納しておくことができる。換言すれば、シリアルROM200をXIPモードに切り替える命令と、切り替え後に実行するXIPモードの命令とを、同時に保持することができる。 In this embodiment, the control register 523 for memory-mapped access and the control register 526 for indirect access are provided independently of each other. As a result, the instruction for the XIP mode can be stored in the control register 526 in advance before switching to the XIP mode using the control register 526. In other words, the instruction for switching the serial ROM 200 to the XIP mode and the instruction for the XIP mode to be executed after the switching can be held at the same time.

この後、CPU300は、後続の命令フェッチのために、メモリマップドアクセス要求(リード)を発行する。SPIコントローラ500は、このメモリマップドアクセス要求を(9)で許可し、(9)〜(10)において、図17と同様に、シングルモードでのリード動作が実行される。(10)において、CPU300は、シフトイネーブルレジスタ(メモリマップド)に"1"を設定する要求を発行し、シフトイネーブルレジスタ(メモリマップド)は、"1"に設定される。 After this, the CPU 300 issues a memory-mapped access request (read) for subsequent instruction fetch. The SPI controller 500 permits the memory-mapped access request in (9), and in (9) to (10), the read operation in the single mode is executed as in FIG. In (10), the CPU 300 issues a request to set the shift enable register (memory-mapped) to "1", and the shift enable register (memory-mapped) is set to "1".

図19の(11)において、CPU300は、インダイレクト用の要求発行レジスタに"1"を設定するアクセス要求を発行する。インダイレクト用の要求発行レジスタは、(12)で"1"に設定される。シーケンサ520は、インダイレクト用の要求発行レジスタの"1"に応答して、制御レジスタ526のカレント用に保持している命令を含むパラメータを要求調停回路530に出力する。要求発行レジスタは、インダイレクトアクセス用とメモリマップドアクセス用とのそれぞれに対応して設けられる。これにより、制御レジスタ526、523毎に保持されるアクセス要求を、CPU300が実行するプログラムの任意の位置で、要求調停回路530を介してシリアルROM200に発行することができる。 In (11) of FIG. 19, the CPU 300 issues an access request for setting "1" in the request issuance register for indirect. The request issuance register for indirect is set to "1" in (12). In response to "1" of the request issuance register for indirect, the sequencer 520 outputs a parameter including an instruction held for the current of the control register 526 to the request arbiter circuit 530. Request issuance registers are provided for indirect access and memory-mapped access, respectively. As a result, the access request held for each of the control registers 526 and 523 can be issued to the serial ROM 200 via the request arbiter circuit 530 at an arbitrary position of the program executed by the CPU 300.

要求調停回路530は、インダイレクトアクセス用の命令の受信に基づいて、メモリマップドアクセス用の命令の選択を禁止し、要求調停回路ステータスをハイレベル"H"に設定する。換言すれば、要求調停回路530は、インダイレクトアクセス用の命令の受信とメモリマップドアクセス用の命令の受信とが競合する場合、メモリマップドアクセス用の命令のシリアルROM200への出力を禁止する。 The request arbiter circuit 530 prohibits the selection of the memory-mapped access instruction based on the reception of the instruction for indirect access, and sets the request arbiter circuit status to the high level "H". In other words, the request arbitration circuit 530 prohibits the output of the memory-mapped access instruction to the serial ROM 200 when the reception of the instruction for indirect access and the reception of the instruction for memory-mapped access conflict with each other. ..

ここで、ハイレベル"H"の要求調停回路ステータスは、インダイレクトアクセス要求が発生していて、メモリマップドアクセス要求が禁止されている状態を示す。要求調停回路ステータスは、要求調停回路530の内部情報であるが、メモリマップドアクセス用の命令の選択の抑止を示す抑止信号として、要求調停回路530の外部に出力されてもよい。 Here, the high level "H" request arbitration circuit status indicates a state in which an indirect access request has occurred and the memory-mapped access request is prohibited. The request arbiter circuit status is internal information of the request arbiter circuit 530, but may be output to the outside of the request arbiter circuit 530 as a suppression signal indicating suppression of selection of a memory-mapped access instruction.

要求調停回路530の調停制御により、例えば、制御レジスタ523に保持されたXIPモードの命令が、制御レジスタ526に保持されたXIPモードへの切り替え命令より前に実行されることを抑止することができる。従って、シリアルROM200の動作モードを切り替える場合に、シリアルROM200の動作モードと、シリアルROM200に供給される命令の動作モードが不一致になることを抑止することができ、シリアルROM200の誤動作を抑止することができる。この結果、システムSYSの誤動作を抑止することができる。 By the arbitration control of the request arbitration circuit 530, for example, it is possible to prevent the XIP mode instruction held in the control register 523 from being executed before the XIP mode switching instruction held in the control register 526. .. Therefore, when switching the operation mode of the serial ROM 200, it is possible to prevent the operation mode of the serial ROM 200 from being inconsistent with the operation mode of the instruction supplied to the serial ROM 200, and it is possible to suppress the malfunction of the serial ROM 200. can. As a result, the malfunction of the system SYS can be suppressed.

要求調停回路530は、調停により選択したインダイレクトアクセス要求(XIPモードにエンターする命令)をシリアルROM200に出力し、インダイレクトアクセス要求の発行をシーケンサ520に通知する。シフトイネーブルレジスタ(メモリマップド)は、図18の(10)で"1"に設定されている。このため、シーケンサ520は、インダイレクトアクセス要求の発行の通知に基づいて、(13)でメモリマップド用の制御レジスタ(ネクスト用)の内容をメモリマップド用の制御レジスタ(カレント用)にコピーする。 The request arbitration circuit 530 outputs an indirect access request (instruction to enter the XIP mode) selected by arbitration to the serial ROM 200, and notifies the sequencer 520 of the issuance of the indirect access request. The shift enable register (memory-mapped) is set to "1" in (10) of FIG. Therefore, the sequencer 520 copies the contents of the memory-mapped control register (for next) to the memory-mapped control register (for current) in (13) based on the notification of the issuance of the indirect access request. do.

シフトイネーブルレジスタ(メモリマップド)を設けることで、インダイレクトアクセス要求の発行に応答して、その後に発行されるメモリマップドアクセス要求を、メモリマップドアクセス用の制御レジスタ523のカレント用に設定することができる。従って、例えば、インダイレクトアクセス要求でのXIPモードの切り替え後に、メモリマップドアクセス要求でのXIPモードの命令を実行することができる。 By providing a shift enable register (memory-mapped), the memory-mapped access request issued thereafter in response to the issuance of the indirect access request is set for the current of the control register 523 for the memory-mapped access. can do. Therefore, for example, after switching the XIP mode in the indirect access request, the XIP mode instruction in the memory-mapped access request can be executed.

これに対して、インダイレクトアクセス要求でのXIPモードの切り替えタイミングが、要求調停回路530による調停順により、連続する複数のメモリマップドアクセス要求のどこの間に挿入されるか分からないと、次に示すような不具合が発生する。例えば、連続するシングルモードでのメモリマップドアクセス要求の間に、XIPモードの切り替え命令が挿入された場合、XIPモードへの切り替え後のシングルモードでのアクセス要求は正常に実行されない。また、連続するXIPモードでのメモリマップドアクセス要求の間に、XIPモードの切り替え命令が挿入された場合、XIPモードへの切り替え前のXIPモードでのアクセス要求は正常に実行されない。 On the other hand, it is not known where the XIP mode switching timing in the indirect access request is inserted between a plurality of consecutive memory-mapped access requests due to the arbitration order by the request arbitration circuit 530, as shown below. Such a problem occurs. For example, if an XIP mode switching instruction is inserted between consecutive memory-mapped access requests in single mode, the single mode access request after switching to XIP mode is not normally executed. Further, when the XIP mode switching instruction is inserted between the continuous memory-mapped access requests in the XIP mode, the access request in the XIP mode before switching to the XIP mode is not normally executed.

(14)〜(15)で、シリアルROM200をXIPモードにエンターさせるFast Read Quad I/O(Enter XIP mode)のアクセスが実行され、シリアルROM200の動作モードは、シングルモードからXIPモードに切り替わる。要求調停回路530は、インダイレクトアクセス要求によるシリアルROM200のアクセスが完了した(16)で、要求調停回路ステータスをロウレベル"L"に戻す。これにより、メモリマップドアクセス要求のシリアルROM200への出力の禁止状態を解除する。メモリマップドアクセス要求の出力禁止の契機となったインダイレクトアクセス要求によるシリアルROM200へのアクセスが完了するまで、メモリマップドアクセス要求の選択を禁止することで、SPIコントローラ500の誤動作を抑止することができる。また、XIPモードに切り替わった後、メモリマップドアクセス要求によりシリアルROM200がアクセスされるまでの待ち時間を最小限にすることができる。 In (14) to (15), the Fast Read Quad I / O (Enter XIP mode) access for entering the serial ROM 200 into the XIP mode is executed, and the operation mode of the serial ROM 200 is switched from the single mode to the XIP mode. The request arbiter circuit 530 returns the request arbiter circuit status to the low level "L" when the access to the serial ROM 200 by the indirect access request is completed (16). As a result, the prohibited state of outputting the memory-mapped access request to the serial ROM 200 is released. By prohibiting the selection of the memory-mapped access request until the access to the serial ROM 200 by the indirect access request that triggered the output prohibition of the memory-mapped access request is completed, the malfunction of the SPI controller 500 is suppressed. Can be done. Further, after switching to the XIP mode, the waiting time until the serial ROM 200 is accessed by the memory-mapped access request can be minimized.

図20において、CPU300は、後続の命令フェッチのために、(17)でメモリマップドアクセス要求(リード)を発行する。SPIコントローラ500は、このメモリマップドアクセス要求を(18)で許可する。この時点で、メモリマップド用の制御レジスタ(カレント用)に、Fast Read Quad I/O(XIP mode)用のパラメータが設定されている。このため、SPIコントローラ500は、(18)〜(19)において、命令コードを発行することなく、XIPモードでシリアルROM200のリード動作を実行する。そして、シリアルROM200からリードされたリードデータRDTがCPU300に返されて、XIPモードでのリード動作が完了する。 In FIG. 20, the CPU 300 issues a memory-mapped access request (read) in (17) for subsequent instruction fetch. The SPI controller 500 permits this memory-mapped access request in (18). At this point, the parameters for Fast Read Quad I / O (XIP mode) are set in the memory-mapped control register (for current). Therefore, in (18) to (19), the SPI controller 500 executes the read operation of the serial ROM 200 in the XIP mode without issuing an instruction code. Then, the read data RDT read from the serial ROM 200 is returned to the CPU 300, and the read operation in the XIP mode is completed.

なお、図17のリセット信号reset_nの解除前に、インダイレクトアクセス用の制御レジスタ526にXIPモードの切り替え用の命令を予め格納し、メモリマップドアクセス用の制御レジスタ523に、XIPモードの命令を予め格納にしてもよい。そして、図17のリセット信号reset_nの解除前に、インダイレクト用の要求発行レジスタに"1"を予め設定してもよい。この場合、リセット信号reset_nの解除後の最初に、CPU300が、シフトイネーブルレジスタ(メモリマップド)に"1"を設定する要求を発行することで、プログラムの最初でXIPモードへの切り替えを実行することができる。この結果、リセット信号reset_nの解除後に複数のシングルモードの命令を実行する場合に比べて、命令の実行効率を向上することができ、システムSYSの性能を向上することができる。 Before the reset signal reset_n in FIG. 17 is released, the instruction for switching the XIP mode is stored in advance in the control register 526 for indirect access, and the instruction for the XIP mode is stored in the control register 523 for memory-mapped access. It may be stored in advance. Then, "1" may be set in advance in the request issuance register for indirect before the reset signal reset_n in FIG. 17 is released. In this case, the CPU 300 first issues a request to set the shift enable register (memory-mapped) to "1" after the reset signal register_n is released, thereby executing the switch to the XIP mode at the beginning of the program. be able to. As a result, the execution efficiency of the instructions can be improved and the performance of the system SYS can be improved as compared with the case where a plurality of single mode instructions are executed after the reset signal reset_n is released.

以上、この実施形態では、インダイレクトアクセス用の制御レジスタ526に保持した命令をシリアルROM200に出力する場合、メモリマップドアクセス用の制御レジスタ523に保持した命令のシリアルROM200への出力を禁止する。これにより、例えば、シリアルROM200の動作モードを切り替える命令を制御レジスタ526から出力する場合に、切り替え後の動作モードの命令が、動作モードの切り替え前にシリアルROM200に出力されることを抑止することができる。 As described above, in this embodiment, when the instruction held in the control register 526 for indirect access is output to the serial ROM 200, the output of the instruction held in the control register 523 for memory-mapped access to the serial ROM 200 is prohibited. Thereby, for example, when the instruction for switching the operation mode of the serial ROM 200 is output from the control register 526, it is possible to prevent the instruction of the operation mode after the switching from being output to the serial ROM 200 before the operation mode is switched. can.

また、切り替える動作モードと異なる動作モードの命令が、動作モードの切り替え後にシリアルROM200に出力されることを抑止することができる。この結果、シリアルROM200の誤動作を抑止することができ、システムSYSの誤動作を抑止することができる。すなわち、シリアルROM200に対するアクセスを継続しつつ、シリアルROM200の動作モードを切り替えることすることができる。 Further, it is possible to prevent the instruction of the operation mode different from the operation mode to be switched from being output to the serial ROM 200 after the operation mode is switched. As a result, the malfunction of the serial ROM 200 can be suppressed, and the malfunction of the system SYS can be suppressed. That is, the operation mode of the serial ROM 200 can be switched while continuing the access to the serial ROM 200.

メモリマップドアクセス用の制御レジスタ523と、インダイレクトアクセス用の制御レジスタ526とが、互いに独立して設けられるため、XIPモードに切り替える前に、制御レジスタ526にXIPモード用の命令を予め格納しておくことができる。換言すれば、シリアルROM200をXIPモードに切り替える命令と、切り替え後に実行するXIPモードの命令とを、同時に保持することができる。 Since the control register 523 for memory-mapped access and the control register 526 for indirect access are provided independently of each other, the instruction for XIP mode is stored in advance in the control register 526 before switching to the XIP mode. Can be kept. In other words, the instruction for switching the serial ROM 200 to the XIP mode and the instruction for the XIP mode to be executed after the switching can be held at the same time.

要求発行レジスタは、インダイレクトアクセス用とメモリマップドアクセス用とのそれぞれに対応して設けられる。これにより、制御レジスタ526、523毎に保持されるアクセス要求を、CPU300が実行するプログラムの任意の位置で、要求調停回路530を介してシリアルROM200に発行することができる。また、新規デバイスに対しても柔軟に対応することができる。 Request issuance registers are provided for indirect access and memory-mapped access, respectively. As a result, the access request held for each of the control registers 526 and 523 can be issued to the serial ROM 200 via the request arbiter circuit 530 at an arbitrary position of the program executed by the CPU 300. In addition, it is possible to flexibly support new devices.

メモリマップドアクセス要求の出力禁止の契機となったインダイレクトアクセス要求によるシリアルROM200へのアクセスが完了するまで、メモリマップドアクセス要求の選択を禁止することで、SPIコントローラ500の誤動作を抑止することができる。また、XIPモードに切り替わった後、メモリマップドアクセス要求によりシリアルROM200がアクセスされるまでの待ち時間を最小限にすることができる。 By prohibiting the selection of the memory-mapped access request until the access to the serial ROM 200 by the indirect access request that triggered the output prohibition of the memory-mapped access request is completed, the malfunction of the SPI controller 500 is suppressed. Can be done. Further, after switching to the XIP mode, the waiting time until the serial ROM 200 is accessed by the memory-mapped access request can be minimized.

シーケンサ520は、メモリマップド用の制御レジスタ523内に、シリアルROM200の発行する命令を保持するカレント用と、カレント用の次に発行する命令を保持するネクスト用とを有する。これにより、カレント用を使用して、シングルモードでのシリアルROM200のアクセス(プログラムのフェッチ)を実行しながら、XIPモードの命令をネクスト用に予め格納することができる。 The sequencer 520 has, in the memory-mapped control register 523, a current one for holding an instruction issued by the serial ROM 200 and a next one for holding an instruction to be issued next for the current one. As a result, the XIP mode instruction can be stored in advance for the next while executing the access (program fetch) of the serial ROM 200 in the single mode by using the current one.

また、ネクスト用のレジスタからカレント用のレジスタへの命令の転送は、シフトイネーブルレジスタ(メモリマップド)がセットされている場合に、インダイレクト用の制御レジスタ526のカレント用からの命令の出力に基づいて実行される。この結果、インダイレクトアクセス用の制御レジスタ526のカレントを使用してシリアルROM200をXIPモードに切り替え後、XIPモードの命令を迅速に実行することができる。 Further, the transfer of the instruction from the next register to the current register is output from the current instruction of the indirect control register 526 when the shift enable register (memory-mapped) is set. It is executed based on. As a result, after switching the serial ROM 200 to the XIP mode using the current of the control register 526 for indirect access, the instruction of the XIP mode can be executed quickly.

(第2の実施形態)
図21は、本発明の第2の実施形態に係るSPIコントローラの一例を示すブロック図である。図5と同様の要素については、同じ符号を付し、詳細な説明は省略する。図21に示すSPIコントローラ500Aは、図5のSPIコントローラ500のシーケンサ520の代わりにシーケンサ520Aを有する。
(Second Embodiment)
FIG. 21 is a block diagram showing an example of the SPI controller according to the second embodiment of the present invention. The same elements as those in FIG. 5 are designated by the same reference numerals, and detailed description thereof will be omitted. The SPI controller 500A shown in FIG. 21 has a sequencer 520A instead of the sequencer 520 of the SPI controller 500 of FIG.

シーケンサ520Aは、図5のシーケンサ520の共通制御レジスタ528の代わりに、共通制御レジスタ528Aを有する。共通制御レジスタ528Aは、共通制御レジスタ528にパラメータリード制御レジスタ529Aを追加している。パラメータリード制御レジスタ529Aは、パラメータリード要求フラグの一例である。パラメータリード制御レジスタ529Aは、シリアルROM200からパラメータをリードしてSPIコントローラ500A内のレジスタに設定する動作のトリガとなるフラグと、バッファとを有する。バッファには、フラグのセット時にシリアルROM200からリードするデータが一時的に蓄積される。 The sequencer 520A has a common control register 528A instead of the common control register 528 of the sequencer 520 of FIG. The common control register 528A adds a parameter read control register 529A to the common control register 528. The parameter read control register 529A is an example of the parameter read request flag. The parameter read control register 529A has a flag and a buffer that trigger an operation of reading a parameter from the serial ROM 200 and setting it in a register in the SPI controller 500A. Data read from the serial ROM 200 is temporarily stored in the buffer when the flag is set.

SPIコントローラ500Aのその他の構成は、図5のSPIコントローラ500の構成と同様である。また、SPIコントローラ500Aを含むシステムSYSの構成は、図1と同様である。 Other configurations of the SPI controller 500A are the same as the configuration of the SPI controller 500 of FIG. The configuration of the system SYS including the SPI controller 500A is the same as that in FIG.

図22は、図21のシーケンサ520Aに設けられるレジスタの設定内容の一例を示す説明図である。図22は、図6の設定内容に、図21のパラメータリード制御レジスタ529Aの設定内容が追加される。パラメータリード制御レジスタ529Aが"1"の場合、SPIコントローラ500Aは、シリアルROM200からリードしたパラメータをメモリマップドアクセス用の制御レジスタ群522およびインダイレクトアクセス用の制御レジスタ群525に格納する。例えば、パラメータリード制御レジスタ529Aは、リセット信号reset_nの解除時(論理値0から論理値1への変化時)に"1"に設定される。SPIコントローラ500は、シリアルROM200から読み出した各種パラメータをレジスタに格納した後、パラメータリード制御レジスタ529Aを"0"にリセットする。 FIG. 22 is an explanatory diagram showing an example of the setting contents of the register provided in the sequencer 520A of FIG. 21. In FIG. 22, the setting contents of the parameter read control register 529A of FIG. 21 are added to the setting contents of FIG. When the parameter read control register 529A is "1", the SPI controller 500A stores the parameters read from the serial ROM 200 in the control register group 522 for memory-mapped access and the control register group 525 for indirect access. For example, the parameter read control register 529A is set to "1" when the reset signal register_n is released (when the logical value changes from 0 to 1). The SPI controller 500 stores the various parameters read from the serial ROM 200 in the register, and then resets the parameter read control register 529A to "0".

図23は、シリアルROM200をシングルモードから命令省略モードに遷移させる図21のSPIコントローラ500Aの動作の一例を示すタイミング図である。図17〜図20と同様の動作については、詳細な説明を省略する。図23〜図25に示す動作は、SPIコントローラ500Aの制御方法の一例を示す。 FIG. 23 is a timing diagram showing an example of the operation of the SPI controller 500A of FIG. 21 for transitioning the serial ROM 200 from the single mode to the instruction omission mode. Detailed description of the same operation as in FIGS. 17 to 20 will be omitted. The operations shown in FIGS. 23 to 25 show an example of a control method of the SPI controller 500A.

この実施形態では、図23の動作の前に、パラメータリード制御レジスタ529Aのフラグに論理値1が設定される。また、インダイレクトアクセス用の制御レジスタ526のカレント用に、シリアルROM200の最終アドレス(例えば、FFFF80h)から128バイトのデータをシングルモードでリードするためのパラメータが格納される。図23〜図25では、パラメータリード制御レジスタ529Aの設定値は、パラメータリード要求信号PReadreqの論理値(図23ではハイレベル"H")として示される。 In this embodiment, the logical value 1 is set in the flag of the parameter read control register 529A before the operation of FIG. 23. Further, for the current of the control register 526 for indirect access, a parameter for reading 128 bytes of data from the final address (for example, FFFF80h) of the serial ROM 200 in a single mode is stored. In FIGS. 23 to 25, the set value of the parameter read control register 529A is shown as a logical value of the parameter read request signal PREAdreq (high level “H” in FIG. 23).

図23の(1)において、リセット信号reset_nが論理値1に解除され、SPIコントローラ500は動作を開始する。パラメータリード制御レジスタ529Aのフラグが論理値1にセットされた場合、CPU300は、CPUアクセスに示すように、自分自身の動作のための命令をフェッチするため(メモリマップドリード)、メモリマップドアクセス要求(リード要求)を発行する。しかしながら、要求調停回路ステータスがハイレベル"H"に設定されているため、メモリマップド側(すなわち、CPU300)からのアクセス要求は、要求調停回路530により禁止される。 In (1) of FIG. 23, the reset signal reset_n is released to the logical value 1, and the SPI controller 500 starts operation. When the flag of the parameter read control register 529A is set to the logical value 1, the CPU 300 fetches an instruction for its own operation (memory-mapped read) as shown in the CPU access, so that the memory-mapped access Issue a request (lead request). However, since the request arbiter circuit status is set to the high level "H", the access request from the memory-mapped side (that is, the CPU 300) is prohibited by the request arbiter circuit 530.

(2)において、SPIコントローラ500Aは、インダイレクトアクセス用の制御レジスタ526のカレント用に保持されたパラメータリード用の命令に従って、シリアルROM200の最終アドレスから128バイトのデータをリードするリード動作を実行する。リード動作は、シングルモードで実行される。例えば、リードするデータが格納されたアドレスと、リードするデータのバイト数とは、CPU300が実行する命令のオペランドに格納されている。SPIコントローラ500Aは、シリアルROM200からリードしたデータを、パラメータリード制御レジスタ529Aのバッファに順次蓄積する。 In (2), the SPI controller 500A executes a read operation of reading 128 bytes of data from the final address of the serial ROM 200 in accordance with a parameter read instruction held for the current of the control register 526 for indirect access. .. The read operation is performed in single mode. For example, the address where the read data is stored and the number of bytes of the read data are stored in the operand of the instruction executed by the CPU 300. The SPI controller 500A sequentially stores the data read from the serial ROM 200 in the buffer of the parameter read control register 529A.

リード動作が完了した(3)において、SPIコントローラ500Aは、バッファに蓄積したデータを、メモリマップドアクセス用の制御レジスタ523のネクスト用とインダイレクトアクセス用の制御レジスタ526のカレント用とに転送する。また、SPIコントローラ500Aは、インダイレクトアクセス用の制御レジスタ群525の要求発行レジスタを"1"に設定する。 When the read operation is completed (3), the SPI controller 500A transfers the data stored in the buffer to the next control register 523 for memory-mapped access and the current control register 526 for indirect access. .. Further, the SPI controller 500A sets the request issuance register of the control register group 525 for indirect access to "1".

図23に示すように、この実施形態では、SPIコントローラ500Aの起動時にシリアルROM200に格納されているデータを、メモリマップドアクセス要求用の命令と、インダイレクトアクセス要求用の命令として読み出すことができる。そして、メモリマップドアクセス用の制御レジスタ523のネクスト用に、Fast Read Quad I/O(XIP)用のパラメータが設定される。インダイレクトアクセス用の制御レジスタ526のカレント用に、Fast Read Quad I/O(Enter XIP mode)用のパラメータが設定される。 As shown in FIG. 23, in this embodiment, the data stored in the serial ROM 200 when the SPI controller 500A is started can be read as an instruction for a memory-mapped access request and an instruction for an indirect access request. .. Then, the parameters for Fast Read Quad I / O (XIP) are set for the next of the control register 523 for memory-mapped access. The parameters for Fast Read Quad I / O (Enter XIP mode) are set for the current of the control register 526 for indirect access.

従って、CPU300により制御レジスタ523、526にパラメータを格納する命令をそれぞれ実行することなく、制御レジスタ523、526にパラメータを格納することができる。この結果、例えば、シングルモードからXIPモードへの切り替えを効率的に実行することができる。シリアルROM200に格納されたデータをパラメータとして制御レジスタ523、526に設定できるため、新規デバイスに対しても柔軟に対応することができる。 Therefore, the parameters can be stored in the control registers 523 and 526 without the CPU 300 executing the instructions for storing the parameters in the control registers 523 and 526, respectively. As a result, for example, switching from the single mode to the XIP mode can be efficiently executed. Since the data stored in the serial ROM 200 can be set in the control registers 523 and 526 as parameters, it is possible to flexibly deal with new devices.

なお、図23では、リセット信号reset_nの解除時に、リード要求信号PReadreqが論理値1にセットされている場合の動作を示すが、リード要求信号PReadreqは、CPU300によるライトアクセスにより論理値1に設定されてもよい。この場合、リード要求信号PReadreqが論理値0の期間、メモリマップドアクセス用の制御レジスタ523のカレント用を使用して、CPU300によるメモリアクセスが実行される。そして、リード要求信号PReadreqの論理値1への変化に基づいて、図23の(2)からの動作が開始される。 Note that FIG. 23 shows the operation when the read request signal PREAdreq is set to the logical value 1 when the reset signal reset_n is released, but the read request signal PREAdreq is set to the logical value 1 by the write access by the CPU 300. You may. In this case, the memory access by the CPU 300 is executed by using the current use of the memory-mapped access control register 523 during the period when the read request signal PREAdreq has a logical value of 0. Then, based on the change of the read request signal PREAdreq to the logical value 1, the operation from (2) of FIG. 23 is started.

図24の(4)において、インダイレクトアクセス用の制御レジスタ群525の要求発行レジスタが"1"に設定されたとき、要求調停回路ステータスは、ハイレベル"H"に維持されている。このため、SPIコントローラ500Aは、インダイレクトアクセス用の制御レジスタ526のカレント用のパラメータに従って、Fast Read Quad I/O(Enter XIP mode)のアクセスを開始する。Fast Read Quad I/O(Enter XIP mode)のアクセスの実行により、シリアルROM200は、シングルモードからXIPモードに遷移する。 In FIG. 24 (4), when the request issuance register of the control register group 525 for indirect access is set to "1", the request arbiter circuit status is maintained at the high level "H". Therefore, the SPI controller 500A starts the Fast Read Quad I / O (Enter XIP mode) access according to the current parameter of the control register 526 for indirect access. By executing the access of Fast Read Quad I / O (Enter XIP mode), the serial ROM 200 transitions from the single mode to the XIP mode.

(5)でFast Read Quad I/O(Enter XIP mode)のアクセスが完了したとき、SPIコントローラ500Aは、要求調停回路ステータスをロウレベル"L"に変化させ、メモリマップド側からのアクセスを許可する。また、SPIコントローラ500Aは、パラメータリード要求信号PReadreqを、ロウレベル"L"に変化させる。この時点で、メモリマップドアクセス用の制御レジスタ523のカレント用には、ネクスト用からFast Read Quad I/O(XIP用)が転送されている。 When the Fast Read Quad I / O (Enter XIP mode) access is completed in (5), the SPI controller 500A changes the request arbiter circuit status to the low level "L" and permits access from the memory-mapped side. .. Further, the SPI controller 500A changes the parameter read request signal PREAdreq to the low level "L". At this point, the Fast Read Quad I / O (for XIP) has been transferred from the next to the current of the control register 523 for the memory-mapped access.

図25の(6)において、メモリマップドアクセス用の制御レジスタ523のカレント用のパラメータに従って、Fast Read Quad I/O(XIP用)のアクセスを開始する。Fast Read Quad I/O(XIP用)のアクセスの実行により、シリアルROM200からリードデータが出力され、(7)でXIPモードのリード動作が完了する。 In FIG. 25 (6), the Fast Read Quad I / O (for XIP) access is started according to the current parameter of the memory-mapped access control register 523. By executing the access of Fast Read Quad I / O (for XIP), the read data is output from the serial ROM 200, and the read operation in the XIP mode is completed in (7).

以上、この実施形態においても、上述した実施形態と同様の効果を得ることができる。さらに、この実施形態では、CPU300により制御レジスタ523、526にパラメータを格納する命令をそれぞれ実行することなく、制御レジスタ523、526にパラメータを格納することができる。この結果、例えば、シングルモードからXIPモードへの切り替えを効率的に実行することができる。シリアルROM200に格納されたデータをパラメータとして制御レジスタ523、526に設定できるため、新規デバイスに対しても柔軟に対応することができる。 As described above, even in this embodiment, the same effect as that of the above-described embodiment can be obtained. Further, in this embodiment, the parameters can be stored in the control registers 523 and 526 without the CPU 300 executing the instructions for storing the parameters in the control registers 523 and 526, respectively. As a result, for example, switching from the single mode to the XIP mode can be efficiently executed. Since the data stored in the serial ROM 200 can be set in the control registers 523 and 526 as parameters, it is possible to flexibly deal with new devices.

以上、各実施形態に基づき本発明の説明を行ってきたが、上記実施形態に示した要件に本発明が限定されるものではない。これらの点に関しては、本発明の主旨をそこなわない範囲で変更することができ、その応用形態に応じて適切に定めることができる。 Although the present invention has been described above based on each embodiment, the present invention is not limited to the requirements shown in the above embodiments. With respect to these points, the gist of the present invention can be changed without impairing the gist of the present invention, and can be appropriately determined according to the application form thereof.

100 SoC
200 シリアルROM
300 CPU
400 デコーダ
500、500A SPIコントローラ
510 CPUインタフェース回路
520、520A シーケンサ
522 制御レジスタ群
523 制御レジスタ
524 データバッファ
525 制御レジスタ群
526 制御レジスタ
527 データバッファ
528、528A 共通制御レジスタ
530 要求調停回路
540 プロトコル発生回路
600 RAM
700 入出力インタフェース部
800 ネットワークインタフェース部
AD アドレス
CLK クロック信号
DMY ダミーサイクル
INS 命令
IO(IO0−IO3) データ端子
MD モード
RDT リードデータ
reset_n リセット信号
SYS システム
100 SoC
200 serial ROM
300 CPU
400 Decoder 500, 500A SPI controller 510 CPU interface circuit 520, 520A Sequencer 522 Control register group 523 Control register 524 Data buffer 525 Control register group 526 Control register 527 Data buffer 528, 528A Common control register 530 Request arbitration circuit 540 Protocol generation circuit 600 RAM
700 I / O interface unit 800 Network interface unit AD address CLK clock signal DMY dummy cycle INS command IO (IO0-IO3) data terminal MD mode RDT read data reset_n reset signal SYSTEM

特開2017−045311号公報JP-A-2017-045311

Claims (8)

1本の信号線を使用してデータを転送するシリアルモードと複数の信号線を使用してデータを転送するパラレルモードとを切り替え可能なシリアルメモリのアクセスを制御するインタフェース回路であって、
前記シリアルメモリに保持されたプログラムを実行するプロセッサから出力される前記シリアルメモリのアクセス用の命令を保持する第1命令保持部を含み、前記第1命令保持部に保持した命令を出力する第1インタフェース部と、
前記プロセッサからのメモリアクセス要求を前記シリアルメモリが受け付け可能な命令に変換し、変換した命令を出力する第2インタフェース部と、
前記第1インタフェース部または前記第2インタフェース部が出力する命令を前記シリアルメモリに出力し、前記第1インタフェース部からの命令の受信と前記第2インタフェース部からの命令の受信とが競合する場合、前記第2インタフェース部から受信する命令の出力を禁止する調停部と、
を有することを特徴とするインタフェース回路。
An interface circuit that controls access to a serial memory that can switch between a serial mode that transfers data using a single signal line and a parallel mode that transfers data using multiple signal lines.
A first instruction holding unit that holds an instruction for accessing the serial memory output from a processor that executes a program held in the serial memory, and outputs an instruction held in the first instruction holding unit. Interface part and
A second interface unit that converts a memory access request from the processor into an instruction that can be accepted by the serial memory and outputs the converted instruction.
When the instruction output by the first interface unit or the second interface unit is output to the serial memory, and the reception of the instruction from the first interface unit and the reception of the instruction from the second interface unit conflict with each other. An arbitration unit that prohibits the output of instructions received from the second interface unit, and
An interface circuit characterized by having.
前記第1命令保持部に保持される命令は、前記シリアルメモリを前記シリアルモードから前記パラレルモードに切り替える命令であること
を特徴とする請求項1に記載のインタフェース回路。
The interface circuit according to claim 1, wherein the instruction held in the first instruction holding unit is an instruction for switching the serial memory from the serial mode to the parallel mode.
前記第1インタフェース部は、
前記プロセッサによりセットされる要求発行フラグを有し、
前記要求発行フラグのセットに応答して、前記第1命令保持部に保持された命令を出力すること
を特徴とする請求項1または請求項2に記載のインタフェース回路。
The first interface unit is
Has a request issuance flag set by the processor
The interface circuit according to claim 1 or 2, wherein an instruction held in the first instruction holding unit is output in response to the set of the request issuing flags.
前記第1インタフェース部は、
前記インタフェース回路の起動時にセットされる要求発行フラグを有し、
前記要求発行フラグがセットされている場合、前記第1命令保持部に予め保持された命令を出力すること
を特徴とする請求項1または請求項2に記載のインタフェース回路。
The first interface unit is
It has a request issuance flag that is set when the interface circuit is started.
The interface circuit according to claim 1 or 2, wherein when the request issuance flag is set, an instruction held in advance is output to the first instruction holding unit.
前記第2インタフェース部から受信する命令の出力を禁止した前記調停部は、前記シリアルメモリに出力した前記第1インタフェース部からの命令による前記シリアルメモリの動作が完了するまで、前記第2インタフェース部から受信する命令の出力を禁止すること
を特徴とする請求項3または請求項4に記載のインタフェース回路。
The arbitration unit, which prohibits the output of the instruction received from the second interface unit, is used from the second interface unit until the operation of the serial memory by the instruction from the first interface unit output to the serial memory is completed. The interface circuit according to claim 3 or 4, wherein the output of the received instruction is prohibited.
パラメータリード要求フラグを有し、
前記第1インタフェース部は、前記インタフェース回路の起動時に前記パラメータリード要求フラグがセットされている場合、前記第1命令保持部に格納された命令の実行に従って前記シリアルメモリから読み出されたデータを、前記シリアルメモリのアクセス用の命令として前記第1命令保持部に格納すること
を特徴とする請求項1ないし請求項5のいずれか1項に記載のインタフェース回路。
Has a parameter read request flag
When the parameter read request flag is set at the time of starting the interface circuit, the first interface unit receives data read from the serial memory according to the execution of the instruction stored in the first instruction holding unit. The interface circuit according to any one of claims 1 to 5, wherein the command is stored in the first instruction holding unit as an instruction for accessing the serial memory.
前記第2インタフェース部は、
前記変換した命令を保持する第2命令保持部と、
前記第2命令保持部から前記変換した命令が転送される第3命令保持部と、を有し、
前記第1インタフェース部は、前記第1命令保持部に保持された命令の出力に応答して前記第2命令保持部から前記第3命令保持部に前記変換した命令を転送する場合にセットされるシフトフラグを有すること
を特徴とする請求項1ないし請求項6のいずれか1項に記載のインタフェース回路。
The second interface unit is
A second instruction holding unit that holds the converted instruction, and
It has a third instruction holding unit to which the converted instruction is transferred from the second instruction holding unit.
The first interface unit is set when the converted instruction is transferred from the second instruction holding unit to the third instruction holding unit in response to the output of the instruction held in the first instruction holding unit. The interface circuit according to any one of claims 1 to 6, wherein the interface circuit has a shift flag.
1本の信号線を使用してデータを転送するシリアルモードと複数の信号線を使用してデータを転送するパラレルモードとを切り替え可能なシリアルメモリのアクセスを制御する、第1インタフェース部と第2インタフェース部と調停部とを含むインタフェース回路の制御方法であって、
前記第1インタフェース部が、前記シリアルメモリに保持されたプログラムを実行するプロセッサから出力される前記シリアルメモリのアクセス用の命令を保持する第1命令保持部に保持した命令を出力し、
前記第2インタフェース部が、前記プロセッサからのメモリアクセス要求を前記シリアルメモリが受け付け可能な命令に変換し、変換した命令を出力し、
前記調停部が、前記第1インタフェース部または前記第2インタフェース部が出力する命令を前記シリアルメモリに出力し、前記第1インタフェース部からの命令の受信と前記第2インタフェース部からの命令の受信とが競合する場合、前記第2インタフェース部から受信する命令の出力を禁止する
ことを特徴とするインタフェース回路の制御方法。
A first interface unit and a second interface unit that control access to a serial memory that can switch between a serial mode in which data is transferred using one signal line and a parallel mode in which data is transferred using multiple signal lines. It is a control method of an interface circuit including an interface unit and an arbitration unit.
The first interface unit outputs the instruction held in the first instruction holding unit that holds the instruction for accessing the serial memory output from the processor that executes the program held in the serial memory.
The second interface unit converts the memory access request from the processor into an instruction that can be accepted by the serial memory, and outputs the converted instruction.
The arbitration unit outputs a command output by the first interface unit or the second interface unit to the serial memory, and receives an instruction from the first interface unit and a command from the second interface unit. A method for controlling an interface circuit, which prohibits the output of an instruction received from the second interface unit when the two interfaces conflict with each other.
JP2020074713A 2020-04-20 2020-04-20 INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application Active JP7468112B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020074713A JP7468112B2 (en) 2020-04-20 2020-04-20 INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020074713A JP7468112B2 (en) 2020-04-20 2020-04-20 INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application

Publications (2)

Publication Number Publication Date
JP2021174051A true JP2021174051A (en) 2021-11-01
JP7468112B2 JP7468112B2 (en) 2024-04-16

Family

ID=78281793

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020074713A Active JP7468112B2 (en) 2020-04-20 2020-04-20 INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application

Country Status (1)

Country Link
JP (1) JP7468112B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116974963A (en) * 2023-09-25 2023-10-31 上海云豹创芯智能科技有限公司 Device for accessing memory, method, chip and storage medium thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100546403B1 (en) 2004-02-19 2006-01-26 삼성전자주식회사 Serial flash memory controller having reduced possession time of memory bus
US8880785B2 (en) 2012-09-28 2014-11-04 Atmel Corporation Microcontroller with integrated interface enabling reading data randomly from serial flash memory
JP2018055318A (en) 2016-09-28 2018-04-05 富士ゼロックス株式会社 Electronic apparatus and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116974963A (en) * 2023-09-25 2023-10-31 上海云豹创芯智能科技有限公司 Device for accessing memory, method, chip and storage medium thereof
CN116974963B (en) * 2023-09-25 2023-12-15 上海云豹创芯智能科技有限公司 Device for accessing memory, method, chip and storage medium thereof

Also Published As

Publication number Publication date
JP7468112B2 (en) 2024-04-16

Similar Documents

Publication Publication Date Title
US5613078A (en) Microprocessor and microprocessor system with changeable effective bus width
JP3573614B2 (en) Image processing apparatus and image processing system
JP2010039767A (en) Built-in system
JP7468112B2 (en) INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application
JP4056768B2 (en) Microcomputer, cache memory control method, and clock control method
US20030181994A1 (en) Microprocessor performing efficient external bus access
TWI471731B (en) Memory access method, memory access control method, spi flash memory device and spi controller
JPH1083349A (en) Cache memory bank controller
JPH0883237A (en) Data processor
JPH0855097A (en) Data processing system and its memory access method
JP2004118300A (en) Dma controller
JP3206656B2 (en) Prefetch device and prefetch method on bus
JP2007108882A (en) Memory controller, memory-controlling method, and information processing device
JP2000047930A (en) Data processor
JP3323751B2 (en) Printing equipment
JPH0449457A (en) Direct memory access transfer control device
JPH10247150A (en) Data processing system
JPH10116244A (en) Method and device for data transfer
JP2003228546A (en) Control device for direct memory access
JP2000172553A (en) Data processor
JP5949330B2 (en) Information processing apparatus and information processing method
JP2003076559A (en) Information processor
JPH0895800A (en) Cpu control circuit
JPH0651979A (en) Microprocessor for peripheral unit control
JP2002269026A (en) Microcomputer device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231219

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240219

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240305

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240318