JPS6346460B2 - - Google Patents

Info

Publication number
JPS6346460B2
JPS6346460B2 JP8764281A JP8764281A JPS6346460B2 JP S6346460 B2 JPS6346460 B2 JP S6346460B2 JP 8764281 A JP8764281 A JP 8764281A JP 8764281 A JP8764281 A JP 8764281A JP S6346460 B2 JPS6346460 B2 JP S6346460B2
Authority
JP
Japan
Prior art keywords
signal
data
memory
cpu
instruction
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
Application number
JP8764281A
Other languages
Japanese (ja)
Other versions
JPS57203162A (en
Inventor
Yutaka Murao
Mutsuo Sugawara
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.)
Toshiba Corp
Original Assignee
Tokyo Shibaura Electric 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 Tokyo Shibaura Electric Co Ltd filed Critical Tokyo Shibaura Electric Co Ltd
Priority to JP8764281A priority Critical patent/JPS57203162A/en
Publication of JPS57203162A publication Critical patent/JPS57203162A/en
Publication of JPS6346460B2 publication Critical patent/JPS6346460B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/22Means for limiting or controlling the pin/gate ratio

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)

Description

【発明の詳細な説明】 本発明はプログラム・デバツグを含むモニタリ
ングが良好に行なえるようにした1チツプ・マイ
クロ・コンピユータに関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a one-chip microcomputer that allows for good monitoring including program debugging.

近年、マイクロ・コンピユータ(以下マイコン
と称す)の分野では、1チツプのものが大量に出
回つてきた。これは、コストダウンのためには、
1チツプ化が効果的であることと、LSI(大規模
集積回路)の集積能力が向上していることとによ
る。しかして1チツプ・マイコンは、CPU(中央
処理装置)内にプログラム・メモリー,データ・
メモリー等を内蔵するため、従来必要であつたこ
れらメモリーとの間をつなぐ外部バスが不要とな
り、このためこのバスに割当てられていた端子
(ピン)にI/O(入出力)ポートを多数割当てら
れるようになる。この場合外部バスが使えないか
ら、デバツグ等のためのコンソール機能の実現が
困難化される。しかしながら1チツプ・マイコン
においても上記コンソール機能を実現するのは必
要であるから、何らかの対策を考えなければなら
ない。
In recent years, in the field of microcomputers (hereinafter referred to as microcomputers), large quantities of one-chip devices have been on the market. This is to reduce costs,
This is due to the effectiveness of single-chip integration and the improvement in the integration capacity of LSI (Large-Scale Integrated Circuits). However, a single-chip microcontroller has program memory, data, and
Since it has built-in memory, there is no need for an external bus that connects these memories, which was required in the past, and for this reason, many I/O (input/output) ports are assigned to the terminals (pins) that were assigned to this bus. You will be able to do it. In this case, since the external bus cannot be used, it becomes difficult to implement a console function for debugging or the like. However, since it is necessary to realize the above console function even in a single-chip microcomputer, some kind of countermeasure must be taken.

本発明は上記実情に鑑みてなされたもので、マ
イコンのコンソール処理にシリアル転送を利用し
かつCPU内部での処理を工夫することにより最
少のピン数でデバツグを含むモニタリングが行な
える1チツプ・マイクロ・コンピユータを提供し
ようとするものである。
The present invention was made in view of the above circumstances, and is a one-chip microcontroller that uses serial transfer for microcontroller console processing and devises processing within the CPU to enable monitoring, including debugging, with a minimum number of pins.・It aims to provide computers.

以下図面を参照して本発明の一実施例を説明す
る。第1図は同実施例を示す構成図である。この
図に示される如くCPU11は、命令解読及び実
行の中心であるプロセサ部(演算処理部)12、
その基本タイミング信号φ,CLK等を生成する
タイミング・ジエネレータ13の他に、1チツプ
マイコンであるため、RAM/ROM(Random
Access Memory及びRead Only Memory)1
4をも内蔵しており、更に以下に述べるデバツグ
等に必要な回路を内蔵している。CPU11外に
は、コンソール動作をコントロールするコンソー
ル用外部回路15が設けられ、この回路15より
のシリアル・データはデータ転送兼割込み要求ラ
インSIN(SITRQ)より送出されて、シリアル・
データを受信するためのシフトレジスタ16に入
力され、正常なフオーマツトで正しく入力された
場合、コントロール部17でDA(データ・アベ
イラブル)=1、FE(フレーミング・エラー)=0
のフラグが立てられる。この時アンド・ゲート1
8と擬似命令発生ロジツク19とにより、コンソ
ール・ステート・カウンタ20の値に従つて、擬
似命令の発生/不発生がコントロールされる。こ
の擬似命令の発生は、通常の命令実行の区切り
目、或いはCPUホールト(Halt)時の定期的タ
イミングで発生可能となる。上記擬似命令発生ロ
ジツク19では、アドレス・ストツプ・イネーブ
ル信号ASTP―ENBもコントロールされ、この
回路例が第4図に示される。上記ロジツク19内
の擬似命令発生部21は、基本的には入力3本の
デコーダであり、ゲート18の出力SIDAとコン
ソール・ステート・カウンタ20の値とによつ
て、擬似命令となるバス・データBUS―DATA、
擬似命令の発生を許可する信号BUS―ENBがつ
くられ、また信号SIDAと、OH(Operation or
Halt)信号の立上り時に発生する信号OH1との
論理積をとるアンドゲート22によつて、アドレ
ス・ストツプ・イネーブル信号ASTP―ENBを
出力するフリツプフロツプ23のセツト信号がつ
くられる。インバータ24はフリツプフロツプ2
3のリセツト用である。上記信号BUS―ENBが
“1”になると、上述した一定のセンス・タイミ
ングで、アンド・ゲート25によりドライバ26
がイネーブルされ、バスデータBUS―DATAが
内部バス27上にのせられる。このバス27上に
のせられたデータは、インストラクシヨンとして
プロセツサ部12内のインストラクシヨン・レジ
スタにしまわれる。この時当然ながら、通常の命
令フエツチは禁止される。この例では、コンソー
ル・ステート・カウンタ20の値が“1”及び
“2”の時のみ前記擬似命令が発生され、その内
容はそれぞれ次の(イ),(ロ)のようなものである。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a configuration diagram showing the same embodiment. As shown in this figure, the CPU 11 includes a processor section (arithmetic processing section) 12 which is the center of instruction decoding and execution;
In addition to the timing generator 13 that generates the basic timing signals φ, CLK, etc., the RAM/ROM (Random
Access Memory and Read Only Memory) 1
4 is also built-in, and the circuit necessary for debugging etc. described below is also built-in. Outside the CPU 11, a console external circuit 15 is provided to control the console operation. Serial data from this circuit 15 is sent out from the data transfer/interrupt request line SIN (SITRQ) and serially transmitted.
If the data is input to the shift register 16 for receiving data and is input correctly in the normal format, the control unit 17 will output DA (data available) = 1 and FE (framing error) = 0.
will be flagged. At this time and gate 1
8 and pseudo-instruction generation logic 19 control generation/non-occurrence of pseudo-instructions according to the value of console state counter 20. This pseudo-instruction can be generated at the breakpoint of normal instruction execution or at regular timing during a CPU halt. The pseudo-instruction generation logic 19 also controls the address stop enable signal ASTP-ENB, and an example of this circuit is shown in FIG. The pseudo-instruction generator 21 in the logic 19 is basically a decoder with three inputs, and generates bus data that becomes a pseudo-instruction based on the output SIDA of the gate 18 and the value of the console state counter 20. BUS-DATA,
A signal BUS-ENB is created to permit the generation of pseudo-instructions, and signals SIDA and OH (Operation or
A set signal for a flip-flop 23 which outputs an address stop enable signal ASTP-ENB is generated by an AND gate 22 which performs an AND with a signal OH1 generated at the rising edge of the Halt signal. Inverter 24 is flip-flop 2
This is for resetting step 3. When the signal BUS-ENB becomes "1", the driver 26 is activated by the AND gate 25 at the above-mentioned fixed sense timing.
is enabled, and bus data BUS-DATA is placed on the internal bus 27. The data placed on this bus 27 is stored in an instruction register in the processor section 12 as an instruction. At this time, of course, the normal commanded fetch is prohibited. In this example, the pseudo-instructions are generated only when the values of the console state counter 20 are "1" and "2", and their contents are as shown in (a) and (b) below, respectively.

(イ) 擬似セーブ命令(データ掃出し命令)(ステ
ートつまりカウンタ20の値が“1”の時):
プロセツサ部12のプログラム・カウンタ
(PCと略す)28、コンデイシヨン・コード・
レジスタ(CCRと略す)、アキユミユレータ
(Aと略す)(図示せず)のデータを、この順に
シフトレジスタ29のシリアル・データ出力ラ
インSOUTに出力する。その後シフトレジス
タ16の内容をメモリーアドレスと見なし、こ
のメモリーアドレスから読出したデータを出力
ラインSOUTに出力する。
(b) Pseudo save instruction (data sweep instruction) (state, that is, when the value of counter 20 is “1”):
A program counter (abbreviated as PC) 28 of the processor section 12, a condition code
The data of the register (abbreviated as CCR) and the accumulator (abbreviated as A) (not shown) are output to the serial data output line SOUT of the shift register 29 in this order. Thereafter, the contents of the shift register 16 are regarded as a memory address, and the data read from this memory address is output to the output line SOUT.

(ロ) 擬似リストア命令(データ取込み命令)(ス
テートつまりカウンタ20の値が“2”の
時):上記(イ)項の場合とは逆に、入力ライン
SINよりシフトレジスタ16に入力したデータ
を、順に前記PC,CCR,Aに格納する。その
後シフトレジスタ16に入つたデータをメモリ
ーアドレスのデータとみなすことにより、メモ
リー14への書込みを行なう。
(b) Pseudo restore instruction (data import instruction) (state, that is, when the value of counter 20 is "2"): Contrary to the case of (a) above, when the input line
Data input from SIN to the shift register 16 is stored in the PC, CCR, and A in sequence. Thereafter, writing into the memory 14 is performed by regarding the data entered in the shift register 16 as memory address data.

ただし上記命令(イ),(ロ)はあくまでも一例であ
り、命令の実行内容は各システムに最適なものを
選べばよい。またこの例ではデータの同期転送を
仮定しており、その同期クロツクが前記CLKで
ある。クロツク・コントロール部30では、クロ
ツク信号CLKにより2つのシフトレジスタ16,
29のシフト・イン・クロツクCLKIとシフト・
アウト・クロツクCLKOがつくられている。
CPU11からの送信データは、外部にシリア
ル・データを送信するためのシフトレジスタ29
に内部バス27より書込まれると、自動的にシフ
トレジスタ29の内容が出力ラインSOUT上に、
一定のフオーマツトに従つてのせられる。
However, the above instructions (a) and (b) are just examples, and the execution contents of the instructions can be selected as appropriate for each system. Furthermore, this example assumes synchronous data transfer, and the synchronous clock is the CLK. In the clock control section 30, the two shift registers 16,
29 shift-in clock CLKI and shift-in clock
The out-clock CLKO is being created.
Transmission data from the CPU 11 is sent to a shift register 29 for transmitting serial data to the outside.
When written from the internal bus 27, the contents of the shift register 29 are automatically transferred to the output line SOUT.
It is placed according to a certain format.

上記コンソール処理の制御状態が、現在どこに
あるかを表示/コントロールするものとして上記
コンソール・ステート・カウンタ20が用いら
れ、その動作は第2図に示されている。このカウ
ンタ20は2つのリセツト入力R1,R2(いずれで
もリセツト可能)をもち、それぞれリセツト信号
RESET、信号OH1が入力されている。信号
RESETは、CPU11全体のリセツト信号(イニ
シヤライズ)でもあり、パワー・オン時等にアク
テイブになる。信号OH1は第2図bに示される
如く実際のOH信号(実効OH信号)OHeffの立上
りで、一定のパルス幅だけアクテイブになり、信
号OHeffの立上りを意味する。カウンタ20のカ
ウント・アツプ用クロツクは、信号OHeffの立下
り時に発生する信号OH2とコントロール部17
からの信号DAとの論理和で得られ、ゲート31
はそのためのノア・ゲートである。信号DAは、
上述した通り外部よりデータを受信したことを示
し、この信号DAは、シフトレジスタ16からメ
モリーアドレスが読出されると零にクリアされ
る。また第2図aに示される如くカウンタ20
は、カウント値“3”で飽和するようになつてお
り、ゲート32はそのためのものである。このカ
ウンタ飽和機能は、後述するようにレジスタ及び
メモリーのデータ書込み時に必要となるもので、
多種のデータが入力ラインSINから送られてきた
時に、いちいちカウント・アツプしないためのも
のである。第1図のゲート33,34、デイレイ
35、インバータ36は信号OH1,OH2を得る
ためのものである。
The console state counter 20 is used to display/control the current control state of the console processing, and its operation is shown in FIG. This counter 20 has two reset inputs R 1 and R 2 (either one can be reset), and each can receive a reset signal.
RESET, signal OH 1 is input. signal
RESET is also a reset signal (initialization) for the entire CPU 11, and becomes active when the power is turned on. As shown in FIG. 2b, the signal OH 1 becomes active for a certain pulse width at the rise of the actual OH signal (effective OH signal) OH eff , meaning the rise of the signal OH eff . The count-up clock of the counter 20 is connected to the signal OH2 generated at the falling edge of the signal OHeff and the control section 17.
It is obtained by ORing with the signal DA from the gate 31
is the Noah Gate for that purpose. The signal DA is
As described above, this signal DA indicates that data has been received from the outside, and is cleared to zero when the memory address is read from the shift register 16. In addition, as shown in FIG. 2a, a counter 20
is designed to be saturated at a count value of "3", and the gate 32 is for this purpose. This counter saturation function is necessary when writing data to registers and memory, as described later.
This is to prevent the count from increasing each time when various types of data are sent from the input line SIN. Gates 33, 34, delay 35, and inverter 36 in FIG. 1 are for obtaining signals OH 1 and OH 2 .

後述のアドレスストツプ機能を実現するため、
CPU11の内部に、内部OH信号であるiot
得るコンパレータ37を具備している。実効的な
OH信号OHeffは、外部OH信号をOHextとすると OHeff=OHiot・OHext ……(1) と表わせる。これはOHiot=1(ext=0)でか
つOHext=1(ext=0)の時、OHeff=1つま
り高レベルでプロセツサ部12(実質的にCPU
11)をオペレーシヨン状態とし、一方OHeff
0つまり低レベルとなつた時プロセツサ部12を
ホールト状態とすることを意味する。信号OHiot
のためにフリツプフロツプ38が設けられ、この
フリツプフロツプ38は2つのセツト入力S1,S2
(いずれによつてもセツト可能)と1つのリセツ
ト入力Rとを有する。セツト入力S1とS2には、そ
れぞれCPUリセツト信号である信号RESETと、
CPU内部で生成されるコントロール信号である
ISETが入力されている。この信号ISETは第3図
に示される如く生成される。即ち第3図aに示さ
れる如く信号ISETは、アンドゲート39、デイ
レイ40により、iot・SIDAがデイレイされ
た信号であり、この信号でフリツプフロツプ38
による信号OHiotのセツト、信号SIDAのクリア
が行なわれる。これを第3図bで更に詳述すれ
ば、信号OHiotが低レベルの時(後述のアドレ
ス・ストツプがかかつた時)でかつ信号SIDAが
立上つた時(入力ラインSINからデータが入つた
時)信号ISETpを出し、この信号を遅らせて信号
ISETとし、この信号で信号OHiotを高レベル、信
号SIDAを低レベルとするものである。更に信号
ISETは、第5図に示される後述の信号
TRQACKもクリアする。一方、フリツプフロツ
プ38のリセツト入力Rにはアンドゲート41の
出力がつながれる。このゲート41では、プログ
ラム・カウンタ28とシフトレジスタ16とのデ
ータ比較結果であるコンパレータ37の出力
EQU(一致信号)とアドレス・ストツプ・イネー
ブル信号ASTP―ENBとのアンドが、内部基本
クロツクφでセンスされている。即ちこれらによ
り、アドレス一致が検出された時信号OHiotリセ
ツト、つまりフリツプフロツプ38のリセツト入
力Rが“1”で出力が“1”となつて、MOS
トランジスタ42がオン、従つて実効OH信号
OHeffが“0”(低レベル)でCPU11はホール
ト状態(アドレス・ストツプ実行)となる。信号
OHeffの出力端には、トランジスタ42に対しバ
イポーラ・トランジスタ45がCPU外部で並列
接続され、また信号OHeffの出力端は抵抗46を
介して5V電源に接続される。トランジスタ45
はコンソール用外部回路15側から、信号ext
で制御される。
In order to realize the address stop function described later,
The CPU 11 includes a comparator 37 that obtains an internal OH signal iot . effective
The OH signal OH eff can be expressed as OH eff =OH iot ·OH ext (1), where the external OH signal is OH ext . This means that when OH iot = 1 ( ext = 0) and OH ext = 1 ( ext = 0), OH eff = 1, that is, at a high level, the processor section 12 (essentially the CPU
11) is in the operation state, while OH eff =
0, which means that when the level becomes low, the processor section 12 is placed in a halt state. signal oh iot
A flip-flop 38 is provided for this purpose, and this flip-flop 38 has two set inputs S 1 , S 2
(can be set by either) and one reset input R. The set inputs S 1 and S 2 are provided with a signal RESET, which is a CPU reset signal, respectively.
It is a control signal generated inside the CPU.
ISET is entered. This signal ISET is generated as shown in FIG. That is, as shown in FIG. 3a, the signal ISET is a signal obtained by delaying iot ·SIDA by an AND gate 39 and a delay 40, and this signal causes the flip-flop 38 to be delayed.
The signal OH iot is set and the signal SIDA is cleared. To explain this in more detail in Figure 3b, when the signal OH iot is at a low level (when an address stop described later is applied) and when the signal SIDA rises (when data is input from the input line SIN), outputs the signal ISET p , delays this signal, and outputs the signal ISET p.
ISET, and this signal sets the signal OH iot to high level and the signal SIDA to low level. further signal
ISET is a signal shown in FIG.
Also clear TRQACK. On the other hand, the output of the AND gate 41 is connected to the reset input R of the flip-flop 38. This gate 41 outputs the output of the comparator 37 which is the data comparison result between the program counter 28 and the shift register 16.
The AND of EQU (match signal) and address stop enable signal ASTP-ENB is sensed by internal basic clock φ. That is, when an address match is detected, the signal OH iot reset, that is, the reset input R of the flip-flop 38 becomes "1" and the output becomes "1", and the MOS
Transistor 42 is on, so the effective OH signal
When OH eff is "0" (low level), the CPU 11 enters a halt state (address stop execution). signal
A bipolar transistor 45 is connected to the transistor 42 in parallel to the output terminal of the OH eff outside the CPU, and the output terminal of the signal OH eff is connected to a 5V power supply via a resistor 46 . transistor 45
is the signal ext from the console external circuit 15 side.
controlled by

またコンソール用外部回路15とのハンド・シ
エイキングのために、信号TRQACKを得るフリ
ツプフロツプ43が用意されている。このフリツ
プフロツプ43は第5図に示されるように3つの
リセツト入力R1,R2,R3(いずれによつてもリセ
ツト可能)と1つのセツト入力Sを有する。リセ
ツト入力R1,R2及びR3には、それぞれ信号
ISET,ICLR及びCPUリセツト信号である信号
RESETが入力される。信号ISETは既に述べた
通りであり、信号ICLRは擬似命令の処理の一環
として出力される。アンド・ゲート44の入力に
は、信号SIDAと、シフトレジスタ29が空か否
かを示す信号TRBE(トランスミツシヨン・バツ
フア・エンプテイ)が与えられ、ゲート44の出
力はフリツプフロツプ43のセツトSの入力とな
る。上記第5図の回路によれば、信号TRQACK
が“1”(高レベル)の時、出力ラインSOUTか
ら出力されるデータが所期のデータであると知る
ことができ、またCPU動作がこれまで進行した
か等のモニタリングとか、入力ラインSINのデー
タ転送制御が行なえる。
Further, for handshaking with the console external circuit 15, a flip-flop 43 is provided to obtain a signal TRQACK. This flip-flop 43 has three reset inputs R 1 , R 2 , R 3 (resettable by any of them) and one set input S, as shown in FIG. Reset inputs R 1 , R 2 and R 3 each have a signal
Signals that are ISET, ICLR and CPU reset signals
RESET is input. The signal ISET is as described above, and the signal ICLR is output as part of pseudo-instruction processing. A signal SIDA and a signal TRBE (transmission buffer empty) indicating whether or not the shift register 29 is empty are applied to the input of the AND gate 44, and the output of the gate 44 is applied to the input of the set S of the flip-flop 43. becomes. According to the circuit shown in Figure 5 above, the signal TRQACK
When is “1” (high level), you can know that the data output from the output line SOUT is the expected data, and you can also monitor the progress of the CPU operation, etc. Data transfer control can be performed.

しかして、プログラム・デバツグに要求される
コンソール機能は、下記の(a)〜(d)の機能である。
Therefore, the console functions required for program debugging are the following functions (a) to (d).

(a) レジスタ及びメモリーからのデータ・リード
(データ掃出し) (b) レジスタ及びメモリーへのデータ・ライト
(データ書込み) (c) アドレス・ストツプ(或る番地にきたら
CPUの動作をとめる) (d) シングル・ステツプ(1命令実行する毎に
CPUの動作をとめる) これら(a)〜(d)項のうち、(d)項はCPU内部/外
部のメモリー・アクセス時のアドレス・ストロー
ブ信号ADRを、OHeff=1(オペレーシヨン中)
の時内部アクセス/外部アクセスに無関係に、ア
ドレス・ストローブ・タイミングで常に出力し、
またOHeff=0(ホールト中)の時、一切出力し
ないというようにし、外部回路でOHext=1にし
た後の最初のADR信号の立上りで、OHext=0
ext=1)とすれば実現できる。これは一般
によく知られた方法であり、(d)項の実現方法は本
発明の主旨とは直接関係ない。従つて以下では(a)
〜(c)項の実現方法を述べる。
(a) Data read from registers and memory (data sweep) (b) Data write to registers and memory (data write) (c) Address stop (when a certain address is reached)
(d) Single step (every time one instruction is executed)
Among these terms (a) to (d), term (d) is the address strobe signal ADR when accessing memory inside/outside the CPU, and OH eff = 1 (during operation).
Always outputs at address strobe timing regardless of internal access/external access.
Also, when OH eff = 0 (during halt), no output is made, and at the first rise of the ADR signal after setting OH ext = 1 in the external circuit, OH ext = 0.
This can be achieved by setting ( ext = 1). This is a generally well-known method, and the method for realizing section (d) is not directly related to the gist of the present invention. Therefore, in the following (a)
The method for realizing section (c) will be described.

第6図は上記(a),(b)項で述べたメモリー・リー
ド/ライト時の動作を示すタイミング波形図であ
る。
FIG. 6 is a timing waveform diagram showing the memory read/write operations described in sections (a) and (b) above.

外部回路15では、まず信号OHext=0とす
る。するとCPU11の内部では、前記(1)式に
より OHeff=OHiot・OHext=0 従つて信号OH2がアクテイブとなり、コン
ソール・ステート・カウンタ20がカウント・
アツプされ、第2図a及び第6図に示される如
くステート=1となる。上記OHeff=0によ
り、CPU11はホールト状態に入る。なおこ
こでCPUホールト状態とは、外部から見てホ
ールト状態、つまりプロセツサ部12がメモリ
ー14からプロセツサ部12内のインストラク
シヨン・レジスタにインストラクシヨンを取出
してこれを実行するということが止められる
が、前記擬似命令は実行できる状態にあること
は勿論である。
In the external circuit 15, the signal OH ext is first set to 0. Then, inside the CPU 11, according to equation (1) above, OH eff = OH iot・OH ext = 0 Therefore, the signal OH 2 becomes active, and the console state counter 20 starts counting.
As shown in FIG. 2a and FIG. 6, the state becomes 1. Due to the above OH eff =0, the CPU 11 enters the halt state. Note that the CPU halt state here means a halt state as seen from the outside, that is, the processor unit 12 is stopped from fetching an instruction from the memory 14 to the instruction register in the processor unit 12 and executing it. However, it goes without saying that the pseudo-instruction is in an executable state.

また外部回路15では、入力ラインSINから
メモリーアドレスつまりリード/ライトさせた
いメモリーアドレスを、正規のフオーマツトで
シリアル転送する。これにより入力ラインSIN
上に、スタート・ビツトなどの“0”情報がの
ると、CPU11内部ではアドレス・ストツプ
イネーブル信号ASTP―ENBが、第4図及び
第6図に示される如くクリアされる。前記メモ
リーアドレスはシフトレジスタ16内にあり、
また該レジスタ16にメモリーアドレスが正し
く受信された時DA=1,FE=0となつてDA
が立つから、カウンタ20がカウント・アツプ
されてステート=2となる。このとき、ステー
ト=1の状態でSIDA=1となるから、前記(イ)
項の擬似セーブ命令が発生される。
Further, the external circuit 15 serially transfers the memory address, that is, the memory address to be read/written from the input line SIN in a regular format. This allows input line SIN
When "0" information such as a start bit is placed therein, the address stop enable signal ASTP-ENB is cleared within the CPU 11 as shown in FIGS. 4 and 6. the memory address is within the shift register 16;
Also, when the memory address is correctly received in the register 16, DA = 1, FE = 0, and DA
stands, the counter 20 is counted up and becomes state=2. At this time, since SIDA=1 when state=1, the above (a)
A pseudo-save instruction for the term is generated.

この時CPU内部では、SIDA=1でかつ出力
ラインSOUTのTRBE=1となつた時点で、
第5図及び第6図に示される如くTRQACK=
1となる。ここでもし、通常の命令の処理を実
行中であればその処理が終つた後、前記発生さ
れた擬似セーブ命令の実質的な実行に入る。こ
れは、割込み受付時に一般のCPUにおいて行
なわれる処理と全く同様である。次に上記メモ
リーアドレスがメモリー14のリード/ライト
の為の擬似命令の場合は、メモリーアドレスが
付与されていないレジスタ(例えばPC28,
CCR,A等)がまず一定の順序に従い、一定
の間隔で、一定のフオーマツトに従つて出力ラ
インSOUTより送出される。最後にシフトレ
ジスタ16に格納されているアドレスに対応す
るメモリーデータが読出され、上記と同様にし
て出力ラインSOUTに送出される。この処理
が終ると自動的に信号ICLRが生成され、信号
TRQACKをクリアする。一方外部回路15で
は、前記TRQACK=1を見て、出力ライン
SOUT上にのるデータをPC,CCR,A及びメ
モリーデータと見なして順に拾い、表示処理等
を行なう。
At this time, inside the CPU, when SIDA = 1 and TRBE of the output line SOUT = 1,
As shown in Figures 5 and 6, TRQACK=
It becomes 1. Here, if normal instruction processing is being executed, after that processing is completed, the actual execution of the generated pseudo save instruction begins. This is exactly the same as the processing performed by a general CPU when accepting an interrupt. Next, if the above memory address is a pseudo-instruction for reading/writing the memory 14, registers to which no memory address is assigned (for example, PC28,
CCR, A, etc.) are first sent out from the output line SOUT in a certain order, at certain intervals, and in a certain format. Finally, the memory data corresponding to the address stored in the shift register 16 is read out and sent to the output line SOUT in the same manner as above. When this process is completed, the signal ICLR is automatically generated and the signal
Clear TRQACK. On the other hand, the external circuit 15 sees the TRQACK=1 and outputs the output line.
The data on SOUT is regarded as PC, CCR, A, and memory data, and is picked up in order, and display processing is performed.

― 外部回路15では、前記TRQACKのク
リアによる該信号の立下りを見て、新しいPC,
CCR,A及びメモリーデータを入力ラインSIN
より転送する。即ち信号TRQACKの立下り
を、次データの転送許可と見なしている。
CPU内部では、カウンタ20のステート=2
での信号SIDAの立上りにより、擬似リストア
命令を発生する。この命令の実行により、入力
ラインSINからのデータを順にPC28,CCR,
A及びメモリー14のもとあつた位置に格納す
る。この場合メモリー14以外のPC,CCR等
はメモリー・アドレスを与えられておらず、固
有の識別手段によつて識別される。信号
TRQACKは信号SIDAの立上りで“1”にな
り(TRBE=1)、擬似命令実行中に自動的に
発生される信号ICLRで1データ毎に低レベル
にされる。
- In the external circuit 15, the new PC,
CCR, A and memory data input line SIN
Transfer more. That is, the fall of the signal TRQACK is regarded as permission to transfer the next data.
Inside the CPU, the state of counter 20 = 2
When the signal SIDA rises at , a pseudo restore command is generated. By executing this instruction, data from the input line SIN is sent to PC28, CCR,
A and the memory 14 at the original location. In this case, PCs, CCRs, etc. other than the memory 14 are not given memory addresses and are identified by unique identification means. signal
TRQACK becomes "1" (TRBE=1) at the rising edge of signal SIDA, and is set to low level for each data by signal ICLR, which is automatically generated during pseudo-instruction execution.

外部回路15では、最後に生じる信号
TRQACKの立下りを見てOHext=1にする。
CPU内部では、前記OHext=1によりOHeff
立上り、従つて信号OH1がアクテイブとなつ
てカウンタ20がクリアされるものである。
In the external circuit 15, the last generated signal
Check the falling edge of TRQACK and set OH ext = 1.
Inside the CPU, OH eff rises due to the aforementioned OH ext =1, so the signal OH 1 becomes active and the counter 20 is cleared.

第7図は前記(C)項で述べたアドレス・ストツプ
時の動作を示すタイミング波形図である。この動
作も基本的に前記メモリー・リード/ライトの場
合と同様である。即ちこの場合は、外部信号
OHextでOHeffを低レベルとしてCPU11をホー
ルド状態とし、外部回路15からストツプ番地を
入力ラインSINでシフトレジスタ16にシリアル
転送しておき、第6図のに相当する′の位置
で、CPU11がPCデータを出力ラインSOUT上
に出し始めた時に、外部回路15でOHext=1に
して、第4図のロジツクによりアドレス・ストツ
プ・イネーブル信号ASTP―ENBを高レベル
(“1”レベル)にする。この時擬似セーブ命令処
理は、カウンタ20の値“0”(ステート=0)
であることを検知して、PCデータのみを掃き出
して処理を終了し、CPU11は通常の命令の実
行に戻る。これは、信号OHextを外部で制御して
メモリー・リード/ライトを中断できることによ
る。あとはシフトレジスタ16の値とPC28の
アドレス一致が生じるとEQU=1となり、第7
図ののタイミングで信号OHiotがリセツトされ、
OHeff=0となるから外部回路15は、この
OHeff=0を見てメモリー・リード/ライト等を
行なえばよい。この図では、入力ラインSINより
任意のデータを入れて通常の命令に復帰させてい
る。なおこの時ステート=0となつているため、
擬似命令が発生されることはない。また上記′
のタイミングでOHeff=1(CPUオペレーシヨン
状態)とCPUホールト時の擬似セーブ命令実行
が重なつているが、これはたとえOHeff=1とな
つても、擬似セーブ命令を終了してからでないと
次のCPU通常動作に戻れないからである。
FIG. 7 is a timing waveform diagram showing the operation at address stop mentioned in section (C) above. This operation is basically the same as the memory read/write described above. In other words, in this case, the external signal
OH ext sets OH eff to a low level, puts the CPU 11 in a hold state, and serially transfers the stop address from the external circuit 15 to the shift register 16 via the input line SIN. When PC data starts to be output on the output line SOUT, OH ext is set to 1 by the external circuit 15, and the address stop enable signal ASTP-ENB is set to high level (“1” level) by the logic shown in Figure 4. . At this time, the pseudo-save command processing is performed when the value of the counter 20 is "0" (state = 0).
Detecting this, only the PC data is flushed out, the process is terminated, and the CPU 11 returns to normal instruction execution. This is because the signal OH ext can be controlled externally to interrupt memory read/write. After that, when the value of the shift register 16 and the address of the PC 28 match, EQU=1, and the 7th
The signal OH iot is reset at the timing shown in the figure.
Since OH eff = 0, the external circuit 15
All you have to do is perform memory read/write, etc., while observing OH eff =0. In this figure, arbitrary data is input from the input line SIN to restore normal instructions. Note that at this time, the state is 0, so
No pseudo-instructions are issued. Also the above
At the timing of OH eff = 1 (CPU operation state) and the execution of a pseudo-save instruction during a CPU halt overlap, but even if OH eff = 1, this occurs only after the pseudo-save instruction has finished. This is because the CPU cannot return to normal operation.

上記構成による利点は、CPU11と外部回路
15間をつなぐ配線数が数本で済むため、最少の
ピン数でデバツグを含むモニタリングを行なえる
ことである。
The advantage of the above configuration is that only a few wires are required to connect the CPU 11 and the external circuit 15, so monitoring including debugging can be performed with a minimum number of pins.

なお本発明は実施例のみに限られるものではな
く、種々の応用が可能である。例えば出力ライン
SOUTを、CPU内のデータをコンソール用外部
回路に転送するためにのみ用いたが、他の用途に
共用してもよい。また実施例では、本構成をプロ
グラム・デバツグに用いたが、デバツグ段階での
見落しをデバツグすること、実装段階での検査、
故障発見などのモニタリングに用いることもでき
る。また実施例では、CPUホールト状態でデバ
ツグのためのメモリー・リード/ライトを行なつ
たが、CPUオペレーシヨン状態で行なうことも
できる。また実施例ではCPUをホールト状態に
してアドレス・ストツプのアドレス・データを
CPUに送出するようにしたが、必ずしもCPUを
ホールト状態にする必要はなく、これもCPUオ
ペレーシヨン状態で行なうことができる。
Note that the present invention is not limited to the embodiments only, and various applications are possible. For example, the output line
Although SOUT was used only to transfer data in the CPU to an external circuit for the console, it may also be used for other purposes. In addition, in the embodiment, this configuration was used for program debugging, but it is also useful for debugging oversights at the debugging stage, inspection at the implementation stage,
It can also be used for monitoring such as failure detection. Furthermore, in the embodiment, memory read/write for debugging was performed in the CPU halt state, but it can also be performed in the CPU operation state. In addition, in the embodiment, the CPU is put in a halt state and the address data of the address stop is
Although the data is sent to the CPU, it is not necessary to put the CPU in the halt state, and this can also be done while the CPU is in the operating state.

以上説明した如く本発明によれば、CPUとコ
ンソール用外部回路回をつなぐ配線数が極めて少
なくて済むため、最少のピン数でデバツグのため
のメモリー・リード/ライトが行なえる1チツ
プ・マイクロ・コンピユータが提供できるもので
ある。
As explained above, according to the present invention, the number of wires connecting the CPU and the external circuit for the console can be extremely small, so that memory read/write for debugging can be performed with the minimum number of pins. This is something that computers can provide.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を示すブロツク構成
図、第2図a,bは同構成の一部動作を示す信号
波形図、第3図aは同構成の一部詳細回路図、同
図bは同回路の動作を示す信号波形図、第4図、
第5図は第1図の構成の一部詳細回路図、第6
図,第7図は第1図の構成の動作を示す信号波形
図である。 11……CPU、12……プロセツサ部(演算
処理部)、14……RAM(データ・メモリー)/
ROM(プログラム・メモリー)、15……コンソ
ール用外部回路、16,29……シフトレジス
タ、17……コントロール部、19……擬似命令
発生ロジツク、20……コンソール・ステート・
カウンタ、SIN,SOUT……シリアル・データ転
送ライン。
FIG. 1 is a block configuration diagram showing an embodiment of the present invention, FIGS. 2a and 2b are signal waveform diagrams showing part of the operation of the same configuration, and FIG. 3a is a detailed circuit diagram of a part of the same configuration. Figure b is a signal waveform diagram showing the operation of the circuit, Figure 4,
Figure 5 is a partial detailed circuit diagram of the configuration shown in Figure 1;
7 are signal waveform diagrams showing the operation of the configuration shown in FIG. 1. 11...CPU, 12...Processor section (arithmetic processing section), 14...RAM (data memory)/
ROM (program memory), 15...external circuit for console, 16, 29...shift register, 17...control section, 19...pseudo-instruction generation logic, 20...console state
Counter, SIN, SOUT...serial data transfer line.

Claims (1)

【特許請求の範囲】[Claims] 1 演算処理部とプログラム・メモリー及びデー
タ・メモリーとを1チツプ内に内蔵してなり、少
くともデバツグを行なうためのコンソール用外部
回路とつながる1チツプ・マイクロ・コンピユー
タにおいて、前記コンソール用外部回路からシリ
アル転送されるアドレス・データを取込み記憶す
る第1の手段と、該手段へのデータ取込みを検出
する第2の手段と、該手段によるデータ取込み検
出動作及び前記アドレス・データに応じて少くと
も前記プログラム・メモリー或いはデータ・メモ
リーに記憶されたデータを掃出す第3の手段と、
該手段で掃出されたデータを前記コンソール用外
部回路へシリアル転送する第4の手段と、前記第
1の手段を介して前記外部回路から返還されるシ
リアル・データを少くとも元のメモリーに書込む
第5の手段とを具備したことを特徴とする1チツ
プ・マイクロ・コンピユータ。
1 In a one-chip microcomputer that has an arithmetic processing unit, program memory, and data memory built into one chip and is connected to an external console circuit for at least debugging, a first means for capturing and storing serially transferred address data; a second means for detecting data capture into the means; third means for purging data stored in program memory or data memory;
fourth means for serially transferring the data flushed by the means to the external circuit for the console; and writing the serial data returned from the external circuit via the first means to at least the original memory. A one-chip microcomputer characterized by comprising a fifth means for loading the computer.
JP8764281A 1981-06-08 1981-06-08 One-chip microcomputer Granted JPS57203162A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8764281A JPS57203162A (en) 1981-06-08 1981-06-08 One-chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8764281A JPS57203162A (en) 1981-06-08 1981-06-08 One-chip microcomputer

Publications (2)

Publication Number Publication Date
JPS57203162A JPS57203162A (en) 1982-12-13
JPS6346460B2 true JPS6346460B2 (en) 1988-09-14

Family

ID=13920632

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8764281A Granted JPS57203162A (en) 1981-06-08 1981-06-08 One-chip microcomputer

Country Status (1)

Country Link
JP (1) JPS57203162A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61269705A (en) * 1985-05-24 1986-11-29 Omron Tateisi Electronics Co Programmable controller
JPH02181237A (en) * 1989-01-06 1990-07-16 Hitachi Ltd Microprocessor
JPH10289126A (en) * 1997-04-15 1998-10-27 Fujitsu Ltd Microcontroller and repeater

Also Published As

Publication number Publication date
JPS57203162A (en) 1982-12-13

Similar Documents

Publication Publication Date Title
JP2597153B2 (en) Write protector
JP3105223B2 (en) Debug peripherals for microcomputers, microprocessors and core processor integrated circuits
US7131114B2 (en) Debugger breakpoint management in a multicore DSP device having shared program memory
US6101584A (en) Computer system and semiconductor device on one chip including a memory and central processing unit for making interlock access to the memory
US5263168A (en) Circuitry for automatically entering and terminating an initialization mode in a data processing system in response to a control signal
JPH048874B2 (en)
JP2595314B2 (en) IC card with erroneous writing prevention function
US4348722A (en) Bus error recognition for microprogrammed data processor
EP0679981A2 (en) Reset circuit of electronic device
JPH0743653B2 (en) Interrupt controller
US5933381A (en) Semiconductor integrated circuit having DRAM mounted on semiconductor chip
US5903912A (en) Microcontroller configured to convey data corresponding to internal memory accesses externally
EP0348240B1 (en) Microprocessor equipped with parity control unit on same chip
JP3202700B2 (en) Signal processing device
US10042692B1 (en) Circuit arrangement with transaction timeout detection
US4636945A (en) Microprocessor
JPH0724029B2 (en) Emulation device
JPH0159610B2 (en)
JP2559382B2 (en) Information processing device
JPS62179033A (en) Ic microprocessor
JPS6244284B2 (en)
US5860161A (en) Microcontroller configured to indicate internal memory accesses externally
US5673419A (en) Parity bit emulator with write parity bit checking
JPS6346460B2 (en)
US6550015B1 (en) Scalable virtual timer architecture for efficiently implementing multiple hardware timers with minimal silicon overhead