JP2006092522A - Bus control method and circuit - Google Patents

Bus control method and circuit Download PDF

Info

Publication number
JP2006092522A
JP2006092522A JP2005196296A JP2005196296A JP2006092522A JP 2006092522 A JP2006092522 A JP 2006092522A JP 2005196296 A JP2005196296 A JP 2005196296A JP 2005196296 A JP2005196296 A JP 2005196296A JP 2006092522 A JP2006092522 A JP 2006092522A
Authority
JP
Japan
Prior art keywords
circuit
bus
read
signal
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005196296A
Other languages
Japanese (ja)
Inventor
Yutaka Fujimaki
裕 藤巻
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.)
Kawasaki Microelectronics Inc
Original Assignee
Kawasaki Microelectronics Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kawasaki Microelectronics Inc filed Critical Kawasaki Microelectronics Inc
Priority to JP2005196296A priority Critical patent/JP2006092522A/en
Publication of JP2006092522A publication Critical patent/JP2006092522A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent a hang-up to the utmost by executing the same access processing as previous one again without immediate initialization even when a ready signal RDY has not become active. <P>SOLUTION: A bus control method that, at a reading operation or writing operation on an external I/O device 20, completes the processing of the bus cycle of the access when a ready signal RDY input from the external I/O device 20 becomes active, if the ready signal RDY has not become active in a prescribed time, aborts the current bus cycle to recover a non-access state and, in the non-access state, executes the bus cycle of the same access as previous one again. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、外部回路との間でデータをやりとりするバス制御方法および回路に係り、特に何らかの理由でレディ信号が有効にならずアクセス状態から復帰できなくなった場合に、非アクセス状態に強制的に復帰させ、その後再度同一アクセスを行うようにしたバス制御方法および回路に関するものである。   The present invention relates to a bus control method and circuit for exchanging data with an external circuit, and particularly forcibly to a non-access state when a ready signal is not valid and cannot be restored from an access state for some reason. The present invention relates to a bus control method and a circuit that are restored and then accessed again.

特許文献1に見られるように、読出動作や書込動作を始めたマイクロコントローラは、内蔵するバス制御回路において、バス制御信号を構成するハンドシエーク信号の1信号であるレディ信号が有効になるのを待ち、その処理を完了させる都合上、レディ信号が何らかの理由により有効にならない場合は永遠に処理を完了させることができず、ハングアップしてしまう。マイクロコントローラおよびその中心であるCPUがハングアップしてしまうということは、システム全体がハングアップしてしまうということに他ならない。   As seen in Patent Document 1, in a microcontroller that has started a read operation or a write operation, in a built-in bus control circuit, a ready signal that is one signal of a handshake signal constituting a bus control signal becomes effective. For the convenience of waiting and completing the process, if the ready signal is not valid for some reason, the process cannot be completed forever and hangs up. The fact that the microcontroller and its central CPU hang up is nothing less than that the entire system hangs up.

そこで、この不具合を回避するために、前記特許文献1では、一定時間を超えてもレディ信号が有効にならない場合にはCPUを初期化することで、ハングアップが長時間継続することを回避している。
特開平07−084835号公報
Therefore, in order to avoid this problem, in Patent Document 1, when the ready signal does not become effective even after a certain time, the CPU is initialized to avoid the hang-up from continuing for a long time. ing.
Japanese Patent Application Laid-Open No. 07-084835

しかしながら、CPUを初期化するということは、それまで実行した処理のすべてを放棄することであり、言ってみれば最後の手段である。レディ信号が有効にならなかったことが、仮に偶発的理由(例えばノイズの混入等)による場合、再度同一処理を実行すれば問題が生じない可能性がある。また、同一処理を再度実行してもアクセスが成功しない場合において、そのアクセス対象を特定し、その対象モジュールのみをリセットし、初期設定を行うことは困難であった。   However, initializing the CPU means giving up all of the processing executed so far, and it is a last resort. If the ready signal is not valid due to an accidental reason (for example, noise mixing), there is a possibility that no problem will occur if the same processing is executed again. Further, when access is not successful even if the same processing is executed again, it is difficult to specify the access target, reset only the target module, and perform initial setting.

本発明はこの点に着目してなされたものであり、レディ信号が有効にならなかった場合でも、直ちには初期化せずに再度前回と同一アクセス処理を実行させるようにして、できるだけハングアップに陥ることを防止できるようにし、また、再度前回と同一アクセス処理を複数回実行させてもそれが不調に終わった場合にはそのアクセス対象のみのリセットが可能になるようにして、その後の処理続行の可能性を高めたバス制御方法および回路を提供することである。   The present invention has been made paying attention to this point, and even if the ready signal is not valid, the same access processing as the previous time is executed again without being initialized immediately, so as to hang up as much as possible. In addition, if the same access process is executed again and again multiple times, it will be possible to reset only the access target and continue the subsequent processing. It is an object of the present invention to provide a bus control method and a circuit that increase the possibility of such a problem.

バス制御方法の発明は、CPUを使用して、外部回路に対して読出動作あるいは書込動作を行う際に、前記外部回路から入力するレディ信号が有効になることに基づき当該読出あるいは書込アクセスのバスサイクルの処理を完了するバス制御方法において、前記レディ信号が規定時間を超えても有効にならないとき、現バスサイクルを中止することにより非アクセス状態に復帰させ、該非アクセス状態になった後再度前回と同一アクセスのバスサイクルを実行することを特徴とする。   In the invention of the bus control method, when a read operation or a write operation is performed on an external circuit using a CPU, the read or write access is performed based on a ready signal input from the external circuit being valid. In the bus control method that completes the processing of the bus cycle, when the ready signal does not become effective even after a specified time, the current bus cycle is stopped to return to the non-access state, and after entering the non-access state The bus cycle of the same access as the previous time is executed again.

ここで、前記同一アクセスのバスサイクルの実行回数が規定数に達することにより、前記バスサイクルの処理を終了すると共に割り込みあるいはリセットとして使用できる信号を出力することが望ましい。   Here, when the number of executions of the bus cycle of the same access reaches a specified number, it is desirable to end the processing of the bus cycle and output a signal that can be used as an interrupt or reset.

また、前記同一アクセスのバスサイクルの実行回数が規定数に達することにより、前記バスサイクルの処理を終了すると共に当該アクセスに関する情報を記憶することも望ましい。   It is also desirable that when the number of executions of the same access bus cycle reaches a specified number, the processing of the bus cycle is terminated and information related to the access is stored.

さらに、前記記憶したアクセスに関する情報を前記CPUに読ませるためのデータ処理を行うことも望ましい。   Further, it is desirable to perform data processing for causing the CPU to read the stored access information.

バス制御回路の発明は、外部回路に対してバスおよび制御線を介して接続され、CPUからの読み出しあるいは書込みの指令に基づき前記外部回路に対して読出制御信号あるいは書込制御信号を出力して読み出しあるいは書込みを行う際、前記外部回路から入力するレディ信号が有効になることに基づき当該アクセスのバスサイクルの処理を完了するバス制御回路において、前記CPUからの読み出しあるいは書込みの指令に基づき前記外部回路に対して前記読出制御信号あるいは前記書込制御信号を生成して出力する読出/書込回路と、該読出/書込回路から前記読出制御信号あるいは前記書込制御信号を前記外部回路に出力した後に前記レディ信号が有効になることなく規定時間が経過するとリトライ信号を出力するバスサイクル計測回路とを具備し、前記読出/書込回路は、前記バスサイクル計測回路から前記リトライ信号が出力されることにより前記読出制御信号あるいは前記書込制御信号を一旦解除するとともに再度生成して、前回と同一アクセスのバスサイクルが実行されるようにしたことを特徴とする。   The invention of the bus control circuit is connected to an external circuit via a bus and a control line, and outputs a read control signal or a write control signal to the external circuit based on a read or write command from the CPU. When reading or writing, in the bus control circuit that completes the processing of the bus cycle of the access based on the ready signal input from the external circuit becoming valid, the external control is performed based on a read or write command from the CPU. A read / write circuit that generates and outputs the read control signal or the write control signal to the circuit, and outputs the read control signal or the write control signal from the read / write circuit to the external circuit Bus cycle measurement circuit that outputs a retry signal when the specified time has passed without the ready signal being valid. And the read / write circuit temporarily cancels the read control signal or the write control signal and generates it again when the retry signal is output from the bus cycle measuring circuit. A bus cycle of the same access is executed.

ここで、前記バスサイクル計測回路は、前記読出制御信号あるいは前記書込制御信号が生成されると時間の計測動作を一旦解除してから該計測動作を再開し、前記リトライ信号が出力された後は前記読出制御信号及び前記書込制御信号が解除されると前記計測動作を解除することことが望ましい。   Here, when the read control signal or the write control signal is generated, the bus cycle measuring circuit once cancels the time measuring operation and then restarts the measuring operation, and after the retry signal is output. Preferably, the measurement operation is canceled when the read control signal and the write control signal are canceled.

また、前記バスサイクル計測回路で生成される前記リトライ信号の回数を計測して規定回数に達すると、割り込みあるいはリセットとして使用できる信号を出力するリトライ回数計測回路を具備することも望ましい。   It is also desirable to provide a retry count measurement circuit that outputs a signal that can be used as an interrupt or reset when the number of retry signals generated by the bus cycle measurement circuit is measured and reaches a specified number.

さらに、前記リトライ回数計測回路は、前記リトライ回数の計測値が前記規定回数に達する前に前記レディ信号が有効になると前記リトライ回数の計測動作を解除することも望ましい。   Furthermore, it is preferable that the retry count measurement circuit cancels the retry count measurement operation when the ready signal becomes valid before the measured value of the retry count reaches the specified count.

さらに、前記リトライ回数計測回路が計測する前記リトライ回数の計測値が前記規定回数に達することにより前記アクセスに関する情報を記憶するアクセス内容記憶回路を具備することも望ましい。   Furthermore, it is desirable to further include an access content storage circuit that stores information related to the access when the measured value of the retry count measured by the retry count measurement circuit reaches the specified count.

さらに、前記アクセス内容記憶回路に記憶された前記アクセスに関する情報を前記CPUに読ませるためのデータ処理を行うデータ処理回路を具備することも望ましい。   Further, it is desirable to further include a data processing circuit that performs data processing for causing the CPU to read information related to the access stored in the access content storage circuit.

本発明によれば、レディ信号が何らかの理由により有効にならない場合に再度前回と同一アクセスのバスサイクルを実行させて、バスアクセスを正常に完了する機会を増大させるので、ハングアップしてしまう状況を回避することが可能となる。また、そのバスアクセスが不調に終わった場合でも、その対象デバイスへのアクセス内容を記憶しておくことで、割込み等を利用して対象デバイスへのリセット、設定処理を行うことにより、その後の処理続行の可能性が高まる。その結果として、システム全体のリセット(再起動)機会を削減することができる。   According to the present invention, when the ready signal is not valid for some reason, the same access bus cycle as the previous time is executed again to increase the chance of normal completion of the bus access. It can be avoided. In addition, even if the bus access ends abnormally, by storing the access contents to the target device, resetting and setting the target device using an interrupt etc., the subsequent processing The possibility of continuing increases. As a result, the opportunity for resetting (restarting) the entire system can be reduced.

本実施例では、マイクロコントローラの外部に接続されたメモリやI/Oデバイスといった外部回路に対して読出動作や書込動作を行う際に使用するレディ信号が有効になるのを待ち、当該アクセスのバスサイクルの処理の完了をCPUに通知するバス制御回路において、長時間そのレディ信号が有効にならない場合に、強制的に対外的な(=I/Oデバイスやメモリに接続される外部バスから見た)現バスサイクルを中止し、非アクセス状態に強制的に復帰させ、復帰後再び前回と同一のアクセスのバスサイクルを実行する。そして、この同一バスサイクルの再実行を規定回数行ってもレディ信号が有効にならない場合には、CPUに向けて割り込み要求やリセットとして利用可能な信号を出力したり、あるいは、さらに進めてそのときの対象デバイスへのアクセス内容を記憶しておくことで、割り込み等を利用してCPU等から対象デバイスへのリセット、設定処理を行うことを容易に実現可能とする。   In this embodiment, the access waits until a ready signal used when performing a read operation or a write operation on an external circuit such as a memory or an I / O device connected to the outside of the microcontroller becomes valid. In the bus control circuit that notifies the CPU of the completion of processing of the bus cycle, when the ready signal is not valid for a long time, it is forcibly viewed from the external bus (= external bus connected to the I / O device or memory). A) Stop the current bus cycle, forcibly return to the non-access state, and execute the same access bus cycle as the previous time after returning. If the ready signal does not become effective even if the same bus cycle is re-executed a specified number of times, a signal that can be used as an interrupt request or reset is output to the CPU, or the signal is further advanced and By storing the access contents to the target device, it is possible to easily perform reset and setting processing from the CPU or the like to the target device using an interrupt or the like.

図1は本発明の実施例1のバス制御回路およびその周辺の回路部分を示すブロック図である。図1において、A[15:0]は16ビットのアドレスバスであり、マイクロコントローラ10から外部I/Oデバイス20へ接続されている。また、D[7:0]は8ビットのデータバスであり、マイクロコントローラ10と外部I/Oデバイス20とに双方向に接続されている。   FIG. 1 is a block diagram showing a bus control circuit and its peripheral circuit portion according to the first embodiment of the present invention. In FIG. 1, A [15: 0] is a 16-bit address bus, and is connected from the microcontroller 10 to the external I / O device 20. D [7: 0] is an 8-bit data bus, and is bi-directionally connected to the microcontroller 10 and the external I / O device 20.

CPU_RDN、CPU_WRNは、各々図示しないCPUからの外部への読み出し、書込みを行う際に“L”となる読出制御信号および書込制御信号(Low Active)である。CPUはバス制御回路11からの読出終了信号RD_END、書込終了信号WR_ENDの“H”を受けて、リードサイクル、ライトサイクル、すなわちバスサイクルを終了する。この読出終了信号RD_END、書込終了信号WR_ENDは、バス制御回路11が外部I/Oデバイス20からの有効データ取り込みが完了した時点、又は外部I/Oデバイスへ20の有効データ書き込みが完了した時点で“H”となる信号(High Active)である。   CPU_RDN and CPU_WRN are a read control signal and a write control signal (Low Active) that are set to “L” when reading and writing from a CPU (not shown) to the outside, respectively. The CPU receives the read end signal RD_END and the write end signal WR_END “H” from the bus control circuit 11 and ends the read cycle, the write cycle, that is, the bus cycle. The read end signal RD_END and the write end signal WR_END are used when the bus control circuit 11 completes taking in valid data from the external I / O device 20 or when valid data writing to the external I / O device is completed. The signal becomes “H” at (High Active).

バス制御回路11から外部I/Oデバイス20への読出制御信号RDN、書込制御信号WRNは、それぞれCPUからの読出制御信号CPU_RDN、書込制御信号CPU_WRNに基づき出力する。ただし、これはメモリやI/Oデバイスといった外部回路とのハンドシェークに使用するレディ信号RDYの有効入力とのタイミング等を考慮したバスタイミングを提供するためのものである。このバス制御回路11の存在により、様々な外部I/Oデバイスやメモリ等と接続する必要がある場合に、複雑になりがちなバス制御回路11の部分をCPU自体から分離することにより、CPU自体のリード、ライトに関する仕様及び設計が容易になる利点がある。   A read control signal RDN and a write control signal WRN from the bus control circuit 11 to the external I / O device 20 are output based on a read control signal CPU_RDN and a write control signal CPU_WRN from the CPU, respectively. However, this is for providing bus timing in consideration of the timing with the effective input of the ready signal RDY used for handshaking with an external circuit such as a memory or an I / O device. Due to the presence of the bus control circuit 11, when it is necessary to connect to various external I / O devices, memories, etc., the bus control circuit 11 which tends to be complicated is separated from the CPU itself, so that the CPU itself There is an advantage that the specifications and design for reading and writing are easy.

本実施例1では、バス制御回路11内に読出/書込回路としてのRDN_WRN生成回路111、バスサイクル計測回路112、及びリトライ回数計測回路113を配置する。RDN_WRN生成回路111は文字通り外部I/Oデバイス20に向けて出力する読出制御信号RDN、書込制御信号WRNを生成する回路である。   In the first embodiment, an RDN_WRN generation circuit 111 as a read / write circuit, a bus cycle measurement circuit 112, and a retry count measurement circuit 113 are arranged in the bus control circuit 11. The RDN_WRN generation circuit 111 literally generates a read control signal RDN and a write control signal WRN that are output to the external I / O device 20.

バスサイクル計測回路112はバスサイクルがシステムクロック単位で何クロック分継続しているかを計測する回路であり、規定クロック数に達するとリトライ信号RETRYを出力する。   The bus cycle measurement circuit 112 is a circuit that measures how many clock cycles a bus cycle continues in units of system clocks, and outputs a retry signal RETRY when the number of clocks reaches a specified number.

RDN_WRN生成回路111はこのリトライ信号RETRYを受けると、外部I/Oデバイス20に対する読出サイクルもしくは書き込みサイクルの再実行を要求するために、読出制御信号RDNもしくは書込制御信号WRNを一旦解消してから再度生成する。   Upon receiving the retry signal RETRY, the RDN_WRN generation circuit 111 once cancels the read control signal RDN or the write control signal WRN to request the external I / O device 20 to re-execute the read cycle or the write cycle. Generate again.

リトライ回数計測回路113は、バスサイクル計測回路112からのリトライ信号RETRYを受け、前回と同一アクセスのバスサイクルが何回実行されたかを計測する内部カウンタを備え、その計測値RTRY_CNTが規定回数に達した際に、CPUに向けてパルス信号INT_Oを発生する。   The retry count measurement circuit 113 includes an internal counter that receives the retry signal RETRY from the bus cycle measurement circuit 112 and measures how many times the bus cycle having the same access as the previous one has been executed, and the measured value RTRY_CNT reaches the specified number of times. When this occurs, a pulse signal INT_O is generated toward the CPU.

また、このリトライ回数計測回路113は、外部I/Oデバイス20からのレディ信号RDYが有効になりバスサイクルが正常終了した際に、RDN_WRN生成回路111から出力される読出終了信号RD_ENDあるいは書込終了信号WR_ENDを受けて、内部カウンタをリセットする。   In addition, the retry count measuring circuit 113 receives the read end signal RD_END output from the RDN_WRN generation circuit 111 or the write end when the ready signal RDY from the external I / O device 20 becomes valid and the bus cycle ends normally. In response to the signal WR_END, the internal counter is reset.

さらに、このリトライ回数計測回路113は、現在のリトライ回数の計測値RTRY_CNTをRDN_WRN生成回路111に送り、その計測値RTRY_CNTが規定回数に達すると、RDN_WRN生成回路111から読出終了信号RD_ENDあるいは書込終了信号WR_ENDが出力されるので、このときも、RDN_WRN生成回路111から出力される読出終了信号RD_ENDあるいは書込終了信号WR_ENDを受けて、内部カウンタをリセットする。   Further, the retry count measurement circuit 113 sends the measurement value RTRY_CNT of the current retry count to the RDN_WRN generation circuit 111. When the measurement value RTRY_CNT reaches the specified number of times, the read end signal RD_END or the write end is sent from the RDN_WRN generation circuit 111. Since the signal WR_END is output, the internal counter is reset in response to the read end signal RD_END or the write end signal WR_END output from the RDN_WRN generation circuit 111.

図2に外部I/Oデバイス20からのデータ読出動作(正常時)のタイミングチャートを示す。マイクロコントロ−ラ10は、内部レジスタに保持されたアドレス値をアドレスバスA[15:0]に出力する。それと同時に、CPUは読出制御信号CPU_RDNを“L”にする。バス制御回路11は読出制御信号CPU_RDN=“L”を受けて、読出制御信号RDNを“H”→“L”にする。外部I/Oデバイス20は、マイクロコントローラ10からの読出要求に応答するデータの準備が完了した時点で有効出力データをデータバスD[7:0]に出力すると同時に、レディ信号RDYを有効に、つまり“L”→“H”にする。バス制御回路11はこのレディ信号RDYの“L”→“H”を受けて読出終了信号RD_ENDを“H”にし、これを受けてCPUは読出データを内部に取り込むことが可能となる。それと同時にCPUは読出制御信号CPU_RDNを“L”→“H”にすることで、読出サイクルを終了する。   FIG. 2 shows a timing chart of the data read operation (normal time) from the external I / O device 20. The microcontroller 10 outputs the address value held in the internal register to the address bus A [15: 0]. At the same time, the CPU sets the read control signal CPU_RDN to “L”. In response to the read control signal CPU_RDN = “L”, the bus control circuit 11 changes the read control signal RDN from “H” to “L”. The external I / O device 20 outputs the valid output data to the data bus D [7: 0] at the time when the preparation of data in response to the read request from the microcontroller 10 is completed, and at the same time, the ready signal RDY is validated. That is, “L” → “H”. The bus control circuit 11 receives the ready signal RDY from “L” to “H” and sets the read end signal RD_END to “H”. In response to this, the CPU can take in the read data. At the same time, the CPU changes the read control signal CPU_RDN from “L” to “H” to complete the read cycle.

図3に外部I/Oデバイス20へのデータ書込動作(正常時)のタイミングチャートを示す。マイクロコントローラ10は、内部レジスタに保持されたアドレス値をアドレスバスA[15:0]に出力する。それと同時に書込制御信号CPU_WRNを“L”にする。データバスD[7:0]は書込データを出力し、バス制御回路11は書込制御信号CPU_WRN=“L”を受けて、書込制御信号WRNを“H”→“L”にする。外部I/Oデバイス20はマイクロコントローラ10からの書込要求への対応準備が完了した時点でレディ信号RDYを有効に、つまり“L”→“H”にすると共に、内部へ書込データを取り込む。バス制御回路11はレディ信号RDYの“L”→“H”を受けて書込終了信号WR_ENDを“H”にし、これを受けてCPUは書込制御信号CPU_WRNを“L”→“H”にすることで、書込サイクルを終了する。   FIG. 3 shows a timing chart of a data write operation (normal time) to the external I / O device 20. The microcontroller 10 outputs the address value held in the internal register to the address bus A [15: 0]. At the same time, the write control signal CPU_WRN is set to “L”. The data bus D [7: 0] outputs write data, and the bus control circuit 11 receives the write control signal CPU_WRN = “L” and changes the write control signal WRN from “H” to “L”. The external I / O device 20 makes the ready signal RDY valid, that is, changes from “L” to “H” when the preparation for responding to the write request from the microcontroller 10 is completed, and takes in the write data to the inside. . In response to the ready signal RDY “L” → “H”, the bus control circuit 11 changes the write end signal WR_END to “H”, and in response to this, the CPU changes the write control signal CPU_WRN from “L” to “H”. This completes the write cycle.

図4はバスサイクル計測回路112の構成例を示すブロック図である。図中では3ビットのバイナリカウンタ1121をシンボル化して表しており、このカウンタ1121は「0」→「7」までのカウントアップを行うものである。カウントするのはシステムクロック信号CLKの立ち上がりであり、イネーブル端子ENABLEが“H”の場合にクロック信号CLKの立ち上がりでカウント値を+1し、イネーブル端子ENABLEが“L”の場合にはカウント値を変更しない。また、リセット端子RESETNが“L”の場合にはクロック信号CLKの立ち上がりでカウンタの値を「0」とし、リセット端子RESETNが“H”の場合には先に説明したイネーブル端子ENABLEによって動作を切り替えるリセット優先のカウンタである。   FIG. 4 is a block diagram illustrating a configuration example of the bus cycle measurement circuit 112. In the drawing, a 3-bit binary counter 1121 is symbolized and this counter 1121 counts up from “0” to “7”. Counting is performed at the rising edge of the system clock signal CLK. When the enable terminal ENABLE is “H”, the count value is incremented by 1 at the rising edge of the clock signal CLK, and when the enable terminal ENABLE is “L”, the count value is changed. do not do. Further, when the reset terminal RESETN is “L”, the counter value is set to “0” at the rising edge of the clock signal CLK, and when the reset terminal RESETN is “H”, the operation is switched by the enable terminal ENABLE described above. This is a reset priority counter.

その他、1122はリトライ信号RETRYによって入力を切り替えるセレクタ、1123はD型フリップフロップ、1124,1125,1126はAND回路、1127はNOR回路、1128はインバータである。D型フリップフロップ1123とAND回路1124により、読出制御信号RDNあるいは書込制御信号WRNの立ち下がりエッジを検出すると、AND回路1124は“H”を出力する。   In addition, reference numeral 1122 denotes a selector for switching inputs according to a retry signal RETRY, 1123 denotes a D-type flip-flop, 1124, 1125, 1126 denote AND circuits, 1127 denotes a NOR circuit, and 1128 denotes an inverter. When the D-type flip-flop 1123 and the AND circuit 1124 detect the falling edge of the read control signal RDN or the write control signal WRN, the AND circuit 1124 outputs “H”.

本実施例1では、読出制御信号RDNあるいは書込制御信号WRNが“L”の場合に、カウンタ1121のイネーブル端子ENABLEが“H”となることで、その読出制御信号RDNあるいは書込制御信号WRNがシステムクロック信号CLK単位でどれだけの期間“L”であるかがカウントされる。カウンタ1121のリセットは、システムRESETの他、リトライ信号RETRY=“L”の場合はAND回路1124の出力がセレクタ1122で選択されて読出制御信号RDNあるいは書込制御信号WRNの“H”→“L”のとき実施され、リトライ信号RETRY=“H”の場合はNOR回路1126の出力がセレクタ1122で直接選択されて読出制御信号RDNおよび書込制御信号WRNが共に“H”のときに実施される。   In the first embodiment, when the read control signal RDN or the write control signal WRN is “L”, the enable terminal ENABLE of the counter 1121 becomes “H”, whereby the read control signal RDN or the write control signal WRN. Is a period “L” for each system clock signal CLK. In addition to the system RESET, the counter 1121 is reset when the retry signal RETRY = "L", the output of the AND circuit 1124 is selected by the selector 1122, and the read control signal RDN or the write control signal WRN changes from "H" to "L". When the retry signal RETRY = “H”, the output of the NOR circuit 1126 is directly selected by the selector 1122 and when the read control signal RDN and the write control signal WRN are both “H”. .

すなわち、カウンタ1121は、例えば読み出し動作の場合では、読出制御信号RDNが“H”→“L”になるとリセットされ、それからクロック信号CLKをカウントし、そのカウント値=「7」未満においてレディ信号RDYが“H”となることにより読出制御信号RDNが“L”→“H”に復帰すればリセットされるが、カウント値=「7」になるとリトライ信号RETRYが“H”となり、バスサイクルが終了しなかったことが示される。そして、リトライ信号RETRYが“H”となると、RDN_WRN生成回路111により読出制御信号RDNが“H”となり、カウンタ1121はリセットされ、リトライ信号RETRYが“L”になる。書込み動作の場合もこれと同様である。   That is, for example, in the case of a read operation, the counter 1121 is reset when the read control signal RDN changes from “H” to “L”, then counts the clock signal CLK, and the ready signal RDY when the count value = “7” or less. Is reset when the read control signal RDN returns from "L" to "H" due to "H", but when the count value = "7", the retry signal RETRY becomes "H" and the bus cycle ends. It was shown that they did not. When the retry signal RETRY becomes “H”, the read control signal RDN becomes “H” by the RDN_WRN generation circuit 111, the counter 1121 is reset, and the retry signal RETRY becomes “L”. The same applies to the write operation.

図5はリトライ回数計測回路113の構成例を示すブロック図である。図中で使用するカウンタ1131の機能は図4で使用しているカウンタ1121とまったく同じである。1132,1133はD型フリップフロップ、1134〜1136はAND回路、1137はNOR回路である。D型フリップフロップ1132とAND回路1134により、リトライ信号RETRYの立ち上がりエッジを検出すると、AND回路1134は“H”を出力する。D型フリップフロップ1133とAND回路1136により、AND回路1135の立ち上がりエッジを検出すると、アンド回路1136は“H”を出力する。   FIG. 5 is a block diagram illustrating a configuration example of the retry count measuring circuit 113. The function of the counter 1131 used in the figure is exactly the same as the counter 1121 used in FIG. Reference numerals 1132 and 1133 denote D-type flip-flops, 1134 to 1136 denote AND circuits, and 1137 denotes a NOR circuit. When the rising edge of the retry signal RETRY is detected by the D flip-flop 1132 and the AND circuit 1134, the AND circuit 1134 outputs “H”. When the rising edge of the AND circuit 1135 is detected by the D-type flip-flop 1133 and the AND circuit 1136, the AND circuit 1136 outputs “H”.

カウンタ1131はリトライ信号RETRYの立ち上がりエッジの回数を計測し、計測値RTRY_CNTを出力する。このカウンタ1131のリセットはシステムRESET信号、読出終了信号RD_ENDあるいは書込終了信号WR_ENDが“H”の時に行われる。また、このカウンタ1131のカウント値が「7」になると、AND回路1135が1クロック分のパルス信号INT_Oを出力し、CPUへの割り込み要求やリセットとして使用することができる。   The counter 1131 measures the number of rising edges of the retry signal RETRY, and outputs a measurement value RTRY_CNT. The counter 1131 is reset when the system RESET signal, the read end signal RD_END, or the write end signal WR_END is “H”. When the count value of the counter 1131 becomes “7”, the AND circuit 1135 outputs a pulse signal INT_O for one clock and can be used as an interrupt request or reset to the CPU.

図6は最初の読出サイクルでレディ信号RDYが有効にならず、リトライを行い2回目の読出サイクルを実施し、レディ信号RDYが有効になった場合のタイミングチャートである。図中のカウント値COUNTはバスサイクル計測回路112内のカウンタ1121の値を10進数で示したものである。カウンタ1121は、読出制御信号RDN=“L”を受けて、カウント値COUNT=「0」にクリアされ、その後も読出制御信号RDNが“L”なので、クロック信号CLKに同期してカウントアップする。   FIG. 6 is a timing chart in the case where the ready signal RDY is not enabled in the first read cycle, the retry is performed and the second read cycle is performed, and the ready signal RDY is enabled. The count value COUNT in the figure indicates the value of the counter 1121 in the bus cycle measuring circuit 112 in decimal. The counter 1121 receives the read control signal RDN = “L”, is cleared to the count value COUNT = “0”, and thereafter, since the read control signal RDN is “L”, the counter 1121 counts up in synchronization with the clock signal CLK.

カウント値COUNTが本実施例1での規定値である「7」になったところでリトライ信号RETRYが“H”となり、これにより読出制御信号RDNが“L”→“H”になり外部I/Oデバイス20からみた見かけ上のバスサイクル(1回目)が終了する。また、これと同時にリトライ回数計測回路113内のカウンタ1131の計測値RTRY_CNTが「0」から「1」にカウントアップされる。加えて、読出制御信号RDNが“H”になったことで、カウンタ1121のカウント値COUNTは「0」にクリアされ、前回と同一アクセスの2回目のバスサイクルが開始される。   When the count value COUNT reaches “7” which is the specified value in the first embodiment, the retry signal RETRY changes to “H”, and the read control signal RDN changes from “L” to “H”, thereby causing the external I / O. The apparent bus cycle (first time) seen from the device 20 is completed. At the same time, the measured value RTRY_CNT of the counter 1131 in the retry count measuring circuit 113 is counted up from “0” to “1”. In addition, since the read control signal RDN becomes “H”, the count value COUNT of the counter 1121 is cleared to “0”, and the second bus cycle of the same access as the previous time is started.

本例では2回目のバスサイクルで読出制御信号RDNが“L”の期間に、レディ信号RDYが“H”となるのを受けて読出終了信号RD_ENDが“H”、そして読出制御信号CPU_RDNが“H”となり、この時点で本読み出しのアクセスに関するバスサイクルは終了する。1回目及び2回目のバスサイクル期間中、読出制御信号CPU_RDNは“L”のままであり、読出終了信号RD_ENDが“H”になるまでの間、CPUとしては長めのバスサイクルを1回実行したという捉え方となる。リトライ回数計測回路113内のカウンタ1131は読出終了信号RD_ENDが“H”になることでリセットされる。   In this example, in the period when the read control signal RDN is “L” in the second bus cycle, the read end signal RD_END is “H” in response to the ready signal RDY becoming “H”, and the read control signal CPU_RDN is “ At this time, the bus cycle relating to the read access ends. During the first and second bus cycles, the read control signal CPU_RDN remains “L”, and the CPU executes one long bus cycle until the read end signal RD_END becomes “H”. It will be understood. The counter 1131 in the retry count measuring circuit 113 is reset when the read end signal RD_END becomes “H”.

図6に対応する書き込み処理に関しては、図2と図3の関係から明らかなように、各信号を、RDN→WRN、CPU_RDN→CPU_WRN、RD_END→WR_ENDに置き換えることで対応可能なため、詳細な説明を省略する(両者でデータバスD[7:0]の波形が異なるが、本質ではない)。   The write processing corresponding to FIG. 6 can be handled by replacing each signal with RDN → WRN, CPU_RDN → CPU_WRN, RD_END → WR_END, as is apparent from the relationship between FIG. 2 and FIG. (The waveform of the data bus D [7: 0] differs between the two, but this is not essential).

図7はリトライ回数、つまりリトライ回数計測回路113内のカウンタ1131の計測値RTRY_CNTが本実施例での規定数である「7」(つまり、リトライ回数が8回目)に到達した際に1クロック幅のパルス信号INT_Oが出力される様子を示したタイミングチャートである。このパルス信号INT_Oを割り込み要求信号として利用することにより、バスサイクルエラーの感知後の処理をソフトウェアで対応することが可能となる。また、このパルス信号INT_Oをリセットとして利用し、システムの初期化に利用することも可能となる。なお、このように、計測値RTRY_CNTが本実施例1での規定数である「7」に到達したときは、この計測値RTRY_CNTに基づき読出終了信号RD_ENDが“H”、そして読出制御信号CPU_RDNが“H”となり、この時点で本読み出しのアクセスに関するバスサイクルは終了する。リトライ回数計測回路113内のカウンタ1131は読出終了信号RD_ENDが“H”になることでリセットされる。   FIG. 7 shows the number of retries, that is, one clock width when the measured value RTRY_CNT of the counter 1131 in the retry number measuring circuit 113 reaches “7” (that is, the number of retries is the eighth) which is the specified number in this embodiment. 6 is a timing chart showing how the pulse signal INT_O is output. By using this pulse signal INT_O as an interrupt request signal, the processing after the detection of the bus cycle error can be handled by software. It is also possible to use this pulse signal INT_O as a reset to initialize the system. As described above, when the measurement value RTRY_CNT reaches “7” which is the prescribed number in the first embodiment, the read end signal RD_END is “H” and the read control signal CPU_RDN is set based on the measurement value RTRY_CNT. At this time, the bus cycle related to the read access ends. The counter 1131 in the retry count measuring circuit 113 is reset when the read end signal RD_END becomes “H”.

図8は本発明の実施例2のバス制御回路およびその周辺の回路部分を示すブロック図である。図1に示したものと同じものには同じ符号を付けた。114はアクセス内容記憶回路であり、リトライ回数が規定値である「7」に達し、アクセスが不調に終わった際に、そのアクセス内容である、アドレスバスA[15:0]、書き込みの場合の書き込みデータDOUT[7:0]、読み出しフラグとしてのCPU_RDN、書き込みフラグとしてのCPU_WRNの内容を、データDO[25:0]として内部レジスタにまとめて記憶する。   FIG. 8 is a block diagram showing a bus control circuit and its peripheral circuit portion according to the second embodiment of the present invention. The same components as those shown in FIG. Reference numeral 114 denotes an access content storage circuit. When the number of retries reaches a predetermined value “7” and the access ends abnormally, the address bus A [15: 0], which is the access content, is written. The contents of write data DOUT [7: 0], CPU_RDN as a read flag, and CPU_WRN as a write flag are collectively stored as data DO [25: 0] in an internal register.

115はアクセスが不調に終わった際にCPUに読み込ませるためのデータを生成するデータ処理回路としてのDIN生成回路であり、CPUからの読み出しアクセスがIOデバイス20に対する場合にはIOデバイス20からの読み出しデータバスD[7:0]の内容をDIN[7:0]として出力し、またアクセス内容記憶回路114に対する場合はアクセス内容記憶回路114のレジスタに記憶したデータDO[25:0]を8ビット単位で切り替えてDIN[7:0]として出力する。   Reference numeral 115 denotes a DIN generation circuit as a data processing circuit that generates data to be read by the CPU when access is unsuccessful. When the read access from the CPU is to the IO device 20, the read from the IO device 20 is performed. The contents of the data bus D [7: 0] are output as DIN [7: 0], and in the case of the access content storage circuit 114, the data DO [25: 0] stored in the register of the access content storage circuit 114 is 8 bits. Switch in units and output as DIN [7: 0].

図9はアクセス内容記憶回路114の構成例を示すブロック図である。1141は3ビットのD型フリップフロップ、1142は26ビットのD型フリップフロップ、1143〜1145はAND回路、1146はOR回路、1147はセレクタである。   FIG. 9 is a block diagram showing a configuration example of the access content storage circuit 114. 1141 is a 3-bit D-type flip-flop, 1422 is a 26-bit D-type flip-flop, 1143 to 1145 are AND circuits, 1146 is an OR circuit, and 1147 is a selector.

D型フリップフロップ1141は、リトライ回数計測回路113内のカウンタ1131の計測値RTRY_CNTを取り込み、その値が「6」に達すると、AND回路1143の出力が“H”となり、AND回路1144のゲートを開くので、その次の“H”のリトライ信号RETRY(これは、RTRY_CNT=「7」のとき)が入力した時にそのAND回路1144の出力が“H”となり、AND回路1145がゲートを開く。   The D-type flip-flop 1141 takes in the measured value RTRY_CNT of the counter 1131 in the retry count measuring circuit 113, and when the value reaches “6”, the output of the AND circuit 1143 becomes “H”, and the gate of the AND circuit 1144 is turned on. Therefore, when the next “H” retry signal RETRY (when RTRY_CNT = “7”) is input, the output of the AND circuit 1144 becomes “H”, and the AND circuit 1145 opens the gate.

この結果、不調に終わったアクセスの内容であるところのアドレスバスA[15:0]、書き込みの場合の書き込みデータバスDOUT[7:0]、読み出しフラグとしてのCPU_RDN、書き込みフラグとしてのCPU_WRNの内容、つまり合計26ビットが、アンド回路1145を経由してセレクタ1147に入力する。   As a result, the content of the address bus A [15: 0], which is the content of the access that ended abnormally, the write data bus DOUT [7: 0] in the case of writing, the CPU_RDN as the read flag, and the content of the CPU_WRN as the write flag That is, a total of 26 bits are input to the selector 1147 via the AND circuit 1145.

このとき、計測値RTRY_CNTが「7」になったことに基づき読出終了信号RD_ENDが“H”となっているので、OR回路1146の出力が“H”となり、セレクタ1147はAND回路1145の出力を選択して、前記した不調に終わったアクセスの内容を示すデータDO[25:0]がフリップフロップ1142に記憶される。この後に読出終了信号RD_ENDが“L”になり、セレクタ1147が切り替わるので、クロックCLKが更新しても、このフリップフロップ1142の記憶内容はセレクタ1147経由で自己保持される。   At this time, since the read end signal RD_END is “H” based on the measurement value RTRY_CNT becoming “7”, the output of the OR circuit 1146 becomes “H”, and the selector 1147 outputs the output of the AND circuit 1145. The data DO [25: 0] indicating the contents of the access that has been selected and ended abnormally is stored in the flip-flop 1142. Thereafter, the read end signal RD_END becomes “L” and the selector 1147 is switched, so that even if the clock CLK is updated, the stored contents of the flip-flop 1142 are self-held via the selector 1147.

図10はDIN生成回路115の構成例を示すブロック図である。1151はCPUから到来するアドレスバスA[15:0]の内容を3ビットのコードに変換するデコード回路、1152はアクセス内容記憶回路114の26ビットの保持データDO[25:0]およびIOデバイス20の読み出しデータD[7:0]を、デコード回路1151のデコード結果によって選択するセレクタである。アクセス内容記憶回路114の保持データDO[25:0]は、DO[7:0],DO[15:8],DO[22:16],DO[25:23]のように8ビット単位で選択される(8ビットに足りない場合には不足ビットは任意とする)。   FIG. 10 is a block diagram illustrating a configuration example of the DIN generation circuit 115. 1151 is a decoding circuit for converting the contents of the address bus A [15: 0] coming from the CPU into a 3-bit code, 1152 is the 26-bit retained data DO [25: 0] of the access content storage circuit 114, and the IO device 20 Is a selector that selects the read data D [7: 0] from the decoding result of the decoding circuit 1151. The stored data DO [25: 0] of the access content storage circuit 114 is in units of 8 bits like DO [7: 0], DO [15: 8], DO [22:16], DO [25:23]. Is selected (the missing bits are optional if less than 8 bits).

デコード回路1151は、CPUからのアドレスバスA[15:0]の内容がIOデバイス20を示すときは“000”のコードを出力する。すると、セレクタ1152は、IOデバイス20への入力データD[7:0]を選択し、これがCPUに読み込まれる。CPUからのアドレスバスA[15:0]の内容がアクセス内容記憶回路114に割り当てられたIOアドレス#0を示すときは“001”のコードを出力し、アクセス内容記憶回路114に記憶されているデータDO[25:0]の内のデータDO[7:0]を選択し、これがCPUに読み込まれる。以下、アクセス内容記憶回路114に割り当てられたIOアドレス#1,#2,#3を示すときは、それぞれコード“010”,“011”,“100”を出力することで、データDO[25:0]の内のデータDO[15:8],DO[22:16],DO[25:23]を選択し、これらがCPUに読み込まれる。   The decode circuit 1151 outputs a code “000” when the content of the address bus A [15: 0] from the CPU indicates the IO device 20. Then, the selector 1152 selects the input data D [7: 0] to the IO device 20 and this is read into the CPU. When the content of the address bus A [15: 0] from the CPU indicates the IO address # 0 assigned to the access content storage circuit 114, a code "001" is output and stored in the access content storage circuit 114. Data DO [7: 0] is selected from the data DO [25: 0] and is read by the CPU. Hereinafter, when the IO addresses # 1, # 2, and # 3 assigned to the access content storage circuit 114 are indicated, by outputting the codes “010”, “011”, and “100”, respectively, the data DO [25: Data DO [15: 8], DO [22:16], and DO [25:23] in [0] are selected and read by the CPU.

このようにして、CPUからのアドレスバスA[15:0]の内容を切り替えることによって、DIN生成回路115はアクセス内容記憶回路114の記憶データDO[25:0]やIOデバイス20から直接読み出したデータD[7:0]をCPUで読み取り易いように8ビット単位としてそのCPUに送る。   In this way, by switching the contents of the address bus A [15: 0] from the CPU, the DIN generation circuit 115 directly reads the stored data DO [25: 0] of the access content storage circuit 114 or the IO device 20. Data D [7: 0] is sent to the CPU in 8-bit units so that it can be easily read by the CPU.

以上のように、INT_O信号による割込み処理により、CPUがソフトウエアでこのアクセス内容記憶回路114内の記憶内容等をDIN生成回路115によってデータ処理してから読み出すことにより、ユーザはどのIOデバイスでアクセスのエラーが発生したのかを知ることが可能となる。仮に、この特定されたIOデバイスがそれまでの処理の履歴を考慮しないIOデバイスの場合であれば、この特定されたIOデバイスのみをリセットし、この後にこのIOデバイスの再度の設定作業を行い、再度先般不調に終わったアクセスを行い、再び処理を続行することが可能となる。このことは、システム全体のリセット(再起動)機会の削減を意味する。   As described above, by the interrupt processing by the INT_O signal, the CPU accesses the contents stored in the access content storage circuit 114 by software after data processing by the DIN generation circuit 115, and the user accesses which IO device. It becomes possible to know whether or not an error has occurred. If the specified IO device is an IO device that does not consider the history of processing up to that point, only the specified IO device is reset, and then the IO device is set again. It becomes possible to perform the access again after the last unsuccessful access and continue the process again. This means a reduction in the chance of resetting (restarting) the entire system.

実施例1のバス制御回路を含むマイクロコントローラの一部および外部I/Oデバイス示すブロック図である。FIG. 2 is a block diagram illustrating a part of a microcontroller including a bus control circuit according to the first embodiment and an external I / O device. 図1のバス制御回路の読出動作(正常時)のタイミングチャートである。3 is a timing chart of a read operation (normal time) of the bus control circuit of FIG. 1. 図1のバス制御回路の書込動作(正常時)のタイミングチャートである。2 is a timing chart of a writing operation (normal time) of the bus control circuit of FIG. 1. バスサイクル計測回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of a bus cycle measurement circuit. リトライ回数計測回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of a retry frequency measurement circuit. リトライ動作のタイミングチャートである。It is a timing chart of a retry operation. リトライ回数が規定数に達した場合のタイミングチャートである。6 is a timing chart when the number of retries reaches a specified number. 実施例2のバス制御回路を含むマイクロコントローラの一部および外部I/Oデバイス示すブロック図である。10 is a block diagram showing a part of a microcontroller including a bus control circuit according to a second embodiment and an external I / O device. FIG. アクセス内容記憶回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of an access content memory circuit. DIN生成回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of a DIN production | generation circuit.

符号の説明Explanation of symbols

10:マイクロコントローラ
11:バス制御回路
111:RDN_WRN生成回路(読出/書込回路)
112:バスサイクル計測回路、1121:カウンタ、1122:セレクタ、1123:D型フリップフロップ、1124,1125,1126:AND回路、1127:NOR回路、1128:インバータ
113:リトライ回数計測回路、1131:カウンタ、1132,1133:D型フリップフロップ、1134〜1136:AND回路、1137:NOR回路
114:アクセス内容記憶回路、1141,1142:D型フリップフロップ、1143〜1145:AND回路、1146:OR回路、1147:セレクタ
115:DIN生成回路、1151:デコード回路、1152:セレクタ
20:外部I/Oデバイス
A[15:0]:アドレスバス
D[7:0]:データバス
CLK:クロック信号
CPU_RDN:読出制御信号
CPU_WRN:書込制御信号
RDN:読出制御信号
WRN:書込制御信号
RDY:レディ信号
RETRY:リトライ信号
WR_END:書込終了信号
RD_END:読出終了信号
COUNT:カウンタ1121のカウント値
RTRY_CNT:カウンタ1131のカウント値
10: Microcontroller 11: Bus control circuit 111: RDN_WRN generation circuit (read / write circuit)
112: Bus cycle measurement circuit, 1121: Counter, 1122: Selector, 1123: D-type flip-flop, 1124, 1125, 1126: AND circuit, 1127: NOR circuit, 1128: Inverter 113: Retry count measurement circuit, 1131: Counter, 1132, 1133: D-type flip-flop, 1134 to 1136: AND circuit, 1137: NOR circuit 114: Access content storage circuit, 1141, 1142: D-type flip-flop, 1143 to 1145: AND circuit, 1146: OR circuit, 1147: Selector 115: DIN generation circuit, 1151: decode circuit, 1152: selector 20: external I / O device A [15: 0]: address bus D [7: 0]: data bus CLK: clock signal CPU_RDN: read control signal CPU_WR : Write control signal RDN: read control signal WRN: write control signal RDY: Ready signal RETRY: Retry signal WR_END: write end signal RD_END: read end signal COUNT: count value of the counter 1121 RTRY_CNT: count value of the counter 1131

Claims (10)

CPUを使用して、外部回路に対して読出動作あるいは書込動作を行う際に、前記外部回路から入力するレディ信号が有効になることに基づき当該読出あるいは書込アクセスのバスサイクルの処理を完了するバス制御方法において、
前記レディ信号が規定時間を超えても有効にならないとき、現バスサイクルを中止することにより非アクセス状態に復帰させ、該非アクセス状態になった後再度前回と同一アクセスのバスサイクルを実行することを特徴とするバス制御方法。
When a read operation or a write operation is performed on an external circuit using the CPU, processing of the bus cycle for the read or write access is completed based on the ready signal input from the external circuit being valid. In the bus control method to
When the ready signal does not become effective even after a specified time, the current bus cycle is canceled to return to the non-access state, and after entering the non-access state, the same access bus cycle as before is executed again. A characteristic bus control method.
請求項1に記載のバス制御方法において、
前記同一アクセスのバスサイクルの実行回数が規定数に達することにより、前記バスサイクルの処理を終了すると共に割り込みあるいはリセットとして使用できる信号を出力することを特徴とするバス制御方法。
The bus control method according to claim 1,
When the number of executions of the same access bus cycle reaches a specified number, the bus cycle processing is terminated and a signal that can be used as an interrupt or reset is output.
請求項1に記載のバス制御方法において、
前記同一アクセスのバスサイクルの実行回数が規定数に達することにより、前記バスサイクルの処理を終了すると共に当該アクセスに関する情報を記憶することを特徴とするバス制御方法。
The bus control method according to claim 1,
A bus control method characterized in that when the number of executions of the bus cycle of the same access reaches a specified number, the processing of the bus cycle is terminated and information relating to the access is stored.
請求項3に記載のバス制御方法において、
前記記憶したアクセスに関する情報を前記CPUに読ませるためのデータ処理を行うことを特徴とするバス制御回路。
The bus control method according to claim 3,
A bus control circuit that performs data processing for causing the CPU to read information relating to the stored access.
外部回路に対してバスおよび制御線を介して接続され、CPUからの読み出しあるいは書込みの指令に基づき前記外部回路に対して読出制御信号あるいは書込制御信号を出力して読み出しあるいは書込みを行う際、前記外部回路から入力するレディ信号が有効になることに基づき当該アクセスのバスサイクルの処理を完了するバス制御回路において、
前記CPUからの読み出しあるいは書込みの指令に基づき前記外部回路に対して前記読出制御信号あるいは前記書込制御信号を生成して出力する読出/書込回路と、該読出/書込回路から前記読出制御信号あるいは前記書込制御信号を前記外部回路に出力した後に前記レディ信号が有効になることなく規定時間が経過するとリトライ信号を出力するバスサイクル計測回路とを具備し、
前記読出/書込回路は、前記バスサイクル計測回路から前記リトライ信号が出力されることにより前記読出制御信号あるいは前記書込制御信号を一旦解除するとともに再度生成して、前回と同一アクセスのバスサイクルが実行されるようにしたことを特徴とするバス制御回路。
When connected to an external circuit via a bus and a control line and reading or writing by outputting a read control signal or a write control signal to the external circuit based on a read or write command from the CPU, In the bus control circuit that completes the processing of the bus cycle of the access based on the ready signal input from the external circuit being valid,
A read / write circuit that generates and outputs the read control signal or the write control signal to the external circuit based on a read or write command from the CPU, and the read control from the read / write circuit A bus cycle measuring circuit that outputs a retry signal when a specified time elapses without the ready signal being effective after the signal or the write control signal is output to the external circuit,
The read / write circuit temporarily cancels the read control signal or the write control signal when the retry signal is output from the bus cycle measuring circuit, and generates the bus control cycle in the same access as the previous time. A bus control circuit characterized in that is executed.
請求項5に記載のバス制御回路において、
前記バスサイクル計測回路は、前記読出制御信号あるいは前記書込制御信号が生成されると時間の計測動作を一旦解除してから該計測動作を再開し、前記リトライ信号が出力された後は前記読出制御信号及び前記書込制御信号が解除されると前記計測動作を解除することを特徴とするバス制御回路。
The bus control circuit according to claim 5.
When the read control signal or the write control signal is generated, the bus cycle measurement circuit once cancels the time measurement operation and restarts the measurement operation. After the retry signal is output, the bus cycle measurement circuit resumes the read operation. A bus control circuit which releases the measurement operation when a control signal and the write control signal are released.
請求項5又は6に記載のバス制御回路において、
前記バスサイクル計測回路で生成される前記リトライ信号の回数を計測して規定回数に達すると、割り込みあるいはリセットとして使用できる信号を出力するリトライ回数計測回路を具備することを特徴とするバス制御回路。
In the bus control circuit according to claim 5 or 6,
A bus control circuit, comprising: a retry count measuring circuit that outputs a signal that can be used as an interrupt or a reset when the number of retry signals generated by the bus cycle measuring circuit is measured and reaches a specified number.
請求項7に記載のバス制御回路において、
前記リトライ回数計測回路は、前記リトライ回数の計測値が前記規定回数に達する前に前記レディ信号が有効になると前記リトライ回数の計測動作を解除することを特徴とするバス制御回路。
The bus control circuit according to claim 7,
The retry count measurement circuit releases the retry count measurement operation when the ready signal becomes valid before the measured value of the retry count reaches the specified count.
請求項7に記載のバス制御回路において、
前記リトライ回数計測回路が計測する前記リトライ回数の計測値が前記規定回数に達することにより前記アクセスに関する情報を記憶するアクセス内容記憶回路を具備することを特徴とするバス制御回路。
The bus control circuit according to claim 7,
A bus control circuit comprising: an access content storage circuit for storing information related to the access when a measured value of the retry count measured by the retry count measurement circuit reaches the specified number of times.
請求項7に記載のバス制御回路において、
前記アクセス内容記憶回路に記憶された前記アクセスに関する情報を前記CPUに読ませるためのデータ処理を行うデータ処理回路を具備することを特徴とするバス制御回路。
The bus control circuit according to claim 7,
A bus control circuit comprising a data processing circuit for performing data processing for causing the CPU to read information relating to the access stored in the access content storage circuit.
JP2005196296A 2004-08-25 2005-07-05 Bus control method and circuit Withdrawn JP2006092522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005196296A JP2006092522A (en) 2004-08-25 2005-07-05 Bus control method and circuit

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004245694 2004-08-25
JP2005196296A JP2006092522A (en) 2004-08-25 2005-07-05 Bus control method and circuit

Publications (1)

Publication Number Publication Date
JP2006092522A true JP2006092522A (en) 2006-04-06

Family

ID=36233395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005196296A Withdrawn JP2006092522A (en) 2004-08-25 2005-07-05 Bus control method and circuit

Country Status (1)

Country Link
JP (1) JP2006092522A (en)

Similar Documents

Publication Publication Date Title
US20090210590A1 (en) Peripheral module register access methods and apparatus
JP2002041489A (en) Synchronizing signal generation circuit, processor system using the same and synchronizing signal generating method
US20150234661A1 (en) Semiconductor integrated circuit device and system using the same
JPH05204709A (en) Processor
US10656952B2 (en) System on chip (SOC) and method for handling interrupts while executing multiple store instructions
JP5292706B2 (en) Computer system
JP2016143422A (en) Configuring serial devices
JP2010181990A (en) Data processor
JP2011227730A (en) Microcomputer
JP2006092522A (en) Bus control method and circuit
JP6673021B2 (en) Memory and information processing device
EP2352092B1 (en) Processor, information processing apparatus, and method of controlling processor
JP5549627B2 (en) Microcomputer
JP2008059191A (en) Microcontroller and its debugging method
JP5012562B2 (en) Microcomputer
JP5350049B2 (en) Interface circuit
JP2008021040A (en) Bus master circuit, bus control method and computer program
JP2017073186A (en) Nonvolatile storage device
JPH1049489A (en) Signal generating device
JP2003331587A (en) Control device for data input of serial eeprom
JPS6346460B2 (en)
JP2563204B2 (en) Dynamic bus size detection circuit
JP2010049462A (en) Data processor
JP2010140132A (en) Memory system and memory controller
JP2006221435A (en) Memory circuit

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20081007