JPH0690730B2 - Microprocessor and output port - Google Patents
Microprocessor and output portInfo
- Publication number
- JPH0690730B2 JPH0690730B2 JP2288695A JP28869590A JPH0690730B2 JP H0690730 B2 JPH0690730 B2 JP H0690730B2 JP 2288695 A JP2288695 A JP 2288695A JP 28869590 A JP28869590 A JP 28869590A JP H0690730 B2 JPH0690730 B2 JP H0690730B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- output
- signal
- master latch
- circuit
- 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.)
- Expired - Fee Related
Links
- 238000013500 data storage Methods 0.000 claims description 23
- 125000004122 cyclic group Chemical group 0.000 claims description 16
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 4
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 1
Landscapes
- Microcomputers (AREA)
Description
【発明の詳細な説明】 産業上の利用分野 本発明はマイクロプロセッサと出力ポートの構成に関
し、出力ポートを介して出力される信号のタイムベース
エラーの少ないマイクロプロセッサおよび出力ポートを
提供するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a configuration of a microprocessor and an output port, and provides a microprocessor and an output port in which a signal output through the output port has less time base error. .
従来の技術 近年、ノイマン方式のマイクロプロセッサはあらゆる方
面で多用されており、その構成としては、順次実行され
る命令群からなるプログラムを格納するプログラム格納
手段と、ディジタルデータの読み書きが可能なデータ格
納手段と、ディジタルデータの演算を実行する演算手段
と、前記データ格納手段の入出力端子と前記演算手段の
入出力端子を接続するデータバスと、前記プログラム格
納手段から送出される命令に基づいて前記データ格納手
段と前記演算手段の動作をコントロールするコントロー
ル手段と、命令の実行タイミング信号を発生するタイミ
ングジェネレータと、前記タイミングジェネレータの出
力に基づいて前記プログラム格納手段に格納された特定
の命令を選択する命令選択手段とを備えていることに特
徴づけられる。また、その代表的な構成が特公昭58−33
584号公報(以下、文献1と略記する。)に示されてい
る。2. Description of the Related Art In recent years, Neumann microprocessors have been widely used in all fields, and their configurations include a program storage means for storing a program consisting of a series of instructions to be sequentially executed and a data storage for reading / writing digital data. Means, an arithmetic means for executing arithmetic operation of digital data, a data bus connecting the input / output terminal of the data storage means and the input / output terminal of the arithmetic means, and the above-mentioned means based on an instruction sent from the program storage means. Control means for controlling the operations of the data storage means and the arithmetic means, a timing generator for generating an instruction execution timing signal, and a specific instruction stored in the program storage means based on the output of the timing generator. Characterized by having instruction selection means To be In addition, the typical structure is Japanese Patent Publication Sho 58-33.
No. 584 (hereinafter referred to as Document 1).
発明が解決しようとする課題 しかしながら、文献1に示されるようなノイマン方式の
マイクロプロセッサは、あらかじめ定められた順序にし
たがってデータの処理を実行していくために、プログラ
ムが膨大になるにつれて非同期で入力される外部データ
の取り込みやそれに基づくデータの処理のサイクルが長
くなり、その結果、事象が発生してからマイクロプロセ
ッサから出力信号が送出されるまでの時間のばらつき、
すなわち、タイムベースエラーがかなり大きくなるとい
う問題を有している。このような問題に対して、従来は
割り込みという手段が用いられてきたが、割り込み要求
があってもその時点で実行している命令を処理してしま
わないと割り込み処理に移行できないため、マイクロプ
ロセッサが割り込みを受け付けてから、実際に割り込み
サービスルーチンを開始するまでの時間そのものにタイ
ムベースエラーが発生してしまうという問題点を有して
いた。SUMMARY OF THE INVENTION However, the Neumann method microprocessor as shown in Document 1 executes data processing in a predetermined order, and thus asynchronously inputs data as the program becomes huge. The cycle of fetching external data and the processing of data based on it becomes longer, and as a result, the variation in the time from the occurrence of an event to the output signal from the microprocessor,
That is, there is a problem that the time base error becomes considerably large. Conventionally, a means called an interrupt has been used to deal with such a problem. However, even if an interrupt request is made, it cannot move to the interrupt process unless the instruction being executed at that time is processed. There is a problem that a timebase error occurs in the time itself from when an interrupt is accepted until the interrupt service routine is actually started.
本発明は上記従来の問題点を解決するもので、一連の信
号パターンをタイムベースエラーを少なく出力すること
ができるマイクロプロセッサおよび出力ポートを提供す
ることを目的とする。SUMMARY OF THE INVENTION The present invention solves the above-mentioned conventional problems, and an object of the present invention is to provide a microprocessor and an output port capable of outputting a series of signal patterns with a small time base error.
課題を解決するための手段 この目的を達成するために本発明のマイクロプロセッサ
は、巡回カウント動作を行うフリーランニングカウンタ
と、2種類以上のディジタルデータを格納するデータ格
納手段と、前記データ格納手段の中から互いに異なるデ
ータを選択する第1および第2のデータ選択手段と、前
記第1および第2のデータ選択手段が選択したデータの
どちらか一方のデータを出力するデータ切換手段と、前
記外部入力信号に同期して前記フリーランニングカウン
タのカウントデータを格納するカウントデータ格納手段
と、前記カウントデータ格納手段のデータと前記データ
切換手段の出力データとの加算を行う加算器と、前記フ
リーランニングカウンタのカウントデータと前記加算器
の加算データとを比較し、一致した場合に一致信号を出
力する比較手段と、前記比較手段から出力される一致信
号に基づいて巡回カウント動作を行うポインタと、前記
データ格納手段と同数のディジタルデータを格納するマ
スターラッチ部と、前記マスターラッチ部の中から互い
に異なるマスターラッチをそれぞれ選択する第1および
第2のマスターラッチ選択手段と、前記第1および第2
のマスターラッチ選択手段が選択したマスターラッチの
どちらか一方のデータを出力するマスターラッチ切換手
段と、前記マスターラッチ切換手段の出力データを前記
比較手段から出力される一致信号に基づいて取り込むス
レーブラッチ部とからなる出力ポートを備えている。Means for Solving the Problems To achieve this object, a microprocessor according to the present invention comprises a free running counter for performing a cyclic counting operation, a data storage means for storing two or more types of digital data, and a data storage means for storing the data. First and second data selecting means for selecting mutually different data, data switching means for outputting one of the data selected by the first and second data selecting means, and the external input A count data storage means for storing count data of the free running counter in synchronization with a signal, an adder for adding data of the count data storage means and output data of the data switching means, and a free running counter of the free running counter. Compare the count data and the addition data of the adder, and if they match, match Comparing means for outputting a signal, a pointer for performing a cyclic counting operation based on the coincidence signal output from the comparing means, a master latch section for storing the same number of digital data as the data storing means, and a master latch section First and second master latch selecting means for selecting mutually different master latches, and the first and second master latch selecting means.
Master latch selecting means for outputting data of either one of the master latches selected by the master latch selecting means, and a slave latch portion for fetching output data of the master latch switching means based on a coincidence signal output from the comparing means. It has an output port consisting of.
また、本発明の出力ポートは、巡回カウント動作を行う
フリーランニングカウンタと、外部入力信号に応じて出
力データを変更する時間データ格納手段と、前記フリー
ランニングカウンタのカウントデータ前記時間データ格
納手段の出力データとの加算を行う加算器と、前記フリ
ーランニングカウンタのカウントデータと前記加算器の
出力データとを比較し、一致した場合に一致信号を出力
する比較手段と、前記比較手段から出力される一致信号
に基づいて巡回カウント動作を行うポインタと、少なく
とも2種類以上のディジタルデータを格納するマスター
ラッチ部と、前記ポインタの内容に応じて、前記マスタ
ーラッチ部のいずれか1つを選択するマスターラッチ選
択手段と、前記マスターラッチ部のデータを前記比較手
段から出力される一致信号に基づいて取り込むスレーブ
ラッチ部とを備えている。Further, the output port of the present invention includes a free-running counter for performing a cyclic counting operation, time data storage means for changing output data according to an external input signal, count data of the free-running counter, and output of the time data storage means. An adder that performs addition with data, a comparison unit that compares the count data of the free running counter and the output data of the adder, and outputs a match signal when they match, and a match output from the comparison unit A pointer that performs a cyclic count operation based on a signal, a master latch unit that stores at least two or more types of digital data, and a master latch selection that selects one of the master latch units according to the contents of the pointer. Means and data of the master latch section is output from the comparing means. Taking based on No. match signal and a slave latch portion.
作用 本発明は上記した構成により、出力ポートを介して出力
される信号のタイムベースエラーが少ないマイクロプロ
セッサおよび出力ポートを得ることができる。Effect of the Invention With the above-described configuration, the present invention can provide a microprocessor and an output port in which a signal output via the output port has less time base error.
実施例 以下、本発明の一実施例について、図面を参照しながら
説明する。Embodiment One embodiment of the present invention will be described below with reference to the drawings.
第1図は本発明のマイクロプロセッサの構成図を示すも
のである。FIG. 1 is a block diagram of the microprocessor of the present invention.
第1図において、TMGR100は外部クロック入力端子10に
供給されるクロック信号をもとに命令の実行タイミング
信号を発生するタイミングジェネレータであり、その出
力信号はPC200,ICR900およびFRC1000に供給されてい
る。PLA300はプログラマブルロジックアレイであり、順
次実施される命令群からなるプログラムが格納されてい
る。PC200はプログラムカウンタであり、TMGR100の出力
信号に基づいてPLA300に格納された特定の命令を選択す
る。FRC1000はフリーランニングカウンタであり、TMGR1
00の出力信号をクロック信号として巡回カウント動作を
行う。FRC1000のカウントデータはローカルバス1400を
介してICR900および出力ポート1100に供給される。ICR9
00はインプットキャプチャレジスタ回路であり、外部信
号入力端子20〜27に印加される入力信号のエッジが到来
したときに、その時点のFRC1000のカウントデータをICR
900内の特定のレジスタに格納する(同時に複数の入力
信号のエッジが到来したときには、複数のレジスタにFR
C1000のカウントデータが格納される。)とともに、図
示されてはいない入力信号受け付けフラグをセットする
機能を有している。PLA300から送出される命令はコマン
ドバス1300を介してALU400,アドレスデコーダ600(図中
ではアドレスデコーダAと示されている。),アドレス
デコーダ800(図中ではアドレスデコーダBと示されて
いる。),ICR900および出力ポート1100に供給される。
また、データバス1200はALU400,ROM500,RAM700,ICR900
および出力ポート1100に接続されている。ALU400はディ
ジタルデータの算術および論理演算を実行する演算器で
ある。ROM500はあらかじめ格納されているディジタルデ
ータをデータバス1200に送出する読み出し専用メモリで
ある。RAM700はデータバス1200を介してディジタルデー
タの読み書きを行うランダムアクセスメモリである。出
力ポート1100は信号入力端子40から入力される外部信号
を基準とし、プログラムによって変えられる一連の信号
パターンを信号出力端子30〜37から出力する。アドレス
デコーダ600はROM500のアドレスを選択し、アドレスデ
コーダ800はRAM700のアドレスを選択する。In FIG. 1, TMGR100 is a timing generator that generates an instruction execution timing signal based on the clock signal supplied to the external clock input terminal 10, and its output signal is supplied to the PC200, ICR900 and FRC1000. The PLA 300 is a programmable logic array, and stores a program including a group of instructions that are sequentially executed. PC200 is a program counter, and selects a specific instruction stored in PLA300 based on the output signal of TMGR100. FRC1000 is a free running counter, TMGR1
The cyclic count operation is performed using the output signal of 00 as a clock signal. The count data of FRC1000 is supplied to ICR900 and output port 1100 via local bus 1400. ICR9
00 is an input capture register circuit, and when the edge of the input signal applied to the external signal input terminals 20 to 27 arrives, the count data of the FRC1000 at that time is ICR.
Stored in a specific register in 900 (FR is written in multiple registers when the edges of multiple input signals arrive at the same time.
The count data of C1000 is stored. ), And has a function of setting an input signal reception flag (not shown). The command transmitted from the PLA 300 is ALU 400, address decoder 600 (shown as address decoder A in the drawing), address decoder 800 (shown as address decoder B in the drawing) via command bus 1300. , ICR900 and output port 1100.
The data bus 1200 is ALU400, ROM500, RAM700, ICR900.
And connected to output port 1100. ALU400 is an arithmetic unit that executes arithmetic and logical operations on digital data. The ROM 500 is a read-only memory that sends digital data stored in advance to the data bus 1200. The RAM 700 is a random access memory that reads and writes digital data via the data bus 1200. The output port 1100 outputs a series of signal patterns that can be changed by a program from the signal output terminals 30 to 37 with reference to the external signal input from the signal input terminal 40. The address decoder 600 selects the address of the ROM 500, and the address decoder 800 selects the address of the RAM 700.
以上のように構成された本実施例のマイクロプロセッサ
について、以下その動作について第1図〜第3図を用い
て説明する。The operation of the microprocessor of the present embodiment configured as described above will be described below with reference to FIGS. 1 to 3.
TMGR100は外部クロック入力端子10に供給されるクロッ
ク信号をもとに命令の実行タイミング信号を発生し、こ
の信号をPC200,ICR900およびFRC1000に供給する。PC200
はTMGR100の出力信号に基づいてPLA300に格納された命
令群の中から特定の命令を選択し、PLA300はPC200によ
って選択された命令をコマンドバス1300に送出する。AL
U400はコマンドバス1300から送られてくる命令にしたが
って、データバス1200を介して送られてくるディジタル
データの算術および論理演算を実行し、その結果をデー
タバス1200に送出する。アドレスデコーダ600はコマン
ドバス1300を介して送られてくる命令に基づいて特定の
アドレスを選択し、ROM500はアドレスデコーダ600によ
って選択されたアドレスに対応する格納手段に格納され
たディジタルデータをデータバス1200に送出する。アド
レスデコーダ800はコマンドバス1300を介して送られて
くる命令に基づいて特定のアドレスを選択し、RAM700は
アドレスコデーダ800によって選択されたアドレスに対
応する格納手段に対し、データバス1200から送られてく
るディジタルデータを格納あるいは既に格納されたディ
ジタルデータをデータバス1200に送出する。The TMGR100 generates an instruction execution timing signal based on the clock signal supplied to the external clock input terminal 10, and supplies this signal to the PC200, ICR900 and FRC1000. PC200
Selects a specific instruction from the instruction group stored in PLA300 based on the output signal of TMGR100, and PLA300 sends the instruction selected by PC200 to command bus 1300. AL
The U400 executes arithmetic and logical operations of digital data sent via the data bus 1200 according to the command sent from the command bus 1300, and sends the result to the data bus 1200. The address decoder 600 selects a specific address based on an instruction sent via the command bus 1300, and the ROM 500 transfers the digital data stored in the storage means corresponding to the address selected by the address decoder 600 to the data bus 1200. Send to. The address decoder 800 selects a specific address based on the instruction sent via the command bus 1300, and the RAM 700 is sent from the data bus 1200 to the storage means corresponding to the address selected by the address coder 800. It stores the incoming digital data or sends the already stored digital data to the data bus 1200.
次に、第2図および第3図を用いて出力ポート1100につ
いて説明する。第2図は第1図の出力ポート1100の内部
構造を示す構成図であり、第3図は主要部のタイミング
チャートである。Next, the output port 1100 will be described with reference to FIGS. 2 and 3. FIG. 2 is a block diagram showing the internal structure of the output port 1100 of FIG. 1, and FIG. 3 is a timing chart of the main part.
第2図で信号入力端子40から入力される外部信号は比較
回路1130,FRCレジスタ1180,時間データ切換回路1175,マ
スターラッチ切換回路1176に供給される。The external signal input from the signal input terminal 40 in FIG. 2 is supplied to the comparison circuit 1130, the FRC register 1180, the time data switching circuit 1175, and the master latch switching circuit 1176.
時間データレジスタ1111〜1114,1116〜1119(図中では
時間データレジスタA1〜D1,A2〜D2と示されている。)
は出力ポートからデータを出力するタイミングデータを
格納するレジスタである。Time data registers 1111 to 1114, 1116 to 1119 (indicated as time data registers A1 to D1 and A2 to D2 in the figure)
Is a register that stores timing data for outputting data from the output port.
時間データ選択回路1120(図中では時間データ選択回路
1と示されている。)は時間データレジスタ1111〜1114
の中から、時間データ選択回路1125(図中では時間デー
タ選択回路2と示されている。)は時間データレジスタ
1116〜1119の中からいずれか1つのレジスタを選択し、
選択したレジスタに格納されているタイミングデータを
それぞれ時間データ切換回路1175に供給する。時間デー
タ切換回路1175は外部信号の信号レベルに応じて、時間
データ選択回路1120および時間データ選択回路1125から
供給されるタイミングデータのどちらか一方を選択し、
加算器1190に供給する。The time data selection circuit 1120 (indicated as time data selection circuit 1 in the figure) includes time data registers 1111-1114.
Among them, the time data selection circuit 1125 (shown as the time data selection circuit 2 in the figure) is a time data register.
Select one of the registers from 1116 to 1119,
The timing data stored in the selected register is supplied to the time data switching circuit 1175, respectively. The time data switching circuit 1175 selects one of the timing data supplied from the time data selection circuit 1120 and the time data selection circuit 1125 according to the signal level of the external signal,
Supply to the adder 1190.
FRCレジスタ1180は入力端子40から外部信号が入力され
ると、そのときFRC1000のカウントデータをラッチし、
そのラッチデータを加算器1190に供給する。加算器1190
はFRCレジスタ1180のデータと時間データ選択回路1175
の出力データとの加算を行い、その加算結果データを比
較回路1130に供給する。比較回路1130は加算器1190から
供給される加算結果データとローカルバス1400を介して
第1図のFRC1000から供給されるカウントデータとを比
較し、一致した場合に一致信号をスレーブラッチ回路11
60およびポインタ回路1170に供給する。また、比較回路
1130は入力端子40から外部信号が供給されると比較動作
を開始し、ポインタ回路1170からオーバーフロー信号が
供給されるまで比較動作を行う。When an external signal is input from the input terminal 40, the FRC register 1180 latches the count data of the FRC1000 at that time,
The latch data is supplied to the adder 1190. Adder 1190
Is the FRC register 1180 data and time data selection circuit 1175
The output data is added and the addition result data is supplied to the comparison circuit 1130. The comparison circuit 1130 compares the addition result data supplied from the adder 1190 with the count data supplied from the FRC 1000 of FIG. 1 via the local bus 1400, and if they match, outputs a match signal as a slave latch circuit 11
60 and pointer circuit 1170. Also, the comparison circuit
The 1130 starts the comparison operation when an external signal is supplied from the input terminal 40, and performs the comparison operation until the overflow signal is supplied from the pointer circuit 1170.
アドレスデコーダ1110,1115(図中ではアドレスデコー
ダC1,C2と示されている。)はコマンドバス1300から送
られてくる命令に従い、データバス1200を介して時間デ
ータレジスタ1111〜1114,1116〜1119にディジタルデー
タを格納する際にアドレスを選択する。The address decoders 1110 and 1115 (indicated as address decoders C1 and C2 in the figure) follow the instructions sent from the command bus 1300 and send them to the time data registers 1111-1114 and 1116-1119 via the data bus 1200. Select an address when storing digital data.
マスターラッチ1141〜1144,1146〜1149(図中ではマス
ターラッチA1〜D1,A2〜D2と示されている。)は出力デ
ータを格納するラッチである。Master latches 1141 to 1144 and 1146 to 1149 (indicated as master latches A1 to D1 and A2 to D2 in the figure) are latches for storing output data.
マスターラッチ選択回路1150(図中ではマスターラッチ
選択回路1と示されている。)はマスターラッチ1141〜
1144の中からマスターラッチ選択回路1155(図中ではマ
スターラッチ選択回路2と示されている。)はマスター
ラッチ1146〜1149の中からいずれか1つのレジスタを選
択し、選択したマスターラッチに格納されている出力デ
ータをそれぞれマスターラッチ切換回路1176に供給す
る。マスターラッチ切換回路1176は外部信号の信号レベ
ルに応じてマスターラッチ選択回路1150およびマスター
ラッチ選択回路1155から供給される出力データのどちら
か一方を選択し、スレーブラッチ回路1160に供給する。
また、アドレスデコーダ1140,1145(図中ではアドレス
デコーダD1,D2と示されている。)はコマンドバス1300
から送られてくる命令にしたがい、データバス1200を介
してマスターラッチ1141〜1144,1146〜1149にディジタ
ルデータを格納する際にアドレスを選択する。Master latch selection circuit 1150 (indicated as master latch selection circuit 1 in the figure) includes master latches 1141 ...
A master latch selection circuit 1155 (indicated as master latch selection circuit 2 in the figure) from 1144 selects any one of the master latches 1146 to 1149 and stores it in the selected master latch. The output data that has been output to the master latch switching circuit 1176. The master latch switching circuit 1176 selects one of the output data supplied from the master latch selection circuit 1150 and the master latch selection circuit 1155 according to the signal level of the external signal, and supplies it to the slave latch circuit 1160.
Also, the address decoders 1140 and 1145 (indicated as address decoders D1 and D2 in the figure) are command buses 1300.
An address is selected when digital data is stored in the master latches 1141 to 1144 and 1146 to 1149 via the data bus 1200 according to the instruction sent from the.
ポインタ回路1170は比較回路1130の一致信号に基づいて
巡回カウント動作を行い、カウントデータを時間データ
選択回路1120,1125およびマスターラッチ選択回路1150,
1155に供給する。さらに、ポインタ回路1170はカウント
動作が一巡した場合にはオーバーフロー信号を比較回路
1130に供給する。また、ポインタ回路1170はコマンドバ
ス1300から送られてくる初期化命令によってカウントデ
ータを初期化する。The pointer circuit 1170 performs a cyclic count operation based on the match signal of the comparison circuit 1130, and outputs count data to the time data selection circuits 1120 and 1125 and the master latch selection circuit 1150.
Supply to 1155. Further, the pointer circuit 1170 compares the overflow signal when the count operation has completed one cycle.
Supply to 1130. Further, the pointer circuit 1170 initializes the count data by the initialization instruction sent from the command bus 1300.
以上のように構成された出力ポート1100について、その
動作について説明する。The operation of the output port 1100 configured as above will be described.
時間データレジスタ1111〜1114および1116〜1119にはプ
ログラムにより、任意のディジタルデータが書き込まれ
る。たとえば、プログラムにより時間データレジスタ11
11に時間データが書き込まれる場合には、まずコマンド
バス1300を介して送られてくる命令にしたがって、アド
レスデコーダ1110は時間データレジスタ1111を選択し、
選択された時間データレジスタ1111はデータバス1200を
介して送られてくるディジタルデータを格納する。同様
にして時間データレジスタ1112〜1114および1116〜1119
に任意のディジタルデータが書き込まれる。また、マス
ターラッチ1141〜1144,1146〜1149も同様にプログラム
により、任意のディジタルデータが書き込まれる。Arbitrary digital data is written in the time data registers 1111-1114 and 1116-1119 by a program. For example, the time data register 11
When time data is written to 11, the address decoder 1110 first selects the time data register 1111 according to the instruction sent via the command bus 1300,
The selected time data register 1111 stores the digital data sent via the data bus 1200. Similarly, time data registers 1112 to 1114 and 1116 to 1119
Arbitrary digital data is written in. Further, the master latches 1141 to 1144 and 1146 to 1149 are similarly programmed with arbitrary digital data by programming.
時間データ選択回路1120,1125およびマスターラッチ選
択回路1150,1155はポインタ回路1170から供給されるカ
ウントデータに応じて、それぞれの時間データレジスタ
あるいはマスターラッチを選択する。即ちポインタ回路
1170のカウントデータ「0」,「1」,「2」,「3」
に対して、時間データ選択回路1120は、時間データレジ
スタ1111,1112,1113,1114を、時間データ選択回路1125
は時間データレジスタ1116,1117,1118,1119を選択し、
同様に、マスターラッチ選択回路1150はマスターラッチ
1141,1142,1143,1144を、マスターラッチ選択回路1155
はマスターラッチ1146,1147,1148,1149をそれぞれ選択
する。The time data selection circuits 1120 and 1125 and the master latch selection circuits 1150 and 1155 select respective time data registers or master latches according to the count data supplied from the pointer circuit 1170. That is, the pointer circuit
1170 count data "0", "1", "2", "3"
On the other hand, the time data selection circuit 1120 replaces the time data registers 1111, 1112, 1113, 1114 with the time data selection circuit 1125.
Selects the time data registers 1116,1117,1118,1119,
Similarly, the master latch selection circuit 1150
1141, 1142, 1143, 1144 as master latch selection circuit 1155
Selects master latches 1146, 1147, 1148, 1149, respectively.
信号レベルについて、信号の電位が低電位の場合を
「0」、高電位の場合を「1」と表現すると、信号入力
端子40から入力される外部信号の信号レベルが「1」の
場合には、時間データ切換回路1175は時間データ選択回
路1120の出力データを、マスターラッチ切換回路1176は
マスターラッチ選択回路1150の出力データをそれぞれ出
力し、外部信号の信号レベルが「0」の場合には、時間
データ切換回路1175は時間データ選択回路1125の出力デ
ータを、マスターラッチ切換回路1176はマスターラッチ
選択回路1155の出力データをそれぞれ出力する。Regarding the signal level, when the potential of the signal is low, it is expressed as “0”, and when it is high, it is expressed as “1”. When the signal level of the external signal input from the signal input terminal 40 is “1”, , The time data switching circuit 1175 outputs the output data of the time data selection circuit 1120, the master latch switching circuit 1176 outputs the output data of the master latch selection circuit 1150, and when the signal level of the external signal is “0”, The time data switching circuit 1175 outputs the output data of the time data selection circuit 1125, and the master latch switching circuit 1176 outputs the output data of the master latch selection circuit 1155.
次に第3図を用いて一連の出力パターンを出力するとき
の動作について説明する。第3図でaはFRC1000がアッ
プカウンタの場合のカウントデータの時間的変化を示し
たものであり、bは入力端子40から入力される外部信号
を示し、cはFRCレジスタ1180のラッチデータを示し、
dはポインタ回路1170の出力データを示し、eは時間デ
ータ切換回路1175から加算器1190に供給される時間デー
タを示し、fは加算器1190から比較回路1130に供給され
る加算結果データを示し、gはマスターラッチ切換回路
1176からスレーブラッチ回路1160に供給される出力デー
タを示し、hはスレーブラッチ回路1160から出力するデ
ータを示し、iは比較回路1130から出力される一致信号
を示している。Next, the operation of outputting a series of output patterns will be described with reference to FIG. In FIG. 3, a shows the change over time of the count data when the FRC1000 is an up counter, b shows the external signal input from the input terminal 40, and c shows the latch data of the FRC register 1180. ,
d indicates output data of the pointer circuit 1170, e indicates time data supplied from the time data switching circuit 1175 to the adder 1190, f indicates addition result data supplied from the adder 1190 to the comparison circuit 1130, g is a master latch switching circuit
1176 shows the output data supplied to the slave latch circuit 1160, h shows the data outputted from the slave latch circuit 1160, and i shows the coincidence signal outputted from the comparison circuit 1130.
FRC1000がアップカウンタであり、時間データレジスタ1
111〜1114および1116〜1119にはそれぞれ時間データ
TA1,TB1,TC1,TD1およびTA2,TB2,TC2,TD2が格納されてお
り、マスターラッチ1141〜1144および1143〜1149にはそ
れぞれ出力データDA1,DB1,DC1,DD1およびDA2,DB2,DC2,D
D2が格納されているとする。また時刻t0の初期状態では
ポインタ回路1170のカウントデータは「0」とする。FRC1000 is up counter and time data register 1
111 to 1114 and 1116 to 1119 have time data, respectively.
T A1 , T B1 , T C1 , T D1 and T A2 , T B2 , T C2 , T D2 are stored, and output data D A1 , D B1 , D are stored in master latches 1141 to 1144 and 1143 to 1149, respectively. C1 , D D1 and D A2 , D B2 , D C2 , D
Suppose D2 is stored. In the initial state at time t0, the count data of the pointer circuit 1170 is "0".
ポインタ回路1170のカウントデータが「0」の状態で
は、時間データ選択回路1120,1125はそれぞれ時間デー
タレジスタ1111,1116を選択し、それぞれの時間データ
レジスタに格納されている時間データTA1,TA2を時間デ
ータ切換回路1175に供給する。同様に、マスターラッチ
選択回路1150,1155はそれぞれマスターラッチ1141,1146
を選択し、それぞれのマスターラッチに格納されている
出力データDA1,DA2をマスターラッチ切換回路1176に供
給する。When the count data of the pointer circuit 1170 is "0", the time data selection circuits 1120 and 1125 select the time data registers 1111 and 1116, respectively, and the time data T A1 and T A2 stored in the respective time data registers. Is supplied to the time data switching circuit 1175. Similarly, the master latch selection circuits 1150 and 1155 have master latches 1141 and 1146, respectively.
And supplies the output data D A1 and D A2 stored in the respective master latches to the master latch switching circuit 1176.
時刻t1で入力端子40に入力されている外部信号のリーデ
ィングエッジが到来すると、FRCレジスタ1180にはその
時点でのFRC1000のカウントデータN1がラッチされ、加
算器1190にカウントデータN1を供給する。また、外部信
号の信号レベルが「1」となるため、時間データ切換回
路1175は時間データレジスタ1111から供給されている時
間データTA1を加算器1190に供給し、マスターラッチ切
換回路1176はマスターラッチ1141から供給されている出
力データDA1をスレーブラッチ回路1160に供給する。When the leading edge of the external signal input to the input terminal 40 arrives at time t1, the FRC register 1180 latches the count data N1 of the FRC1000 at that time, and supplies the count data N1 to the adder 1190. Further, since the signal level of the external signal becomes "1", the time data switching circuit 1175 supplies the time data T A1 supplied from the time data register 1111 to the adder 1190, and the master latch switching circuit 1176 outputs the master latch. The output data D A1 supplied from 1141 is supplied to the slave latch circuit 1160.
加算器1190はFRCレジスタ1180のラッチデータN1と時間
データ切換回路1175から供給される時間データTA1との
加算を行い、その加算結果データN2(=N1+TA1)を比
較回路1130に供給する。比較回路1130は外部信号のリー
ディングエッジの到来とともに、加算器1190から供給さ
れているディジタルデータN2とローカルバス1400を介し
て送られてくる第1図に示したFRC1000のカウントデー
タとの比較を開始し、第3図の時刻t2でFRC1000のカウ
ントデータがN2に等しくなると、第3図iに示される一
致信号をスレーブラッチ回路1160およびポインタ回路11
70に送出する。スレーブラッチ回路1160は第3図hに示
されるように比較回路1130から送出される一致信号のリ
ーディングエッジでマスターラッチ切換回路1176から供
給されている出力データDA1をラッチし、また第3図d
に示されるように、ポインタ回路1170は一致信号により
カウントデータを「0」から「1」にカウントアップす
る。ポインタのカウントデータが「1」になることによ
って、第3図e,gに示すように加算器1190には時間デー
タ切換回路1175から時間データTB1が供給され、スレー
ブラッチ回路1160にはマスターラッチ切換回路1176から
出力データDB1が供給される。The adder 1190 adds the latch data N1 of the FRC register 1180 and the time data T A1 supplied from the time data switching circuit 1175, and supplies the addition result data N2 (= N1 + T A1 ) to the comparison circuit 1130. The comparator circuit 1130 starts the comparison of the digital data N2 supplied from the adder 1190 and the count data of the FRC1000 shown in FIG. 1 sent via the local bus 1400 with the arrival of the leading edge of the external signal. Then, when the count data of the FRC1000 becomes equal to N2 at the time t2 in FIG. 3, the match signal shown in FIG.
Send to 70. The slave latch circuit 1160 latches the output data D A1 supplied from the master latch switching circuit 1176 at the leading edge of the coincidence signal sent from the comparison circuit 1130 as shown in FIG.
As shown in, the pointer circuit 1170 counts up the count data from "0" to "1" by the coincidence signal. When the count data of the pointer becomes "1", the time data T B1 is supplied from the time data switching circuit 1175 to the adder 1190 and the master latch is supplied to the slave latch circuit 1160 as shown in FIGS. The output data D B1 is supplied from the switching circuit 1176.
以後、同様にしてFRC1000のカウントデータと加算器119
0が送出するデータとの比較が行われ、時刻t3,t4,t5で
はFRC1000のカウントデータと加算器1190の加算結果デ
ータとが一致するため、比較回路1130から一致信号が送
出される。そして、比較回路1130から一致信号が送出さ
れるたびにスレーブラッチ回路1160はマスターラッチ選
択回路1150で選択されたマスターラッチに格納されたデ
ィジタルデータをラッチし、ポインタ回路1170はカウン
ト動作を行う。After that, similarly, count data of FRC1000 and adder 119
The data transmitted by 0 is compared with each other. At times t3, t4, and t5, since the count data of the FRC 1000 and the addition result data of the adder 1190 match, a match signal is sent from the comparison circuit 1130. Then, each time a match signal is sent from the comparison circuit 1130, the slave latch circuit 1160 latches the digital data stored in the master latch selected by the master latch selection circuit 1150, and the pointer circuit 1170 performs a counting operation.
時刻t5ではポインタ回路1170はカウント値が「3」から
「0」になり一巡するので、オーバーフロー信号を比較
回路1130に送出する。比較回路1130はこのオーバーフロ
ー信号によって比較動作を停止し、入力端子40に入力さ
れている外部信号のトレイリングエッジが到来するまで
一致信号を送出しない。At time t5, the pointer circuit 1170 makes a round from the count value of “3” to “0”, and therefore sends an overflow signal to the comparison circuit 1130. The comparison circuit 1130 stops the comparison operation due to this overflow signal, and does not send the coincidence signal until the trailing edge of the external signal input to the input terminal 40 arrives.
時刻t6で入力端子40に入力されている外部信号のトレイ
リングエッジが到来すると、FRCレジスタ1180にはその
時点でのFRC1000のカウントデータN6がラッチされ、加
算器1190にカウンタデータN6を供給する。また、外部信
号の信号レベルが「0」となるため、時間データ切換回
路1175は時間データレジスタ1116から供給されている時
間データTA2を加算器1190に供給し、マスターラッチ切
換回路1176はマスターラッチ1146から供給されている出
力データDA2をスレーブラッチ回路1160に供給する。When the trailing edge of the external signal input to the input terminal 40 arrives at time t6, the FRC register 1180 latches the count data N6 of the FRC1000 at that time, and supplies the counter data N6 to the adder 1190. Further, since the signal level of the external signal becomes “0”, the time data switching circuit 1175 supplies the time data T A2 supplied from the time data register 1116 to the adder 1190, and the master latch switching circuit 1176 outputs the master latch. The output data D A2 supplied from the 1146 is supplied to the slave latch circuit 1160.
加算器1190はFRCレジスタ1180のラッチデータN6と時間
データ切換回路1175から供給される時間データTA2との
加算を行い、その加算結果データN7(=N6+TA2)を比
較回路1130に供給する。比較回路1130は外部信号のトレ
イリングエッジの到来とともに、加算器1190から供給さ
れているディジタルデータN7とローカルバス1400を介し
て送られてくるFRC1000のカウントデータとの比較を開
始し、第3図の時刻t7でFRC1000のカウントデータがN7
に等しくなると、第3図iに示される一致信号をスレー
ブラッチ回路1160およびポインタ回路1170に送出する。
スレーブラッチ回路1160は第3図hに示されるように、
比較回路1130から送出される一致信号のリーディングエ
ッジでマスターラッチ切換回路1176から供給されている
出力データDA2をラッチし、また第3図dに示されるよ
うにポインタ回路1170は一致信号によりカウントデータ
を「0」から「1」にカウントアップする。The adder 1190 adds the latch data N6 of the FRC register 1180 and the time data T A2 supplied from the time data switching circuit 1175, and supplies the addition result data N7 (= N6 + T A2 ) to the comparison circuit 1130. When the trailing edge of the external signal arrives, the comparator circuit 1130 starts comparing the digital data N7 supplied from the adder 1190 with the count data of the FRC1000 sent via the local bus 1400, and FIG. The count data of FRC1000 is N7 at time t7
When it is equal to, the coincidence signal shown in FIG. 3i is sent to the slave latch circuit 1160 and the pointer circuit 1170.
The slave latch circuit 1160, as shown in FIG.
At the leading edge of the match signal sent from the comparison circuit 1130, the output data D A2 supplied from the master latch switching circuit 1176 is latched, and as shown in FIG. Is incremented from "0" to "1".
以後、時刻t1〜t5の場合と同様の動作が繰り返される。After that, the same operation as in the case of time t1 to t5 is repeated.
したがって、入力端子40に入力されている外部信号を基
準にして、FRC1000の任意のカウント後のデータを時間
データレジスタ1111〜1114および1116〜1119に格納し、
時間データレジスタ1111〜1114,1116〜1119に対応する
マスターラッチ1141〜1144,1146〜1149に任意の出力デ
ータを格納することにより、一連の出力パターンを有す
る信号をスレーブラッチ回路1160から出力することがで
きる。Therefore, with reference to the external signal input to the input terminal 40, the data after any counting of the FRC1000 is stored in the time data registers 1111-1114 and 1116-1119,
By storing arbitrary output data in the master latches 1141 to 1144, 1146 to 1149 corresponding to the time data registers 1111-1114, 1116 to 1119, it is possible to output a signal having a series of output patterns from the slave latch circuit 1160. it can.
このように、マスターラッチ1141〜1144,1146〜1149か
らスレーブラッチ回路1160へのデータの転送が加算器11
90の出力データとFRC1000のカウントデータを比較する
比較回路1130の一致検出信号によって自動的に行われる
ように構成することにより、入力端子40から非同期で入
力される外部信号のリーディングエッジあるいはトレイ
リングエッジを検出してから、あらかじめ決められた時
間後に出力ポート1100より任意の信号パターンの信号を
送出させる場合にはタイムベースエラーを最小限に押さ
えることができる。以上のように本発明のマイクロプロ
セッサは巡回カウント動作を行うフリーランニングカウ
ンタ(FRC1000)と、2種類以上のディジタルデータを
格納するデータ格納手段(時間データレジスタ1111〜11
14,1116〜1119)と、データ格納手段の中から互いに異
なるデータを選択する第1および第2のデータ選択手段
(時間データ選択回路1120,1125)と、第1および第2
のデータ選択手段が選択したデータのどちらか一方のデ
ータを出力するデータ切換手段(時間データ切換回路11
75)と、外部入力信号に同期してフリーランニングカウ
ンタのカウントデータを格納するカウントデータ格納手
段(FRCレジスタ1180)と、カウントデータ格納手段の
データとデータ切換手段の出力データとの加算を行う加
算器(加算器1190)と、フリーランニングカウンタのカ
ウントデータと加算器の加算データとを比較し、一致し
た場合に一致信号を出力する比較手段(比較回路1130)
と、比較手段から出力される一致信号に基づいて巡回カ
ウント動作を行うポインタ(ポインタ回路1170)と、時
間データ格納手段と同数のディジタルデータを格納する
マスターラッチ部(マスターラッチ1141〜1144,1146〜1
149)と、マスターラッチ部の中から互いに異なるマス
ターラッチをそれぞれ選択する第1および第2のマスタ
ーラッチ選択手段(マスターラッチ選択回路1150,115
5)と、第1および第2のマスターラッチ選択手段が選
択したマスターラッチのどちらか一方のデータを出力す
るマスターラッチ切換手段(マスターラッチ切換回路11
76)と、マスターラッチ切換手段の出力データを比較手
段から出力される一致信号に基づいて取り込むスレーブ
ラッチ部(スレーブラッチ回路1160)とからなる出力ポ
ート(出力ポート1100)を設けたものである。In this way, the data transfer from the master latches 1141 to 1144 and 1146 to 1149 to the slave latch circuit 1160 is performed by the adder 11
The leading edge or trailing edge of the external signal that is asynchronously input from the input terminal 40 is configured by being configured to be automatically performed by the match detection signal of the comparison circuit 1130 that compares the output data of 90 and the count data of FRC1000. When a signal having an arbitrary signal pattern is transmitted from the output port 1100 after a predetermined time from the detection of the time base error, the time base error can be minimized. As described above, the microprocessor of the present invention includes the free running counter (FRC1000) that performs the cyclic counting operation and the data storage means (time data registers 1111 to 1111) that stores two or more types of digital data.
14, 1116 to 1119), first and second data selection means (time data selection circuits 1120, 1125) for selecting mutually different data from the data storage means, and first and second
Data switching means (time data switching circuit 11 for outputting either one of the data selected by the data selecting means).
75), a count data storage means (FRC register 1180) for storing the count data of the free running counter in synchronization with the external input signal, and an addition for adding the data of the count data storage means and the output data of the data switching means. Means (comparator circuit 1130) for comparing the count data of the free-running counter and the addition data of the adder with the adder (adder 1190) and outputting a match signal when they match.
And a pointer (pointer circuit 1170) that performs a cyclic counting operation based on the coincidence signal output from the comparison unit, and a master latch unit (master latches 1141 to 1144, 1146 to which stores the same number of digital data as the time data storage unit). 1
149) and first and second master latch selection means (master latch selection circuits 1150 and 115) for selecting different master latches from the master latch section.
5) and master latch switching means (master latch switching circuit 11) for outputting data of either one of the master latches selected by the first and second master latch selecting means.
76) and a slave latch unit (slave latch circuit 1160) which takes in the output data of the master latch switching means based on the coincidence signal outputted from the comparing means, and is provided with an output port (output port 1100).
したがって、第1図および第2図に示したマイクロプロ
セッサではタイムベースエラーの少ない一連の信号パタ
ーン出力を容易に得ることができる。Therefore, the microprocessor shown in FIGS. 1 and 2 can easily obtain a series of signal pattern outputs with less time base error.
なお、実施例においてはリーディングエッジ,トレイリ
ングエッジそれぞれを基準にして出力ポートから出力す
る出力データが4通りの場合について説明しているが、
1〜4通りのいずれの場合でも同様に動作し、さらに、
出力ポートの時間データレジスタおよびマスターラッチ
はそれぞれ4本ずつ2組の構成になっているが、出力ポ
ートから出力する信号のパターンの複雑さに応じて2本
以上いくつ設けた場合でもまったく同様な効果が得られ
る。In the embodiment, the case where there are four types of output data output from the output port with reference to each of the leading edge and the trailing edge has been described.
The same operation is performed in any of 1 to 4 cases.
The output port time data register and the master latch each consist of two sets of four sets, but the same effect can be obtained when two or more sets are provided depending on the complexity of the pattern of the signal output from the output port. Is obtained.
また、実施例においてフリーランニングカウンタはアッ
プカウンタとしたが、ダウンカウンタの場合はFRCレジ
スタのデータの符号を負にして加算することによって、
全く同様の効果が得られる。In the embodiment, the free running counter is the up counter, but in the case of the down counter, the sign of the data in the FRC register is made negative and the
The same effect can be obtained.
つぎに、第4図は本発明の出力ポートのブロック図を示
したものである。Next, FIG. 4 shows a block diagram of the output port of the present invention.
第4図において、FRC4000はフリーランニングカウンタ
であり、端子4020から供給される信号をクロックとして
巡回カウント動作を行い、FRC4000のカウントデータは
加算器4100,比較回路4200に供給される。In FIG. 4, the FRC4000 is a free-running counter, which performs a cyclic count operation using a signal supplied from the terminal 4020 as a clock, and the count data of the FRC4000 is supplied to the adder 4100 and the comparison circuit 4200.
外部入力端子4030から入力される外部信号は加算器410
0,時間データレジスタ4300,4310(図中では時間データ
レジスタ1,2と示されている。)に供給される。時間デ
ータレジスタ4300,4310は出力ポートからデータを出力
するタイミングデータを格納したレジスタであり、外部
入力信号の信号レベルに応じて時間データレジスタ430
0,4310のいずれか一方のレジスタのデータが加算器4100
に供給される。また、加算器4100は外部入力端子4030か
ら外部信号が入力されると、FRC4000のカウントデータ
と時間データレジスタ4300あるいは4310の時間データと
の加算を行い、その加算結果データを比較回路4200に供
給する。比較回路4200はFRC4000のカウントデータと加
算器4100の加算結果データとの比較を行い、一致した場
合は一致信号をポインタ回路4400およびスレーブラッチ
回路4700に供給する。ポインタ回路4400は比較回路4200
の一致信号に基づいて巡回カウント動作を行い、カウン
トデータをマスターラッチ選択回路4600に供給する。マ
スターラッチ4500〜4530(図中ではマスターラッチA〜
Dと示されている。)は出力端子4010〜4013から出力す
る出力データを格納するレジスタである。マスターラッ
チ選択回路4600はポインタ回路4400のカウントデータに
よって、マスターラッチ4500〜4530のいずれかを選択
し、選択したマスターラッチのデータをスレーブラッチ
回路4700に供給する。スレーブラッチ回路4700は比較回
路4200の一致信号によって、マスターラッチ選択回路46
00から供給される出力データを取り込み、出力端子4010
〜4013から出力する。The external signal input from the external input terminal 4030 is an adder 410.
0, time data registers 4300 and 4310 (indicated as time data registers 1 and 2 in the figure). The time data registers 4300 and 4310 are registers that store timing data for outputting data from the output port, and the time data register 430 corresponds to the signal level of the external input signal.
The data in either register 0 or 4310 is added to the adder 4100.
Is supplied to. When an external signal is input from the external input terminal 4030, the adder 4100 adds the count data of the FRC4000 and the time data of the time data register 4300 or 4310, and supplies the addition result data to the comparison circuit 4200. . The comparison circuit 4200 compares the count data of the FRC 4000 with the addition result data of the adder 4100, and if they match, supplies a match signal to the pointer circuit 4400 and the slave latch circuit 4700. The pointer circuit 4400 is the comparison circuit 4200
The cyclic count operation is performed based on the coincidence signal of and the count data is supplied to the master latch selection circuit 4600. Master latch 4500-4530 (in the figure, master latch A-
It is designated as D. ) Is a register for storing output data output from the output terminals 4010 to 4013. The master latch selection circuit 4600 selects one of the master latches 4500 to 4530 according to the count data of the pointer circuit 4400 and supplies the data of the selected master latch to the slave latch circuit 4700. The slave latch circuit 4700 receives the match signal from the comparison circuit 4200, and the master latch selection circuit 46
Output data supplied from 00, and output terminal 4010
Output from ~ 4013.
以上のように構成された出力ポートについて、第4図の
ブロック図と第5図のタイミングチャートを用いて、そ
の動作を説明する。The operation of the output port configured as above will be described with reference to the block diagram of FIG. 4 and the timing chart of FIG.
第5図でaはFRC4000がアップカウンタの場合のカウン
トデータの時間的変化を示したものであり、bは入力端
子4030から入力される外部信号を示し、cは時間データ
レジスタ4300および4310から加算器4100に供給される時
間データを示し、dは加算器4100から比較回路4200に供
給される加算結果データを示し、eはポインタ回路4400
の出力データを示し、fはマスターラッチ選択回路4600
からスレーブラッチ回路4700に供給される出力データを
示し、gはスレーブラッチ回路4700から出力するデータ
を示し、hは比較回路4200から出力される一致信号を示
している。In FIG. 5, a shows the time change of the count data when the FRC4000 is an up counter, b shows the external signal input from the input terminal 4030, and c is the addition from the time data registers 4300 and 4310. Indicates the time data supplied to the adder 4100, d indicates the addition result data supplied from the adder 4100 to the comparison circuit 4200, and e indicates the pointer circuit 4400.
Output data of the master latch selection circuit 4600
From the slave latch circuit 4700, g represents data output from the slave latch circuit 4700, and h represents a match signal output from the comparison circuit 4200.
FRC4000がアップカウンタであり、時間データレジスタ4
300,4310には時間データT1,T2がそれぞれ格納されてお
り、マスターラッチ4500〜4530には出力データDA,DB,
DC,DDがそれぞれ格納されているとする。FRC4000 is an up counter and time data register 4
Time data T1 and T2 are stored in 300 and 4310, respectively, and output data D A , D B , and master latches 4500 to 4530 are stored.
It is assumed that D C and D D are stored respectively.
信号レベルについて、信号の電位が低電位の場合を
「0」、高電位の場合を「1」と表現すると、入力端子
4030から入力される外部信号の信号レベルが「0」の場
合には時間データレジスタ4300に格納されている時間デ
ータT1が加算器4100に供給され、外部信号の信号レベル
が「1」の場合には時間データレジスタ4310に格納され
ている時間データT2が加算器4100に供給される。また、
ポインタ回路4400のカウントデータ「0」,「1」,
「2」,「3」に対して、マスターラッチ選択回路4600
はマスターラッチ4500,4510,4520,4530をそれぞれ選択
する。Regarding the signal level, when the potential of the signal is low, it is expressed as “0”, and when it is high, it is expressed as “1”.
When the signal level of the external signal input from the 4030 is "0", the time data T1 stored in the time data register 4300 is supplied to the adder 4100, and when the signal level of the external signal is "1". The time data T2 stored in the time data register 4310 is supplied to the adder 4100. Also,
Count data “0”, “1” of the pointer circuit 4400,
Master latch selection circuit 4600 for "2" and "3"
Selects master latches 4500, 4510, 4520, 4530 respectively.
初期状態ではポインタ回路4400のカウントデータは
「0」であるので、マスターラッチ選択回路4600はマス
ターラッチ4500を選択し、このラッチに格納されている
ディジタルデータDAをスレーブラッチ回路4700に送出し
ている。In the initial state, the count data of the pointer circuit 4400 is “0”, so the master latch selection circuit 4600 selects the master latch 4500 and sends the digital data D A stored in this latch to the slave latch circuit 4700. There is.
時刻t0では外部信号の信号レベルは「0」であるので、
加算器4100には時間データレジスタ4300から時間データ
T1が供給されている。Since the signal level of the external signal is “0” at time t0,
The adder 4100 stores the time data from the time data register 4300.
T1 is supplied.
時刻t1に入力端子4030に入力されている外部信号のリー
ディングエッジが到来すると、加算器4100はその時点で
のFRC4000のカウントデータN1と時間データレジスタ430
0から供給されている時間データT1との加算を行い、そ
の加算結果データN1+T1を比較回路4200に供給する。そ
して、加算器4100は入力端子4030に入力されている外部
信号のトレイリングエッジが到来するまで、時刻t1での
加算結果データを比較回路4200に供給しつづける。ま
た、外部信号の信号レベルが「1」となったので、加算
器4100には時間データレジスタ4310から時間データT2が
供給される。When the leading edge of the external signal input to the input terminal 4030 arrives at time t1, the adder 4100 causes the count data N1 of the FRC4000 at that time and the time data register 430
The time data T1 supplied from 0 is added, and the addition result data N1 + T1 is supplied to the comparison circuit 4200. Then, the adder 4100 continues to supply the addition result data at the time t1 to the comparison circuit 4200 until the trailing edge of the external signal input to the input terminal 4030 arrives. Further, since the signal level of the external signal becomes "1", the time data T2 is supplied from the time data register 4310 to the adder 4100.
比較回路4200は加算器4100から供給されているディジタ
ルデータN1+T1とFRC4000のカウントデータとを比較
し、第5図の時刻t2でFRC4000のカウントデータがN1+T
1に等しくなると第5図hに示される一致信号をスレー
ブラッチ回路4700およびポインタ回路4400に送出する。
スレーブラッチ回路4700は第5図gに示されるように、
比較回路4200から送出される一致信号のリーディングエ
ッジでマスターラッチ4500に格納されているディジタル
データDAをラッチし、また第5図eに示されるようにポ
インタ回路4400は一致信号によりカウントデータを
「0」から「1」にカウントアップする。ポインタ回路
4400のカウントデータが「1」に変化することによっ
て、マスターラッチ選択回路4600はマスターラッチ4510
を選択し、このラッチに格納されているディジタルデー
タDBをスレーブラッチ回路4700に送出する。The comparator circuit 4200 compares the digital data N1 + T1 supplied from the adder 4100 with the count data of the FRC4000, and the count data of the FRC4000 is N1 + T at time t2 in FIG.
When it becomes equal to 1, the coincidence signal shown in FIG. 5h is sent to the slave latch circuit 4700 and the pointer circuit 4400.
The slave latch circuit 4700, as shown in FIG.
The digital data D A stored in the master latch 4500 is latched at the leading edge of the coincidence signal sent from the comparison circuit 4200, and as shown in FIG. Count up from "0" to "1". Pointer circuit
By changing the count data of 4400 to "1", the master latch selection circuit 4600 becomes the master latch 4510.
Is selected, and the digital data D B stored in this latch is sent to the slave latch circuit 4700.
時刻t3に入力端子4030に入力されている外部信号のトレ
イリングエッジが到来すると、加算器4100はその時点で
のFRC4000のカウントデータN2と時間データレジスタ431
0から供給されている時間データT2との加算を行い、そ
の加算結果データN2+T2を比較回路4200に供給する。そ
して、加算器4100は入力端子4030に入力されている外部
信号のリーディングエッジが到来するまで、時刻t3での
加算結果データを比較回路4200に供給しつづける。ま
た、外部信号の信号レベルが「0」となったので、加算
器4100には時間データレジスタ4300から時間データT1が
供給される。When the trailing edge of the external signal input to the input terminal 4030 arrives at time t3, the adder 4100 causes the count data N2 of the FRC4000 at that time and the time data register 431.
The time data T2 supplied from 0 is added, and the addition result data N2 + T2 is supplied to the comparison circuit 4200. Then, the adder 4100 continues to supply the addition result data at the time t3 to the comparison circuit 4200 until the leading edge of the external signal input to the input terminal 4030 arrives. Further, since the signal level of the external signal has become "0", the time data T1 is supplied from the time data register 4300 to the adder 4100.
比較回路4200は加算器4100から供給されているディジタ
ルデータN1+T2とFRC4000のカウントデータとを比較
し、第5図の時刻t4でFRC4000のカウントデータがN2+T
2に等しくなると一致信号をスレーブラッチ回路4700お
よびポインタ回路4400に送出する。スレーブラッチ回路
4700は比較回路4200から送出される一致信号のリーディ
ングエッジでマスターラッチ4500に格納されているディ
ジタルデータDBをラッチし、またポインタ回路4400は一
致信号によりカウントデータを「1」から「2」にカウ
ントアップする。The comparison circuit 4200 compares the digital data N1 + T2 supplied from the adder 4100 with the count data of the FRC4000, and the count data of the FRC4000 is N2 + T at time t4 in FIG.
When it becomes equal to 2, the coincidence signal is sent to the slave latch circuit 4700 and the pointer circuit 4400. Slave latch circuit
The 4700 latches the digital data D B stored in the master latch 4500 at the leading edge of the match signal sent from the comparison circuit 4200, and the pointer circuit 4400 changes the count data from “1” to “2” by the match signal. Count up.
以後、同様にして時刻t5,t7,t9で更新される加算器から
の加算結果データに対し、それぞれ時刻t6,t8,t10ではF
RC4000のカウントデータが一致するため、第5図hに示
されるように、比較回路4200から一致信号が送出され
る。そして、比較回路4200から一致信号が送出されるた
びにスレーブラッチ回路4700はマスターラッチ選択回路
4600で選択されたマスターラッチ4500〜4530に格納され
たディジタルデータをラッチし、ポインタ回路4400はカ
ウント動作を行う。After that, similarly to the addition result data from the adder updated at times t5, t7, and t9, F at times t6, t8, and t10, respectively.
Since the count data of RC4000 match, as shown in FIG. 5h, a match signal is sent from the comparison circuit 4200. Then, each time a match signal is sent from the comparison circuit 4200, the slave latch circuit 4700 becomes a master latch selection circuit.
The digital data stored in the master latches 4500 to 4530 selected by 4600 are latched, and the pointer circuit 4400 performs counting operation.
したがって、あらかじめ時間データレジスタ4300,4310
に時間データを格納し、マスターラッチ1141〜1144に任
意の出力データを格納することにより、入力端子4030に
入力されている外部信号を基準にして、一連の出力パタ
ーンを有する信号をスレーブラッチ回路4700から出力す
ることができる。Therefore, the time data register 4300, 4310
By storing the time data in the master latches 1141 to 1144 and storing any output data in the master latches 1141 to 1144, a signal having a series of output patterns is generated based on the external signal input to the input terminal 4030. Can be output from.
以上のように本発明の出力ポートは巡回カウント動作を
行うフリーランニングカウンタ(FRC4000)と、外部入
力信号に応じて出力データを変更する時間データ格納手
段(時間データレジスタ4300,4310)と、フリーランニ
ングカウンタのカウントデータと時間データ格納手段の
出力データとの加算を行う加算器(加算器4100)と、フ
リーランニングカウンタのカウントデータと加算器の出
力データとを比較し、一致した場合に一致信号を出力す
る比較手段(比較回路4200)と、比較手段から出力され
る一致信号に基づいて巡回カウント動作を行うポインタ
(ポインタ回路4400)と、少なくとも2種類以上のディ
ジタルデータを格納するマスターラッチ部(マスターラ
ッチ4500〜4530)と、ポインタの内容に応じて、マスタ
ーラッチ部のいずれか1つを選択するマスターラッチ選
択手段(マスターラッチ選択回路4600)と、マスターラ
ッチ部のデータを比較手段から出力される一致信号に基
づいて取り込むスレーブラッチ部(スレーブラッチ回路
4700)とで構成されている。As described above, the output port of the present invention includes a free running counter (FRC4000) that performs a cyclic counting operation, a time data storage unit (time data register 4300, 4310) that changes output data according to an external input signal, and a free running. An adder (adder 4100) that adds the count data of the counter and the output data of the time data storage means is compared with the count data of the free-running counter and the output data of the adder. A comparing means (comparing circuit 4200) for outputting, a pointer (pointer circuit 4400) for performing a cyclic counting operation based on the coincidence signal output from the comparing means, and a master latch section (master) for storing at least two kinds of digital data. Latch 4500 to 4530) and select one of the master latch parts according to the contents of the pointer. That the master latch selection means (master latch selection circuit 4600), the slave latch unit for taking on the basis of a match signal that is output data of the master latch portion from the comparison means (the slave latch circuit
4700) and.
なお、実施例では出力ポートの出力端子は4つとした
が、マスターラッチおよびスレーブラッチのデータ長を
増減させることで出力端子が幾つの場合でも全く同様に
実現できる。Although the number of output terminals of the output port is four in the embodiment, it can be realized in the same manner even if the number of output terminals is increased or decreased by increasing or decreasing the data length of the master latch and the slave latch.
発明の効果 以上のように本発明は、外部入力信号を基準にして、出
力ポートから出力信号を送出する時間タイミングデータ
を時間データレジスタに格納し、時間データレジスタに
格納した時間タイミングで出力するデータをマスターラ
ッチに格納することによって、外部信号入力端子に印加
される入力信号のエッジが到来すると、その時点のフリ
ーランニングカウンタのカウントデータと時間データレ
ジスタの時間データから信号の出力タイミングの加算を
行い、加算結果の出力タイミングとフリーランニングカ
ウンタのカウントデータが一致すると、自動的に信号が
出力されるので、出力ポートからはタイムベースエラー
の少ない一連の信号パターンを出力することができ、そ
の効果は大きい。EFFECTS OF THE INVENTION As described above, the present invention stores time timing data for sending an output signal from an output port in a time data register based on an external input signal, and outputs data at the time timing stored in the time data register. By storing in the master latch, when the edge of the input signal applied to the external signal input terminal arrives, the output timing of the signal is added from the count data of the free running counter at that time and the time data of the time data register. , When the output timing of the addition result and the count data of the free-running counter match, a signal is automatically output, so a series of signal patterns with less time base error can be output from the output port. large.
第1図は本発明の一実施例におけるマイクロプロセッサ
の構成を示すブロック図、第2図は同実施例における出
力ポート部の具体的な構成例を示すブロック図、第3図
は第2図の主要部のタイミングチャート、第4図は本発
明の一実施例における出力ポートの構成を示すブロック
図、第5図は第4図の主要部のタイミングチャートであ
る。 100…タイミングジェネレータ、200…プログラムカウン
タ、300…PLA、400…ALU、500…ROM、700…RAM、900…I
CR、1000,4000…FRC、1100…出力ポート、1111〜1114,1
116〜1119,4300,4310…時間データレジスタ、1130,4200
…比較回路、1141〜1144,1146〜1149,4500〜4530…マス
ターラッチ、1160,4700…スレーブラッチ、1170,4400…
ポインタ回路、1180…FRCレジスタ、1190,4100…加算
器。FIG. 1 is a block diagram showing a configuration of a microprocessor in an embodiment of the present invention, FIG. 2 is a block diagram showing a concrete configuration example of an output port section in the embodiment, and FIG. 3 is a block diagram of FIG. 4 is a timing chart of the main part, FIG. 4 is a block diagram showing the configuration of the output port in one embodiment of the present invention, and FIG. 5 is a timing chart of the main part of FIG. 100 ... Timing generator, 200 ... Program counter, 300 ... PLA, 400 ... ALU, 500 ... ROM, 700 ... RAM, 900 ... I
CR, 1000,4000 ... FRC, 1100 ... Output port, 1111-1114,1
116 ~ 1119,4300,4310 ... Time data register, 1130,4200
… Comparison circuit, 1141 to 1144,1146 to 1149,4500 to 4530… Master latch, 1160,4700… Slave latch, 1170,4400…
Pointer circuit, 1180 ... FRC register, 1190,4100 ... Adder.
Claims (4)
カウンタと、 2種類以上のディジタルデータを格納するデータ格納手
段と、 前記データ格納手段の中から互いに異なるデータを選択
する第1および第2のデータ選択手段と、 前記第1および第2のデータ選択手段が選択したデータ
のどちらか一方のデータを出力するデータ切換手段と、 前記外部入力信号に同期して前記フリーランニングカウ
ンタのカウントデータを格納するカウントデータ格納手
段と、 前記カウントデータ格納手段のデータと前記データ切換
手段の出力データとの加算を行う加算器と、 前記フリーランニングカウンタのカウントデータと前記
加算器の加算データとを比較し、一致した場合に一致信
号を出力する比較手段と、 前記比較手段から出力される一致信号に基づいて巡回カ
ウント動作を行うポインタと、 前記データ格納手段と同数のディジタルデータを格納す
るマスターラッチ部と、 前記マスターラッチ部の中から互いに異なるマスターラ
ッチをそれぞれ選択する第1および第2のマスターラッ
チ選択手段と、 前記第1および第2のマスターラッチ選択手段が選択し
たマスターラッチのどちらか一方のデータを出力するマ
スターラッチ切換手段と、 前記マスターラッチ切換手段の出力データを前記比較手
段から出力される一致信号に基づいて取り込むスレーブ
ラッチ部とからなる出力ポートを備えたマイクロプロセ
ッサ。1. A free running counter for performing a cyclic counting operation, a data storage means for storing two or more kinds of digital data, and first and second data selection for selecting mutually different data from the data storage means. Means, a data switching means for outputting one of the data selected by the first and second data selecting means, and a count for storing the count data of the free running counter in synchronization with the external input signal. The data storage means, an adder that adds the data of the count data storage means and the output data of the data switching means, and the count data of the free running counter and the addition data of the adder are compared and found to match. In the case of comparing means for outputting a coincidence signal, the coincidence signal output from the comparing means A pointer that performs a cyclic counting operation based on the above, a master latch unit that stores the same number of digital data as the data storage unit, and first and second master latches that select different master latches from the master latch unit. Selecting means, master latch switching means for outputting data of one of the master latches selected by the first and second master latch selecting means, and output data of the master latch switching means is output from the comparing means. A microprocessor having an output port composed of a slave latch unit for capturing on the basis of a match signal.
手段は、ポインタのカウントデータの出力信号に基づい
て選択を変更する請求項1記載のマイクロプロセッサ。2. The microprocessor according to claim 1, wherein the data selection means and the master latch selection means change the selection based on an output signal of the count data of the pointer.
手段は、外部入力信号の信号レベルに基づいて出力デー
タの切り換えを行う請求項1記載のマイクロプロセッ
サ。3. The microprocessor according to claim 1, wherein the data switching means and the master latch switching means switch the output data based on the signal level of the external input signal.
カウンタと、 外部入力信号に応じて出力データを変更する時間データ
格納手段と、 前記フリーランニングカウンタのカウントデータ前記時
間データ格納手段の出力データとの加算を行う加算器
と、 前記フリーランニングカウンタのカウントデータと前記
加算器の出力データとを比較し、一致した場合に一致信
号を出力する比較手段と、 前記比較手段から出力される一致信号に基づいて巡回カ
ウント動作を行うポインタと、 少なくとも2種類以上のディジタルデータを格納するマ
スターラッチ部と、 前記ポインタの内容に応じて、前記マスターラッチ部の
いずれか1つを選択するマスターラッチ選択手段と、 前記マスターラッチ部のデータを前記比較手段から出力
される一致信号に基づいて取り込むスレーブラッチ部と
を備えた出力ポート。4. A free-running counter for performing a cyclic counting operation, time data storage means for changing output data according to an external input signal, and count data of the free-running counter and output data of the time data storage means. Comparing the count data of the free running counter with the output data of the adder, and outputting a match signal when they match, based on the match signal output from the comparing unit. A pointer for performing a cyclic counting operation; a master latch unit for storing at least two kinds of digital data; and a master latch selecting unit for selecting one of the master latch units according to the content of the pointer, The data in the master latch section is based on the coincidence signal output from the comparing means. An output port with a slave latch unit that captures the data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2288695A JPH0690730B2 (en) | 1990-10-26 | 1990-10-26 | Microprocessor and output port |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2288695A JPH0690730B2 (en) | 1990-10-26 | 1990-10-26 | Microprocessor and output port |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH04162181A JPH04162181A (en) | 1992-06-05 |
| JPH0690730B2 true JPH0690730B2 (en) | 1994-11-14 |
Family
ID=17733497
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2288695A Expired - Fee Related JPH0690730B2 (en) | 1990-10-26 | 1990-10-26 | Microprocessor and output port |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0690730B2 (en) |
-
1990
- 1990-10-26 JP JP2288695A patent/JPH0690730B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH04162181A (en) | 1992-06-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4591979A (en) | Data-flow-type digital processing apparatus | |
| EP0180196B1 (en) | Programmable counter/timer device | |
| JPH07282576A (en) | FIFO module | |
| US4907147A (en) | Pipelined data processing system with register indirect addressing | |
| US5812806A (en) | Data driven information processor configuring each data packet with a multi-attribute tag having at least two components | |
| US5467454A (en) | Bus use request adjusting apparatus allowing changing priority levels | |
| US20060004980A1 (en) | Address creator and arithmetic circuit | |
| US5586337A (en) | Programmable controller with timing control | |
| US5021990A (en) | Output pulse generating apparatus | |
| JPH0690730B2 (en) | Microprocessor and output port | |
| US5475828A (en) | Digital processor having plurality of memories and plurality of arithmetic logic units corresponding in number thereto and method for controlling the same | |
| JPH0713818B2 (en) | Microprocessor | |
| JPH0690729B2 (en) | Microprocessor and output port | |
| JPH0690728B2 (en) | Microprocessor | |
| JPH06301596A (en) | Microprocessor | |
| JPS6242301B2 (en) | ||
| JPH07111683B2 (en) | Processor with task switching function | |
| JPH04162138A (en) | microprocessor | |
| JP2870812B2 (en) | Parallel processor | |
| JPH02287659A (en) | Microprocessor | |
| US5887137A (en) | Data processing apparatus having a sorting unit to provide sorted data to a processor | |
| JPH02217038A (en) | Coupling network | |
| JPS5875250A (en) | Digital information processor | |
| JPS63823B2 (en) | ||
| JPH0695304B2 (en) | Data processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |