JPH10320271A - Microcomputer system - Google Patents

Microcomputer system

Info

Publication number
JPH10320271A
JPH10320271A JP14573697A JP14573697A JPH10320271A JP H10320271 A JPH10320271 A JP H10320271A JP 14573697 A JP14573697 A JP 14573697A JP 14573697 A JP14573697 A JP 14573697A JP H10320271 A JPH10320271 A JP H10320271A
Authority
JP
Japan
Prior art keywords
access
microcomputer system
time
access time
memory device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP14573697A
Other languages
Japanese (ja)
Inventor
Tomoo Asami
智生 浅見
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 JP14573697A priority Critical patent/JPH10320271A/en
Publication of JPH10320271A publication Critical patent/JPH10320271A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a microcomputer system capable of properly controlling access timing to a memory device. SOLUTION: The microcomputer system for accessing a memory at set access timing is provided with an access time detection circuit 3 for addressing a memory device 2 trying to execute access timing control immediately after turning on a power supply, sampling data on a data bus for a fixed period and detecting an access time by detecting a change in the states of two continuous sampled values from a non-coincident state to a coincident state and an access timing control part 4 for controlling access timing in accordance with the access time detected by the circuit 3.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はマイクロプロセッサ
及びROM、RAMなどメモリデバイスを備えたマイク
ロコンピュータシステムに係わり、特にメモリデバイス
へのアクセスタイミングを適切に制御できるマイクロコ
ンピュータシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer system having a microprocessor and a memory device such as a ROM and a RAM, and more particularly to a microcomputer system capable of appropriately controlling access timing to a memory device.

【0002】[0002]

【従来の技術】マイクロコンピュータシステムなどで用
いられるROM、RAMなどメモリデバイスのアクセス
タイムは製品によって様々である。そのため、一般に
は、マイクロコンピュータシステムなどを設計する際
に、用いるメモリデバイスを決定し、この決定したメモ
リデバイスに合わせてメモリデバイスへのアクセスタイ
ミングを設定していた。しかし、メモリデバイスの条件
を決定した上でアクセスタイミングを設定するという方
法では、製品化後にアクセスタイムの遅いメモリデバイ
スに変更しようと思っても変更が不可能である。そのた
め、特開平2−83754号公報に示されたメモリアク
セスウェイト制御回路では、メモリアクセスウェイト時
間に関係するクロックの幅を変えることにより、メモリ
デバイスのアクセスタイムによって異なったメモリアク
セスウェイト時間を実現し、上述したような従来の問題
を解決している。
2. Description of the Related Art The access time of a memory device such as a ROM or a RAM used in a microcomputer system or the like varies depending on products. Therefore, generally, when designing a microcomputer system or the like, a memory device to be used is determined, and access timing to the memory device is set in accordance with the determined memory device. However, in the method of setting the access timing after determining the conditions of the memory device, it is impossible to change to a memory device having a slow access time after commercialization. Therefore, the memory access wait control circuit disclosed in Japanese Patent Application Laid-Open No. 2-83754 realizes different memory access wait times depending on the access time of the memory device by changing the width of the clock related to the memory access wait time. This solves the conventional problem as described above.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、特開平
2−83754号公報に示された従来技術では、メモリ
アクセスウェイト時間を変えるに際し、アクセスタイム
を自動的に検知することができないと共に、クロックの
幅を変えることによりアクセスタイミングを変えている
ので、アクセスタイミングの可変範囲が狭く、そのため
メモリデバイスによっては適切なアクセスタイミングを
実現できないという問題がある。本発明の課題は、上記
のような従来技術の問題を解決し、メモリデバイスへの
アクセスタイミングを適切に制御できるマイクロコンピ
ュータシステムを提供することにある。
However, in the prior art disclosed in Japanese Patent Application Laid-Open No. 2-83754, when changing the memory access wait time, the access time cannot be automatically detected, and the clock width cannot be automatically detected. Since the access timing is changed by changing the access timing, there is a problem that a variable range of the access timing is narrow, so that an appropriate access timing cannot be realized depending on a memory device. SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems of the related art and to provide a microcomputer system capable of appropriately controlling access timing to a memory device.

【0004】[0004]

【課題を解決するための手段】上記の課題を解決するた
めに、請求項1記載の発明では、設定されたアクセスタ
イミングでメモリアクセスを行うマイクロコンピュータ
システムにおいて、メモリデバイスのアクセスタイムを
自動的に検出するアクセスタイム検出手段と、上記アク
セスタイム検出手段により検出されたアクセスタイムに
従ってアクセスタイミングを制御するアクセスタイミン
グ制御手段とを備えた。また、請求項2記載の発明で
は、上記において、電源投入直後、アクセスタイミング
制御を行おうとするメモリデバイスをアドレッシング
し、そのときのデータバス上のデータを一定周期でサン
プリングし連続する二つのサンプリング値が不一致状態
から一致状態になったことを検出してアクセスタイムを
検出するようにアクセスタイム検出手段を構成した。ま
た、請求項3記載の発明では、上記において、連続する
二つのサンプリング値が不一致状態から一致状態になっ
た次のサンプリング時をアクセスタイミングとするよう
にアクセスタイミング制御手段を構成した。また、請求
項4記載の発明では、請求項2記載の発明において、連
続する二つのサンプリング値が不一致状態から一致状態
になり、且つ上記一致状態が2回以上連続して検出され
た時をアクセスタイムまたはアクセスタイミングとする
構成にした。また、請求項5記載の発明では、請求項2
乃至請求項4のマイクロコンピュータシステムにおい
て、データバスのプルアップおよびプルダウンを選択的
に行うデータバスプル手段を備え、電源投入直後、上記
データバスプル手段によりデータバスをプルアップまた
はプルダウン状態にしてアクセスタイムを求める動作を
開始させ、連続する二つのサンプリング値が不一致状態
にならないときは、データバスプル状態を他方の状態に
変えて再びアクセスタイムを求める動作を開始させるこ
とによりアクセスタイムを求める構成にした。また、請
求項6記載の発明では、設定されたアクセスタイミング
でメモリアクセスを行うマイクロコンピュータシステム
において、予め自身の所定のアドレスにアクセスタイム
が書き込まれた不揮発性メモリデバイスと、上記不揮発
性メモリデバイスに書き込まれているアクセスタイムを
読み出してアクセスタイミングを制御するアクセスタイ
ミング制御手段とを備えた。また、請求項7記載の発明
では、不揮発性メモリデバイスにおいて、製造時に、自
身の所定のアドレスにアクセスタイムを書き込んだ構成
にした。
In order to solve the above-mentioned problems, according to the present invention, in a microcomputer system for performing memory access at a set access timing, an access time of a memory device is automatically set. An access time detecting means for detecting, and an access timing control means for controlling access timing according to the access time detected by the access time detecting means are provided. According to the second aspect of the present invention, in the above, immediately after power-on, a memory device for which access timing control is to be performed is addressed, and data on the data bus at that time is sampled at a constant cycle to obtain two consecutive sampling values. The access time detecting means is configured to detect that the state has changed from the non-match state to the match state and detect the access time. According to the third aspect of the present invention, in the above, the access timing control means is configured so that an access timing is the next sampling time when two consecutive sampled values change from a mismatched state to a matched state. According to a fourth aspect of the present invention, in the second aspect of the present invention, an access is made when two consecutive sampled values change from a non-coincidence state to a coincidence state and the coincidence state is detected two or more consecutive times. Time or access timing. According to the fifth aspect of the present invention,
5. The microcomputer system according to claim 4, further comprising data bus pull means for selectively pulling up and pulling down the data bus, and immediately after power-on, the data bus is pulled up or pulled down by said data bus pull means for access. When the operation for obtaining the time is started, and when two consecutive sampled values do not become inconsistent, the operation for obtaining the access time is started by changing the data bus pull state to the other state and starting the operation for obtaining the access time again. did. According to a sixth aspect of the present invention, in a microcomputer system for performing memory access at a set access timing, a nonvolatile memory device in which an access time is previously written at a predetermined address of the nonvolatile memory device; Access timing control means for controlling the access timing by reading the written access time. Further, in the invention according to claim 7, in the nonvolatile memory device, an access time is written to a predetermined address of the nonvolatile memory device at the time of manufacture.

【0005】[0005]

【作用】上記のような手段にしたので、請求項1記載の
発明では、検出されたアクセスタイムに従って、メモリ
デバイスへのアクセスタイミングが適切に制御される。
請求項2記載の発明では、電源投入直後、アクセスタイ
ミング設定を行おうとするメモリデバイスにアクセスし
て、そのときのデータバス上のデータを一定周期でサン
プリングし、連続する二つのサンプリング値が不一致状
態から一致状態になったことを検出することによりアク
セスタイムが検出される。請求項3記載の発明では、上
記において、連続する二つのサンプリング値が不一致状
態から一致状態になった次のサンプリング時がアクセス
タイミングとなるように設定される。請求項4記載の発
明では、連続する二つのサンプリング値が不一致状態か
ら一致状態になり、且つ上記一致状態が2回以上連続し
て検出された時がアクセスタイムまたはアクセスタイミ
ングとなるように設定される。請求項5記載の発明で
は、電源投入直後、データバスがプルアップまたはプル
ダウン状態にされてアクセスタイムを求める動作が開始
され、連続する二つのサンプリング値が不一致状態にな
らないときは、データバスプル状態が他方の状態に変え
られて再びアクセスタイムを求める動作が開始されるこ
とによりアクセスタイムが求められる。請求項6記載の
発明では、ROMに書き込まれているアクセスタイムが
読み出され、そのアクセスタイムに従ってアクセスタイ
ミングが自動的に設定される。請求項7記載の発明で
は、ROMの所定のアドレスにアクセスすることにより
上記ROMのアクセスタイムを得ることができる。
According to the first aspect of the present invention, the access timing to the memory device is appropriately controlled according to the detected access time.
According to the second aspect of the invention, immediately after the power is turned on, a memory device for which access timing is to be set is accessed, data on the data bus at that time is sampled at a constant cycle, and two consecutive sampled values are in a non-coincidence state. The access time is detected by detecting that a match has been reached from. According to the third aspect of the present invention, in the above, the access timing is set so that the next sampling time when two consecutive sampled values change from a non-coincidence state to a coincidence state. According to the fourth aspect of the present invention, an access time or an access timing is set when two consecutive sampled values change from a non-coincidence state to a coincidence state, and when the coincidence state is detected twice or more consecutively. You. According to the fifth aspect of the present invention, immediately after the power is turned on, the data bus is pulled up or down to start the operation for obtaining the access time, and when two consecutive sampled values do not become inconsistent, the data bus is pulled up. Is changed to the other state, and the operation for obtaining the access time is started again, whereby the access time is obtained. According to the present invention, the access time written in the ROM is read, and the access timing is automatically set according to the access time. According to the seventh aspect of the present invention, the access time of the ROM can be obtained by accessing a predetermined address of the ROM.

【0006】[0006]

【発明の実施の形態】以下、図面により本発明の実施の
形態を詳細に説明する。図1は本発明をマイクロコンピ
ュータシステムに適用した第1の形態例の構成ブロック
図である。図示したように、この形態例のマイクロコン
ピュータシステムは、CPU(マイクロプロセッサ)な
どを有する制御部1、アクセスタイム検出対象のROM
またはRAMなどメモリデバイス2、メモリデバイス2
のアクセスタイムを検出するアクセスタイム検出回路3
(アクセスタイム検出手段)、検出されたアクセスタイ
ムに従ってアクセスタイミングを設定し、設定されたア
クセスタイミングに従ってメモリデバイス2へのアクセ
スを制御するアクセスタイミング制御部4(アクセスタ
イミング制御手段)、データバスの電源電圧Vccへの
プルアップまたはグラウンド(GND)へのプルダウン
を行う選択スイッチ5(データバスプル手段)などを備
えている。なお、選択スイッチ5を備えない構成も可能
である。図2に、第1の形態例のアクセスタイム検出回
路3の詳細を示す。図示したように、このアクセスタイ
ム検出回路3は、例えば8ビット構成のフリップフロッ
プ(以下、F/Fと称す)11、12、F/F11、1
2の出力値を比較する比較回路13、比較回路13から
出力される一致信号AがHighレベル(一致を意味す
る)からLowレベルになったとき所定幅の信号Bを出
力する不一致検出回路14、不一致が検出されたことを
記憶しておくフラグ回路15、2回目の一致が検出され
たとき所定幅の信号CMPOKを出力する一致検出回路
16などを備える。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a configuration block diagram of a first embodiment in which the present invention is applied to a microcomputer system. As shown in the figure, the microcomputer system of this embodiment includes a control unit 1 having a CPU (microprocessor) and the like, and a ROM for detecting an access time.
Or a memory device 2 such as a RAM, a memory device 2
Access time detection circuit 3 for detecting access time
(Access time detection means), an access timing control unit 4 (access timing control means) for setting access timing according to the detected access time, and controlling access to the memory device 2 according to the set access timing, and a power supply for the data bus. A selection switch 5 (data bus pull means) for pulling up to the voltage Vcc or pulling down to the ground (GND) is provided. Note that a configuration without the selection switch 5 is also possible. FIG. 2 shows details of the access time detection circuit 3 of the first embodiment. As shown in the figure, the access time detection circuit 3 includes flip-flops (hereinafter, referred to as F / Fs) 11, 12, F / Fs 11, 1 having an 8-bit configuration, for example.
A mismatch circuit 14, which outputs a signal B of a predetermined width when the coincidence signal A output from the comparator circuit 13 changes from High level (meaning coincidence) to Low level. A flag circuit 15 for storing that a mismatch is detected is provided, a match detection circuit 16 for outputting a signal CMPOK having a predetermined width when a second match is detected, and the like.

【0007】また、図3に示すように、アクセスタイミ
ング制御部4は、読み出し信号RDの冒頭で所定幅のロ
ード信号Fを出力させるロード信号生成回路17、イン
クリメントカウンタ18、デクリメントカウンタ19、
比較回路20などを備える。なお、RDBは前記読み出
し信号RDの反転信号である。図4は選択スイッチ5を
備えない第1の形態例のタイミングチャート、図5は動
作フロー図である。以下、図1〜図5に従って第1の形
態例の動作を説明する。まず、マイクロコンピュータシ
ステムに電源を投入する(S1)。すると、制御部1
は、メモリデバイス2をアドレッシングし(アクセスタ
イムチェックアドレスをアドレッシング)(図4参
照)、読み出しを開始し(S2)、RDB信号はLow
レベルになる。また、電源が投入されると、制御部1か
らはシステムクロック(以下、CLK信号と称す)が出
力され、最初のCLK信号によりデータバス上のデータ
がF/F11にセットされる(S3)。また、次のCL
K信号によりF/F11にセットされていたデータがF
/F12にセットされ、F/F11にはそのときのデー
タバス上のデータがセットされる(S4)。なお、制御
部1が読み出しを開始し、読み出し信号RDの反転信号
であるRDB信号がLowレベルになると、その冒頭で
アクセスタイミング制御部4内のロード信号生成回路1
7からロード信号Fが出力され、それによりインクリメ
ントカウンタ18の値が0にセットされる。また、この
とき、インクリメントカウンタ18のEN(イネーブ
ル)端子はLowレベルになっているので、カウンタの
値が0にセットされた後は、CLK信号がHighにな
る度毎にカウンタ18の値が1づつ増える。
As shown in FIG. 3, the access timing control section 4 includes a load signal generation circuit 17 for outputting a load signal F having a predetermined width at the beginning of the read signal RD, an increment counter 18, a decrement counter 19,
A comparison circuit 20 and the like are provided. Note that RDB is an inverted signal of the read signal RD. FIG. 4 is a timing chart of the first embodiment without the selection switch 5, and FIG. 5 is an operation flowchart. Hereinafter, the operation of the first embodiment will be described with reference to FIGS. First, the microcomputer system is turned on (S1). Then, the control unit 1
Addresses the memory device 2 (addresses the access time check address) (see FIG. 4), starts reading (S2), and the RDB signal is Low.
Become a level. When the power is turned on, the control unit 1 outputs a system clock (hereinafter, referred to as a CLK signal), and data on the data bus is set in the F / F 11 by the first CLK signal (S3). Also, the next CL
The data set in F / F11 by the K signal becomes F / F11.
/ F12, and the data on the data bus at that time is set in F / F11 (S4). When the control unit 1 starts reading and the RDB signal, which is an inverted signal of the read signal RD, goes low, the load signal generation circuit 1 in the access timing control unit 4 starts at the beginning.
7, the load signal F is output, whereby the value of the increment counter 18 is set to 0. At this time, since the EN (enable) terminal of the increment counter 18 is at the low level, after the counter value is set to 0, the value of the counter 18 is set to 1 every time the CLK signal becomes high. Increase by one.

【0008】こうして、一定周期でサンプリングが行わ
れ、F/F11、12 にセットされた連続する二つの
サンプリング値が比較回路13により比較される(S
5)。そして、その二つのサンプリング値が一致してい
て比較回路13の出力信号(信号A)のレベルがHig
hレベルであると(S5、Yes)、次のCLKにより
F/F11にセットされたデータとF/F12にセット
されたデータとが比較され、それら二つのサンプリング
値の比較結果である比較回路13の出力レベルが判定さ
れる(S6、S4、S5)。なお、データバスの値は、
メモリデバイス2のアドレッシングされた番地からRe
ad dataが出力されるまで変化しない(図4参
照)。ところが、その後データバスにRead dat
aが現れると、その冒頭では連続する二つのサンプリン
グ値が異なった値になり(S5、No)、不一致検出回
路14から所定幅の正の信号Bが出力される。続いて、
次のCLK信号で次のサンプリングが行われ(S7)、
前回のサンプリング値との比較が行われるが(S8)、
Read dataの現れた状態が持続しているので、
通常、この比較結果は一致状態を示す(S8、Ye
s)。また、このCLK FLAG信号(信号C)がH
ighレベルになり、CMPOKが所定の幅だけHig
hレベルになる。なお、ビット間(複数のビットデー
タ)のばらつきなどにより一致状態を示さないならば
(S8、No)、次のサンプリングで同じことをくり返
す(S8→S9→S7→S8)。こうして、インクリメ
ントカウンタ18のカウントアップが終了し、以後メモ
リアクセスに関係なく、FLAG信号がHighレベル
を持続するので、インクリメントカウンタ18のカウン
トアップおよびロードは行われず、したがって、カウン
トアップ終了時のカウント値がアクセスタイムに対応し
たカウント値よりも1だけ大きい値として保持される
(S10)(インクリメントカウンタ18の最終値より
1だけ小さいカウント値のときにRead dataは
データバスに現れているので、そのカウント値をアクセ
スタイムに対応したカウント値とするのであり、フロー
図のS10はこの点を考慮した表現にしている)。
In this manner, sampling is performed at a constant period, and two consecutive sampling values set in the F / Fs 11 and 12 are compared by the comparison circuit 13 (S
5). Then, the two sampling values match, and the level of the output signal (signal A) of the comparison circuit 13 is High.
If the signal is at the h level (S5, Yes), the data set in the F / F11 and the data set in the F / F12 are compared by the next CLK, and the comparison circuit 13 which is the result of comparing these two sampled values is compared. Are determined (S6, S4, S5). The value of the data bus is
Re from the addressed address of the memory device 2
It does not change until ad data is output (see FIG. 4). However, after that, Read data
When a appears, at the beginning, two consecutive sampling values have different values (S5, No), and the mismatch detection circuit 14 outputs a positive signal B of a predetermined width. continue,
The next sampling is performed with the next CLK signal (S7),
The comparison with the previous sampling value is performed (S8).
Since the state where Read data appeared has been maintained,
Normally, this comparison result indicates a matching state (S8, Ye
s). Also, this CLK FLAG signal (signal C) is H
It becomes high level, and CMPOK becomes High by a predetermined width.
h level. If the matching state is not indicated due to a variation between bits (a plurality of bit data) (S8, No), the same is repeated in the next sampling (S8 → S9 → S7 → S8). In this way, the count-up of the increment counter 18 is completed, and the FLAG signal continues to be at the High level irrespective of the memory access thereafter. Therefore, the count-up and the load of the increment counter 18 are not performed. Is held as a value larger by one than the count value corresponding to the access time (S10). (When the count value is smaller than the final value of the increment counter 18 by one, Read data appears on the data bus. The value is a count value corresponding to the access time, and S10 in the flowchart is an expression taking this point into account.)

【0009】次に、アクセスタイム検出後の実際のメモ
リリードアクセス時の動作を図3および図4により説明
する。まず、読み出し開始によりRDB信号がLowレ
ベルになる。そうすると、その冒頭でロード信号Fが所
定幅だけLowレベルになり、そのロード信号Fにより
インクリメントカウンタ18に保持されているカウント
値がデクリメントカウンタ19にロードされる。以後、
読み出し期間中、EN端子がLowレベルであることに
より、CLK信号がHighレベルになる度毎にデクリ
メントカウンタ19は1づつカウントダウンされ、値が
1になると(つまり、図3に示したGの値は1に設定さ
れている)、比較回路20の出力信号HがHighレベ
ルになる。なお、上記比較回路出力信号Hは、制御部1
内のCPUのReady端子に入力されており(図1参
照)、信号HがHighレベルになると、CPUはデー
タバス上のRead dataを取り込む。このアクセ
スタイミングT2は、図4に示すように、アクセスタイ
ム検出時のT1よりt(1クロックサイクル)だけ短い
時間であるが、アクセスタイム検出時において、T1よ
りも少なくとも1クロックサイクル短い時間でデータバ
スにRead dataが現れているので、アクセスタ
イミングT2においてデータバスにRead data
が現れている。上記において、比較回路20に入力され
るGの値を0に設定してもよい。この場合はアクセスタ
イムあるいはアクセスタイミングが1クロックサイクル
分だけ大きく設定されたことになり、その分だけアクセ
スタイミングのマージンが増える。こうして、この形態
例によれば、アクセスタイムが自動的に設定され、設定
されたアクセスタイミングでメモリデバイス2の読み取
りが行われる。
Next, the operation at the time of actual memory read access after the detection of the access time will be described with reference to FIGS. First, when reading is started, the RDB signal goes low. Then, at the beginning, the load signal F becomes Low level by a predetermined width, and the count value held in the increment counter 18 is loaded into the decrement counter 19 by the load signal F. Since then
During the readout period, since the EN terminal is at the low level, the decrement counter 19 is counted down by one each time the CLK signal goes to the high level. When the value becomes 1, the value of G shown in FIG. 1), the output signal H of the comparison circuit 20 becomes High level. The comparison circuit output signal H is output from the control unit 1
Is input to the Ready terminal of the CPU (see FIG. 1), and when the signal H becomes High level, the CPU fetches the Read data on the data bus. As shown in FIG. 4, the access timing T2 is a time shorter than T1 at the time of detecting the access time by t (one clock cycle), but at the time of detecting the access time, the data is at least one clock cycle shorter than T1. Since the read data appears on the bus, the read data appears on the data bus at the access timing T2.
Is appearing. In the above, the value of G input to the comparison circuit 20 may be set to 0. In this case, the access time or access timing is set to be longer by one clock cycle, and the margin of the access timing is increased by that amount. Thus, according to this embodiment, the access time is automatically set, and reading of the memory device 2 is performed at the set access timing.

【0010】図6は、本発明の第2の形態例を示す動作
フロー図である。図示したように、この形態例のステッ
プS11〜S19は第1の形態例(図5)のステップS
1〜S9と同じであるので、説明を省略する。この後の
ステップS20において、この形態例のマイクロコンピ
ュータシステムでは、引き続いてもう1度データサンプ
リングを行い、直前にサンプリングを行ったデータと比
較する(S21)。そして、再び一致したとき、つまり
2回連続して一致した場合に、その最初のサンプリング
時のカウント値をアクセスタイムに対応したカウント値
とする(S22)。こうして、この形態例によれば、ノ
イズなどによる偶然の一致をRead dataがデー
タバスに現れたものと誤判断してしまうのを防ぐことが
できる。
FIG. 6 is an operation flowchart showing a second embodiment of the present invention. As shown, steps S11 to S19 of this embodiment are the same as steps S11 to S19 of the first embodiment (FIG. 5).
1 to S9, the description is omitted. In the subsequent step S20, the microcomputer system of this embodiment continuously performs another data sampling and compares the data with the data sampled immediately before (S21). Then, when they match again, that is, when they match twice in succession, the count value at the first sampling is set as the count value corresponding to the access time (S22). Thus, according to this embodiment, it is possible to prevent an accidental match due to noise or the like from being erroneously determined as Read data appearing on the data bus.

【0011】次に、選択スイッチ5(図1参照)を備え
た第3の形態例について説明する。なお、特許請求の範
囲においてデータバスプル手段は選択スイッチ5を示し
ている。図7に選択スイッチ5の詳細、図8にこの形態
例のマイクロコンピュータシステム要部の構成ブロック
図を示す。図7に示したように、選択スイッチ5は二つ
のトランジスタTr1、Tr2 およびインバータ21
から構成されており、電源投入時には、インバータ21
の入力側がHighレベルになり、したがって、トラン
ジスタTr1はオフ状態、トランジスタTr2はオン状
態である。つまり、nビット(n本、例えば8本)のそ
れぞれのデータラインはプルダウン状態になる。以下、
図9に示した動作フローなどに従って、この形態例の動
作を説明する。まず、電源が投入されるが(S31)、
これにより、データラインがプルダウン状態になる(S
32)。以下、ステップS33〜S37は第1の形態例
(図5のステップS2〜S5と同じであるので、説明を
省略する。ステップS37における判定が一致の場合で
(S37、Yes)、且つタイムアウトカウンタ23
(図8)がタイムアウトに達していなければ(S38、
No)、次のサンプリング値で同様の比較を行う(S3
9→S36→S37)(図2参照)。なお、上記タイム
アウトカウンタ23は、例えば、電源投入と共にCLK
信号によりカウントアップされ、所定数に達したとき一
致信号Jを出力するように構成されている。そして、タ
イムアウトカウンタ23がタイムアウトに達する前に連
続する二つのサンプリング値が不一致になると(S3
7、No)、以下、第1の形態例(図5参照)と同様に
動作する。つまり、上記タイムアウトが発生しなけれ
ば、第1の形態例と同様にアクセスタイムを検出し、且
つ検出されたアクセスタイムにしたがってアクセスタイ
ミング制御部がメモリデバイスのアクセスタイムを設定
する。
Next, a third embodiment provided with a selection switch 5 (see FIG. 1) will be described. In the claims, the data bus pull means indicates the selection switch 5. FIG. 7 shows the details of the selection switch 5, and FIG. 8 shows a block diagram of the configuration of the main part of the microcomputer system of this embodiment. As shown in FIG. 7, the selection switch 5 includes two transistors Tr1, Tr2 and an inverter 21.
When power is turned on, the inverter 21
Becomes high level, so that the transistor Tr1 is off and the transistor Tr2 is on. That is, each data line of n bits (n, for example, 8) is in a pull-down state. Less than,
The operation of this embodiment will be described with reference to the operation flow shown in FIG. First, the power is turned on (S31).
As a result, the data line enters a pull-down state (S
32). Hereinafter, steps S33 to S37 are the same as those in the first embodiment (the same as steps S2 to S5 in FIG. 5, and a description thereof will be omitted. If the determination in step S37 is a match (S37, Yes)),
If (FIG. 8) has not reached the timeout (S38,
No), the same comparison is performed with the next sampling value (S3).
9 → S36 → S37) (see FIG. 2). Note that the time-out counter 23 is, for example, clock
It is configured to count up by a signal and output a coincidence signal J when a predetermined number is reached. If two consecutive sampling values do not match before the timeout counter 23 reaches the timeout (S3).
7, No), and thereafter, operate in the same manner as in the first embodiment (see FIG. 5). That is, if the timeout does not occur, the access time is detected in the same manner as in the first embodiment, and the access timing control unit sets the access time of the memory device according to the detected access time.

【0012】それに対し、メモリデバイス2のアクセス
タイムチェックアドレスの電源投入時のデータが0にな
っていて、Read dataがデータバスに現れる前
後におけるデータに変化がないと(データバスはプルダ
ウンされているので、Read data現れる前のデ
ータバス上のデータの値は0である)、所定時間後、上
記タイムアウトカウンタ23はタイムアウトになる(S
38、Yes)。すると、割り込み発生回路24(図
8)は制御部1内のCPU22に対し割り込み信号Kを
発生し、これにより、CPU22は選択スイッチ5に対
し出力するスイッチ制御信号LをLowレベルにする。
スイッチ制御信号LがLowレベルとなると、トランジ
スタTr1オン状態になり、トランジスタTr2はオフ
状態になるので、データバスはプルアップ状態になる
(S40)。以下、ステップS33からくり返す。Re
ad dataが0であり、且つ1であるということは
あり得ないので、Read dataデータバスに現れ
たとき、今度はステップS37における比較結果が不一
致になり(S37、No)、以下、第1の形態例のよう
に動作する。すなわち、データバスがプルアップもプル
ダウンもされていないならば、電源投入直後、アクセス
タイム検出のためにメモリデバイス2から読み出したR
ead dataが偶然にも読み出し前のデータバス上
のデータ値と同じになり、図5において、S5→S6→
S4→S5のループを永久に回り続ける可能性を否定で
きないが、この形態例のように、プルアップおよびプル
ダウンの切り替えを行えば、万一、アクセスタイム検出
のためにメモリデバイス2から読み出したRead d
ataが読み出し前のデータバス上のデータ値と同じ値
であってもプルアップおよびプルダウンの切り替えによ
りデータバス上のデータ値が変更されるため、ループを
回り続けるという問題を回避できる。
On the other hand, if the power-on data of the access time check address of the memory device 2 is 0 and there is no change in data before and after Read data appears on the data bus (the data bus is pulled down). Therefore, the value of the data on the data bus before the appearance of Read data is 0), and after a predetermined time, the timeout counter 23 times out (S
38, Yes). Then, the interrupt generation circuit 24 (FIG. 8) generates an interrupt signal K to the CPU 22 in the control unit 1, whereby the CPU 22 sets the switch control signal L output to the selection switch 5 to Low level.
When the switch control signal L goes low, the transistor Tr1 is turned on and the transistor Tr2 is turned off, so that the data bus is pulled up (S40). Hereinafter, step S33 is repeated. Re
Since it is impossible that the read data is 0 and 1, when the data appears on the read data bus, the comparison result in step S 37 becomes inconsistent (S 37, No). It operates as in the embodiment. That is, if the data bus is not pulled up or pulled down, immediately after the power is turned on, the R read from the memory device 2 for detecting the access time is read.
The read data becomes the same as the data value on the data bus before the reading by chance, and in FIG. 5, S5 → S6 →
Although the possibility of continuing the loop of S4 → S5 forever cannot be denied, if switching between pull-up and pull-down is performed as in this embodiment, the Read read from the memory device 2 for access time detection should be performed. d
Even if “ata” is the same value as the data value on the data bus before reading, the data value on the data bus is changed by switching between the pull-up and the pull-down, so that the problem of continuing the loop can be avoided.

【0013】また、図10に示す本発明の第4の形態例
では、メモリデバイス2が不揮発性半導体の場合、その
製造時にそのメモリデバイス2aのアクセスタイムを測
定し、その所定のアドレス(アクセスタイムチェックア
ドレス)に上記アクセスタイムを記録しておく。そし
て、そのようなメモリデバイス2aをこの形態例のマイ
クロコンピュータシステムに実装し、電源投入時など
に、制御部1が上記メモリデバイス2aの所定のアドレ
スから記録されているアクセスタイムを読み取り、この
アクセスタイムをクロックサイクルで割った値Nをラッ
チ25に記憶しておき、メモリデバイス2aからの読み
出しの度毎に、その冒頭でロード信号生成回路17から
出力されるロード信号Fにより、ラッチ25に記憶され
た値Nをデクリメントカウンタ19にセットする。この
ようにして、この形態例によれば、図2に示したような
アクセスタイム検出回路3などを備えることなく、第1
の形態例などと同様の効果を実現することができる。
In the fourth embodiment of the present invention shown in FIG. 10, when the memory device 2 is a nonvolatile semiconductor, the access time of the memory device 2a is measured at the time of manufacture, and the predetermined address (access time Check time) is recorded in the access time. Then, such a memory device 2a is mounted on the microcomputer system of this embodiment, and when the power is turned on, the control unit 1 reads an access time recorded from a predetermined address of the memory device 2a, and The value N obtained by dividing the time by the clock cycle is stored in the latch 25, and is stored in the latch 25 by the load signal F output from the load signal generation circuit 17 at the beginning of each read from the memory device 2a. The set value N is set in the decrement counter 19. As described above, according to this embodiment, the first time without the access time detecting circuit 3 shown in FIG.
The same effects as those of the embodiment can be realized.

【0014】[0014]

【発明の効果】以上説明したように、本発明によれば、
請求項1記載の発明では、検出されたアクセスタイムに
従って、メモリデバイスへのアクセスタイミングが適切
に制御されるので、利用者に手間をかけることなく、適
切なアクセスタイミングでメモリデバイスへアクセスで
きる。また、利用者による設定ミスも防ぐことができ
る。また、請求項2記載の発明では、電源投入直後、ア
クセスタイミング設定を行おうとするメモリデバイスに
アクセスして、そのときのデータバス上のデータを一定
周期でサンプリングし、連続する二つのサンプリング値
が不一致状態から一致状態になったことを検出すること
によりアクセスタイムが検出されるので、より適切なア
クセスタイミングを実現できる。また、請求項3記載の
発明では、上記において、連続する二つのサンプリング
値が不一致状態から一致状態になった次のサンプリング
時がアクセスタイミングとなるように設定されるので、
読み出しデータの確立がより確実になる。また、請求項
4記載の発明では、連続する二つのサンプリング値が不
一致状態から一致状態になり、且つ上記一致状態が2回
以上連続して検出された時がアクセスタイムまたはアク
セスタイミングとなるように設定されるので、ノイズな
どによりアクセスタイムをご判断することがなくなる。
また、請求項5記載の発明では、電源投入直後、データ
バスがプルアップまたはプルダウン状態にされてアクセ
スタイムを求める動作が開始され、連続する二つのサン
プリング値が不一致状態にならないときは、データバス
プル状態が他方の状態に変えられて再びアクセスタイム
を求める動作が開始されることによりアクセスタイムが
求められるので、アクセスタイム検出時に永久ループに
陥る危険性を防止できる。また、請求項6記載の発明で
は、ROMに書き込まれているアクセスタイムが読み出
され、そのアクセスタイムに従ってアクセスタイミング
が自動的に設定されるので、請求項1などの効果をより
簡単に実現できる。また、請求項7記載の発明では、R
OMの所定のアドレスにアクセスすることにより上記R
OMのアクセスタイムを得ることができる。
As described above, according to the present invention,
According to the first aspect of the present invention, since the access timing to the memory device is appropriately controlled according to the detected access time, it is possible to access the memory device at an appropriate access timing without any trouble for the user. In addition, setting errors by the user can be prevented. According to the second aspect of the present invention, immediately after the power is turned on, the memory device for which access timing is to be set is accessed, and the data on the data bus at that time is sampled at a constant cycle. Since the access time is detected by detecting the change from the mismatched state to the matched state, more appropriate access timing can be realized. According to the third aspect of the present invention, in the above, the access timing is set so that the next sampling time when two consecutive sampled values change from a mismatched state to a matched state becomes the access timing.
The establishment of the read data becomes more reliable. In the invention according to claim 4, two consecutive sampling values are changed from a non-coincidence state to a coincidence state, and the time when the coincidence state is detected two or more times consecutively becomes an access time or an access timing. Since it is set, it is not necessary to judge the access time due to noise or the like.
According to the fifth aspect of the present invention, immediately after the power is turned on, the data bus is pulled up or pulled down to start an operation for obtaining an access time, and when two consecutive sampled values do not become inconsistent, the data bus is turned off. Since the access state is obtained by changing the pull state to the other state and starting the operation for obtaining the access time again, the danger of falling into a permanent loop upon detection of the access time can be prevented. In the invention according to claim 6, the access time written in the ROM is read and the access timing is automatically set according to the access time, so that the effects of claim 1 and the like can be realized more easily. . In the invention according to claim 7, R
By accessing a predetermined address of the OM, the R
OM access time can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の形態例などのマイクロコンピュ
ータシステムの構成ブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a microcomputer system according to a first embodiment of the present invention.

【図2】本発明の第1の形態例を示すマイクロコンピュ
ータシステム要部の回路図である。
FIG. 2 is a circuit diagram of a main part of a microcomputer system showing a first embodiment of the present invention.

【図3】本発明の第1の形態例を示すマイクロコンピュ
ータシステム要部の他の回路図である。
FIG. 3 is another circuit diagram of a main part of the microcomputer system showing the first embodiment of the present invention.

【図4】本発明の第1の形態例を示すマイクロコンピュ
ータシステム要部のタイミングチャートである。
FIG. 4 is a timing chart of a main part of a microcomputer system showing a first embodiment of the present invention.

【図5】本発明の第1の形態例を示すマイクロコンピュ
ータシステムの動作フロー図である。
FIG. 5 is an operation flowchart of the microcomputer system showing the first embodiment of the present invention.

【図6】本発明の第2の形態例を示すマイクロコンピュ
ータシステムの動作フロー図である。
FIG. 6 is an operation flowchart of a microcomputer system showing a second embodiment of the present invention.

【図7】本発明の第3の形態例を示すマイクロコンピュ
ータシステム要部の回路図である。
FIG. 7 is a circuit diagram of a main part of a microcomputer system showing a third embodiment of the present invention.

【図8】本発明の第3の形態例を示すマイクロコンピュ
ータシステム要部の構成ブロック図である。
FIG. 8 is a configuration block diagram of a main part of a microcomputer system showing a third embodiment of the present invention.

【図9】本発明の第3の形態例を示すマイクロコンピュ
ータシステムの動作フロー図である。
FIG. 9 is an operation flowchart of a microcomputer system showing a third embodiment of the present invention.

【図10】本発明の第4の形態例を示すマイクロコンピ
ュータシステム要部の構成ブロック図である。
FIG. 10 is a configuration block diagram of a main part of a microcomputer system showing a fourth embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1・・・制御部、2・・・メモリデバイス、3・・・ア
クセスタイム検出回路、4・・・アクセスタイミング制
御部、5・・・選択スイッチ、13・・・比較回路、1
4・・・不一致検出回路、15・・・フラグ回路、16
・・・一致検出回路、17・・・ロード信号生成回路、
18・・・インクリメントカウンタ、19・・・デクリ
メントカウンタ、20・・・比較回路、23・・・タイ
ムアウトカウンタ
DESCRIPTION OF SYMBOLS 1 ... Control part, 2 ... Memory device, 3 ... Access time detection circuit, 4 ... Access timing control part, 5 ... Selection switch, 13 ... Comparison circuit, 1
4 ... mismatch detection circuit, 15 ... flag circuit, 16
... match detection circuit, 17 ... load signal generation circuit,
18: increment counter, 19: decrement counter, 20: comparison circuit, 23: timeout counter

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 設定されたアクセスタイミングでメモリ
アクセスを行うマイクロコンピュータシステムにおい
て、メモリデバイスのアクセスタイムを自動的に検出す
るアクセスタイム検出手段と、上記アクセスタイム検出
手段により検出されたアクセスタイムに従ってアクセス
タイミングを制御するアクセスタイミング制御手段とを
備えたことを特徴とするマイクロコンピュータシステ
ム。
In a microcomputer system for performing memory access at a set access timing, an access time detecting means for automatically detecting an access time of a memory device, and an access according to the access time detected by the access time detecting means. A microcomputer system comprising: access timing control means for controlling timing.
【請求項2】 請求項1のマイクロコンピュータシステ
ムにおいて、電源投入直後、アクセスタイミング制御を
行おうとするメモリデバイスをアドレッシングし、その
ときのデータバス上のデータを一定周期でサンプリング
し連続する二つのサンプリング値が不一致状態から一致
状態になったことを検出してアクセスタイムを検出する
ようにアクセスタイム検出手段を構成したことを特徴と
するマイクロコンピュータシステム。
2. The microcomputer system according to claim 1, wherein immediately after the power is turned on, a memory device for which access timing control is to be performed is addressed, and data on the data bus at that time is sampled at a constant cycle, and two successive samplings are performed. A microcomputer system comprising an access time detecting means for detecting an access time by detecting that a value has changed from a mismatched state to a matched state.
【請求項3】 請求項2のマイクロコンピュータシステ
ムにおいて、連続する二つのサンプリング値が不一致状
態から一致状態になった次のサンプリング時をアクセス
タイミングとするようにアクセスタイミング制御手段を
構成したことを特徴とするマイクロコンピュータシステ
ム。
3. The microcomputer system according to claim 2, wherein the access timing control means is configured such that an access timing is a next sampling time when two consecutive sampling values change from a mismatched state to a matched state. Microcomputer system.
【請求項4】 請求項2のマイクロコンピュータシステ
ムにおいて、連続する二つのサンプリング値が不一致状
態から一致状態になり、且つ上記一致状態が2回以上連
続して検出された時をアクセスタイムまたはアクセスタ
イミングとする構成にしたことを特徴とするマイクロコ
ンピュータシステム。
4. The microcomputer system according to claim 2, wherein a time when two consecutive sampled values change from a non-coincidence state to a coincidence state and the coincidence state is detected twice or more consecutively is an access time or an access timing. A microcomputer system characterized in that:
【請求項5】 請求項2乃至請求項4のいずれかに記載
のマイクロコンピュータシステムにおいて、データバス
のプルアップおよびプルダウンを選択的に行うデータバ
スプル手段を備え、電源投入直後、上記データバスプル
手段によりデータバスをプルアップまたはプルダウン状
態にしてアクセスタイムを求める動作を開始させ、連続
する二つのサンプリング値が不一致状態にならないとき
は、データバスプル状態を他方の状態に変えて再びアク
セスタイムを求める動作を開始させることによりアクセ
スタイムを求める構成にしたことを特徴とするマイクロ
コンピュータシステム。
5. The microcomputer system according to claim 2, further comprising data bus pull means for selectively performing pull-up and pull-down of a data bus, said data bus pull means being provided immediately after power-on. Means for pulling up or pulling down the data bus to start an operation for obtaining an access time, and when two consecutive sampled values do not become inconsistent, change the data bus pull state to the other state and reset the access time. A microcomputer system wherein an access time is obtained by starting a desired operation.
【請求項6】 設定されたアクセスタイミングでメモリ
アクセスを行うマイクロコンピュータシステムにおい
て、予め自身の所定のアドレスにアクセスタイムが書き
込まれた不揮発性メモリデバイスと、上記不揮発性メモ
リデバイスに書き込まれているアクセスタイムを読み出
してアクセスタイミングを制御するアクセスタイミング
制御手段とを備えたことを特徴とするマイクロコンピュ
ータシステム。
6. A microcomputer system for performing memory access at a set access timing, wherein a nonvolatile memory device in which an access time is previously written at a predetermined address of the microcomputer, and an access written in the nonvolatile memory device. A microcomputer system comprising: an access timing control unit that reads out time and controls access timing.
【請求項7】 不揮発性メモリデバイスにおいて、製造
時に、自身の所定のアドレスにアクセスタイムを書き込
んだことを特徴とする不揮発性メモリデバイス。
7. The nonvolatile memory device according to claim 1, wherein an access time is written to a predetermined address of the nonvolatile memory device during manufacturing.
JP14573697A 1997-05-20 1997-05-20 Microcomputer system Pending JPH10320271A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14573697A JPH10320271A (en) 1997-05-20 1997-05-20 Microcomputer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14573697A JPH10320271A (en) 1997-05-20 1997-05-20 Microcomputer system

Publications (1)

Publication Number Publication Date
JPH10320271A true JPH10320271A (en) 1998-12-04

Family

ID=15391961

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14573697A Pending JPH10320271A (en) 1997-05-20 1997-05-20 Microcomputer system

Country Status (1)

Country Link
JP (1) JPH10320271A (en)

Similar Documents

Publication Publication Date Title
US4766567A (en) One-chip data processing device including low voltage detector
US6823224B2 (en) Data processing system having an on-chip background debug system and method therefor
JP2755580B2 (en) Digital data processing system
US6886120B2 (en) Memory control circuit
US20030112688A1 (en) Refresh control method of semiconductor memory device and semiconductor memory device comprising the same control method
US6477658B1 (en) Microprocessor with variable clock operation
JP2504018B2 (en) Input circuit
JP3830656B2 (en) Power supply voltage adjustment circuit and semiconductor device
JP2743850B2 (en) Data processing device
CN103973266A (en) Oscillator correction circuit and method and integrated circuit
US20140281156A1 (en) Managing wait states for memory access
US7061272B2 (en) Finite state machine circuit
JPH05342085A (en) Memory access control circuit
JPH04323746A (en) Microcontroller unit
JP2004045090A (en) Semiconductor integrated circuit
JPH10320271A (en) Microcomputer system
EP0208287B1 (en) Direct memory access controller
JPH0944467A (en) Microcomputer
US20020179707A1 (en) Smart card reader circuit and insertion detection method
JPH05303440A (en) Reset control device for digital circuit
KR100415086B1 (en) Embedded flash micro control unit and method for control the same
JP3469827B2 (en) PLL circuit
JP3033755B1 (en) Arithmetic processing unit
KR930002026Y1 (en) Resetting circuit for program of i/o device
JP2005071203A (en) Microprocessor