Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0769836B2 - Microprocessor - Google Patents
[go: Go Back, main page]

JPH0769836B2 - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH0769836B2
JPH0769836B2 JP1108866A JP10886689A JPH0769836B2 JP H0769836 B2 JPH0769836 B2 JP H0769836B2 JP 1108866 A JP1108866 A JP 1108866A JP 10886689 A JP10886689 A JP 10886689A JP H0769836 B2 JPH0769836 B2 JP H0769836B2
Authority
JP
Japan
Prior art keywords
selection
signal
data
comparison
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP1108866A
Other languages
Japanese (ja)
Other versions
JPH02287659A (en
Inventor
憲一 末▲廣▼
博 水口
宰司 國平
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP1108866A priority Critical patent/JPH0769836B2/en
Publication of JPH02287659A publication Critical patent/JPH02287659A/en
Publication of JPH0769836B2 publication Critical patent/JPH0769836B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明はマイクロプロセッサの構成に関し、特に、出力
ポートを介して出力される信号のタイムベースエラーの
少ないマイクロプロセッサを提供するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a structure of a microprocessor, and more particularly to a microprocessor having a small time base error of a signal output through an output port.

従来の技術 近年、ノイマン方式のマイクロプロセッサはあらゆる方
面で多用されており、その構成としては、順次実行され
る命令群からなるプログラムを格納するプログラム格納
手段と、ディジタルデータの読み書きが可能なデータ格
納手段と、ディジタルデータの演算を実行する演算手段
と、前記データ格納手段の入出力端子と前記演算手段の
入出力端子を接続するデータバスと、前記プログラム格
納手段から送出される命令に基づいて前記データ格納手
段と前記演算手段の動作をコントロールするコントロー
ル手段と、命令の実行タイミング信号を発生するタイミ
ングジェネレータと、前記タイミングジェネレータの出
力に基づいて前記プログラム格納手段に格納された特定
の命令を選択する命令選択手段を備えていることに特徴
づけられる。また、その代表的な構成が特公昭58-33584
号公報(以下、文献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 Be done. In addition, the representative structure is Japanese Patent Publication Sho 58-33584.
Japanese Patent Publication (hereinafter, referred to as Document 1).

発明が解決しようとする課題 しかしながら、前記文献1に示されるようなノイマン方
式のマイクロプロセッサは、あらかじめ定められた順序
にしたがってデータの処理を実行していくために、プロ
グラムが膨大になるにつれて非同期で入力される外部デ
ータの取り込みや、それに基づくデータの処理のサイク
ルが長くなり、その結果、事象が発生してからマイクロ
プロセッサから出力信号が送出されるまでの時間のばら
つき、すなわち、タイムベースエラーがかなり大きくな
るという問題を有している。このような問題に対して、
従来は割り込みという手段が用いられてきたが、割り込
み要求があってもその時点で実行している命令を処理し
てしまわないと割り込み処理に移行できないため、マイ
クロプロセッサが割り込みを受け付けてから、実際に割
り込みサービスルーチンを開始するまでの時間そのもの
にタイムベースエラーが発生してしまうという問題点を
有していた。
SUMMARY OF THE INVENTION However, since the Neumann method microprocessor as shown in the above-mentioned Document 1 executes data processing in a predetermined order, it asynchronously operates as the program becomes huge. The cycle of capturing the input external data and processing of the data based on it becomes long, and as a result, the time variation from the occurrence of the event to the output signal from the microprocessor, that is, the time base error is It has the problem of becoming quite large. For such problems,
In the past, a means called interrupt was used, but even if there is an interrupt request, it cannot move to interrupt processing unless the instruction being executed at that time is processed, so after the microprocessor accepts the interrupt, In addition, there is a problem that a time base error occurs in the time itself until the interrupt service routine is started.

本発明は上記従来の問題点を解決するもので、一連の信
号パターンをタイムベースエラーを少なく出力すること
ができる出力ポートをもったマイクロプロセッサを提供
することを目的とする。
The present invention solves the above-mentioned conventional problems, and an object of the present invention is to provide a microprocessor having an output port capable of outputting a series of signal patterns with a small time base error.

課題を解決するための手段 この目的を達成するために本発明のマイクロプロセッサ
は、特定のクロック信号に基づいて巡回カウント動作を
行なうフリーランニングカウンタと、少なくとも2種類
以上のディジタルデータを格納する比較データ格納手段
と、前記比較データ格納手段と同数のディジタルデータ
を格納するマスターラッチ部と、前記比較データ格納手
段のいずれか1つを選択する比較データ選択手段と、前
記マスターラッチ部のいずれか1つを選択するマスター
ラッチ部選択手段と、巡回的に変更する選択信号を出力
する巡回選択指令手段と、前記巡回選択指令手段から出
力される選択信号が巡回的に変更することを停止させる
巡回停止手段と、前記フリーランニングカウンタのカウ
ントデータと前記比較データ格納手段のデータを比較
し、一致した場合に一致信号を出力する比較手段と、前
記マスターラッチ部のディジタルデータを前記比較手段
の一致信号に基づいて取り込むスレイブラッチ部からな
る出力ポートとを備えている。
Means for Solving the Problems To achieve this object, a microprocessor of the present invention includes a free-running counter that performs a cyclic count operation based on a specific clock signal, and comparison data that stores at least two types of digital data. Any one of a storage unit, a master latch unit that stores the same number of digital data as the comparison data storage unit, a comparison data selection unit that selects one of the comparison data storage units, and the master latch unit. Master latch section selecting means, a cyclic selection command means for outputting a cyclically changing selection signal, and a cyclic stopping means for stopping cyclically changing the selection signal output from the cyclic selection command means. And count data of the free running counter and data of the comparison data storage means And comparing means for outputting a coincidence signal when they coincide with each other, and an output port comprising a slave latch portion for taking in the digital data of the master latch portion based on the coincidence signal of the comparing means.

作用 本発明は、上記した構成により、出力ポートを介して出
力される信号のタイムベースエラーが少ないマイクロプ
ロセッサを得ることができる。
Effect of the Invention The present invention can obtain a microprocessor having a small time base error of a signal output through the output port, with the above configuration.

実施例 以下本発明の一実施例について、図面を参照しながら説
明する。
Embodiment An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明のマイクロプロセッサのブロック図を示
すものである。第1図において、TMGR100は外部クロッ
ク入力端子10に供給されるクロック信号をもとに命令の
実行タイミング信号を発生するタイミングジェネレータ
であり、その出力信号はPC200,ICR900及びFRC1000に供
給されている。PLA300はプログラマブルロジックアレイ
であり、順次実行される命令群からなるプログラムが格
納されている。PC200はプログラムカウンタであり、TMG
R100の出力信号に基づいてPLA300に格納された特定の命
令を選択する。FRC1000はフリーランニングカウンタで
あり、TMGR100の出力信号をクロック信号として巡回カ
ウント動作を行う。ICR900はインプットキャプチャレジ
スタ回路であり、外部信号入力端子30〜37に印加される
入力信号のエッジが到来したときに、その時点のFRC100
0のカウントデータをICR900内の特定のレジスタに格納
する(同時に複数の入力信号のエッジが到来したときに
は、複数のレジスタにFRC1000のカウントデータ格納さ
れる。)とともに、不図示の入力信号受け付けフラグを
セットする機能を有している。PLA300から送出される命
令は、コントロールバス1300を介してALU400,アドレス
デコーダ600(図中ではアドレスデコーダAと示されて
いる。),アドレスデコーダ800(図中ではアドレスデ
コーダBと示されている。),ICR900及び出力ポート110
0に供給される。また、データバス1200はALU400,ROM50
0,RAM700,ICR900及び出力ポート1100に接続されてい
る。ALU400はディジタルデータの算術および論理演算を
実行する演算器である。ROM500はあらかじめ格納されて
いるディジタルデータをデータバス1200に送出する読み
出し専用メモリである。RAM700はデータバス1200を介し
てディジタルデータの読み書きを行うランダムアクセス
メモリである。出力ポート1100はプログラムによって変
えられる一連の信号パターンを信号出力端子40〜47から
出力する。アドレスデコーダ600はROM500のアドレスを
選択し、アドレスデコーダ800はRAM700のアドレスを選
択する。
FIG. 1 shows a block diagram of the microprocessor of the present invention. 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 PLA300 is a programmable logic array, and stores a program including a group of instructions that are sequentially executed. PC200 is a program counter, TMG
Select a specific instruction stored in PLA300 based on the output signal of R100. FRC1000 is a free-running counter, which performs a cyclic counting operation using the output signal of TMGR100 as a clock signal. The ICR900 is an input capture register circuit, and when the edge of the input signal applied to the external signal input terminals 30 to 37 arrives, the FRC100 at that point in time.
The count data of 0 is stored in a specific register in the ICR900 (when the edges of a plurality of input signals arrive at the same time, the count data of the FRC1000 is stored in a plurality of registers), and an input signal acceptance flag (not shown) is set. It has the function of setting. The command sent from the PLA 300 is ALU 400, address decoder 600 (shown as address decoder A in the figure), and address decoder 800 (shown as address decoder B in the figure) via the control bus 1300. ), ICR900 and output port 110
Supplied to 0. Data bus 1200 is ALU400, ROM50
0, RAM700, ICR900 and 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 40 to 47. The address decoder 600 selects the address of the ROM 500, and the address decoder 800 selects the address of the RAM 700.

以上のように構成された本実施例のマイクロプロセッサ
について、以下その動作について第1図、第2図及び第
3図を用いて説明する。
The operation of the microprocessor of this embodiment configured as described above will be described below with reference to FIGS. 1, 2, and 3.

TMGR100は外部クロック入力端子10に供給されるクロッ
ク信号をもとに命令の実行タイミング信号を発生し、こ
の信号をPC200,ICR900及びFRC1000に供給する。PC200
は、TMGR100の出力信号に基づいてPLA300に格納された
命令群の中から特定の命令を選択し、コマンドバス1300
に送出する。ALU400はコマンドバス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
Send to. The ALU400 executes arithmetic and logical operations on digital data sent via the data bus 1200 in accordance with instructions sent from the command bus 1300,
The result is sent 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 on the basis of an instruction sent via the command bus 1300, and the RAM 700 sets the data bus 1200 to the storage means corresponding to the address selected by the address decoder 800.
The digital data sent from is stored or the already stored digital data is sent 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図で比較データレジスタ1111〜1114(図中では比較
データレジスタA,B,C,Dと示されている。)は、第1図
のFRC1000のカウントデータと比較するためのディジタ
ルデータを格納するレジスタであり、比較データ選択回
路1120は比較データレジスタ1111〜1114のいずれか1つ
のレジスタを選択し、選択したレジスタに格納されてい
るディジタルデータを比較回路1130に供給する。比較回
路1130は比較データ選択回路1120から供給されるディジ
タルデータとローカルバス1190を介して第1図のFRC100
0から供給されるカウントデータとを比較し、一致した
場合に一致信号をスレーブラッチ回路1160及びANDゲー
ト1175に供給する。また、アドレスデコーダ1110(図中
ではアドレスデコーダCと示されている。)はコマンド
バス1300から送られてくる命令にしたがい、データバス
1200を介して比較データレジスタ1111〜1114にディジタ
ルデータを格納する際にアドレスを選択する。マスター
ラッチ1141〜1144(図中ではマスターラッチA,B,C,Dと
示されている。)は出力するデータを格納するラッチで
あり、マスターラッチ選択回路1150はマスターラッチ11
41〜1144のいずれか1つのマスターラッチを選択し、選
択したマスターラッチに格納されているディジタルデー
タをスレーブラッチ回路1160に供給する。また、アドレ
スデコーダ1140(図中ではアドレスデコーダDと示され
ている。)はコマンドバス1300から送られてくる命令に
したがい、データバス1200を介してマスターラッチ1141
〜1144にディジタルデータを格納する際にアドレスを選
択する。選択信号発生回路1180は4本の選択信号1181〜
1184を比較データ選択回路1120及びマスターラッチ選択
回路1150に供給し、ANDゲート1175の出力信号に基づい
て4本の選択信号のうちいずれか1本を順次イネーブル
状態にする。巡回停止指示回路1170はコマンドバス1300
から送られてくる命令にしたがって“0"あるいは“1"が
格納され、この出力はORゲート1174に供給されている。
また、ORゲート1174のもう一方の入力端子にはNORゲー
ト1172とNORゲート1173により構成されたフリップフロ
ップの一方の出力端子が供給されている。NORゲート117
2,1173により構成されたフリップフロップの一方の入力
端子には選択信号1184が接続され、他方の入力端子には
一巡検出リセット回路1171の出力が接続されている。
In FIG. 2, comparison data registers 1111-1114 (shown as comparison data registers A, B, C, D in the drawing) store digital data for comparison with the count data of FRC1000 in FIG. The comparison data selection circuit 1120 selects any one of the comparison data registers 1111-1114 and supplies the digital data stored in the selected register to the comparison circuit 1130. The comparison circuit 1130 receives the digital data supplied from the comparison data selection circuit 1120 and the FRC 100 of FIG.
The count data supplied from 0 is compared, and if they match, a match signal is supplied to the slave latch circuit 1160 and the AND gate 1175. Further, the address decoder 1110 (indicated as an address decoder C in the figure) follows a command sent from the command bus 1300,
An address is selected when digital data is stored in the comparison data registers 1111-1114 via 1200. Master latches 1141 to 1144 (indicated as master latches A, B, C, D in the figure) are latches for storing data to be output, and master latch selection circuit 1150 is a master latch 11
Any one of the master latches 41 to 1144 is selected, and the digital data stored in the selected master latch is supplied to the slave latch circuit 1160. Further, the address decoder 1140 (indicated as an address decoder D in the figure) follows the instruction sent from the command bus 1300 and, in response to the instruction sent from the command bus 1300, the master latch 1141 via the data bus 1200.
Select an address when storing digital data in ~ 1144. The selection signal generation circuit 1180 has four selection signals 1181 to
1184 is supplied to the comparison data selection circuit 1120 and the master latch selection circuit 1150, and one of the four selection signals is sequentially enabled based on the output signal of the AND gate 1175. The patrol stop instruction circuit 1170 is the command bus 1300.
"0" or "1" is stored according to the instruction sent from the output from the OR gate 1174.
Further, the other input terminal of the OR gate 1174 is supplied with one output terminal of the flip-flop constituted by the NOR gate 1172 and the NOR gate 1173. NOR gate 117
The selection signal 1184 is connected to one input terminal of the flip-flop constituted by 2,1173, and the output of the one-cycle detection reset circuit 1171 is connected to the other input terminal.

以上のように構成された出力ポート1100について、その
動作について説明する。
The operation of the output port 1100 configured as above will be described.

比較データレジスタ1111〜1114にはプログラムにより任
意のディジタルデータが書き込まれる。たとえば、プロ
グラムにより比較データレジスタ1111に比較データが書
き込まれる場合には、まず、コマンドバス1300を介して
送られてくる命令にしたがって、アドレスデコーダ1110
は比較データレジスタ1111を選択し、選択された比較デ
ータレジスタ1111はデータバス1200を介して送られてく
るディジタルデータを格納する。同様にして比較データ
レジスタ1112〜1114には任意のディジタルデータが書き
込まれる。また、マスターラッチ1141〜1144も同様にプ
ログラムにより任意のディジタルデータが書き込まれ
る。
Arbitrary digital data is written in the comparison data registers 1111-1114 by a program. For example, when the comparison data is written in the comparison data register 1111 by the program, first, according to the instruction sent via the command bus 1300, the address decoder 1110
Selects the comparison data register 1111, and the selected comparison data register 1111 stores the digital data sent via the data bus 1200. Similarly, arbitrary digital data is written in the comparison data registers 1112 to 1114. Further, in the master latches 1141 to 1144, arbitrary digital data is similarly written by the program.

比較データ選択回路1120及びマスターラッチ選択回路11
50は選択信号発生回路1180から供給されている4本の選
択信号に対応する比較データレジスタとマスターラッチ
をそれぞれ選択する。比較データ選択回路1120は、選択
信号1181がイネーブルの場合には比較データレジスタ11
11、選択信号1182がイネーブルの場合には比較データレ
ジスタ1112、選択信号1183がイネーブルの場合には比較
データレジスタ1113、選択信号1184がイネーブルの場合
には比較データレジスタ1114を選択し、マスターラッチ
選択回路1150は、選択信号1181がイネーブルの場合には
マスターラッチ1141、選択信号1182がイネーブルの場合
にはマスターラッチ1142、選択信号1183がイネーブルの
場合にはマスターラッチ1143、選択信号1184がイネーブ
ルの場合にはマスターラッチ1144を選択する。
Comparison data selection circuit 1120 and master latch selection circuit 11
Reference numeral 50 selects the comparison data register and the master latch corresponding to the four selection signals supplied from the selection signal generation circuit 1180, respectively. The comparison data selection circuit 1120 uses the comparison data register 11 when the selection signal 1181 is enabled.
11, the comparison data register 1112 when the selection signal 1182 is enabled, the comparison data register 1113 when the selection signal 1183 is enabled, the comparison data register 1114 when the selection signal 1184 is enabled, and the master latch is selected. The circuit 1150 includes a master latch 1141 when the selection signal 1181 is enabled, a master latch 1142 when the selection signal 1182 is enabled, a master latch 1143 when the selection signal 1183 is enabled, and a selection signal 1184 when the selection signal 1184 is enabled. To select the master latch 1144.

次に、第3図を用いて一連の出力パターンを出力すると
きの動作について説明する。第3図aはFRC1000のカウ
ントデータの時間的変化を示したものであり、第3図b
及びdは比較回路1130の一致信号を示したものであり、
第3図c及びeはスレーブラッチ回路1160のラッチデー
タの変化を示している。即ち、FRC1000がダウンカウン
タであり、比較データレジスタ1111〜1114にはそれぞれ
比較データNA,NB,NC,ND(NA>NB>NC>ND)が格納されてお
り、マスターラッチ1141〜1144にはそれぞれ出力データ
DA,DBDC,DDが格納されているとすると、初期状態には選
択信号発生回路1180は選択信号1181をイネーブル状態に
しており、そのため比較データ選択手段1120は比較デー
タレジスタ1111を選択し、このレジスタに格納されてい
るディジタルデータNAを比較回路1130に送出し、マスタ
ーラッチ選択回路1150はマスターラッチ1141を選択し、
このラッチに格納されているディジタルデータDAをスレ
ーブラッチ回路1160に送出している。比較回路1130は比
較データレジスタ1111に格納されているディジタルデー
タNAとローカルバス1190を介して送られてくる第1図に
示したFRC1000のカウントデータとを比較し、時刻t1にF
RC1000のカウントデータがNAになると、第3図bに示さ
れる一致信号をスレーブラッチ回路1160及びANDゲート1
175に送出する。スレーブラッチ回路1160は第3図cに
示されるように比較回路1130から送出される一致信号に
よりマスターラッチ1141に格納されているディジタルデ
ータDAをラッチする。また、ANDゲート1175はORゲート1
174の出力が“1"の場合、比較回路1130から送出される
一致信号を選択信号発生回路1180に送出する。選択信号
発生回路1180は比較回路1130から送出される一致信号に
よりイネーブル状態の選択信号を1181から1182に切り換
える。選択信号1182がイネーブル状態になることによ
り、比較データ選択回路1120は比較データレジスタ1112
に格納されたディジタルデータNBを比較回路1130に送出
し、マスターラッチ選択回路1150はマスターラッチ1142
に格納されたディジタルデータDBスレーブラッチ回路11
60に送出する。比較回路1130は比較データレジスタ1112
に格納されたディジタルデータNBとローカルバス1190を
介して送られてくるFRC1000のカウントデータとを比較
し、時刻t2にFRC1000のカウントデータがNBになると第
3図bに示される一致信号をスレーブラッチ回路1160及
びANDゲート1175に送出する。スレーブラッチ回路1160
は比較回路1130から一致信号が送出されるまでは前回ラ
ッチした出力データDAを保持しているが、比較回路1130
から送出される一致信号を受け取ると第3図cに示され
るようにマスターラッチ1142に格納されたディジタルデ
ータDBをラッチする。また、選択信号発生回路1180は前
述したように比較回路1130から送出される一致信号によ
りイネーブル状態の選択信号を1182から1183に切り換え
る。
Next, the operation of outputting a series of output patterns will be described with reference to FIG. FIG. 3a shows the time change of the count data of FRC1000, and FIG.
And d are the coincidence signals of the comparison circuit 1130,
FIGS. 3C and 3E show changes in the latch data of the slave latch circuit 1160. That is, the FRC1000 is a down counter, and the comparison data registers 1111-1114 store comparison data N A , N B , N C , N D (N A > N B > N C > N D ), Output data to master latches 1141 to 1144 respectively
Assuming that D A , D B D C , and D D are stored, the selection signal generation circuit 1180 enables the selection signal 1181 in the initial state, so that the comparison data selection means 1120 causes the comparison data register 1111 to operate. The master latch selection circuit 1150 selects the master latch 1141 and sends the digital data N A stored in this register to the comparison circuit 1130.
The digital data D A stored in this latch is sent to the slave latch circuit 1160. The comparison circuit 1130 compares the digital data N A stored in the comparison data register 1111 with the count data of the FRC1000 shown in FIG. 1 sent via the local bus 1190, and at time t1, F
When the count data of RC1000 becomes N A , the match signal shown in FIG.
Send to 175. The slave latch circuit 1160 latches the digital data D A stored in the master latch 1141 by the coincidence signal sent from the comparison circuit 1130 as shown in FIG. 3c. AND gate 1175 is OR gate 1
When the output of 174 is "1", the coincidence signal transmitted from the comparison circuit 1130 is transmitted to the selection signal generation circuit 1180. The selection signal generation circuit 1180 switches the selection signal in the enabled state from 1181 to 1182 by the coincidence signal sent from the comparison circuit 1130. When the selection signal 1182 is enabled, the comparison data selection circuit 1120 changes the comparison data register 1112.
The digital data N B stored in the master latch 1142 is sent to the comparison circuit 1130.
Digital data stored in D B Slave latch circuit 11
Send to 60. The comparison circuit 1130 is a comparison data register 1112.
The digital data N B stored in the FRC1000 is compared with the count data of the FRC1000 sent via the local bus 1190. When the count data of the FRC1000 becomes N B at time t2, the match signal shown in FIG. It is sent to the slave latch circuit 1160 and the AND gate 1175. Slave latch circuit 1160
Holds the previously latched output data D A until the match signal is sent from the comparison circuit 1130.
Upon receipt of the coincidence signal sent from the device, the digital data D B stored in the master latch 1142 is latched as shown in FIG. 3c. Also, the selection signal generation circuit 1180 switches the selection signal in the enabled state from 1182 to 1183 by the coincidence signal sent from the comparison circuit 1130 as described above.

以後同様にして、時刻t3,t4においてローカルバス1190
を介して送られてくるFRC1000のカウントデータが比較
データ選択回路1120から送出される比較データと一致す
るため比較回路1130から一致信号が送出され、スレーブ
ラッチ回路1160はマスターラッチ選択回路で選択された
マスターラッチに格納されたディジタルデータをラッチ
し、また、選択信号発生回路1180は選択信号1183,1184
を順次イネーブル状態に切り換える。そして、イネーブ
ル状態である選択信号が切り換わるごとに、比較データ
選択回路1120が比較回路1130に送出する比較データ及び
マスターラッチ選択回路1150がスレーブラッチ回路1160
に送出するディジタルデータが切り換えられる。したが
って、ある時刻での第1図のFRC1000のカウントデータ
に対し、任意のカウント後のデータを比較データレジス
タ1111〜1114に格納し、比較データレジスタ1111〜1114
に対応するマスターラッチ1141〜1144に任意のデータを
格納することにより、一連の出力パターンを有する信号
をスレーブラッチ回路から出力することができる。
After that, similarly, at times t3 and t4, the local bus 1190
Since the count data of the FRC1000 sent via the match with the comparison data sent from the comparison data selection circuit 1120, a match signal is sent from the comparison circuit 1130, and the slave latch circuit 1160 is selected by the master latch selection circuit. The digital data stored in the master latch is latched, and the selection signal generation circuit 1180 selects the selection signals 1183 and 1184.
Are sequentially switched to the enabled state. Then, every time the selection signal in the enabled state is switched, the comparison data selection circuit 1120 sends the comparison data and the master latch selection circuit 1150 to the comparison circuit 1130 and the slave latch circuit 1160.
The digital data to be sent to is switched. Therefore, with respect to the count data of the FRC1000 of FIG. 1 at a certain time, the data after arbitrary counting is stored in the comparison data registers 1111-1114, and the comparison data registers 1111-1114 are stored.
By storing arbitrary data in the master latches 1141 to 1144 corresponding to, a signal having a series of output patterns can be output from the slave latch circuit.

NORゲート1172,1173により構成されたフリップフロップ
は選択信号1184がイネーブル状態になるとNORゲート117
2の出力が“1"から“0"に反転し、選択信号発生回路118
0が選択信号1181から1184までをすべてイネーブル状態
に切り換えたことを検出する。即ち、NORゲート1172,11
73により構成されたフリップフロップは一巡検出回路で
あり、一巡を検出した場合にはORゲート1174に供給して
いる信号を“0"にする。この時、巡回停止指示回路1170
の出力が“0"になっていると、ORゲート1174の出力は
“0"となり、ANDゲート1175の出力が“0"に固定される
ため、比較回路1130から出力される一致信号が選択信号
発生回路1180に供給されなくなる。したがって、巡回停
止指示回路1170の出力が“0"の場合には比較レジスタ11
11〜1114及びマスターラッチ1141〜1144に格納されたデ
ィジタルデータによってスレーブラッチから出力される
信号パターンを第3図cに示されるように一回だけ出力
することになる。
The flip-flop formed by the NOR gates 1172 and 1173 is NOR gate 117 when the selection signal 1184 is enabled.
The output of 2 is inverted from “1” to “0”, and the selection signal generation circuit 118
It is detected that 0 switches all the selection signals 1181 to 1184 to the enable state. That is, NOR gates 1172, 11
The flip-flop constituted by 73 is a one-cycle detection circuit, and when detecting one cycle, sets the signal supplied to the OR gate 1174 to “0”. At this time, the patrol stop instruction circuit 1170
When the output of is 0, the output of the OR gate 1174 is 0 and the output of the AND gate 1175 is fixed at 0, so the match signal output from the comparison circuit 1130 is the selection signal. It is no longer supplied to the generation circuit 1180. Therefore, when the output of the patrol stop instruction circuit 1170 is “0”, the comparison register 11
According to the digital data stored in 11 to 1114 and master latches 1141 to 1144, the signal pattern output from the slave latch is output only once as shown in FIG. 3c.

また、巡回停止指示回路1170の出力が“1"の場合にはOR
ゲート1174の出力が“1"に固定されるため、NORゲート1
172とNORゲート1173により構成されたフリップフロップ
の出力の状態に関係なく比較回路1130から出力される一
致信号がANDゲート1175を通して選択信号発生回路1180
に供給され続ける。したがって、巡回停止指示回路1170
の出力が“1"の場合には比較レジスタ1111〜1114及びマ
スターラッチ1141〜1144に格納されたディジタルデータ
によってスレーブラッチから出力される信号パターンを
第3図eに示されるように連続的に出力することにな
る。
If the output of the patrol stop instruction circuit 1170 is "1", OR
NOR gate 1 because the output of gate 1174 is fixed at “1”
The match signal output from the comparison circuit 1130 regardless of the output state of the flip-flop configured by the 172 and the NOR gate 1173 passes through the AND gate 1175 and the selection signal generation circuit 1180.
Will continue to be supplied to. Therefore, the patrol stop instruction circuit 1170
When the output of "1" is "1", the signal pattern output from the slave latch according to the digital data stored in the comparison registers 1111-1114 and master latches 1141-1144 is continuously output as shown in FIG. 3e. Will be done.

NORゲート1172,1173で構成された一巡検出回路の出力は
コマンドバス1300から送られてくる命令により、一巡検
出リセット回路から出力される信号で“1"にすることが
可能であり、また、巡回停止指示回路1170の出力もコマ
ンドバス1300から送られてくる命令により任意の状態に
することができる。したがって、任意の信号パターンを
単発的あるいは連続的に出力することができる。
The output of the loop detection circuit composed of NOR gates 1172 and 1173 can be set to "1" by the signal output from the loop detection reset circuit by an instruction sent from the command bus 1300. The output of the stop instruction circuit 1170 can also be set in an arbitrary state by an instruction sent from the command bus 1300. Therefore, it is possible to output an arbitrary signal pattern one-shot or continuously.

このように、マスターラッチ1141〜1144からスレイブラ
ッチ回路1160へのデータの転送が比較データレジスタ11
11〜1114とFRC1000のカウントデータを比較する比較回
路1130の一致検出信号によって自動的に行われるように
構成することにより、非同期で入力される外部信号のエ
ッジを検出してから、あらかじめ決められた時間後に出
力ポート1100から任意の信号パターンの信号を送出させ
る場合にはタイムベースエラーを最小限に押さえること
ができる。
As described above, the data transfer from the master latches 1141 to 1144 to the slave latch circuit 1160 is performed by the comparison data register 11
11 to 1114 is compared with the count data of FRC1000, and is configured to be automatically performed by the match detection signal of the comparison circuit 1130, thereby detecting the edge of the external signal that is asynchronously input and then determined in advance. When a signal having an arbitrary signal pattern is transmitted from the output port 1100 after the elapse of time, the time base error can be suppressed to the minimum.

以上のように本発明は、特定のクロック信号に基づいて
巡回カウント動作を行なうフリーランニングカウンタ
(1000)と、少なくとも2種類以上のディジタルデータ
を格納する比較データ格納手段(比較データレジスタ11
11〜1114)と、前記比較データ格納手段と同数のディジ
タルデータを格納するマスターラッチ部(マスターラッ
チ1141〜1144)と、前記比較データ格納手段のいずれか
1つを選択する比較データ選択手段(比較データ選択回
路1120)と、前記マスターラッチ部のいずれか1つを選
択するマスターラッチ部選択手段(マスターラッチ選択
回路1150)と、巡回的に変更する選択信号を出力する巡
回選択指令手段(選択信号発生回路1180)と、前記巡回
選択指令手段から出力される選択信号が巡回的に変更す
ることを停止させる巡回停止手段(巡回停止指示回路11
70、NORゲート1172,1173、ORゲート1174)と、前記フリ
ーランニングカウンタのカウントデータと前記比較デー
タ格納手段のデータを比較し、一致した場合に一致信号
を出力する比較手段(比較回路1130)と、前記マスター
ラッチ部のディジタルデータを前記比較手段の一致信号
に基づいて取り込むスレイブラッチ部(スレーブラッチ
回路1160)からなる出力ポート1100とを設けたものであ
る。
As described above, according to the present invention, the free-running counter (1000) that performs the cyclic counting operation based on the specific clock signal and the comparison data storage means (comparison data register 11) that stores at least two types of digital data are provided.
11 to 1114), a master latch unit (master latches 1141 to 1144) that stores the same number of digital data as the comparison data storage unit, and a comparison data selection unit (comparison unit) that selects one of the comparison data storage units. A data selection circuit 1120), a master latch section selection means (master latch selection circuit 1150) for selecting one of the master latch sections, and a cyclic selection command means (selection signal) for outputting a selection signal to be cyclically changed. The generation circuit 1180) and the cyclic stop means (the cyclic stop instruction circuit 11) for stopping the cyclic change of the selection signal output from the cyclic selection command means.
70, NOR gates 1172, 1173, OR gate 1174) and a comparison means (comparison circuit 1130) for comparing the count data of the free running counter with the data of the comparison data storage means and outputting a coincidence signal when they coincide. And an output port 1100 comprising a slave latch unit (slave latch circuit 1160) for taking in the digital data of the master latch unit based on the coincidence signal of the comparing means.

したがって、第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本ずつの構成になって
いるが、出力ポートから出力する信号のパターンの複雑
さに応じて2本以上いくつ設けた場合でもまったく同様
な効果が得られる。
In the embodiment, the comparison data register and the master latch of the output port are each configured with four, but even if two or more are provided depending on the complexity of the pattern of the signal output from the output port, it is completely impossible. Similar effects are obtained.

発明の効果 以上のように本発明は、外部信号入力端子のいずれかに
印加される入力信号のエッジが到来すると、その直後に
インプットキャプチャレジスタがその時点のタイミング
情報としてフリーランニングカウンタのカウントデータ
をインプットキャプチャレジスタ内の特定のレジスタに
格納するので、入力信号の正確な到来時点はソフトウェ
アによって確認することが可能であり、出力ポートから
一連の信号パターンを有する出力信号を送出し始める目
標時点までの時間差データを、データバスに送出して比
較データレジスタに格納し、比較データレジスタに格納
した設定時間ごとに出力したいデータを、データバスを
介してマスターラッチに格納すれば、出力ポートからは
タイムベースエラーの少ない一連の信号パターンを出力
することができるマイクロプロセッサを得ることがで
き、その効果は大きい。
As described above, according to the present invention, when the edge of the input signal applied to any of the external signal input terminals arrives, the input capture register immediately outputs the count data of the free running counter as timing information at that time. Since it is stored in a specific register in the input capture register, the exact arrival time of the input signal can be confirmed by software, and the output port having a series of signal patterns can output the output signal up to the target time. If the time difference data is sent to the data bus and stored in the comparison data register, and the data stored in the comparison data register that is to be output at each set time is stored in the master latch via the data bus, the time base is output from the output port. A series of signal patterns with few errors can be output. It is possible to obtain a microprocessor capable of achieving high efficiency.

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

第1図は本発明の一実施例におけるマイクロプロセッサ
のブロック図、第2図は出力ポート部の具体的な構成例
を示すブロック図、第3図は第2図の主要部のタイミン
グチャートである。 100……タイミングジェネレータ、200……プログラムカ
ウンタ、300……PLA、400……ALU、500……ROM、700…
…RAM、900……ICR、1000……FRC、1100……出力ポー
ト、1111〜1114……比較データレジスタ、1141〜1144…
…マスターラッチ、1160……スレーブラッチ。
FIG. 1 is a block diagram of a microprocessor according to an embodiment of the present invention, FIG. 2 is a block diagram showing a concrete configuration example of an output port section, and FIG. 3 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 ... ICR, 1000 ... FRC, 1100 ... output port, 1111-1114 ... comparison data register, 1141-1144 ...
… Master latch, 1160… Slave latch.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】特定のクロック信号に基づいて巡回カウン
ト動作を行なうフリーランニングカウンタと、 少なくとも2種類以上のディジタルデータを格納する比
較データ格納手段と、 前記比較データ格納手段と同数のディジタルデータを格
納するマスターラッチ部と、 前記比較データ格納手段のいずれか1つを選択する比較
データ選択手段と、 前記マスターラッチ部のいずれか1つを選択するマスタ
ーラッチ部選択手段と、 巡回的に変更する選択信号を出力する巡回選択指令手段
と、 前記巡回選択指令手段から出力される選択信号が巡回的
に変更することを停止させる巡回停止手段と、 前記フリーランニングカウンタのカウントデータと前記
比較データ選択手段で選択された前記比較データ格納手
段のデータとを比較し、一致した場合に一致信号を出力
する比較手段と、 前記マスターラッチ部のディジタルデータを前記比較手
段の一致信号に基づいて取り込むスレイブラッチ部から
なる出力ポートとを備えたことを特徴とするマイクロプ
ロセッサ。
1. A free-running counter for performing a cyclic counting operation based on a specific clock signal, a comparison data storage means for storing at least two kinds of digital data, and the same number of digital data as the comparison data storage means. Master latch unit, a comparison data selection unit that selects any one of the comparison data storage units, a master latch selection unit that selects any one of the master latch units, and a cyclically changing selection A cyclic selection command means for outputting a signal, a cyclic stop means for stopping the cyclic change of the selection signal output from the cyclic selection command means, count data of the free running counter and the comparison data selection means. The data in the selected comparison data storage means is compared, and if they match, the A microprocessor comprising: a comparison unit that outputs a match signal; and an output port that is a slave latch unit that takes in digital data of the master latch unit based on a match signal of the comparison unit.
【請求項2】巡回選択指令手段から出力される選択信号
に基づいて選択を変更する比較データ選択手段とマスタ
ーラッチ部選択手段を有する請求項1記載のマイクロプ
ロセッサ。
2. The microprocessor according to claim 1, further comprising comparison data selecting means and master latch section selecting means for changing the selection based on a selection signal output from the cyclic selection command means.
【請求項3】比較手段から出力される一致信号によって
選択信号を変更する巡回選択指令手段を有する請求項1
記載のマイクロプロセッサ。
3. A cyclic selection command means for changing the selection signal according to the coincidence signal output from the comparison means.
The described microprocessor.
【請求項4】巡回停止手段が巡回停止状態を示す場合に
は比較データ選択手段が比較データ格納手段のすべての
データを選択し終えると選択信号の変更を停止し、巡回
停止手段が巡回状態を示す場合には比較手段の一致信号
が出力されるたびに巡回的に選択信号を変更する巡回選
択指令手段を有する請求項1記載のマイクロプロセッ
サ。
4. When the patrol stop means indicates the patrol stop state, when the comparison data selection means finishes selecting all the data in the comparison data storage means, the change of the selection signal is stopped, and the patrol stop means changes the patrol state. 2. The microprocessor according to claim 1, further comprising cyclic selection commanding means for cyclically changing the selection signal each time the coincidence signal of the comparing means is output.
JP1108866A 1989-04-27 1989-04-27 Microprocessor Expired - Fee Related JPH0769836B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1108866A JPH0769836B2 (en) 1989-04-27 1989-04-27 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1108866A JPH0769836B2 (en) 1989-04-27 1989-04-27 Microprocessor

Publications (2)

Publication Number Publication Date
JPH02287659A JPH02287659A (en) 1990-11-27
JPH0769836B2 true JPH0769836B2 (en) 1995-07-31

Family

ID=14495571

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1108866A Expired - Fee Related JPH0769836B2 (en) 1989-04-27 1989-04-27 Microprocessor

Country Status (1)

Country Link
JP (1) JPH0769836B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6448162A (en) * 1987-08-18 1989-02-22 Nec Corp Microcomputer

Also Published As

Publication number Publication date
JPH02287659A (en) 1990-11-27

Similar Documents

Publication Publication Date Title
JPS63123218A (en) Timer/counter circuit
US5872961A (en) Microcomputer allowing external monitoring of internal resources
JPH0769836B2 (en) Microprocessor
US5058050A (en) Timer unit and data processing apparatus including the same
JP2512119B2 (en) Microprocessor
JPH0713818B2 (en) Microprocessor
JPH0690728B2 (en) Microprocessor
JP4923288B2 (en) Fault tolerance consensus method for asynchronous shared object system and its implementation mechanism
JPH0690729B2 (en) Microprocessor and output port
JP2784001B2 (en) Instruction processing circuit of programmable controller
US5151982A (en) Data processing system
JPH04162138A (en) microprocessor
JPH02287629A (en) Microprocessor
JPH04162181A (en) Microprocessor and output ports
JP2625145B2 (en) Memory access control device
SU1622935A1 (en) Asynchronous distributor
JP2517471Y2 (en) IC test equipment
JP3045731B2 (en) Sequence control method
JPH0584547B2 (en)
JPH01173132A (en) Microprogram controller
JPS58181155A (en) Storage device of state history
JPH0584545B2 (en)
JPH01274246A (en) Interruption processing system for microprocessor
JPS58214938A (en) Direct memory access system for cyclic data transfer
JPS605349A (en) Program tracing device for plural processors

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070731

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080731

Year of fee payment: 13

LAPS Cancellation because of no payment of annual fees