JP2013175014A - Address byte count determination device, address byte count determination method, program, and semiconductor device - Google Patents
Address byte count determination device, address byte count determination method, program, and semiconductor device Download PDFInfo
- Publication number
- JP2013175014A JP2013175014A JP2012038512A JP2012038512A JP2013175014A JP 2013175014 A JP2013175014 A JP 2013175014A JP 2012038512 A JP2012038512 A JP 2012038512A JP 2012038512 A JP2012038512 A JP 2012038512A JP 2013175014 A JP2013175014 A JP 2013175014A
- Authority
- JP
- Japan
- Prior art keywords
- address
- data
- data string
- bytes
- output
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、外部接続するSPI(Serial Peripheral Interface)規格のシリアルメモリのアドレスバイト数を判定するアドレスバイト数判定方法とその判定装置に関し、例えば、不揮発性シリアルメモリのアドレスバイト数判定方法とその判定装置に関する。 The present invention relates to an address byte number determination method for determining the number of address bytes in an externally connected SPI (Serial Peripheral Interface) standard serial memory and a determination apparatus thereof, for example, a method for determining the number of address bytes in a nonvolatile serial memory and the determination thereof. Relates to the device.
近年、コスト削減は、ASIC(Application Specific Integrated Circuit)搭載製品の重要課題となっている。例えば、ASICとROM(Read Only Memory)デバイスの端子数や実装面積に関わるコスト削減のために、端子数の少ない不揮発性シリアルメモリがブートROMとして搭載されるケースが増えている。シリアルメモリは、幅広い容量バリエーションと端子位置互換を特徴としており、ASICや実装基板が完成した後からでも製品別に最適容量のシリアルメモリ・デバイスを選択することが可能である。これは、ASICの流用による開発コストや、製品コストの削減に貢献する。例えば、製品開発の過程では、ソフトウェアの完成度が向上するまでの期間において、ブートROMとして、容量に余裕を持たせたEEPROM(Electrically Erasable Programmable Read Only Memory)やFLASH等の書き換え可能な不揮発性シリアルメモリが用いられる。そして、ソフトウェアが完成した後に、不揮発性シリアルメモリが備えるプロテクト機能によってソフトウェア破壊防止が図られる。さらに、必要最小限の小容量不揮発性シリアルメモリや安価なマスクROM型のシリアルメモリへの切り替えによるコスト削減が図られる。 In recent years, cost reduction has become an important issue for products equipped with ASIC (Application Specific Integrated Circuit). For example, in order to reduce costs related to the number of terminals and mounting area of ASIC and ROM (Read Only Memory) devices, a case where a nonvolatile serial memory with a small number of terminals is mounted as a boot ROM is increasing. The serial memory is characterized by a wide range of capacity variations and terminal position compatibility, and it is possible to select a serial memory device having the optimum capacity for each product even after the ASIC or mounting board is completed. This contributes to a reduction in development cost and product cost due to diversion of ASIC. For example, in the product development process, rewritable non-volatile serial such as EEPROM (Electrically Erasable Programmable Read Only Memory) or FLASH with sufficient capacity as boot ROM in the period until software perfection is improved Memory is used. After the software is completed, software destruction is prevented by a protect function provided in the nonvolatile serial memory. Furthermore, the cost can be reduced by switching to the minimum necessary small-capacity nonvolatile serial memory or an inexpensive mask ROM type serial memory.
しかしながら、不揮発性シリアルメモリのアドレスバイト数には1/2/3等の種類がある。このため、ASIC側から接続されたシリアルメモリに合わせた幅のアドレスを出力しなければ、シリアルメモリから正しい内容を読み出すことが出来ない。また、アドレスバイト数を外部端子入力で選択すると、端子コストの増加を招く。さらに、従来、アドレスバイト数3であったシリアルFLASHにおいても、近年、アドレスバイト数4のデバイスが出現してきている。このため、同一のASICを搭載する製品であっても、製品毎に最適なアドレスバイト数が異なるという状況の増加が予想される。
そこで、利用者が製品毎に最適な(安価な)不揮発性シリアルメモリを選択可能とすることが望まれる。具体的には、アドレスバイト数を選択するための端子コストが発生しないように、不揮発性シリアルメモリのアドレスバイト数を判定する手段が必要とされている。
However, the number of address bytes of the non-volatile serial memory includes a type such as 1/2/3. For this reason, the correct contents cannot be read from the serial memory unless an address having a width corresponding to the serial memory connected from the ASIC side is output. Further, if the number of address bytes is selected by external terminal input, the terminal cost increases. Furthermore, in the serial FLASH that conventionally has 3 address bytes, devices with 4 address bytes have recently appeared. For this reason, even if the products are equipped with the same ASIC, an increase in the situation where the optimum number of address bytes differs for each product is expected.
Therefore, it is desired that the user can select an optimal (inexpensive) nonvolatile serial memory for each product. Specifically, a means for determining the number of address bytes of the nonvolatile serial memory is required so that a terminal cost for selecting the number of address bytes does not occur.
シリアルメモリのアドレスバイト数を判定する手段として、例えば、特許文献1には、
SPIに準拠したシリアルメモリにアクセスして、該シリアルメモリのメモリサイズを自
動的に判別する方法が開示されている。
また、特許文献2には、EEPROMの記憶容量が事前に分からない場合にも、入手したEEPROMの記憶容量を自動的に判別でき、その判別結果を利用することにより、アクセスシーケンスを決定することのできるEEPROMの記憶容量判別装置およびEEPROMの記憶容量判別方法が開示されている。特許文献2では、起動時処理において、第1のタイミングを開始タイミングとしてシリアルインタフェースがシリアルに受信するデータが所定のデータに一致するか否かを判断し、データ不一致の場合には、第2のタイミングを開始タイミングとしてシリアルインタフェースがシリアルに受信するデータが所定のデータに一致するか否かを判断する手法を用いる。
さらに、特許文献3には、スレーブデバイスのアドレスビット長に依存せずにブートアップ処理を行うことができる情報処理装置が開示されている。特許文献3では、EEPROMにアドレスデータを入力して、EEPROMの出力レベルが所定の値となるときまでにEEPROMに入力したアドレスデータのビット数をカウントする手法を用いる。
As means for determining the number of address bytes of the serial memory, for example,
A method of accessing a serial memory compliant with SPI and automatically determining the memory size of the serial memory is disclosed.
Further, in
Furthermore,
例えば、特許文献1は、シリアルメモリ、特にSPI準拠のシリアルメモリにおいて、アクセスモード、すなわちメモリが必要とするアドレスバイト数を自動的に判別することができる判別方法の提供を目的としている。
図22Aは、特許文献1のシリアルメモリのアクセスモード自動判別装置が、SPIに準拠したインタフェースをもつシリアルメモリへアクセスする接続配線図であり、図22Bは、そのアクセスモード判定処理フローチャートである。
For example,
FIG. 22A is a connection wiring diagram in which the serial memory access mode automatic determination device of
図22Aに示すように、本判別装置は、CPU2とプルアップ抵抗3で構成され、図22Aの点線で囲まれたメモリサイズが未知のシリアルメモリ1のDO、DI、SK、CSポートは、CPU2のそれぞれ対応するI/Oピンに接続される。そして、DOポートは、プルアップ抵抗3で電源回路に接続されて、常時電位がハイ・レベルになっている。この回路構成において、CPU2がメモリ1のメモリサイズを判定する手順は、図22Bのフローチャートに示されるように、初期データ書き込み処理(f1)、判定データ読み出し処理(f2)、及び判定処理(f3)の手順を順に行うことで実現される。
初期データ書き込み処理(f1)においては、CSポートをハイ・レベルからロウ・レベルに設定した後、CPU2からDIポートに、書き込みコマンドに続いて4バイトのゼロ(00h)が出力される。
As shown in FIG. 22A, this discrimination device is composed of a
In the initial data write process (f1), after the CS port is set from high level to low level, 4-byte zero (00h) is output from the
図23Aは、判定データ読み出し処理(f2)におけるアクセスモードごとの読み出しデータの一覧表であり、図23Bは、判定処理の詳細フローチャートである。
判定データ読み出し処理(f2)において、読み出しコマンドに続いて1番目、2番目のゼロがメモリ1に入力されると、2番目のゼロと引き換えにメモリがアクセスモード1の場合には、メモリの0番地からデータゼロ(00h)がDOポートに読み出される。
一方、メモリがアクセスモード2の場合には、1番目と2番目のゼロは、アドレスの上位と下位を指定し、また、メモリがアクセスモード3の場合には、1番目と2番目のゼロは、アドレスの上位及び中位を指定することになる。
アクセスモード2、3の場合においては、必要なバイト数のアドレス(アクセスモード2では2バイト、アクセスモード3では3バイト)がメモリに入力されないうちは、図22Aに示すDOポートに接続されたプルアップ抵抗3よって、DOポートの電位がハイに吊り上げられ、16進表現でFFhの状態のデータが出力される。
このように、2番目のゼロと引き換えにDOポートから得られるデータを第1の判定データとする。
FIG. 23A is a list of read data for each access mode in the determination data read process (f2), and FIG. 23B is a detailed flowchart of the determination process.
In the determination data read process (f2), when the first and second zeros are input to the
On the other hand, when the memory is in
In the case of the
Thus, data obtained from the DO port in exchange for the second zero is used as the first determination data.
同様にして、3番目のゼロ及び4番目のゼロと引き換えにDOポートより読み出されるデータを、それぞれ第2、第3判定データとする。
図23Bは、判定処理の詳細フローチャートである。該判定処理は、第1〜第3判定データをもとに実施され、同図に示されるように、第1の判定データがゼロ(00h)であれば、アクセスモード1のメモリと判定される。そして、第1の判定データがゼロ以外で第2の判定データがゼロ(00h)であれば、アクセスモード2、第2の判定データもゼロ以外で第3の判定データがゼロ(00h)であれば、アクセスモード3と判定される。第3の判定データもゼロでなければメモリの故障と判定される。
Similarly, data read from the DO port in exchange for the third zero and the fourth zero are set as second and third determination data, respectively.
FIG. 23B is a detailed flowchart of the determination process. The determination process is performed based on the first to third determination data. As shown in the figure, if the first determination data is zero (00h), the memory is determined as the
しかしながら、特許文献1では、初期データ書き込み処理(ステップf1)によって不揮発性シリアルメモリの一部(0番地)に特定の値(0)を書き込む必要がある。このため、マスクROMタイプやプロテクト処置が施された書き換え不能な不揮発性シリアルメモリに対しては、アドレスバイト数の自動判定ができないという問題がある。加えて、上述した特許文献2、3の判別方法においても、シリアルメモリから受信する値が、所定の値となることを用いている判別方法であるため、同様の問題が生じる。
このように、シリアルメモリのアドレスバイト数を判定するには、判定用データをシリアルメモリに書き込む必要があった。
その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。
However, in
As described above, in order to determine the number of address bytes of the serial memory, it is necessary to write determination data to the serial memory.
Other problems and novel features will become apparent from the description of the specification and the accompanying drawings.
一実施態様のアドレスバイト数判定装置、その方法及びプログラムは、例えば、次のような手順によりアドレスバイト数を判定する。まず、シリアルメモリのアドレスの最大バイト数を仮定する。前記最大バイト数を有する第1アドレスをシリアルメモリへ出力し、前記第1アドレスの出力に応じて、第1データ列として、最初に取得する第1先頭データ値から、前記第1先頭データ値と異なる第1末尾データ値が検出されるまでのデータ列を前記シリアルメモリから読み出す。続いて、前記第1アドレスの特定ビットを反転した第2アドレスを前記シリアルメモリへ出力し、前記第2アドレスの出力に応じて、第2データ列として、最初に取得する第2先頭データ値から、前記第2先頭データ値と異なる第2末尾データ値が検出されるまでのデータ列を前記シリアルメモリから読み出す。そして、前記第1データ列と前記第2データ列とを比較し、前記第1データ列と前記第2データ列とが不一致であることを検出すると、前記特定ビットを含むアドレス部位に基づいて前記シリアルメモリのアドレスバイト数を判定する。 The address byte number determination apparatus, method, and program according to one embodiment determine the address byte number by the following procedure, for example. First, assume the maximum number of bytes of the address of the serial memory. A first address having the maximum number of bytes is output to a serial memory, and in response to the output of the first address, as a first data string, from the first head data value acquired first, the first head data value and A data string until a different first tail data value is detected is read from the serial memory. Subsequently, a second address obtained by inverting the specific bit of the first address is output to the serial memory, and from the second head data value acquired first as a second data string according to the output of the second address A data string until a second tail data value different from the second head data value is detected is read from the serial memory. Then, when comparing the first data string and the second data string and detecting that the first data string and the second data string do not match, based on the address portion including the specific bit, Determine the number of serial memory address bytes.
前記一実施態様によれば、判定用データをシリアルメモリに書き込むことなく、シリアルメモリのアドレスバイト数の判定を可能にする手段を提供することが可能となる。 According to the embodiment, it is possible to provide means for enabling determination of the number of address bytes of the serial memory without writing determination data in the serial memory.
以下、実施形態について、図面を参照しながら説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。各図面において同一の構成または機能を有する構成要素および相当部分には、同一の符号を付し、その説明は省略する。 Hereinafter, embodiments will be described with reference to the drawings. For clarity of explanation, the following description and drawings are omitted and simplified as appropriate. In the drawings, components having the same configuration or function and corresponding parts are denoted by the same reference numerals and description thereof is omitted.
図1に一実施形態のアドレスバイト数判定装置の構成例を示す。アドレスバイト数判定装置10は、メモリ入出力部11、アドレス生成部12、第1データ列取得部13、第2データ列取得部14、比較部15、及び、制御部16を備える。図1には示していないが、アドレスバイト数判定装置10は、例えば半導体装置に搭載され、半導体装置に接続可能なシリアルメモリとデータを送受信する。
メモリ入出力部11は、シリアルメモリとのインタフェースを担う。具体的には、シリアルメモリへアドレスを出力し、アドレスに応じてシリアルメモリから連続するデータ列を受け取る。
FIG. 1 shows an example of the configuration of an address byte number determination apparatus according to an embodiment. The address byte
The memory input /
アドレス生成部12は、シリアルメモリのアドレスの最大バイト数を仮定し、まず、最大バイト数を有する第1アドレスをメモリ入出力部11へ送る。次に、メモリ入出力部11が第1アドレスに応じたデータを取得した後、第1アドレスの特定ビットを反転した第2アドレスをメモリ入出力部11へ送る。
ここで、特定ビットについての説明を容易にするため、第1及び第2アドレスが、1バイトの大きさのアドレス部位を最大バイト数有する構成であることを用いる。加えて、各アドレス部位を特定する場合、X番目(Xは1から最大バイト数までの整数)のアドレス部位、と表すことにする。例えば、最大バイト数が3バイトである場合、第1及び第2アドレスは、1番目から3番目までの3つのアドレス部位からなる。
図2を用いてアドレスバイト数とアドレス部位との関係を具体的に説明する。図2では、アドレスバイト数1〜4それぞれの場合を一例として示す。アドレスバイト数1〜4のアドレスが、1番目から各アドレスバイト数までのアドレス部位を有する構成であることを示している。
The
Here, in order to facilitate the description of the specific bit, it is used that the first and second addresses have a configuration having a maximum number of bytes of an address part having a size of 1 byte. In addition, when specifying each address part, it is expressed as the Xth address part (X is an integer from 1 to the maximum number of bytes). For example, when the maximum number of bytes is 3, the first and second addresses consist of three address parts from the first to the third.
The relationship between the number of address bytes and the address part will be specifically described with reference to FIG. In FIG. 2, the case of each
さらに、シリアルメモリのアドレスは、アドレスバイト数1〜4それぞれのすべての領域(ビット)を用いる場合もあるが、その一部分の領域を用いる場合もある。例えば、シリアルメモリのアドレスとして、最上位のアドレス部位(1番目のアドレス部位)の最下位ビットを除く、上位ビットを用いていないことがある。図2に、アドレスバイト数のアドレス領域のうち、一部分の領域を用いない場合の一例を示す。図2では、アドレスバイト数1〜4のアドレス領域が、1つ以上のアドレス部位から構成される様子を示す。加えて、アドレス領域のうち、アドレスを特定するビットとして使用する領域を斜線の矩形領域で示している。黒塗りの丸印は、各アドレスの最下位ビットである。
アドレスバイト数1〜4の各アドレスにおいて、最下位バイトのアドレス部位(アドレスバイト数のアドレス部位)の最下位ビット(図2で黒塗りの丸印の領域)はアドレスを特定するビットとして常に用いられる。このため、特定ビットに各アドレス部位の最下位ビット(図2において矢印で示すビット)を用いると、各アドレス部位の有効・無効を確実に検出することができる。例えば、図2において、最右の矢印のビットが有効であればアドレスバイト数4と判断できる。
Furthermore, the address of the serial memory may use all the areas (bits) of 1 to 4 address bytes, but may use a part of the area. For example, as the address of the serial memory, there are cases where the upper bits except for the least significant bit of the highest address part (first address part) are not used. FIG. 2 shows an example in which a part of the address area of the number of address bytes is not used. FIG. 2 shows a state in which an address area having 1 to 4 address bytes is composed of one or more address parts. In addition, of the address area, an area used as a bit for specifying an address is indicated by a hatched rectangular area. The black circle is the least significant bit of each address.
In each address of 1 to 4 address bytes, the least significant bit of the address part of the least significant byte (address part of the number of address bytes) is always used as a bit for specifying an address. It is done. For this reason, when the least significant bit (bit indicated by an arrow in FIG. 2) of each address part is used as the specific bit, the validity / invalidity of each address part can be reliably detected. For example, in FIG. 2, if the rightmost bit is valid, it can be determined that the number of address bytes is four.
従って、アドレス生成部12は、第1アドレスの各アドレス部位の最下位ビットを特定ビットとすることが好ましい。さらに、アドレス生成部12は、まず、特定ビットとして、最大バイト数のアドレス部位の最下位ビットを反転させ、順次上位のアドレス部位の最下位ビットを反転させることが好ましい。これにより、下位のアドレス部位(大きいアドレスバイト数の場合)から順番に有効・無効を判別することになるため、効率良くアドレスバイト数を判定することができる。なお、1番目のアドレス部位については、他のアドレス部位が無効であることが検出されると、アドレスバイト数1であると判定できる。従って、1番目のアドレス部位については、特定ビットを反転させて有効・無効を判別しなくても、アドレスバイト数を判定することができる。
Therefore, the
第1データ列取得部13は、メモリ入出力部11がシリアルメモリへ第1アドレスを出力し、第1アドレスに応じたデータを読み出すと、第1データ列を取得する。第1データ列取得部13は、第1データ列として、メモリ入出力部11が読み出したデータ列のうち、最初に取得する第1先頭データ値から、第1先頭データ値と異なる第1末尾データ値が検出されるまでのデータ列を取得する。
第2データ列取得部14は、メモリ入出力部11がシリアルメモリへ第2アドレスを出力し、第2アドレスに応じたデータを読み出すと、第2データ列を取得する。第2データ列取得部14は、第2データ列として、メモリ入出力部11が読み出したデータ列のうち、最初に取得する第2先頭データ値から、第2先頭データ値と異なる第2末尾データ値が検出されるまでのデータ列を取得する。
比較部15は、第1データ列と第2データ列とが一致するか、不一致であるかを示す比較結果を出力する。
The first data
The second data
The
制御部16は、外部からクロック信号やリセット信号を受け、アドレスバイト数の判定処理の開始・完了を制御する。さらに、制御部16は、比較部15から比較結果を受け、比較結果が不一致であることを検出すると、特定ビットを含むアドレス部位に基づいてシリアルメモリのアドレスバイト数を判定し、判定したアドレスバイト数を出力する。一方、比較結果が一致を示す場合、制御部16は、特定ビットを異なる位置に変更した第2アドレスをメモリ入出力部11へ送るように、アドレス生成部12を制御する。制御部16は、アドレスバイト数を判定するまで、第2データ列取得部14が特定ビットを変更した第2アドレスに応じた第2データ列の取得を繰り返すように制御する。
制御部16は、アドレスバイト数を次のようにして判定する。
比較結果が不一致であり、かつ、特定ビットを含むアドレス部位より下位のアドレス部位が無効である場合には、制御部16は、アドレスバイト数を1番目から特定ビットを含むアドレス部位までのバイト数であると判定する。これは、特定ビットを含むアドレス部位及びそれより上位のアドレス部位が有効である場合である。
さらに、比較結果が一致であり、かつ、2番目から最大バイト数までのアドレス部位が無効(1番目のアドレス部位を除いて無効)である場合には、制御部16は、アドレスバイト数が、1バイトであると判定する。
The
The
When the comparison result is inconsistent and the address part lower than the address part including the specific bit is invalid, the
Further, when the comparison result is coincident and the address part from the second to the maximum number of bytes is invalid (invalid except for the first address part), the
例えば、アドレス生成部12が、特定ビットを、最大バイト数から順番に上位のアドレス部位に設定している場合には、制御部16は、比較結果が不一致であることを検出すると、アドレスバイト数が、1番目から特定ビットを含むアドレス部位までのバイト数であると判定する。さらに、比較結果が一致である場合であっても、2番目から最大バイト数までのアドレス部位が無効である場合には、制御部16は、アドレスバイト数が、1バイトであると判定する。
For example, when the
次に、図3を参照して動作を説明する。図3に一実施形態のアドレスバイト数判定装置の動作例を示す。
ここで、アドレスバイト数判定装置10のいずれかの構成要素、例えば、制御部16やアドレス生成部12が、仮定したシリアルメモリのアドレスの最大バイト数を保持していることを前提とする。この処理は、アドレスバイト数判定装置10に予め設定されていてもよいし、処理開始時に外部から入力する場合であってもよい。少なくともアドレス生成部12が最大バイト数の第1アドレスを生成できる状態になっていればよい。例えば、アドレス生成部12が、第1アドレスとして、予め設定された値を保持していてもよい。
アドレスバイト数判定処理の開始の指示(例えば、リセット信号の解除)を制御部16が受けると(S11)、アドレス生成部12は、最大バイト数を有する第1アドレスを生成し、メモリ入出力部11へ送る。メモリ入出力部11は、第1アドレスをシリアルメモリへ出力する(S12)。
メモリ入出力部11は、第1アドレスの出力に応じて、シリアルメモリからデータ列を読み出し、第1データ列取得部13は、第1データ列を取得する(S13)。
Next, the operation will be described with reference to FIG. FIG. 3 shows an operation example of the address byte number determination apparatus according to the embodiment.
Here, it is assumed that any component of the address byte
When the
The memory input /
制御部16は、第1データ列が取得されたことを検出すると、アドレス生成部12へ第2アドレスの生成を指示する。アドレス生成部12は、制御部16からの指示に従って、第1アドレスの特定ビットを反転した第2アドレスを生成し、メモリ入出力部11へ送る。メモリ入出力部11は、第2アドレスをシリアルメモリへ出力する(S14)。
メモリ入出力部11は、第2アドレスの出力に応じて、シリアルメモリからデータ列を読み出し、第2データ列取得部14は、第2データ列を取得する(S15)。
第1及び第2データ列が保持されると、比較部15は、第1データ列と第2データ列とを比較し、比較結果を制御部16へ出力する(S16)。
制御部16は、比較結果から、第1データ列と第2データ列とが不一致であり、特定ビットを含むアドレス部位が有効であることを検出すると(S17、YES)、特定ビットを含むアドレス部位に基づいてシリアルメモリのアドレスバイト数を判定し、判定結果を出力して処理を終了する(S18)。一方、比較結果が一致する場合(S17、NO)、制御部16は、2番目から最大バイト数までのアドレス部位の有効・無効を確認する(S19)。2番目から最大バイト数までのアドレス部位がすべて無効である場合には(S19、YES)、アドレスバイト数は1バイトとなることから、制御部16は、アドレスバイト数を判定し、判定結果を出力して処理を終了する(S18)。
When detecting that the first data string has been acquired, the
The memory input /
When the first and second data strings are held, the
When the
一方、2番目から最大バイト数までのアドレス部位に有効・無効を判別していないアドレス部位がある場合)には(S19、NO)、制御部16は、アドレス生成部12へ特定ビットを異なる位置に変更した第2アドレスをメモリ入出力部11へ送るように制御する。アドレス生成部12は、制御部16から新たな第2アドレスの生成を指示されると、特定ビットの位置を変更した第2アドレスを生成し、アドレスバイト数判定装置10は、上述したステップS14以降の処理を繰り返す。このとき、アドレス生成部12は、制御部16から特定ビットの位置を指示される。制御部16は、アドレスバイト数が判定可能となるまで、特定ビットを異なる部位に変更した第2アドレスをメモリ入出力部11へ送ることを繰り返すように、アドレス生成部12を制御する。
On the other hand, when there is an address part for which validity / invalidity is not determined in the address part from the second to the maximum number of bytes) (S19, NO), the
例えば、制御部16は、第2アドレスの最初の特定ビットを最大バイト数のアドレス部位の最下位ビットとし、その後に生成する第2アドレスの特定ビットを、一つ前に生成した第2アドレスの特定ビットを含むアドレス部位より一つ上位のアドレス部位の最下位ビットとするように、アドレス生成部12を制御する。
シリアルメモリへの第2アドレスの新たな出力に応じて、メモリ入出力部11がデータ列を読み出すと、第2データ列取得部14は、新たな第2データ列を取得するように構成される(S16)。比較部15は、第2データ列取得部14が第2データ列を新たに取得すると、比較結果を更新するように構成される(S17)。
For example, the
When the memory input /
一実施形態では、シリアルメモリは、複数の値(異なる値)が格納されていることを前提とする。これは、データの取得を開始する先頭データに対して、異なる値である末尾データを検出するためである。
以上、図1から図3を用いて、アドレスバイト数判定装置10を説明した。以下に、アドレスバイト数判定装置10のより具体的な実施形態、及び、一実施形態のアドレスバイト数判定装置10を半導体装置に搭載する場合の構成例について説明する。
In one embodiment, the serial memory assumes that multiple values (different values) are stored. This is to detect tail data that is different from the head data from which data acquisition is started.
The address byte
実施形態1.
* 実施形態1の構成
図4は、実施形態1における、アドレスバイト数判定装置を用いる半導体装置のシステム構成例を示す図である。実施形態1のシステム構成例は、シリアルメモリ101と、一実施形態のアドレスバイト数判定装置を搭載する半導体装置102とで構成される。半導体装置102は、シリアルメモリ101と外部接続する。
半導体装置102は、クロック生成モジュール(CLKGEN)103、CPU104、ROM105、RAM(Random Access Memory)106、汎用入出力ポート(GPIO)107、アドレスバイト数検出モジュール(ADDRESS BYTE DETECTOR)108、クロックド・シリアル・インタフェース・モジュール(CLOCKED SERIAL INTERFACE)109、及び、SPI信号切り替えモジュール(SEL)110で構成される。アドレスバイト数検出モジュール108は、アドレスバイト数判定装置の一態様である。実施形態1では、半導体装置102に搭載する一例を示す。
* Configuration of
The
クロック生成モジュール103は、クロック信号N116と、リセット信号N117とをシステムバスN115に出力する。
CPU104は、システムバスN115に接続されたバスマスタであり、システムバスN115を経由して、ROM105やRAM106や汎用入出力ポート107やクロックド・シリアル・インタフェース・モジュール109へのアクセスを行う。
ROM105は、システムバスN115に接続されたバススレーブであり、システムバスN115からのリードアクセス要求に対して、ROMに格納されたデータをシステムバスN115のリードデータとして出力する。
RAM106は、システムバスN115に接続されたバススレーブである。RAM106は、システムバスN115からのライトアクセス要求に対して、システムバスN115から入力されたライトデータをRAMに格納し、システムバスN115からのリードアクセス要求に対して、RAMに格納されたデータをシステムバスN115のリードデータとして出力する。
The
The
The
The
汎用入出力ポート107は、システムバスN115に接続されたバススレーブであり、アドレスバイト数検出完了信号N113と、アドレスバイト数検出結果信号N114とを受け、システムバスN115からのリードアクセス要求に対して、アドレスバイト数検出完了信号N113とアドレスバイト数検出結果信号N114の状態を、システムバスN115のリードデータとして出力する。
アドレスバイト数検出モジュール108は、クロック信号N116、リセット信号N117、及び、アドレスバイト数検出用データ出力信号N108を受け、アドレスバイト数検出完了信号N113、アドレスバイト数検出結果信号N114、アドレスバイト数検出用デバイス選択信号N105、アドレスバイト数検出用クロック信号N106、及び、アドレスバイト数検出用データ入力信号N107を出力する。
The general-purpose input /
The address byte
クロックド・シリアル・インタフェース・モジュール109は、システムバスN115に接続されたバススレーブであり、SPI入出力用データ出力信号N112を受け、SPI入出力用デバイス選択信号N109と、SPI入出力用クロック信号N110と、SPI入出力用データ入力信号N111とを出力する。
SPI信号切り替えモジュール110は、アドレスバイト数検出用デバイス選択信号N105、アドレスバイト数検出用クロック信号N106、アドレスバイト数検出用データ入力信号N107、SPI入出力用デバイス選択信号N109、SPI入出力用クロック信号N110、SPI入出力用データ入力信号N111、シリアルメモリ用データ出力信号N104、及び、アドレスバイト数検出完了信号N113を受け、アドレスバイト数検出用データ出力信号N108、SPI入出力用データ出力信号N112、シリアルメモリ用デバイス選択信号N101、シリアルメモリ用クロック信号N102、及び、シリアルメモリ用データ入力信号N103を出力する。
シリアルメモリ101は、シリアルメモリ用デバイス選択信号N101と、シリアルメモリ用クロック信号N102と、シリアルメモリ用データ入力信号N103とが受けとり、シリアルメモリ用データ出力信号N104を出力する。
The clocked
The SPI
The
一般に、半導体装置は、クロックド・シリアル・インタフェース・モジュール109がシリアルメモリ101と接続し、データの入出力を制御する構成をとる。しかし、本実施形態では、汎用入出力ポート107、アドレスバイト数検出モジュール108、クロックド・シリアル・インタフェース・モジュール109、及び、SPI信号切り替えモジュール110が、シリアルメモリ101とインタフェースを担う。言い換えると、本実施形態の半導体装置102は、一本実施形態のアドレスバイト数判定装置であるアドレスバイト数検出モジュール108を搭載するため、汎用入出力ポート107と、SPI信号切り替えモジュール110とをさらに備える。これらの構成要素は、上述した入出力により、少なくとも次のような機能を実現するともいえる。
Generally, a semiconductor device has a configuration in which a clocked
クロックド・シリアル・インタフェース・モジュール109は、通常動作において、シリアルメモリ101とのデータの入出力を制御するシリアルインタフェース部として働く。
アドレスバイト数検出モジュール108は、アドレスバイト数が決定される前に起動され、半導体装置102と接続するシリアルメモリ101のアドレスバイト数を判定する。
汎用入出力ポート107は、SPI信号切り替えモジュール110の切り替えを制御する制御信号の内容をアクセス要求に応じてシステムバスN115に出力する。制御信号は、アドレスバイト数検出モジュール108がアドレスバイト数を検出するか否かを示す信号(図4のアドレスバイト数検出完了信号N113)を用いる。
SPI信号切り替えモジュール110は、制御信号に応じて、クロックド・シリアル・インタフェース・モジュール109とアドレスバイト数検出モジュール108とを切り替えて、シリアルメモリと接続するスイッチ部として働く。具体的には、SPI信号切り替えモジュール110は、シリアルメモリ101のアドレスバイト数が検出される前は、アドレスバイト数検出モジュール108とシリアルメモリ101とを接続させ、アドレスバイト信号が検出された後は、クロックド・シリアル・インタフェース・モジュール109とシリアルメモリ101とを接続させるように制御される。
The clocked
The address byte
The general purpose input /
The SPI
図5は、アドレスバイト数検出モジュール108の詳細構成図である。
アドレスバイト数検出モジュール108は、シリアル転送クロック生成モジュール(SKGEN)201、シーケンス制御モジュール(SEQ)202、バイト選択モジュール203、ビット反転制御モジュール204、パラレル/シリアル変換モジュール205、ANDゲート206、シリアル/パラレル変換モジュール207、1バイト・レジスタ(REG)208〜211、カウンタ(CONTER)212、213、比較器(EQ)214〜218、及び、ANDゲート219で構成される。
FIG. 5 is a detailed configuration diagram of the address byte
The address byte
シリアル転送クロック生成モジュール201は、バスのクロック信号N116を入力し、シリアル転送クロック信号N201を出力する。これにより、シリアル転送クロック生成モジュール201は、バスのクロック信号に基づいて、アドレスバイト数検出モジュール108内の内部クロックを生成する。
シーケンス制御モジュール202は、バスのクロック信号N116と、バスのリセット信号N117、シリアル転送クロック信号N201、比較結果出力信号N225、比較結果出力信号N226、及び、比較結果出力信号N230を受け、出力バイトデータ選択信号N204、ビット反転制御信号N206、データ更新制御信号N208、クロック出力許可信号N209、アドレスバイト数検出用デバイス選択信号N105、受信データキャプチャ制御信号N211、受信データキャプチャ制御信号N212、受信データキャプチャ制御信号N213、受信データキャプチャ制御信号N214、カウンタ初期化信号N219、カウントクロックN220、カウンタ初期化信号N221、及び、カウントクロックN222を出力する。これにより、シーケンス制御モジュール202は、アドレスバイト数の検出処理の開始・完了、及び、アドレスバイト数検出モジュール108の各構成要素を制御する。
The serial transfer
The
ビット反転制御モジュール204は、アドレスバイト数検出用アドレス信号N202と、ビット反転制御信号N206とを受け、ビット反転制御済みアドレスN207を出力する。これにより、ビット反転制御モジュール204は、最大バイト数を有する第1アドレスと、第1アドレスの特定ビットを反転させた第2アドレスを生成する。
バイト選択モジュール203は、1バイトのアドレスバイト数検出用命令コードN203と、4バイトのビット反転制御済みアドレスN207と、出力バイトデータ選択信号N204とを受け、出力バイトデータN205を出力する。これにより、バイト選択モジュール203は、アドレスのうち、シリアルメモリ101へ送るバイトの位置を選択する。
パラレル/シリアル変換モジュール205は、出力バイトデータN205と、データ更新制御信号N208と、シリアル転送クロック信号N201とを受け、アドレスバイト数検出用データ入力信号N107を出力する。
ANDゲート206は、シリアル転送クロック信号N201と、クロック出力許可信号N209とを受け、アドレスバイト数検出用クロック信号N106を出力する。
シリアル/パラレル変換モジュール207は、シリアル転送クロック信号N201と、アドレスバイト数検出用データ出力信号N108とを受け、受信データN210を出力する。
The bit
The
The parallel /
The AND
Serial /
1バイト・レジスタ208は、受信データN210と、受信データキャプチャ制御信号N211とを受け、キャプチャ済み受信データN215を出力する。
1バイト・レジスタ209は、受信データN210と、受信データキャプチャ制御信号N212とを受け、キャプチャ済み受信データN216を出力する。
1バイト・レジスタ210は、受信データN210と、受信データキャプチャ制御信号N213とを受け、キャプチャ済み受信データN217を出力する。
1バイト・レジスタ211は、受信データN210と、受信データキャプチャ制御信号N214とを受け、キャプチャ済み受信データN218を出力する。
カウンタ212は、カウンタ初期化信号N219と、カウントクロックN220とを受け、カウント結果N223を出力する。
カウンタ213は、カウンタ初期化信号N221と、カウントクロックN222とを受け、カウント結果N224を出力する。
The 1-
The 1-
The 1-
The 1-byte register 211 receives the reception data N210 and the reception data capture control signal N214, and outputs captured reception data N218.
The
The
比較器214は、キャプチャ済み受信データN215と、キャプチャ済み受信データN216とを受け、比較結果出力信号N225を出力する。
比較器215は、キャプチャ済み受信データN217と、キャプチャ済み受信データN218とを受け、比較結果出力信号N226を出力する。
比較器216は、キャプチャ済み受信データN215と、キャプチャ済み受信データN217とを受け、比較結果出力信号N227を出力する。
比較器217は、キャプチャ済み受信データN216と、キャプチャ済み受信データN218とを受け、比較結果出力信号N228を出力する。
比較器218は、カウント結果N223と、カウント結果N224とを受け、比較結果出力信号N229を出力する。
ANDゲート219は、比較結果出力信号N227と、比較結果出力信号N228と、比較結果出力信号N229とを受け、比較結果出力信号N230を出力する。
The
The
The
The
AND
ここで、図1の構成と、図4の構成とを対応づけると次のようになる。
バイト選択モジュール203、パラレル/シリアル変換モジュール205、ANDゲート206、及び、シリアル/パラレル変換モジュール207は、メモリ入出力部11を構成し、シリアルメモリ101とのデータの入出力を制御するように働く。
ビット反転制御モジュール204は、アドレス生成部12を構成し、シリアルメモリ101へ出力するアドレス(第1アドレス、第2アドレス)を生成するように働く。
1バイト・レジスタ208、209と、カウンタ212と、比較器214とは、第1データ列取得部13を構成し、第1データ列を取得するように働く。
1バイト・レジスタ210、211と、カウンタ213と、比較器215とは、第2データ列取得部14を構成し、第2データ列を取得するように働く。
比較器216〜218と、ANDゲート219とは、比較部15を構成し、第1データ列と第2データ列とが一致するか、不一致であるかを示す比較結果を出力する。
シリアル転送クロック生成モジュール201と、シーケンス制御モジュール202とは、制御部16を構成し、アドレスバイト数を判定する。加えて、アドレスバイト数を検出できるように、各構成要素が機能するように制御する。
Here, the configuration of FIG. 1 is associated with the configuration of FIG. 4 as follows.
The
The bit
The 1-
The 1-
The
The serial transfer
ここで、実施形態1では、第1データ列は、第1先頭データ値、第1末尾データ値、及び、第1データ列の長さ(第1データ長)からなる第1データ列情報として保持する。同様に、第2データ列は、第2先頭データ値、第2末尾データ値、及び、第2データ列の長さ(第2データ長)からなる第2データ列情報として保持する。具体的には次の構成要素で保持する。
1バイト・レジスタ208は、第1データ列の第1先頭データ値を保持する。1バイト・レジスタ209は、第1データ列の第1末尾データ値を保持する。カウンタ212は、第1データ長を保持する。ここで、第1データ長は、第1データ列の総バイト数である。半導体装置102は、シリアルメモリ101から1バイトずつデータを読み出す。従って、カウンタ212が保持する値は、半導体装置102が、第1先頭データ値から第1末尾データ値を取得するまでの第1データ列の各データを取得した回数(取得回数)を保持しているということもできる。
第2データ列情報についても同様に、1バイト・レジスタ210は、第2データ列の第2先頭データ値を保持する。1バイト・レジスタ211は、第2データ列の第2末尾データ値を保持する。カウンタ213は、第2データ長を保持する。
加えて、ANDゲート219は、比較器216〜218の比較結果に基づいて、第1データ列情報及び第2データ列情報の各要素のすべてが一致する場合には、一致を示す比較結果を出力し、いずれかの要素が不一致である場合には、不一致を示す比較結果を出力する。
Here, in the first embodiment, the first data string is held as first data string information including the first head data value, the first tail data value, and the length (first data length) of the first data string. To do. Similarly, the second data string is held as second data string information including the second head data value, the second tail data value, and the length (second data length) of the second data string. Specifically, the following components are held.
The 1-
Similarly for the second data string information, the 1-
In addition, the AND
図6は、SPI信号切り替えモジュール110の一例を示す詳細構成図である。
SPI信号切り替えモジュール110は、セレクタ(SEL)301〜303と、バッファ304と、バッファ305とで構成される。
セレクタ301は、アドレスバイト数検出用デバイス選択信号N105と、SPI入出力用デバイス選択信号N109と、アドレスバイト数検出完了信号N113とを受け、シリアルメモリ用デバイス選択信号N101を出力する。
セレクタ302は、アドレスバイト数検出用クロック信号N106と、SPI入出力用クロック信号N110と、アドレスバイト数検出完了信号N113とを受け、シリアルメモリ用クロック信号N102を出力する。
セレクタ303は、アドレスバイト数検出用データ入力信号N107と、SPI入出力用データ入力信号N111と、アドレスバイト数検出完了信号N113とを受け、シリアルメモリ用データ入力信号N103を出力する。
バッファ304は、シリアルメモリ用データ出力信号N104を受け、アドレスバイト数検出用データ出力信号N108を出力する。
バッファ305は、シリアルメモリ用データ出力信号N104を受け、SPI入出力用データ出力信号N112を出力する。
FIG. 6 is a detailed configuration diagram illustrating an example of the SPI
The SPI
The
The
The
The
The
*実施形態1の動作
図4、図5、及び図6で説明した半導体装置102の動作を、図7、図8A、8B、図9A、9B、図10A、10Bのフローチャートと、図11〜図14のデータ内容例、図15A〜15B、図16A〜16C、図17A〜17D、図18A〜18Dのタイミングチャートを用いて説明する。
図4のシステムに電源が投入されると、半導体装置102において、クロック生成モジュール103は、リセット信号N117をアサートするとともに、クロック信号N116にクロックの出力を開始する。そして、クロック生成モジュール103は、所定時間経過後に、リセット信号N117をデアサートする。
* Operation of
When the system of FIG. 4 is turned on, in the
図7は、本実施形態の半導体装置102における、CPU104の動作を示すフローチャートである。
CPU104は、汎用入出力ポート107からアドレスバイト数検出完了信号N113の状態を読み出す(ステップS101)。
アドレスバイト数検出が完了している場合には(S102、YES)、次のステップS103へ進み、アドレスバイト数検出が完了していない場合には(S102、NO)、ステップS101に戻って、アドレスバイト数検出完了となるまで、アドレスバイト数検出完了信号N113の状態を読み出す処理を繰り返す(ステップS102)。
アドレスバイト数検出が完了していると、CPU104は、汎用入出力ポート107からアドレスバイト数検出結果信号N114の状態を読み出し、接続されたシリアルメモリのアドレスバイト数を取得する(ステップS103)。
以降、CPU104は、クロックド・シリアル・インタフェース・モジュール109を操作し、取得したシリアルメモリのアドレスバイト数に従ってSPIバス・サイクルを組み立てる。これにより、CPU104は、シリアルメモリ101へのアクセスを行う(ステップS104)。
FIG. 7 is a flowchart showing the operation of the
The
If the address byte count detection is completed (S102, YES), the process proceeds to the next step S103. If the address byte count detection is not completed (S102, NO), the process returns to step S101 to return to the address The process of reading the state of the address byte number detection completion signal N113 is repeated until the byte number detection is completed (step S102).
When the address byte number detection is completed, the
Thereafter, the
図8A、8Bは、本実施形態の半導体装置102における、アドレスバイト数検出モジュール108の動作を示すフローチャートである。
初期状態において、アドレスバイト数検出完了信号N113は、ロウ・レベルに初期化されており、またアドレスバイト数検出時に用いるシリアルメモリ読み出し用の命令コード(03h)が固定値として与えられている。ここでは、シリアルメモリ101の最大バイト数が4バイトであることを前提とする。例えば、シーケンス制御モジュール202は、リセット信号N117がアサートされると、アドレスバイト数検出完了信号N113を、ロウ・レベルに初期化し、リセット信号N117がデアサートされると、アドレスを生成する処理を開始するように、ビット反転制御モジュール204を制御する。これにより、アドレスバイト数を判定する処理が開始される。
先ず、ビット反転制御モジュール204は、任意の4バイトの値を第1アドレスとして選択し、ビット反転制御済みアドレスN207に供給する(ステップS201)。この時、ビット反転制御信号N206は、デアサートされており、ビット反転制御済みアドレスN207には、アドレスバイト数検出用アドレス信号N202の値がそのまま出力される。ここで、第1アドレスとなる、任意の4バイトの値は、予めアドレスバイト数検出モジュール108内に保持した値であってもよいし、外部から入力される値を用いるように構成されていてもよい。最大バイト数についても、任意の4バイトの値と同様である。
次に、第1アドレスを用いてシリアルメモリ101から第1データ列を読み出し、第1データ列情報を取得する(ステップS202)。シリアルメモリのデータ列取得の詳細フローは、別途説明する。
ステップS202で取得した第1データ列情報は、最初に読み出された第1の値(第1先頭データ値)が1バイト・レジスタ208に格納され、2バイト目以降で最初に読み出された1バイト・レジスタ208に格納された値と異なる第2の値(第1末尾データ値)が1バイト・レジスタ209に格納される。さらに、第1の値から第2の値が格納されるまでに読み出された総バイト数(第1データ長)がカウンタ212に格納される。
次に、ビット反転制御モジュール204は、第1アドレスのビット0を反転した値を第2アドレスとして選択する(S203)。ここでは、第1アドレスのビット0は、最大バイト数のアドレス部位(最下位のアドレス部位)の最下位ビットである。このとき、シーケンス制御モジュール202は、ビット反転制御信号N206を制御する。これにより、ビット反転制御済みアドレスN207には、アドレスバイト数検出用アドレス信号N202のビット0が反転された値が出力される。
8A and 8B are flowcharts showing the operation of the address byte
In the initial state, the address byte number detection completion signal N113 is initialized to a low level, and a serial memory read instruction code (03h) used when detecting the number of address bytes is given as a fixed value. Here, it is assumed that the maximum number of bytes of the
First, the bit
Next, the first data string is read from the
In the first data string information acquired in step S202, the first value (first head data value) read first is stored in the 1-
Next, the bit
第2アドレスがシリアルメモリ101へ出力されると、シリアルメモリ101からデータ列情報を取得する(ステップS204)。シリアルメモリのデータ列取得の詳細フローは、別途説明する。
ステップS204で取得した第2データ列情報は、最初に読み出された第1の値(第2先頭データ値)が1バイト・レジスタ210に格納され、2バイト目以降で最初に読み出された1バイト・レジスタ210と異なる第2の値(第2末尾データ値)が1バイト・レジスタ211に格納される。さらに、第2の値が格納されるまでに読み出された総バイト数(第2データ長)がカウンタ213に格納される。
次に、比較器216〜218は、ステップS202で得られた第1データ列情報とステップS204で得られた第2データ列情報との一致確認を行う(ステップS205)。データ列情報の一致確認は、各要素どうしが全て一致することで確認する。比較器216は、第1及び第2データ列情報の第1の値(第1先頭データ値と第2先頭データ値)の比較を行う。比較器217は、第1及び第2データ列情報の第2の値(第1末尾データ値と第2末尾データ値)の比較を行う。比較器218で第1及び第2データ列情報の総バイト数のカウント値(第1データ長と第2データ長)を比較する。ANDゲート219は、各要素が一致したことを検出し、第1及び第2データ列情報の一致確認結果を比較結果出力信号N230に出力する。比較結果出力信号N230は、シーケンス制御モジュール202に入力される。
When the second address is output to the
In the second data string information acquired in step S204, the first value (second head data value) read first is stored in the 1-
Next, the
第1データ列情報と第2データ列情報とが一致しない場合には、ステップS203で反転したアドレスのビット0がシリアルメモリ101に有効なアドレスビットであったことになる。従って、シーケンス制御モジュール202は、接続されたシリアルメモリ101のアドレスバイト数が、4であると判定(ステップS206)し、最終ステップS216に進む。
データ列情報が一致している場合には、ステップS203で反転したアドレスのビット0がシリアルメモリ101に無効なアドレスビットであったことになる。従って、シーケンス制御モジュール202は、新たな第2アドレスを用いてシリアルメモリ101のアドレスバイト数の判定を更に進めるために、次のステップS207に進むように制御する。
If the first data string information and the second data string information do not match, it means that
If the data string information matches,
ビット反転制御モジュール204は、第1アドレスのビット8を反転した値を新たな第2アドレスとして選択する(ステップS207)。ここでは、第1アドレスのビット8は、第1アドレスにおける3番目のアドレス部位の最下位ビットであり、特定ビットが一つ前の4番目(最大バイト数)のアドレス部位より一つ上位のアドレス部位に設定されることになる。このとき、シーケンス制御モジュール202は、ビット反転制御モジュール204が第1アドレスのビット8を反転するように、ビット反転制御信号N206を制御する。これにより、ビット反転制御済みアドレスN207には、アドレスバイト数検出用アドレス信号N202のビット8が反転された値が出力される。
The bit
新たな第2アドレスがシリアルメモリ101へ出力されると、シリアルメモリ101から新たな第2アドレスに応じた第2データ列情報を取得する(ステップS208)。シリアルメモリ101のデータ列取得の詳細フローは、別途説明する。
ステップS208で取得した第2データ列情報は、ステップS204と同様に格納される。
次に、比較器216〜218は、ステップS202で得られた第1データ列情報とステップS208で得られた第2データ列情報との一致確認を行う(ステップS209)。データ列情報の一致確認は、各要素どうしが全て一致することで確認する。比較器216〜218の具体的な動作は、ステップS205と同様であるため説明を省略する。
When the new second address is output to the
The second data string information acquired in step S208 is stored in the same manner as in step S204.
Next, the
データ列情報が一致しない場合には、ステップS207で反転したアドレスのビット8がシリアルメモリ101に有効なアドレスビットであったことになる。従って、シーケンス制御モジュール202は、接続されたシリアルメモリ101のアドレスバイト数は、3であると判定(ステップS210)し、最終ステップS216に進む。
データ列情報が一致している場合には、ステップS207で反転したアドレスのビット8がシリアルメモリ101に無効なアドレスビットであったことになる。従って、シーケンス制御モジュール202は、さらに新たな第2アドレスを用いてシリアルメモリ101のアドレスバイト数の判定を更に進めるために、次のステップS211に進むように制御する。
ビット反転制御モジュール204は、第1アドレスのビット16を反転した値を第2アドレスとして選択する(ステップS211)。ここでは、第1アドレスのビット16は、第1アドレスにおける2番目のアドレス部位の最下位ビットであり、特定ビットが一つ前の3番目アドレス部位より一つ上位のアドレス部位に設定されることになる。このとき、シーケンス制御モジュール202は、ビット反転制御信号N206を制御する。これにより、ビット反転制御済みアドレスN207には、アドレスバイト数検出用アドレス信号N202のビット16が反転された値が出力される。
If the data string information does not match,
If the data string information matches,
The bit
さらに新たな第2アドレスがシリアルメモリ101へ出力されると、シリアルメモリ101からさらに新たなデータ列情報を取得する(ステップS212)。シリアルメモリ101のデータ列取得の詳細フローは、別途説明する。
ステップS212で取得した第2データ列情報は、ステップS204、S208と同様に格納される。
次に、比較器216〜218は、ステップS202で得られた第1データ列情報とステップS212で得られた第2データ列情報との一致確認を行う(ステップS213)。データ列情報の一致確認は、各要素どうしが全て一致することで確認する。比較器216〜218の具体的な動作は、ステップS205、S209と同様であるため説明を省略する。
When a new second address is output to the
The second data string information acquired in step S212 is stored in the same manner as in steps S204 and S208.
Next, the
データ列情報が一致しない場合には、ステップS211で反転したアドレスのビット16がシリアルメモリ101に有効なアドレスビットであったことになる。従って、シーケンス制御モジュール202は、接続されたシリアルメモリ101のアドレスバイト数は、2であると判定(ステップS214)し、最終ステップS216に進む。
データ列情報が一致している場合には、ステップS211で反転したアドレスのビット16がシリアルメモリ101に無効なアドレスビットであったことになる。従って、シーケンス制御モジュール202は、接続されたシリアルメモリ101のアドレスバイト数は、1であると判定(ステップS215)し、最終ステップS216に進む。
最終ステップS216では、シーケンス制御モジュール202は、アドレスバイト数検出完了信号N113にハイ・レベルを出力し、アドレスバイト数検出の完了を外部に通知する。加えて、シーケンス制御モジュール202は、アドレスバイト数検出結果信号N114へ検出したアドレスバイト数を出力する。
If the data string information does not match, the
If the data string information matches, the
In the final step S216, the
続いて、アドレスバイト数検出モジュール108が第1データ列情報と第2データ列情報とを取得する動作について説明する。
図9A、9Bは、本実施形態のアドレスバイト数検出モジュール108における、シリアルメモリ101の第1データ列情報取得(図8AのステップS202)の詳細フローチャートである。
先ず、シーケンス制御モジュール202は、カウンタ初期化信号N219を出力し、総バイト数のカウンタ212をクリアする(ステップS301)。
次に、シーケンス制御モジュール202は、アドレスバイト数検出用デバイス選択信号N105にロウ・レベルを出力し、SPIバス・サイクルを開始させる(ステップS302)。
次に、シーケンス制御モジュール202は、アドレスバイト数検出用命令コードN203の送信を行う(ステップS303)。
シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にアドレスバイト数検出用命令コードN203の値を出力する。
続いて、シーケンス制御モジュール202によってデータ更新制御信号N208がアサートされると、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納され、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107にMSBから順にシリアル出力される。
Next, an operation in which the address byte
9A and 9B are detailed flowcharts of the first data string information acquisition (step S202 in FIG. 8A) of the
First, the
Next, the
Next, the
In accordance with the output byte data selection signal N204 output from the
Subsequently, when the data update control signal N208 is asserted by the
次に、アドレスのビット31〜24の送信を行う(ステップS304)。シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にビット反転制御済みアドレスN207のビット31〜24の値を出力する。
続いて、データ更新制御信号N208がアサートされると、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納される。パラレル/シリアル変換モジュール205は、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107に格納した値をMSBから順にシリアル出力する。
Next, the bits 31 to 24 of the address are transmitted (step S304). In accordance with the output byte data selection signal N204 output from the
Subsequently, when the data update control signal N208 is asserted, the value of the output byte data N205 is stored in the parallel /
次に、アドレスのビット23〜16の送信を行う(ステップS305)。シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にビット反転制御済みアドレスN207のビット23〜16の値を出力する。
続いて、データ更新制御信号N208がアサートされると、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納される。パラレル/シリアル変換モジュール205は、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107に格納した値をMSBから順にシリアル出力する。
Next, the bits 23 to 16 of the address are transmitted (step S305). In accordance with the output byte data selection signal N204 output from the
Subsequently, when the data update control signal N208 is asserted, the value of the output byte data N205 is stored in the parallel /
次に、アドレスのビット15〜8の送信を行う(ステップS306)。シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にビット反転制御済みアドレスN207のビット15〜8の値を出力する。
続いて、データ更新制御信号N208がアサートされると、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納される。パラレル/シリアル変換モジュール205は、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107に格納した値をMSBから順にシリアル出力する。
次に、アドレスのビット7〜0の送信を行う(ステップS307)。シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にビット反転制御済みアドレスN207のビット7〜0の値を出力する。
続いて、データ更新制御信号N208がアサートされると、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納される。パラレル/シリアル変換モジュール205は、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107に格納した値をMSBから順にシリアル出力する。
Next,
Subsequently, when the data update control signal N208 is asserted, the value of the output byte data N205 is stored in the parallel /
Next, bits 7 to 0 of the address are transmitted (step S307). In accordance with the output byte data selection signal N204 output from the
Subsequently, when the data update control signal N208 is asserted, the value of the output byte data N205 is stored in the parallel /
次に、シリアル/パラレル変換モジュール207は、1バイトのデータを取得する(ステップS308)。
具体的には、シリアル/パラレル変換モジュール207は、アドレスバイト数検出用クロック信号N106に同期して入力されるアドレスバイト数検出用データ出力信号N108を、8ビット分受信し、1バイトの受信データN210を得る。受信データN210は、受信データキャプチャ制御信号N211の制御により、第1の値(第1先頭データ値)として1バイト・レジスタ208に格納される。
Next, the serial /
Specifically, the serial /
次に、カウントクロックN220の制御により、カウンタ212をインクリメントする(ステップS309)。
次に、シリアル/パラレル変換モジュール207は、後続する1バイトのデータを取得する(ステップS310)。
具体的には、シリアル/パラレル変換モジュール207は、アドレスバイト数検出用クロック信号N106に同期して入力されるアドレスバイト数検出用データ出力信号N108を、8ビット分受信し、1バイトの受信データN210を得る。受信データN210は、受信データキャプチャ制御信号N212の制御により、第2の値として1バイト・レジスタ209に格納する。
次に、カウントクロックN220の制御により、カウンタ212をインクリメントする。(ステップS311)。
Next, the
Next, the serial /
Specifically, the serial /
Next, the
次に、比較器214は、第1の値と第2の値との比較を行う(ステップS312)。比較器214は、キャプチャ済み受信データN215とキャプチャ済み受信データN216とを比較した結果を比較結果出力信号N225として出力する。シーケンス制御モジュール202は、比較結果出力信号N225を参照し、一致していれば(ステップS312、YES)、ステップS310に戻り処理を繰り返し、一致していなければ(ステップS312、NO)、次のステップS313に進むように制御する。比較結果出力信号N225が一致を示す場合、1バイト・レジスタ209に格納された第2の値は、第1末尾データとなる。
最後に、シーケンス制御モジュール202は、アドレスバイト数検出用デバイス選択信号N105にハイ・レベルを出力し、SPIバス・サイクルを終了する(ステップS313)。
ステップS308〜S312で説明したように、シーケンス制御モジュール202は、1バイト・レジスタ208に第1先頭データ値を保持させ、比較器214の出力が不一致を示すまで、第1データ列の2番目に取得する値から順番に1バイト・レジスタ209に取り込むことによって、第1末尾データ値を1バイト・レジスタ209に保持させるように制御する。
Next, the
Finally, the
As described in steps S308 to S312, the
図10A、10Bは、本実施形態のアドレスバイト数検出モジュール108における、シリアルメモリ101の第2データ列情報取得(図8BのステップS204、ステップS208,ステップS212)の詳細フローチャートである。
先ず、シーケンス制御モジュール202は、カウンタ初期化信号N221を出力し、総バイト数のカウンタ213をクリアする(ステップS401)。
次に、シーケンス制御モジュール202は、アドレスバイト数検出用デバイス選択信号N105にロウ・レベルを出力し、SPIバス・サイクルを開始させる(ステップS402)。
次に、シーケンス制御モジュール202は、アドレスバイト数検出用命令コードN203の送信を行う(ステップS403)。
シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にアドレスバイト数検出用命令コードN203の値を出力する。
続いて、シーケンス制御モジュール202によってデータ更新制御信号N208がアサートされ、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納され、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107にMSBから順にシリアル出力される。
10A and 10B are detailed flowcharts of the second data string information acquisition (step S204, step S208, and step S212 in FIG. 8B) of the
First, the
Next, the
Next, the
In accordance with the output byte data selection signal N204 output from the
Subsequently, the data update control signal N208 is asserted by the
次に、アドレスのビット31〜24の送信を行う(ステップS404)。シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にビット反転制御済みアドレスN207のビット31〜24の値を出力する。
続いて、データ更新制御信号N208がアサートされ、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納される。パラレル/シリアル変換モジュール205は、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107に格納した値をMSBから順にシリアル出力する。
Next, address bits 31 to 24 are transmitted (step S404). In accordance with the output byte data selection signal N204 output from the
Subsequently, the data update control signal N208 is asserted, and the value of the output byte data N205 is stored in the parallel /
次に、アドレスのビット23〜16の送信を行う(ステップS405)。シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にビット反転制御済みアドレスN207のビット23〜16の値を出力する。
続いて、データ更新制御信号N208がアサートされると、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納される。パラレル/シリアル変換モジュール205、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107に格納した値をMSBから順にシリアル出力する。
次に、アドレスのビット15〜8の送信を行う(ステップS406)。シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にビット反転制御済みアドレスN207のビット15〜8の値を出力する。
続いて、データ更新制御信号N208がアサートされると、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納される。パラレル/シリアル変換モジュール205、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107に格納した値をMSBから順にシリアル出力する。
Next, the bits 23 to 16 of the address are transmitted (step S405). In accordance with the output byte data selection signal N204 output from the
Subsequently, when the data update control signal N208 is asserted, the value of the output byte data N205 is stored in the parallel /
Next, the
Subsequently, when the data update control signal N208 is asserted, the value of the output byte data N205 is stored in the parallel /
次に、アドレスのビット7〜0の送信を行う(ステップS407)。
シーケンス制御モジュール202から出力される出力バイトデータ選択信号N204に従い、バイト選択モジュール203は、出力バイトデータN205にビット反転制御済みアドレスN207のビット7〜0の値を出力する。
続いて、データ更新制御信号N208がアサートされると、出力バイトデータN205の値が、パラレル/シリアル変換モジュール205に格納される。パラレル/シリアル変換モジュール205、シリアル転送クロック信号N201に同期して、アドレスバイト数検出用データ入力信号N107に格納した値をMSBから順にシリアル出力する。
次に、シリアル/パラレル変換モジュール207は、1バイトのデータを取得する(ステップS408)。
具体的には、シリアル/パラレル変換モジュール207は、アドレスバイト数検出用クロック信号N106に同期して入力されるアドレスバイト数検出用データ出力信号N108を、8ビット分受信し、1バイトの受信データN210を得る。受信データN210は、受信データキャプチャ制御信号N213の制御により、第1の値(第1先頭データ値)として1バイト・レジスタ210に格納される。
次に、カウントクロックN222の制御により、カウンタ213をインクリメントする。(ステップS409)。
Next, bits 7 to 0 of the address are transmitted (step S407).
In accordance with the output byte data selection signal N204 output from the
Subsequently, when the data update control signal N208 is asserted, the value of the output byte data N205 is stored in the parallel /
Next, the serial /
Specifically, the serial /
Next, the
次に、シリアル/パラレル変換モジュール207は、後続する1バイトのデータを取得する(ステップS410)。
具体的には、シリアル/パラレル変換モジュール207は、アドレスバイト数検出用クロック信号N106に同期して入力されるアドレスバイト数検出用データ出力信号N108を、8ビット分受信し、1バイトの受信データN210を得る。受信データN210は、受信データキャプチャ制御信号N214の制御により、第2の値として1バイト・レジスタ211に格納する。
Next, the serial /
Specifically, the serial /
次に、カウントクロックN222の制御により、カウンタ213をインクリメントする。(ステップS411)。
次に、比較器215は、第1の値と第2の値との比較を行う(ステップS412)。比較器215は、キャプチャ済み受信データN217とキャプチャ済み受信データN218とを比較した結果を比較結果出力信号N226として出力する。シーケンス制御モジュール202は、比較結果出力信号N226を参照し、一致していれば(ステップS412、YES)、ステップS410に戻り処理を繰り返し、一致していなければ(ステップS412、NO)、次のステップS413に進むように制御する。比較結果出力信号N226が一致を示す場合、1バイト・レジスタ211に格納された第2の値は、第2末尾データとなる。
最後に、シーケンス制御モジュール202は、アドレスバイト数検出用デバイス選択信号N105にハイ・レベルを出力し、SPIバス・サイクルを終了する(ステップS413)。
ステップS408〜S412で説明したように、シーケンス制御モジュール202は、1バイト・レジスタ210に第2先頭データ値を保持させ、比較器215の出力が不一致を示すまで、第2データ列の2番目に取得する値から順番に1バイト・レジスタ211に取り込むことによって、第2末尾データ値を1バイト・レジスタ211に保持させるように制御する。
Next, the
Next, the
Finally, the
As described in steps S408 to S412, the
ここで、シリアルメモリ101が保持する具体的な値と、アドレスバイト数検出モジュール108の判定動作のタイミングチャートとを用いて、具体的な動作例を説明する。図11〜図14は、本実施形態の半導体装置102へ接続するシリアルメモリ101のデータ内容例を示す図である。図15A〜図18Dは、本実施形態の半導体装置102へシリアルメモリ101を接続した場合の動作例を示すタイミングチャートである。シリアルメモリ101のアドレスバイト数が図11、15A、15Bでは4、図12、16A〜16Cでは3、図13、図17A〜17Dでは2、図14、図18A〜18Dでは1の場合をそれぞれ示している。
Here, a specific operation example will be described using a specific value held in the
図11〜図14に示すように、シリアルメモリ101には、均一では無い値を格納していることを前提とする。
図15A〜図18Dに示す符号T511からT544で示すタイミングチャートは、図8A〜図10Bの処理と次のように対応する。タイミングチャートT511、T521、T531、T541は、図8AのステップS202の処理(図9A、9Bのフローチャート)によって、第1アドレスに応じた第1データ列情報を取得する場合を示す。タイミングチャートT512、T522、T532、T542は、図8BのステップS204の処理(図10A、10Bのフローチャート)によって、第2アドレスに応じた第2データ列情報を取得する場合を示す。タイミングチャートT523、T533、T543は、図8BのステップS208の処理(図10A、10Bのフローチャート)によって、新たな第2アドレスに応じた第2データ列情報を取得する場合を示す。タイミングチャートT534、T544は、図8BのステップS212の処理(図10A、10Bのフローチャート)によって、さらに新たな第2アドレスに応じた第2データ列情報を取得する場合を示す。
図15A〜図18Dでは、第1アドレスを"0000FF00h"とする。
As shown in FIGS. 11 to 14, it is assumed that the
Timing charts indicated by reference numerals T511 to T544 shown in FIGS. 15A to 18D correspond to the processes of FIGS. 8A to 10B as follows. Timing charts T511, T521, T531, and T541 show a case where the first data string information corresponding to the first address is acquired by the process of step S202 of FIG. 8A (the flowcharts of FIGS. 9A and 9B). Timing charts T512, T522, T532, and T542 show a case where the second data string information corresponding to the second address is acquired by the process of step S204 of FIG. 8B (the flowcharts of FIGS. 10A and 10B). Timing charts T523, T533, and T543 show a case where the second data string information corresponding to the new second address is acquired by the process of step S208 of FIG. 8B (the flowcharts of FIGS. 10A and 10B). Timing charts T534 and T544 illustrate a case where second data string information corresponding to a new second address is acquired by the process of step S212 in FIG. 8B (the flowcharts in FIGS. 10A and 10B).
In FIGS. 15A to 18D, the first address is set to “0000FF00h”.
まず、半導体装置102へアドレスバイト数4のシリアルメモリ101を接続する場合を説明する。
シリアルメモリ101には、図11に示すデータが格納されている。
図15Aに示す、タイミングチャートT511では、第1アドレスを用いて、シリアルメモリ101の第1データ列情報を取得する(図8A、ステップS202)。
先ず、半導体装置102は、アドレスバイト数検出用デバイス選択信号N101にロウ・レベルを出力する。続いて、半導体装置102は、シリアルメモリ用クロック信号N102に同期して、1バイトの読み出し命令コード(タイミングC1)と、4バイトの第1アドレス(タイミングC2〜C5)とをシリアルメモリ用データ入力信号N103に順次出力する。
引き続き、半導体装置102は、シリアルメモリ用クロック信号N102に同期して、シリアルメモリ用データ出力信号N104から第1の値を取得し(タイミングC6)、第1の値とデータ値が異なる第2の値を取得する(タイミングC10)まで、第1データ列の取得を継続する。
このとき、シリアルメモリ101は、シリアルメモリ用データ入力信号N103に入力された読み出し命令コード(タイミングC1)と4バイトのアドレス0000FF00h(タイミングC2〜C5)とを認識し、該当アドレスのデータをシリアルメモリ用データ出力信号N104に出力開始(タイミングC6)する。
ここで、半導体装置102は、第1の値が00h、第2の値がBCh、及び、カウント値が5となる第1データ列情報を得る。
First, a case where the
The
In the timing chart T511 shown in FIG. 15A, the first data string information of the
First, the
Subsequently, the
At this time, the
Here, the
図15Bに示す、タイミングチャートT512では、第1アドレス0000FF00hのビット0を反転して得られる第2アドレス0x0000FF01hを用いて、シリアルメモリ101の第2データ列情報を取得する。
このとき、シリアルメモリ101は、シリアルメモリ用データ入力信号N103に入力された読み出し命令コード(タイミングC1)と4バイトのアドレス0000FF01h(タイミングC2〜C5)とを認識し、該当アドレスのデータをシリアルメモリ用データ出力信号N104に出力開始(タイミングC6)する。
ここで、半導体装置102は、第1の値が00h、第2の値がBCh、及び、カウント値が4となる第2データ列情報を得る。
In the timing chart T512 shown in FIG. 15B, the second data string information of the
At this time, the
Here, the
タイミングチャートT511及びT512で得られた第1及び第2データ列情報は、一致しない。
この結果から、接続されたシリアルメモリのアドレスバイト数は、4であると判断する。
The first and second data string information obtained in the timing charts T511 and T512 do not match.
From this result, it is determined that the number of address bytes of the connected serial memory is 4.
次に、半導体装置102へアドレスバイト数3のシリアルメモリ101を接続する場合を説明する。
シリアルメモリ101には、図12に示すデータが格納されている。
図16A、16Bに示す、タイミングチャートT521及びT522においては、シリアルメモリ101のアドレスバイト数が3である。従って、シリアルメモリ101は、シリアルメモリ用データ入力信号N103に入力された読み出し命令コード(タイミングC1)と上位3バイトのアドレス0000FFh(タイミングC2〜C4)とを認識し、認識したアドレスのデータ出力を開始(タイミングC5)する。一方、半導体装置102は、タイミングC5までは、アドレスを出力する処理を実施するため、タイミングC6からの第1及び第2データ列を読み出す。その結果、タイミングチャートT521及びT522において、半導体装置102は、第1及び第2データ列情報ともに、第1の値が00h、第2の値がBCh、カウント値が4となる情報を取得する。
タイミングチャートT521及びT522で得られる第1データ列情報と第2データ列情報とは、一致する。
Next, a case where the
The
In the timing charts T521 and T522 shown in FIGS. 16A and 16B, the number of address bytes of the
The first data string information and the second data string information obtained in the timing charts T521 and T522 match.
図16Cに示す、タイミングチャートT523では、第1アドレス0000FF00hのビット8を反転して得た第2アドレス0x0000FE00を用いて、シリアルメモリ101のデータ列情報を取得する。
このとき、シリアルメモリ101は、シリアルメモリ用データ入力信号N103に入力された読み出し命令コード(タイミングC1)と上位3バイトのアドレス0000FEh(タイミングC2〜C4)とを認識し、該当アドレスのデータ出力を開始(タイミングC5)する。
ここで、半導体装置102は、タイミングC6からのデータ列を読み出し、第1のデータが00h、第2のデータがBCh、カウント値が5となる、新たな第2データ列情報を取得する。
タイミングチャートT521及びT523で得られた第1及び第2データ列情報は、一致しない。
この結果から、接続されたシリアルメモリのアドレスバイト数は、3であると判断する。
なお、タイミングチャートT523において半導体装置102から出力されるアドレスの最下位1バイトは、上述した説明ではゼロを設定した。しかし、シリアルメモリ101が最下位バイトの値を参照することが無いため、任意の値でもよい。
In the timing chart T523 illustrated in FIG. 16C, the data string information of the
At this time, the
Here, the
The first and second data string information obtained in the timing charts T521 and T523 do not match.
From this result, it is determined that the number of address bytes of the connected serial memory is 3.
In the timing chart T523, the least significant byte of the address output from the
次に、半導体装置102へアドレスバイト数2のシリアルメモリ101を接続する場合を説明する。
シリアルメモリ101には、図13に示すデータが格納されている。
図17A〜17Cに示す、タイミングチャートT531、T532及びT533においては、シリアルメモリ101のアドレスバイト数が2である。従って、シリアルメモリ101は、シリアルメモリ用データ入力信号N103に入力された読み出し命令コード(タイミングC1)と上位2バイトのアドレス0000h(タイミングC2〜C3)とを認識し、認識したアドレスのデータ出力を開始(タイミングC4)する。一方、半導体装置102は、タイミングC5までは、アドレスを出力する処理を実施するため、タイミングC6からの第1及び第2データ列を読み出す。その結果、タイミングチャートT531〜T533において、半導体装置102は、第1及び第2データ列情報ともに、第1の値が00h、第2の値がBCh、カウント値が3となる情報を取得する。
タイミングチャートT531、T532及びT533で得られる第1データ列情報と、二つの第2データ列情報とは、すべて一致する。
Next, a case where the
The
In the timing charts T531, T532, and T533 shown in FIGS. 17A to 17C, the number of address bytes of the
The first data string information obtained in the timing charts T531, T532, and T533 and the two second data string information all match.
図17Dに示す、タイミングチャートT534では、第1アドレス0000FF00hのビット16を反転して得た第2アドレス0x0001FF00を用いて、シリアルメモリ101のデータ列情報を取得する。
このとき、シリアルメモリ101は、シリアルメモリ用データ入力信号N103に入力された読み出し命令コード(タイミングC1)と上位2バイトのアドレス0001h(タイミングC2〜C3)とを認識し、該当アドレスのデータ出力を開始(タイミングC4)する。
ここで、半導体装置102は、タイミングC6からのデータ列を読み出し、第1の値が00h、第2の値がBCh、カウント値が2となるさらに新たな第2データ列情報を取得する。
タイミングチャートT531及びT534で得られた第1及び第2データ列情報は、一致しない。
この結果から、接続されたシリアルメモリのアドレスバイト数は、2であると判断する。
なお、半導体装置102から出力されるアドレスについて、タイミングチャートT533における最下位1バイトと、タイミングチャートT534における最下位2バイトとを、上述した説明ではゼロに設定した。しかし、シリアルメモリ101がこれらの値を参照することが無いため、任意の値でもよい。
In the timing chart T534 illustrated in FIG. 17D, the data string information of the
At this time, the
Here, the
The first and second data string information obtained in the timing charts T531 and T534 do not match.
From this result, it is determined that the number of address bytes of the connected serial memory is 2.
For the address output from the
最後に、半導体装置102へアドレスバイト数1のシリアルメモリ101を接続する場合を説明する。
シリアルメモリ101には、図14に示すデータが格納されている。
図18A〜18Dに示す、タイミングチャートT541、T542、T543及びT544おいては、シリアルメモリのアドレスバイト数が1である。従って、シリアルメモリ101は、シリアルメモリ用データ入力信号N103に入力された読み出し命令コード(タイミングC1)と上位1バイトのアドレス00h(タイミングC2)とを認識し、認識したアドレスのデータ出力を開始(タイミングC3)する。一方、半導体装置102は、タイミングC5までは、アドレスを出力する処理を実施するため、タイミングC6から第1及び第2データ列を読み出す。その結果、タイミングチャートT541〜T544において、半導体装置102は、第1及び第2データ列情報ともに、第1の値が00h、第2の値がBCh、カウント値が2となる情報を取得する。
タイミングチャートT541〜T544で得られる第1データ列情報と、三つの第2データ列情報とは、一致する。
Finally, a case where the
The
In the timing charts T541, T542, T543, and T544 shown in FIGS. 18A to 18D, the number of address bytes of the serial memory is one. Accordingly, the
The first data string information obtained from the timing charts T541 to T544 matches the three second data string information.
この結果から、接続されたシリアルメモリのアドレスバイト数は、1であると判断する。
なお、半導体装置102から出力されるアドレスについて、タイミングチャートT543における最下位1バイトと、タイミングチャートT544における最下位2バイトとを、上述した説明ではゼロに設定した。しかし、シリアルメモリ101がこれらの値を参照することが無いため、任意の値でもよい。
From this result, it is determined that the number of address bytes of the connected serial memory is 1.
For the address output from the
* 実施形態1のメカニズムおよび効果
以上説明したとおり、本実施形態のアドレスバイト数判定装置及び方法を用いると、シリアルメモリ101に格納されている既存のデータを読み出すことによって、シリアルメモリ101のアドレスバイト数を判定する。これは、シリアルメモリ101のアドレスバイト数の判定に、既知の判定用データをシリアルメモリ101に書き込むことを必要としない。これにより、マスクROMやプロテクト済みの書込み不能なシリアルメモリであってもアドレスバイト数を判定するという有利な効果を生じる。
また、シリアルメモリ101への判定用データの書き込みが不要であるので、シリアルメモリ101に格納されていたデータを破壊しない効果も生じる。
さらに、シリアルメモリ101への判定用のデータを書き込みが不要であるので、書き込みが遅いNOR型FLASHやEEPROM等であっても、アドレスバイト数の判定時間が延びない効果も生じる。
また、本実施形態のアドレスバイト数判定装置では、プルアップ抵抗によって与えられるシリアルデータ出力信号の常時電位を利用せずに、シリアルメモリから出力されるデータのみを用いてアドレスバイト数の判定を行う。これにより、ノイズ耐性が高く、またシリアルデータ出力信号の常時電位をハイ・レベルに保つプルアップ抵抗が不要となる効果も生じる。
* Mechanism and Effect of First Embodiment As described above, when the apparatus and method for determining the number of address bytes according to this embodiment are used, the address bytes of the
In addition, since it is not necessary to write the determination data to the
Further, since it is not necessary to write determination data to the
Further, in the address byte number determination device according to the present embodiment, the address byte number is determined using only the data output from the serial memory without using the constant potential of the serial data output signal given by the pull-up resistor. . As a result, noise immunity is high, and an effect of eliminating the need for a pull-up resistor that maintains the constant potential of the serial data output signal at a high level.
実施形態2.
実施形態2では、メモリコントローラ型のシリアルメモリインタフェースを用いる半導体装置へ一実施形態のアドレスバイト数判定装置を搭載する場合のシステムの一態様を説明する。
* 実施形態2の構成
図19は、実施形態2における、アドレスバイト数判定装置を搭載する半導体装置のシステム構成例を示す図である。実施形態2のシステム構成例は、シリアルメモリ101と、一実施形態のアドレスバイト数判定装置を搭載する半導体装置401とで構成される。半導体装置401は、シリアルメモリ101と外部接続する。
半導体装置401は、クロック生成モジュール103、CPU104、RAM106、アドレスバイト数検出モジュール108、SPIメモリ・コントローラ・モジュール402、インバータ403、及び、SPI信号切り替えモジュール110で構成される。
SPIメモリ・コントローラ・モジュール402は、システムバスN115に接続されたバススレーブであり、ホールド要求信号N405と、アドレスバイト数検出結果信号N114と、SPI入出力用データ出力信号N404とを受け、SPI入出力用デバイス選択信号N401と、SPI入出力用クロック信号N402と、SPI入出力用データ入力信号N403とを出力する。SPIメモリ・コントローラ・モジュール402は、メモリバイト数が検出された後、シリアルメモリ101とのデータの入出力を制御する機能を担う。
インバータ403は、アドレスバイト数検出完了信号N113を受け、ホールド要求信号N405を出力する。
図4と同じ符号の構成要素は同様であるため、説明を省略する。
In the second embodiment, an aspect of a system in the case where the address byte number determination device of one embodiment is mounted on a semiconductor device using a memory controller type serial memory interface will be described.
* Configuration of Second Embodiment FIG. 19 is a diagram illustrating a system configuration example of a semiconductor device in which an address byte number determination device according to the second embodiment is mounted. The system configuration example of the second embodiment includes a
The
The SPI
Since the components with the same reference numerals as those in FIG. 4 are the same, the description thereof is omitted.
* 実施形態2の動作
図19で説明した半導体装置401の動作を、図20のフローチャートを用いて説明する。
図19のシステムに電源が投入されると(ステップS701)、半導体装置401では、クロック生成モジュール103は、リセット信号N117をアサートするとともに(ステップS702)、クロック信号N116にクロックの出力を開始する。リセット信号N117がアサートされたことにより、アドレスバイト数検出モジュール108は、アドレスバイト数検出完了信号N113をデアサート状態に初期化する。さらに、インバータ403は、アドレスバイト数検出完了信号N113がデアサートされると、ホールド要求信号N405をアサートする。
そして、クロック生成モジュール103は、所定時間経過後に、リセット信号N117をデアサートする(ステップS703)。
リセット信号N117がデアサートされると、CPU104は、ブート処理を開始する(ステップS704)。一方、アドレスバイト数検出モジュール108では、リセット信号N117がデアサートされたことにより、アドレスバイト数を判定する処理を開始する。
そして、CPU104は、命令コード取得のために、システムバスN115経由でSPIメモリ・コントローラ・モジュール402に対するリードアクセスを開始する(ステップS705)
この時、アドレスバイト数検出モジュール108は、アドレスバイト数の検出が完了していないため、アドレスバイト数検出完了信号N113は、デアサートされ、またホールド要求信号N405は、アサートされた状態である。
SPIメモリ・コントローラ・モジュール402は、ホールド要求信号N405がアサートされているため(ステップS706、NO)、シリアルメモリのバス・サイクル発行を保留し、CPU104からのアクセス要求をウエイト状態に保つ。
* Operation of Second Embodiment The operation of the
When the system of FIG. 19 is turned on (step S701), in the
Then, the
When the reset signal N117 is deasserted, the
Then, the
At this time, since the address byte
Since the hold request signal N405 is asserted (step S706, NO), the SPI
その後、アドレスバイト数検出モジュール108は、接続されたシリアルメモリ101のアドレスバイト数の検出を完了すると、アドレスバイト数検出結果信号N114に検出したアドレスバイト情報を出力し、アドレスバイト数検出完了信号N113をアサートする。
インバータ403は、アドレスバイト数検出完了信号N113がアサートされたため、ホールド要求信号N405をデアサートする。
SPIメモリ・コントローラ・モジュール402は、ホールド要求信号N405がデアサートされると(ステップS706、YES)、保留していたシリアルメモリのバス・サイクルを開始する(ステップS707)。この時、シリアルメモリのバス・サイクルは、アドレスバイト数検出結果信号N114で示されるアドレスバイト数に従って組み立てられ、CPU104からのアクセス要求に対応したデータが取得される。
SPIメモリ・コントローラ・モジュール402は、CPU104からのアクセス要求に対応したデータをシステムバスN115に出力し、ウエイトを解除してCPU104からのアクセスを完了させる(ステップS708)。
以降、SPIメモリ・コントローラ・モジュール402は、CPU104からのアクセス要求に応じ、シリアルメモリ101からデータを取得した値をシステムバスN115に出力する。
Thereafter, when the detection of the number of address bytes of the connected
The
When the hold request signal N405 is deasserted (YES in step S706), the SPI
The SPI
Thereafter, in response to an access request from the
* 実施形態2の効果
メモリコントローラ型のシリアルメモリインタフェースであっても、実施形態1で説明した周辺I/O型のシリアルメモリインタフェースと同様に、判定用データをシリアルメモリ101へ書き込まないで、アドレスバイト数の検出を行うことが出来る。
* Effects of the second embodiment Even in the case of a memory controller type serial memory interface, as in the peripheral I / O type serial memory interface described in the first embodiment, the address is not written to the
実施形態3.
上記各実施形態では、第1アドレスの特定ビットを判定させて第2アドレスを生成するときに、特定ビットを一つとして説明したが、これに限られることはない。例えば、一つのアドレス部位うちのの二つのビットを判定させることを排除するものではない。
さらに、上記各実施形態では、第2アドレスの特定ビットを、1番目から最大バイト数までの複数のアドレス部位のうち、最大バイト数のアドレス部位の最下位ビットから一つずつ上位のアドレス部位の最下位ビットへ順番に移動している動作例を説明した。しかし、これに限られるわけではない。例えは、2番目のアドレス部位から順番に最大バイト数までのアドレス部位の最下位ビット(または最下位ビットを含む複数のビット)を反転し、各アドレス部位の有効・無効を判別した後、アドレスバイト数を判定する手順であってもよい。この場合には、第1データ列情報と第2データ列情報との比較結果が不一致であること、かつ、他の上位のアドレス部位の有効である場合に、アドレスバイト数を判定する。加えて、比較結果が一致であり、2番目から最大バイト数までのアドレス部位が無効である場合には、アドレスバイト数を1と判定する。動作例は、図1,3を参照して説明した動作と同様であるため、ここでは説明を省略する。
In each of the above embodiments, when the specific address of the first address is determined to generate the second address, the specific bit is described as one. However, the present invention is not limited to this. For example, it does not exclude that two bits of one address part are determined.
Further, in each of the above embodiments, the specific bit of the second address is assigned to the upper address part one by one from the least significant bit of the address part of the maximum number of bytes among the plurality of address parts from the first to the maximum number of bytes. An example of operation that moves to the least significant bit in order has been described. However, it is not limited to this. For example, the least significant bit (or a plurality of bits including the least significant bit) of the address part in order from the second address part up to the maximum number of bytes is inverted to determine the validity / invalidity of each address part, and then the address It may be a procedure for determining the number of bytes. In this case, the number of address bytes is determined when the comparison result between the first data string information and the second data string information is inconsistent and the other upper address part is valid. In addition, when the comparison result is coincident and the address part from the second to the maximum number of bytes is invalid, the number of address bytes is determined as 1. An example of the operation is the same as the operation described with reference to FIGS.
実施形態4.
上記各実施形態で説明したアドレスバイト数判定装置及び方法、例えば、図5のアドレスバイト数検出モジュール108は、ハードウェアで実現する場合に限られるものではなく、ソフトウェアや、組み込みシステムのように、ハードウェアとソフトウェアとの組合せにより実現してもよい。ハードウェア、ファームウェア、ソフトウェアのいずれか、あるいは、これらの二つ以上の組合せにより実現してもよい。
例えば、アドレス数判定方法は、コンピュータに各処理を実行させるプログラムによって実現することができる。プログラムは、例えば、少なくとも次の各処理をコンピュータに実行させる。
Embodiment 4 FIG.
The address byte count determination apparatus and method described in each of the above embodiments, for example, the address byte
For example, the address number determination method can be realized by a program that causes a computer to execute each process. For example, the program causes the computer to execute at least the following processes.
(1)シリアルメモリのアドレスの最大バイト数を仮定し、最大バイト数を有する第1アドレスをシリアルメモリへ出力する処理。
(2)第1アドレスの出力に応じて、第1データ列として、最初に取得する第1先頭データ値から、前記第1先頭データ値と異なる第1末尾データ値が検出されるまでのデータ列を前記シリアルメモリから読み出す処理。
(3)第1アドレスの特定ビットを反転した第2アドレスをシリアルメモリへ出力する処理。
(4)第2アドレスの出力に応じて、第2データ列として、最初に取得する第2先頭データ値から、第2先頭データ値と異なる第2末尾データ値が検出されるまでのデータ列をシリアルメモリから読み出す処理。
(5)第1データ列と第2データ列とを比較する処理。
(6)第1データ列と第2データ列とが不一致であることを検出すると、特定ビットを含むアドレス部位に基づいて前記シリアルメモリのアドレスバイト数を判定する処理。
これらの処理は、図3を参照して説明した動作と同様であり、また、図8A〜10Bが具体的な動作の一例となるため、詳細な説明を省略する。
(1) A process of outputting the first address having the maximum number of bytes to the serial memory assuming the maximum number of bytes of the address of the serial memory.
(2) A data string from the first head data value acquired first as a first data string until a first tail data value different from the first head data value is detected according to the output of the first address Is read from the serial memory.
(3) A process of outputting the second address obtained by inverting the specific bit of the first address to the serial memory.
(4) According to the output of the second address, as the second data string, a data string from the first head data value acquired first until a second tail data value different from the second head data value is detected Processing to read from serial memory.
(5) Processing for comparing the first data string and the second data string.
(6) A process of determining the number of address bytes of the serial memory based on an address part including a specific bit when it is detected that the first data string and the second data string do not match.
These processes are the same as the operations described with reference to FIG. 3, and FIGS. 8A to 10B are examples of specific operations, and thus detailed description thereof is omitted.
また、プログラムは、例えば、図21に示す半導体装置801内で実行させることができる。図21の構成例は、図4に示す半導体装置102から、汎用入出力ポート107、アドレスバイト数検出モジュール108、SPI信号切り替えモジュール110を除いた構成である。加えて、クロックド・シリアル・インタフェース・モジュール109は、シリアルメモリ101と直接接続されるように構成される。
半導体装置801では、プログラムは、ROM105に格納され、電源がONになると、ROM105からプログラムが読み出される。プログラムは、CPU104の制御のもとで、実行される。プログラムは、クロックド・シリアル・インタフェース・モジュール109によって、シリアルメモリ101との入出力を実施する。
図21の構成例では、半導体装置801に示すように、一般的な半導体装置の構成に特別な回路を追加することなく、プログラムをROM105に組み込むことによって、一実施形態のアドレスバイト数判定方法を実施することが可能になる。
Further, the program can be executed, for example, in the
In the
In the configuration example of FIG. 21, as shown in the
さらに、上述の例において、プログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non-transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えばフレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば光磁気ディスク)、CD−ROM(Read Only Memory)、CD−R、CD−R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM(Random Access Memory))を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は無線通信路を介して、プログラムをコンピュータに供給できる。 Further, in the above example, the program can be stored using various types of non-transitory computer readable media and supplied to the computer. Non-transitory computer readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (for example, flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (for example, magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / W, semiconductor memory (for example, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (Random Access Memory)) are included. The program may also be supplied to the computer by various types of transitory computer readable media. Examples of transitory computer readable media include electrical signals, optical signals, and electromagnetic waves. The temporary computer-readable medium can supply the program to the computer via a wired communication path such as an electric wire and an optical fiber, or a wireless communication path.
上記各実施形態で説明したように、一実施形態のアドレスバイト数判定装置及び方法は、次の処理を実行する。
SPIに準拠した不揮発性シリアルメモリのアドレスバイト数の判定方法であって、想定される最大のアドレスバイト数を仮定して、第1アドレスからシリアルメモリの読み出しサイクルを開始し、少なくとも1回のデータ変化を含む第1データ列(第1のバイト列データ)を取得すること。想定される最大のアドレスバイト数を仮定して、第1アドレスの特定ビットを反転して得られる第2アドレスからシリアルメモリの読み出しサイクルを開始し、少なくとも1回のデータ変化を含む第2データ列(第2のバイト列データ)を取得すること。第1データ列と第2データ列を比較すること。比較結果が一致する場合には、特定ビットを含むアドレス部位が有効であると判断し、一致しない場合には、特定ビットを含むアドレス部位が無効であると判断すること。
このような各処理を実行することにより、シリアルメモリに判定用データを書き込むことなく、シリアルメモリのアドレスバイト数を判定する。これにより、書き換え不能な不揮発性シリアルメモリに対するアドレスバイト数の自動判定が可能となる。
As described in the above embodiments, the apparatus and method for determining the number of address bytes according to an embodiment performs the following processing.
A method for determining the number of address bytes of a non-volatile serial memory compliant with SPI, assuming a maximum possible number of address bytes, starting a read cycle of the serial memory from the first address, and at least one data Obtaining a first data string (first byte string data) including a change. Assuming the maximum possible number of address bytes, the second data string including at least one data change is started by starting a read cycle of the serial memory from the second address obtained by inverting the specific bit of the first address. Obtain (second byte string data). Comparing the first data string and the second data string; When the comparison results match, it is determined that the address part including the specific bit is valid, and when the result does not match, it is determined that the address part including the specific bit is invalid.
By executing each of these processes, the number of address bytes in the serial memory is determined without writing determination data in the serial memory. This makes it possible to automatically determine the number of address bytes for a non-rewritable nonvolatile serial memory.
以上、本発明者によってなされた発明を実施形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。 As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and various modifications can be made without departing from the scope of the invention. Needless to say.
101 シリアルメモリ
102、401、801 半導体装置
103 クロック生成モジュール
104 CPU
105 ROM
106 RAM
107 汎用入出力ポート
108 アドレスバイト数検出モジュール
109 クロックド・シリアル・インタフェース・モジュール
110 SPI信号切り替えモジュール
201 シリアル転送クロック生成モジュール
202 シーケンス制御モジュール
203 バイト選択モジュール
204 ビット反転制御モジュール
205 パラレル/シリアル変換モジュール
206 ANDゲート
207 シリアル/パラレル変換モジュール
208、209、210、211 1バイト・レジスタ
212、213 カウンタ
214、215,216,217,218 比較器
219 ANDゲート
301,302,303 セレクタ
304、305 バッファ
402 SPIメモリ・コントローラ・モジュール
403 インバータ
N101 シリアルメモリ用デバイス選択信号
N102 シリアルメモリ用クロック信号
N103 シリアルメモリ用データ入力信号
N104 シリアルメモリ用データ出力信号
N105 アドレスバイト数検出用デバイス選択信号
N106 アドレスバイト数検出用クロック信号
N107 アドレスバイト数検出用データ入力信号
N108 アドレスバイト数検出用データ出力信号
N109 SPI入出力用デバイス選択信号
N110 SPI入出力用クロック信号
N111 SPI入出力用データ入力信号
N112 SPI入出力用データ出力信号
N113 アドレスバイト数検出完了信号
N114 アドレスバイト数検出結果信号
N115 システムバス
N116 バスのクロック信号
N117 バスのリセット信号
N201 シリアル転送クロック信号
N202 アドレスバイト数検出用アドレス信号
N203 アドレスバイト数検出用命令コード
N204 出力バイトデータ選択信号
N205 出力バイトデータ
N206 ビット反転制御信号
N207 ビット反転制御済みアドレス
N208 データ更新制御信号
N209 クロック出力許可信号
N210 受信データ
N211 受信データキャプチャ制御信号
N212 受信データキャプチャ制御信号
N213 受信データキャプチャ制御信号
N214 受信データキャプチャ制御信号
N215 キャプチャ済み受信データ
N216 キャプチャ済み受信データ
N217 キャプチャ済み受信データ
N218 キャプチャ済み受信データ
N219 カウンタ初期化信号
N220 カウントクロック
N221 カウンタ初期化信号
N222 カウントクロック
N223 カウント結果
N224 カウント結果
N225、N226、N227、N228、N229 比較結果出力信号
N230 比較結果出力信号
N401 SPI入出力用デバイス選択信号
N402 SPI入出力用クロック信号
N403 SPI入出力用データ入力信号
N404 SPI入出力用データ出力信号
N405 ホールド要求信号
101
105 ROM
106 RAM
107 General-purpose I / O port 108 Address byte count detection module 109 Clocked serial interface module 110 SPI signal switching module 201 Serial transfer clock generation module 202 Sequence control module 203 Byte selection module 204 Bit inversion control module 205 Parallel / serial conversion module 206 AND gate 207 Serial / parallel conversion module 208, 209, 210, 211 1 byte register 212, 213 Counter 214, 215, 216, 217, 218 Comparator 219 AND gate 301, 302, 303 Selector 304, 305 Buffer 402 SPI Memory controller module 403 Inverter N101 Serial memory device selection signal N 02 Serial memory clock signal N103 Serial memory data input signal N104 Serial memory data output signal N105 Address byte count detection device selection signal N106 Address byte count detection clock signal N107 Address byte count detection data input signal N108 Address byte count Detection data output signal N109 SPI input / output device selection signal N110 SPI input / output clock signal N111 SPI input / output data input signal N112 SPI input / output data output signal N113 Address byte count detection completion signal N114 Address byte count detection result signal N115 System bus N116 Bus clock signal N117 Bus reset signal N201 Serial transfer clock signal N202 Address byte number detection address signal N203 Address byte count detection instruction code N204 Output byte data selection signal N205 Output byte data N206 Bit inversion control signal N207 Bit inversion controlled address N208 Data update control signal N209 Clock output enable signal N210 Reception data N211 Reception data capture control signal N212 Reception data Capture control signal N213 Received data capture control signal N214 Received data capture control signal N215 Captured received data N216 Captured received data N217 Captured received data N218 Captured received data N219 Counter initialization signal N220 Count clock N221 Counter initialization signal N222 Count Clock N223 Count result N224 Count result N225, N226, N227, N228, N229 Comparison result output signal N230 Comparison result output signal N401 SPI input / output device selection signal N402 SPI input / output clock signal N403 SPI input / output data input signal N404 SPI input / output data output signal N405 Hold request signal
Claims (16)
前記シリアルメモリのアドレスの最大バイト数を仮定し、前記最大バイト数を有する第1アドレスを前記メモリ入出力部へ送り、その後、前記第1アドレスの特定ビットを反転した第2アドレスを前記メモリ入出力部へ送るアドレス生成部と、
前記シリアルメモリへの前記第1アドレスの出力に応じて、前記メモリ入出力部を介して最初に取得する第1先頭データ値から、前記第1先頭データ値と異なる第1末尾データ値が検出されるまでの第1データ列を取得する第1データ列取得部と、
前記シリアルメモリへの前記第2アドレスの出力に応じて、前記メモリ入出力部を介して最初に取得する第2先頭データ値から、前記第2先頭データ値と異なる第2末尾データ値が検出されるまでの第2データ列を取得する第2データ列取得部と、
前記第1データ列と前記第2データ列とが一致するか、不一致であるかを示す比較結果を出力する比較部と、
前記比較結果が不一致であることを検出すると、前記特定ビットを含むアドレス部位に基づいて前記シリアルメモリのアドレスバイト数を出力する制御部と、
を備えるアドレスバイト数判定装置。 A memory input / output unit that outputs an address to a serial memory and receives a continuous data string from the serial memory according to the address;
Assuming the maximum number of bytes of the address of the serial memory, the first address having the maximum number of bytes is sent to the memory input / output unit, and then the second address obtained by inverting the specific bit of the first address is input to the memory. An address generation unit to be sent to the output unit;
In response to the output of the first address to the serial memory, a first tail data value different from the first head data value is detected from the first head data value first obtained through the memory input / output unit. A first data string acquisition unit for acquiring a first data string until
In response to the output of the second address to the serial memory, a second tail data value different from the second head data value is detected from the second head data value first obtained through the memory input / output unit. A second data string acquisition unit for acquiring a second data string until
A comparison unit that outputs a comparison result indicating whether the first data string and the second data string match or not; and
When detecting that the comparison result does not match, a control unit that outputs the number of address bytes of the serial memory based on an address portion including the specific bit;
A device for determining the number of address bytes.
前記第2データ列取得部は、前記シリアルメモリへの前記第2アドレスの新たな出力に応じて、前記第2データ列を取得し、
前記比較部は、前記第2データ列取得部が前記第2データ列を新たに取得すると、前記比較結果を更新するように構成されていることを特徴とする請求項1記載のアドレスバイト数判定装置。 The control unit controls the address generation unit to send the second address in which the specific bit is changed to a different position to the memory input / output unit when the comparison result indicates a match;
The second data string acquisition unit acquires the second data string in response to a new output of the second address to the serial memory,
2. The address byte count determination according to claim 1, wherein the comparison unit is configured to update the comparison result when the second data string acquisition unit newly acquires the second data string. apparatus.
前記アドレス生成部は、前記第2アドレスの最初の特定ビットを最大バイト数のアドレス部位の最下位ビットとし、その後に生成する第2アドレスの特定ビットを、一つ前に生成した第2アドレスの特定ビットを含むアドレス部位より一つ上位のアドレス部位の最下位ビットとすることを特徴とする請求項2記載のアドレスバイト数判定装置。 If the first address consists of the first to the maximum number of bytes,
The address generation unit sets the first specific bit of the second address as the least significant bit of the address portion of the maximum number of bytes, and then generates the specific bit of the second address generated after that of the second address generated immediately before 3. The address byte number determination apparatus according to claim 2, wherein the least significant bit of the address part one higher than the address part including the specific bit is used.
前記第2データ列取得部は、前記第2データ列として、前記第2先頭データ値、前記第2末尾データ値、及び、前記第2データ列の長さを示す第2データ長を含む第2データ列情報を保持し、
前記比較部は、前記第1データ列情報及び前記第2データ列情報の各要素のすべてが一致する場合には、前記比較結果を一致とし、いずれかの要素が不一致である場合には、前記比較結果を不一致とすることを特徴とする請求項1記載のアドレスバイト数判定装置。 The first data string acquisition unit includes, as the first data string, a first data value indicating a length of the first data string, a first data value, and a first data value indicating a length of the first data string. Holds data column information,
The second data string acquisition unit includes, as the second data string, a second data length that includes the second head data value, the second tail data value, and a second data length indicating a length of the second data string. Holds data column information,
The comparison unit sets the comparison result to match when all the elements of the first data string information and the second data string information match, and when any element does not match, 2. The address byte number determination apparatus according to claim 1, wherein the comparison result is inconsistent.
前記第2データ列取得部は、前記第2先頭データ値を保持する第3レジスタ、前記第2末尾データ値を保持する第4レジスタ、前記第3レジスタが保持する値と前記第4レジスタが保持する値とを比較する第2比較器、及び、前記第2データ長をカウントする第2カウンタを備え、
前記制御部は、前記第1レジスタに前記第1先頭データ値を保持させ、前記第1比較器の出力が不一致を示すまで、前記第1データ列の2番目に取得する値から順番に前記第2レジスタに取り込むことによって前記第1末尾データ値を前記第2レジスタに保持させ、前記第3レジスタに前記第2先頭データ値を保持させ、前記第2比較器の出力が不一致を示すまで、前記第2データ列の2番目に取得する値から順番に前記第4レジスタに取り込むことによって前記第2末尾データ値を前記第4レジスタに保持させるように制御することを特徴とする請求項8記載のアドレスバイト数判定装置。 The first data string acquisition unit includes a first register that holds the first head data value, a second register that holds the first tail data value, a value held by the first register, and a second register A first comparator that compares a value to be measured, and a first counter that counts the first data length;
The second data string acquisition unit includes a third register that holds the second head data value, a fourth register that holds the second tail data value, a value held by the third register, and a fourth register A second comparator for comparing with a value to be performed, and a second counter for counting the second data length,
The control unit holds the first head data value in the first register, and sequentially outputs the first data value from the second value acquired in the first data string until the output of the first comparator indicates a mismatch. Until the second tail data value is held in the second register, the second head data value is held in the third register, and the output of the second comparator indicates a mismatch. 9. The control according to claim 8, wherein the second end data value is controlled to be held in the fourth register by taking the value into the fourth register in order from the second acquired value of the second data string. Address byte count determination device.
前記第1アドレスの出力に応じて、第1データ列として、最初に取得する第1先頭データ値から、前記第1先頭データ値と異なる第1末尾データ値が検出されるまでのデータ列を前記シリアルメモリから読み出し、
前記第1アドレスの特定ビットを反転した第2アドレスを前記シリアルメモリへ出力し、
前記第2アドレスの出力に応じて、第2データ列として、最初に取得する第2先頭データ値から、前記第2先頭データ値と異なる第2末尾データ値が検出されるまでのデータ列を前記シリアルメモリから読み出し、
前記第1データ列と前記第2データ列とを比較し、
前記第1データ列と前記第2データ列とが不一致であることを検出すると、前記特定ビットを含むアドレス部位に基づいて前記シリアルメモリのアドレスバイト数を判定するアドレスバイト数判定方法。 Assuming the maximum number of bytes of the address of the serial memory, the first address having the maximum number of bytes is output to the serial memory,
According to the output of the first address, a data string from the first head data value acquired first to a first tail data value different from the first head data value is detected as the first data string. Read from serial memory,
A second address obtained by inverting a specific bit of the first address is output to the serial memory;
According to the output of the second address, a data string from the first leading data value acquired first to the second trailing data value different from the second leading data value is detected as the second data string. Read from serial memory,
Comparing the first data string and the second data string;
An address byte number determination method for determining the number of address bytes of the serial memory based on an address part including the specific bit when detecting that the first data string and the second data string do not match.
前記第2アドレスの新たな出力に応じて、前記第2データ列を取得し、
前記第1データ列と、新たに取得した前記第2データ列とを比較し、
前記アドレスバイト数を判定するまで、前記シリアルメモリへ前記変更した前記第2アドレスの出力を繰り返すことを特徴とする請求項10記載のアドレスバイト数判定方法。 When the first data string and the second data string match, the second address in which the specific bit is changed to a different position is output to the serial memory,
In response to the new output of the second address, the second data string is acquired,
Comparing the first data string and the newly acquired second data string;
11. The address byte number determination method according to claim 10, wherein output of the changed second address to the serial memory is repeated until the address byte number is determined.
前記第2アドレスの最初の特定ビットは、最大バイト数のアドレス部位の最下位ビットであり、
その後に生成する第2アドレスの特定ビットは、一つ前に生成した第2アドレスの特定ビットを含むアドレス部位より一つ上位のアドレス部位の最下位ビットであることを特徴とする請求項11記載のアドレスバイト数判定方法。 If the first address consists of the first to the maximum number of bytes,
The first specific bit of the second address is the least significant bit of the address part of the maximum number of bytes;
12. The specific bit of the second address generated thereafter is the least significant bit of the address portion one higher than the address portion including the specific bit of the second address generated immediately before. To determine the number of address bytes.
シリアルメモリのアドレスの最大バイト数を仮定し、前記最大バイト数を有する第1アドレスをシリアルメモリへ出力する処理と、
前記第1アドレスの出力に応じて、第1データ列として、最初に取得する第1先頭データ値から、前記第1先頭データ値と異なる第1末尾データ値が検出されるまでのデータ列を前記シリアルメモリから読み出す処理と、
前記第1アドレスの特定ビットを反転した第2アドレスを前記シリアルメモリへ出力する処理と、
前記第2アドレスの出力に応じて、第2データ列として、最初に取得する第2先頭データ値から、前記第2先頭データ値と異なる第2末尾データ値が検出されるまでのデータ列を前記シリアルメモリから読み出す処理と、
前記第1データ列と前記第2データ列とを比較する処理と、
前記第1データ列と前記第2データ列とが不一致であることを検出すると、前記特定ビットを含むアドレス部位に基づいて前記シリアルメモリのアドレスバイト数を判定する処理と、
を実行させるプログラム。 On the computer,
Assuming the maximum number of bytes of the address of the serial memory, a process of outputting the first address having the maximum number of bytes to the serial memory;
According to the output of the first address, a data string from the first head data value acquired first to a first tail data value different from the first head data value is detected as the first data string. Reading from serial memory,
A process of outputting a second address obtained by inverting a specific bit of the first address to the serial memory;
According to the output of the second address, a data string from the first leading data value acquired first to the second trailing data value different from the second leading data value is detected as the second data string. Reading from serial memory,
A process of comparing the first data string and the second data string;
When detecting that the first data string and the second data string do not match, a process of determining the number of address bytes of the serial memory based on an address portion including the specific bit;
A program that executes
請求項1乃至6、8、9のいずれか一項に記載のアドレスバイト数判定装置と、
前記シリアルインタフェース部と前記アドレスバイト数判定装置とを切り替えて、シリアルメモリと接続するスイッチ部と、を備える半導体集積装置。 A serial interface unit that controls input / output of data to / from the serial memory;
The address byte number determination device according to any one of claims 1 to 6, 8, and 9,
A semiconductor integrated device comprising: a switch unit that switches between the serial interface unit and the address byte number determination device and connects to a serial memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012038512A JP2013175014A (en) | 2012-02-24 | 2012-02-24 | Address byte count determination device, address byte count determination method, program, and semiconductor device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012038512A JP2013175014A (en) | 2012-02-24 | 2012-02-24 | Address byte count determination device, address byte count determination method, program, and semiconductor device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013175014A true JP2013175014A (en) | 2013-09-05 |
Family
ID=49267868
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012038512A Pending JP2013175014A (en) | 2012-02-24 | 2012-02-24 | Address byte count determination device, address byte count determination method, program, and semiconductor device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013175014A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014078296A (en) * | 2012-10-10 | 2014-05-01 | Mitsubishi Electric Corp | Memory inspection device, memory inspection method and memory inspection program |
CN113448894A (en) * | 2020-03-27 | 2021-09-28 | 株式会社村田制作所 | Data communication device and data communication module |
-
2012
- 2012-02-24 JP JP2012038512A patent/JP2013175014A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014078296A (en) * | 2012-10-10 | 2014-05-01 | Mitsubishi Electric Corp | Memory inspection device, memory inspection method and memory inspection program |
CN113448894A (en) * | 2020-03-27 | 2021-09-28 | 株式会社村田制作所 | Data communication device and data communication module |
CN113448894B (en) * | 2020-03-27 | 2023-10-20 | 株式会社村田制作所 | Data communication device and data communication module |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10592448B2 (en) | Master-slave system, command execution method and data access method with use of serial peripheral interface (SPI) | |
US8769160B2 (en) | Multi-interface memory card and method of operation | |
TW486668B (en) | A single-chip data processing apparatus incorporating an electrically rewritable nonvolatile memory and method of operating the same | |
JP4901285B2 (en) | Memory card that can improve read performance | |
JP4896450B2 (en) | Storage device | |
US8103817B2 (en) | Systems for accessing memory card and methods for accessing memory card by a control unit | |
JP5378360B2 (en) | Automatic detection of memory page size | |
US20230004331A1 (en) | Nand raid controller | |
US20140082267A1 (en) | EMBEDDED MULTIMEDIA CARD (eMMC), HOST CONTROLLING eMMC, AND METHOD OPERATING eMMC SYSTEM | |
US20070288703A1 (en) | Portable storage apparatus and method for freely changing data bus width | |
KR20150106524A (en) | Semiconductor device and semiconductor system for conducting trainning method | |
CN109686391B (en) | Nonvolatile memory device, method of operating the same, and nonvolatile memory package | |
CN109493910B (en) | Microcontroller and operating method thereof and memory system having the same | |
EP1403814B1 (en) | Electronic apparatus, information processing apparatus, adapter apparatus, and information exchange system | |
JP4588427B2 (en) | Memory system and data transmission speed setting method between host and memory card | |
CN105843766B (en) | Method and apparatus for configuring serial device | |
JP2013175014A (en) | Address byte count determination device, address byte count determination method, program, and semiconductor device | |
US9760509B2 (en) | Memory storage device and control method thereof and memory control circuit unit and module | |
TWI467579B (en) | Electronic device, method for controlling memory thereof and associated computer-readable storage medium | |
CN106919343B (en) | Peripheral interface circuit and peripheral memory system | |
JP2009252109A (en) | Memory card control device | |
US20140372666A1 (en) | Semiconductor device with configurable support for multiple command specifications, and method regarding the same | |
US10453072B2 (en) | Electronic device having disassemble monitoring device | |
US11093421B2 (en) | Operation device | |
US20220147469A1 (en) | Method for managing an operation for modifying the stored content of a memory device, and corresponding memory device |