JPH083797B2 - Microcomputer logic simulation method - Google Patents
Microcomputer logic simulation methodInfo
- Publication number
- JPH083797B2 JPH083797B2 JP61222147A JP22214786A JPH083797B2 JP H083797 B2 JPH083797 B2 JP H083797B2 JP 61222147 A JP61222147 A JP 61222147A JP 22214786 A JP22214786 A JP 22214786A JP H083797 B2 JPH083797 B2 JP H083797B2
- Authority
- JP
- Japan
- Prior art keywords
- port
- logic simulation
- input
- microcomputer
- data
- 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 - Lifetime
Links
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 この発明はマイコンの論理シミユレーシヨン方法に関
するものである。The present invention relates to a logic simulation method for a microcomputer.
第3図は従来のマイコンの論理シミユレーシヨン方法
を示す概念図であり、図において、1は1チツプマイコ
ン、1aはマイコンの入力ポート、2はROMアドレスバス1
b,ROMデータバス1cを介して1チップマイコン1に接続
された外部ROMであり、これらにより、論理シミユレー
シヨン対象回路10が構成されている。3はアセンブラ言
語で記述されたテストプログラム、4はテストプログラ
ム3を命令コードに変換するクロスアセンブラ、5は前
記命令コードを、外部ROM2へ格納する論理シミユレーシ
ヨン用コマンドを生成する変換プログラムである。FIG. 3 is a conceptual diagram showing a conventional logic simulation method of a microcomputer. In the figure, 1 is a 1-chip microcomputer, 1a is a microcomputer input port, and 2 is a ROM address bus 1.
b, an external ROM connected to the one-chip microcomputer 1 via the ROM data bus 1c, which constitutes a logic simulation target circuit 10. Reference numeral 3 is a test program written in assembler language, 4 is a cross assembler for converting the test program 3 into an instruction code, and 5 is a conversion program for generating a logic simulation command for storing the instruction code in the external ROM 2.
次に動作について説明する。テストプログラム3はク
ロスアセンブラ4により命令コードに変換される。変換
プログラム5は前記命令コードを、外部ROM2へ格納する
論理シミユレーシヨン用コマンドを生成する。Next, the operation will be described. The test program 3 is converted into an instruction code by the cross assembler 4. The conversion program 5 generates a logic simulation command for storing the instruction code in the external ROM 2.
1チツプマイコン1,外部ROM2のマイコンモデルを論理
シミユレーシヨンすると、外部ROM2より命令が入力さ
れ、1チツプマイコン1により処理される。When the microcomputer model of the 1-chip microcomputer 1 and the external ROM 2 is logically simulated, an instruction is input from the external ROM 2 and processed by the 1-chip microcomputer 1.
第4図はポート入力命令の動作概念図を示す。第4図
において、1チツプマイコン1にリセツト信号1gが入力
されると、プログラムカウンタ1eが動作し、ROMアドレ
スをROMアドレスバス1bへ出力し、外部ROM2より命令コ
ード2aがデータバス1cへ出る。CPU1dは、命令コード2a
を処理して、結果を出力ポート1hへ出力する。FIG. 4 shows a conceptual diagram of the operation of the port input instruction. In FIG. 4, when the reset signal 1g is input to the one-chip microcomputer 1, the program counter 1e operates to output the ROM address to the ROM address bus 1b and the instruction code 2a from the external ROM 2 to the data bus 1c. CPU1d, instruction code 2a
Is processed and the result is output to the output port 1h.
ポート入力命令の場合は、CPU1dはポートコントロー
ル信号1faを発生し、ポート入力ゲート1fbをオンして、
ポート1aに設定されたデータを読み込む。従つて、ポー
ト入力命令を論理シミユレーシヨンする場合、CPU1dが
発生するコントロール信号の出力タイミングに一致する
ように、入力ポート1aにデータを設定する必要がある。In case of the port input instruction, the CPU 1d generates the port control signal 1f a , turns on the port input gate 1f b ,
Read the data set in port 1a. Therefore, when the port input instruction is logically simulated, it is necessary to set the data in the input port 1a so as to match the output timing of the control signal generated by the CPU 1d.
第3図に示す方式は、ポート入力命令の論理シミユレ
ーシヨンにおいて、一度、ポート入力命令を論理シミユ
レーシヨンし、CPU1dが出力するコントロール信号(第
4図,1fa)の発生時刻をみた後、シミユレーシヨン用
コマンドにより人手でデータと時刻を指定して、再度、
論理シミユレーシヨンを実行することにより、テストプ
ログラム中のポート入力命令を順次シミユレーシヨンし
ていく方法である。The method shown in FIG. 3 is a logic simulation of a port input instruction, where the port input instruction is logically simulated once and the generation time of the control signal (1f a in FIG. 4) output by the CPU 1d is observed, and then the simulation command is executed. Manually specify the data and time by
This is a method of sequentially simulating port input instructions in a test program by executing logic simulation.
従来のマイコンの論理シミユレーシヨン方法は以上の
ように構成されているので、ポート入力命令一つ一つに
対して、順次、論理シミユレーシヨンを実行し、ポート
コントロール信号の出力時刻を見て、人手でポート・デ
ータと時刻を指定する必要がある。また、テストプログ
ラム中の全てのポート入力命令に対して、上記の指定時
刻を知るために、くり返し論理シミユレーシヨンを実行
しなければならず、論理シミユレーシヨン実行時間と人
手を要し、論理シミユレーシヨン期間が長いという問題
点があつた。Since the conventional microcomputer logic simulation method is configured as described above, the logic simulation is sequentially executed for each port input instruction, the port control signal output time is checked, and the port is manually input. -It is necessary to specify the data and time. In addition, it is necessary to execute the logic simulation repeatedly for all the port input instructions in the test program in order to know the specified time, which requires the logic simulation execution time and human labor, and the logic simulation period is long. There was a problem.
この発明は、上記のような問題点を解消するためにな
されたもので、テストプログラム中のポート入力命令に
対して、ポートにデータを設定する時刻を人手で指定せ
ず、論理シミユレーシヨン時にCPUから出るポートコン
トロール信号を利用して、論理シミユレーシヨン実行時
に自動的に入力ポートに順次データを設定可能な論理シ
ミユレーシヨン方法を得ることを目的とする。The present invention has been made to solve the above-mentioned problems. For a port input instruction in a test program, the CPU does not manually specify the time to set the data in the port, and the CPU does not operate at the time of logic simulation. It is an object of the present invention to obtain a logic simulation method capable of automatically setting sequential data to an input port when a logic simulation is executed by using an output port control signal.
この発明に係るマイコンの論理シミュレーション方法
は、テストプログラムをクロスアセンブラにより命令コ
ード・データに変換し、この命令コード・データを第1
の変換プログラムで論理シミュレーション用コマンドに
変換して、1チップマイコンに接続された第1の記憶手
段に格納し、前記テストプログラムの中のポート入力デ
ータを第2の変換プログラムで論理シミュレーション用
コマンドに変換して第1の記憶手段に格納し、ポート入
力命令があると前記1チップマイコンからポートコント
ロール信号を発生させ、このポートコントロール信号を
入力したカウンタからのアドレス信号に基づいて、必要
なデータを前記第2の記憶手段から読み出して、前記1
チップマイコンの入力ポートに設定するようにしたもの
である。A microcomputer logic simulation method according to the present invention converts a test program into instruction code data by a cross assembler, and converts the instruction code data into a first instruction code data.
Is converted into a command for logic simulation by the conversion program and stored in the first storage means connected to the one-chip microcomputer, and port input data in the test program is converted into a command for logic simulation by the second conversion program. The converted data is stored in the first storage means, and when there is a port input instruction, a port control signal is generated from the one-chip microcomputer, and the necessary data is generated based on the address signal from the counter to which this port control signal is input. Read from the second storage means,
It is designed to be set to the input port of the chip microcomputer.
この発明におけるポート入力命令に対するデータは、
あらかじめ論理シミユレーシヨン用のポートROMに蓄え
られ、テストプログラム中のポート入力命令が実行され
る毎に、CPUから発生するコントロール信号を入力して
カウントアツプするカウンタ回路により、順次、入力ポ
ートに自動的にデータを設定することにより、人手を必
要とせず、論理シミユレーシヨン期間を短縮する。The data for the port input command in this invention is
It is stored in the port ROM for logic simulation in advance, and every time the port input instruction in the test program is executed, the control circuit that receives the control signal from the CPU and counts it up is automatically and sequentially input to the input port. By setting the data, manpower is not required and the logic simulation period is shortened.
以下、この発明の一実施例を図について説明する。第
1図において、3aは新形式のテストプログラムであり、
ポート入力命令に対して外部より与えるポート・データ
が記述されている。4はテストプログラムの命令コード
を生成するクロスアセンブラ、5は前記命令コードを第
1の記憶手段としての外部ROM2へ格納するための論理シ
ミユレーシヨン・コマンドを生成する第1の変換プログ
ラムである。6は前記新形式のテストプログラムに記述
されたポート・データを読み、後述する第2の記憶手段
としてのポートROM7へ格納するための論理シミユレーシ
ヨン・コマンドを生成する第2の変換プログラムであ
る。An embodiment of the present invention will be described below with reference to the drawings. In Fig. 1, 3a is a new type of test program,
It describes the port data given externally to the port input instruction. Reference numeral 4 is a cross assembler for generating the instruction code of the test program, and 5 is a first conversion program for generating a logic simulation command for storing the instruction code in the external ROM 2 as the first storage means. Reference numeral 6 is a second conversion program for reading the port data described in the new format test program and generating a logical simulation command for storing it in the port ROM 7 as the second storage means described later.
1は1チツプマイコン、2は命令コードを格納するた
めの外部ROMであり、これらは前記第3図と同じ構成で
ある。7,8は論理シミユレーシヨン用モデル回路であ
り、7はポート入力命令に対するデータを蓄えたポート
ROM、8はCPU1dが発生するコントロール信号を入力する
カウンタ回路である。Reference numeral 1 is a 1-chip microcomputer, 2 is an external ROM for storing an instruction code, and these have the same configuration as in FIG. 7 and 8 are model circuits for logic simulation, and 7 is a port that stores data for port input instructions.
ROM and 8 are counter circuits for inputting control signals generated by the CPU 1d.
つぎに動作について説明する。新形式のテストプログ
ラム3aはクロスアセンブラ4に入力して命令コードに変
換した後、第1の変換プログラム5により、その命令コ
ードを外部ROM2へ格納するための論理シミュレーション
用第1コマンドに変換する。また上記テストプログラム
3aは第2変換プログラム6に入力して、テストプログラ
ム中に記述されたポート・データを、ポートROMへ格納
するための論理シミュレーション用第2コマンドに変換
する。Next, the operation will be described. The new format test program 3a is input to the cross assembler 4 and converted into an instruction code, and then the first conversion program 5 converts the instruction code into a logical simulation first command for storing it in the external ROM 2. Also the above test program
3a is input to the second conversion program 6 and converts the port data described in the test program into a second command for logical simulation for storing in the port ROM.
次いで、論理シミュレータを起動して、前記第1、第
2コマンドを実行し、前記外部ROMに命令コードを格納
すると共に前記ポートROMにポート・データを格納す
る。しかる後、リセット信号を与えることにより、外部
ROM2内の命令が順次実行される。Then, the logic simulator is activated to execute the first and second commands, store the instruction code in the external ROM, and store the port data in the port ROM. Then, by applying a reset signal, the external
The instructions in ROM2 are executed sequentially.
命令がポート入力命令であると、マイコン1内のCPU1
dはポートコントロール信号1faを発生する。このポート
コントロール信号1faは、外部のカウンタ回路8に入力
され、ポートROM用アドレスを出力する。従つて上記信
号1faと同期してポートROM7よりデータが読み出され、
データが入力ポート1aに設定される。If the instruction is a port input instruction, CPU1 in microcomputer 1
d generates the port control signal 1f a . The port control signal 1f a is input to the external counter circuit 8 and outputs the port ROM address. Therefore, data is read from the port ROM 7 in synchronization with the signal 1f a ,
Data is set to input port 1a.
以下、同様にして、ポート入力命令が実行される毎
に、カウンタ回路8によりポートROMアドレスがカウン
トアツプされて、データが入力ポート1aに設定される。Similarly, every time the port input instruction is executed, the counter circuit 8 counts up the port ROM address and sets the data in the input port 1a.
第2図はポート入力命令のポートが入出力(I/O)ポ
ートであつた場合の論理シミユレーシヨン方式を示すブ
ロツク図であり、第2図において、1AはI/Oポートであ
り、データ入力とデータ出力が、ポートコントロール信
号8a,8bによつて行なわれる。Fig. 2 is a block diagram showing the logic simulation method when the port of the port input instruction is an input / output (I / O) port. In Fig. 2, 1A is an I / O port and data input and Data output is performed by the port control signals 8a and 8b.
この場合、外部RAM9と、上記信号8a,8bにより適正なR
AMアドレスを計算するカウンタ回路8Aを付加する。この
カウンタ回路8Aはデータの書き込みが入力データ用のア
ドレスに対して行なわれないようにする必要がある。In this case, the external RAM 9 and the above signals 8a and 8b are used for proper R
A counter circuit 8A for calculating the AM address is added. The counter circuit 8A needs to prevent writing of data to an address for input data.
第1図,第2図において、ポート用ゲートのオン/オ
フタイミングを適正なものにするために、論理シミユレ
ーシヨン用モデル回路のゲート遅延をゼロにし、ポート
用ゲートの周辺にデイレイ(遅延)ゲートを付加しても
よい。In FIGS. 1 and 2, in order to make the on / off timing of the port gate appropriate, the gate delay of the logic simulation model circuit is set to zero and a delay gate is provided around the port gate. You may add.
以上のように、この発明によれば、CPUから出力され
るポートコントロール信号を利用して、論理シミユレー
シヨン実行時に自動的に入力ポートに順次データを設定
するように構成したので、ポート入力命令に対して、入
力ポートにデータを設定する時刻を知るために、何度も
論理シミユレーシヨンを実行する必要がなく、また、人
手でデータと時刻をコマンドにより指定する必要もなく
なる。従つて、論理シミユレーシヨン実行時間が少な
く、人手も不要となり、論理シミユレーシヨン期間を短
縮する効果がある。As described above, according to the present invention, the port control signal output from the CPU is used to automatically set the data sequentially to the input ports when the logic simulation is executed. Thus, it is not necessary to repeatedly execute the logical simulation to know the time to set the data in the input port, and it is not necessary to manually specify the data and the time by the command. Therefore, the logic simulation execution time is short, human labor is not required, and there is an effect that the logic simulation period is shortened.
第1図はこの発明の一実施例による論理シミユレーシヨ
ン方法を示すブロツク図、第2図は他の実施例による論
理シミユレーシヨン方法を示すブロツク図、第3図は従
来の論理シミユレーシヨン方法を示すブロツク図、第4
図はポート入力命令の動作を示す概念図である。 1は1チツプマイコン、1aは入力ポート、2は外部ROM
(第1の記憶手段)、5は第1の変換プログラム、6は
第2の変換プログラム、7はポートROM(第2の記憶手
段)、8はカウンタ。 なお、図中、同一符号は同一または相当部分を示す。1 is a block diagram showing a logic simulation method according to one embodiment of the present invention, FIG. 2 is a block diagram showing a logic simulation method according to another embodiment, and FIG. 3 is a block diagram showing a conventional logic simulation method. Fourth
The figure is a conceptual diagram showing the operation of a port input instruction. 1 is a 1 chip microcomputer, 1a is an input port, 2 is an external ROM
(First Storage Means) 5, 5 is a first conversion program, 6 is a second conversion program, 7 is a port ROM (second storage means), and 8 is a counter. In the drawings, the same reference numerals indicate the same or corresponding parts.
Claims (1)
2記憶手段を有する論理シミュレーション用モデル回路
と、前記マイコンをテストするテストプログラムとを備
えた1チップマイコンの論理シミュレーションにおい
て、 第1段階として、テストプログラムをクロスアセンブラ
に入力して命令コードに変換した後、第1の変換プログ
ラムにより、その命令コードを外部ROMへ格納するため
の論理シミュレーション用第1コマンドに変換し、 第2段階として、上記テストプログラムを第2変換プロ
グラムに入力して、テストプログラム中に記述されたポ
ート・データを、ポートROMへ格納するための論理シミ
ュレーション用第2コマンドに変換し、 第3段階として、論理シミュレータを起動して、前記第
1、第2コマンドを実行し、前記外部ROMに命令コード
を格納すると共に前記ポートROMにポート・データを格
納した後、 前記論理シミュレーション用モデル回路のマイコンをリ
セットすると、外部ROMに格納された命令を順次読み出
して実行し、ポート入力命令があると、前記1チップマ
イコンからポートコントロール信号を発生させ、このポ
ートコントロール信号をカウントしたカウンタからのア
ドレス信号に基づいて、必要なポート・データを前記第
2の記憶手段から読み出して、前記1チップマイコンの
入力ポートに設定することを特徴とするマイコンの論理
シミュレーション方法。1. A logic simulation of a one-chip microcomputer comprising a logic simulation model circuit having a first storage means and a second storage means connected to a microcomputer body, and a test program for testing the microcomputer. As a second step, the test program is input to the cross assembler and converted into an instruction code, and then the first conversion program converts the instruction code into the first command for logic simulation for storing in the external ROM. The test program is input to the second conversion program to convert the port data described in the test program into a second command for logic simulation for storing in the port ROM, and as a third step, a logic simulator. To execute the first and second commands, and execute the external R After the instruction code is stored in OM and the port data is stored in the port ROM, the microcomputer of the logic simulation model circuit is reset, the instructions stored in the external ROM are sequentially read and executed, and the port input instruction is executed. Then, a port control signal is generated from the one-chip microcomputer, and necessary port data is read from the second storage means on the basis of an address signal from a counter that counts the port control signal, and the one chip is read. A logic simulation method for a microcomputer, characterized by setting the input port of the microcomputer.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61222147A JPH083797B2 (en) | 1986-09-22 | 1986-09-22 | Microcomputer logic simulation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61222147A JPH083797B2 (en) | 1986-09-22 | 1986-09-22 | Microcomputer logic simulation method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6378243A JPS6378243A (en) | 1988-04-08 |
| JPH083797B2 true JPH083797B2 (en) | 1996-01-17 |
Family
ID=16777915
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61222147A Expired - Lifetime JPH083797B2 (en) | 1986-09-22 | 1986-09-22 | Microcomputer logic simulation method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH083797B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH04139539A (en) * | 1990-10-01 | 1992-05-13 | Alpine Electron Inc | Simulation method for microcomputer |
-
1986
- 1986-09-22 JP JP61222147A patent/JPH083797B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6378243A (en) | 1988-04-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS5933553U (en) | processor | |
| JPS63291134A (en) | Logically integrated circuit | |
| JPH083797B2 (en) | Microcomputer logic simulation method | |
| JPH0157824B2 (en) | ||
| JPH082727Y2 (en) | Programmable sequencer | |
| JP2758624B2 (en) | Speed control method of micro program | |
| JP2581214B2 (en) | Logic simulator | |
| JP2919841B2 (en) | Testing method for data processing equipment | |
| JP2536609B2 (en) | Bus selection circuit | |
| JPH04113469A (en) | Logic simulation processor | |
| JPH03250225A (en) | Logical simulation environment setting method | |
| JPH021572A (en) | Logical simulation method | |
| JPS6111493B2 (en) | ||
| JPH0226252B2 (en) | ||
| JPS6091454A (en) | Integrated circuit | |
| JPH05282395A (en) | Bidirectional pin input/output switching method for hardware simulator | |
| JPS61127004A (en) | Output unit of programmable controller | |
| JPS6368955A (en) | Input/output controller | |
| JPS61202238A (en) | Dynamic burn-in method for microprocessor | |
| JPS6370179A (en) | Logic ic tester | |
| JPH0223423A (en) | Unit arithmetic circuit for parallel arithmetic unit | |
| JPH06282601A (en) | Logical simulator | |
| JPS5920306U (en) | Sequencer speed-up device | |
| JPS6340905A (en) | Programmable controller | |
| JPS5944658B2 (en) | Program check circuit |