JP3937505B2 - Semiconductor device - Google Patents

Semiconductor device Download PDF

Info

Publication number
JP3937505B2
JP3937505B2 JP11492497A JP11492497A JP3937505B2 JP 3937505 B2 JP3937505 B2 JP 3937505B2 JP 11492497 A JP11492497 A JP 11492497A JP 11492497 A JP11492497 A JP 11492497A JP 3937505 B2 JP3937505 B2 JP 3937505B2
Authority
JP
Japan
Prior art keywords
ram
signal
write
circuit
cpu
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
JP11492497A
Other languages
Japanese (ja)
Other versions
JPH10307734A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP11492497A priority Critical patent/JP3937505B2/en
Publication of JPH10307734A publication Critical patent/JPH10307734A/en
Application granted granted Critical
Publication of JP3937505B2 publication Critical patent/JP3937505B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、CPU(central processing unit)と、データの保持に使用されるRAM(random access memory)と、CPUによりアクセスされる周辺回路とを備え、プログラム動作が可能な半導体装置に関する。
【0002】
【従来の技術】
プログラム動作が可能な半導体装置について、これを基板に実装した状態でプログラムをデバッグする方法として、デバッグツールを使用する方法と、デバッグツールを使用しない方法とがある。
【0003】
【発明が解決しようとする課題】
デバッグツールを使用する方法は、評価用端子を備えた半導体装置を基板に実装しなければならず、評価用のシステムの構成が実際の構成と異なってしまうという問題点があり、デバッグツールを使用しない方法においては、動作確認用のプログラムを追加しなければならないという問題点があった。
【0004】
本発明は、かかる点に鑑み、プログラム動作が可能な半導体装置であって、評価用端子を設けなくとも、また、動作確認用のプログラムを追加しなくとも、プログラム動作の確認を行うことができるようにした半導体装置を提供することを目的とする。
【0005】
【課題を解決するための手段】
本発明中、第1の発明(請求項1記載の半導体装置)は、CPUと、データの保持に使用されるRAMと、CPUによりアクセスされる周辺回路とを備える半導体装置において、CPUと周辺回路との間で伝送されるデータをRAMに書き込ませるようにRAMを制御することができるRAM制御回路を備えているというものである。
【0006】
本発明中、第1の発明によれば、CPUと周辺回路との間で伝送されるデータをRAMに書き込み、その内容を読み出すことにより、プログラム動作を確認することができる。
【0007】
本発明中、第2の発明(請求項2記載の半導体装置)は、第1の発明において、RAM制御回路は、CPUと周辺回路との間で伝送されるデータをRAMに書き込ませるようにRAMを制御する場合に、RAMに対して連続するアドレスを供給するRAMアドレス生成回路を備えているというものである。
【0008】
【発明の実施の形態】
図1は本発明の一実施形態の要部を示すブロック図である。図1中、10はCPU、11はデータの保持に使用されるRAMであり、RAM11において、ADDはアドレス入力端子、DATAはデータ入出力端子、RDはリード信号入力端子、WRはライト信号入力端子である。
【0009】
また、12、13、14は周辺回路であり、12はアドレス信号をデジタル信号に変換するAD変換器、13は調歩同期方式によるシリアルデータ伝送を扱うインタフェース・コントローラであるUART、14はタイマである。
【0010】
また、15はアドレス信号の伝送を行うアドレスバス、16はデータの伝送を行うデータバス、17はリード信号の伝送を行うリード信号線、18はライト信号の伝送を行うライト信号線である。
【0011】
この例では、リード信号及びライト信号は、「1」を活性論理値、「0」を非活性論理値とされている。
【0012】
また、19はRAM11の動作を制御するRAM制御回路であり、20はRAM書き込みモード設定信号RWMを出力してRAM書き込みモードの設定を行うRAM書き込みモード設定回路である。
【0013】
RAM書き込みモード設定信号RWMは、RAM書き込みモードを設定する場合には「1」とされ、RAM書き込みモードを設定しない場合、即ち、通常動作モードに設定する場合には「0」とされる。
【0014】
なお、RAM書き込みモードの設定、非設定の選択は、所定の外部端子に対する所定の信号の印加、あるいは、所定のレジスタに対する所定値の書き込み等により行われる。
【0015】
また、21はリード信号線17上のリード信号とライト信号線18上のライト信号とをOR処理するOR回路、22はRAM書み込みモード設定時にRAM11にアドレス信号を供給するRAMアドレス生成回路である。
【0016】
このRAMアドレス生成回路22は、書き込みモード設定信号RWM=「1」にされると、活性状態となり、初期値を0100Hとして、OR回路21の出力が「1」となるごとに、即ち、リード信号又はライト信号が「1」となるごとに1づつインクリメントするアドレスを生成して、これをRAM11に供給するように構成されている。
【0017】
また、23はリード信号線17上のリード信号又は接地電圧、即ち、「0」をRAM11のリード信号入力端子RDに供給する、トランジスタ回路により構成された切り換えスイッチである。
【0018】
この切り換えスイッチ23は、RAM書き込みモード設定信号RWM=「0」とされる場合には、リード信号線17上のリード信号をRAM11のリード信号入力端子RDに供給し、RAM書き込みモード設定信号RWM=「1」とされる場合には、「0」をRAM11のリード信号入力端子RDに供給するように構成されている。
【0019】
また、24はライト信号線18上のライト信号又はOR回路21の出力をRAM11のライト信号入力端子WRに供給する、トランジスタ回路により構成された切り換えスイッチである。
【0020】
この切り換えスイッチ24は、RAM書き込みモード設定信号RWM=「0」とされる場合には、ライト信号線18上のライト信号をRAM11のライト信号入力端子WRに供給し、RAM書き込みモード設定信号RWM=「1」とされる場合には、OR回路21の出力をRAM11のライト信号入力端子WRに供給するように構成されている。
【0021】
また、25はアドレスバス15上のアドレス又はRAMアドレス生成回路22から出力されるアドレスをRAM11のアドレス入力端子ADDに供給する、トランジスタ回路により構成された切り換えスイッチである。
【0022】
この切り換えスイッチ25は、RAM書き込みモード設定信号RWM=「0」とされる場合には、アドレスバス15上のアドレス信号をRAM11のアドレス入力端子ADDに供給し、RAM書き込みモード設定信号RWM=「1」とされる場合には、RAMアドレス生成回路22から出力されるアドレス信号をRAM11のアドレス入力端子ADDに供給するように構成されている。
【0023】
このように構成された本発明の一実施形態においては、RAM書き込み設定信号RWM=「0」の場合、即ち、通常動作モードに設定される場合には、RAM11は、リード信号入力端子RDにリード信号線17上のリード信号が供給され、ライト信号入力端子WRにライト信号線18上のライト信号が供給され、アドレス入力端子ADDにアドレスバス上のアドレス信号が供給される。
【0024】
この結果、RAM11は、リード信号=「1」、ライト信号=「0」とされる場合には、アドレスバス15上のアドレス信号が指定するアドレスのデータをデータバス16に出力し、リード信号=「0」、ライト信号=「1」とされる場合には、アドレスバス15上のアドレス信号が指定するアドレスにデータバス16上のデータを書き込むことになる。
【0025】
これに対して、RAM書き込み設定信号=「1」の場合、即ち、RAM書き込みモードに設定される場合には、RAM11は、リード信号入力端子RDに「0」が供給され、ライト信号入力端子WRにOR回路21の出力が供給され、アドレス入力端子ADDにRAMアドレス生成回路22から出力されるアドレス信号が供給される。
【0026】
したがって、この場合、RAM11は、リード信号又はライト信号のいずれかが「1」になると、RAMアドレス生成回路22が出力するアドレス信号が指定するアドレスにデータバス16上のデータを書き込むことになる。
【0027】
図2はRAM書き込みモードの第1使用例を説明するためのフローチャートであり、RAM書き込みモードの第1使用例では、まず、RAM書き込みモードに設定する(ステップS2−1)。
【0028】
次に、AD変換器12のフラグレジスタに01H を書き込み、AD変換器12によるAD変換動作を開始させ(ステップS2−2)、AD変換器12のフラグレジスタのリードを行う(ステップS2−3)。
【0029】
以後、AD変換器12のフラグレジスタに終了フラグ(81H)が立つまで、AD変換器12のフラグレジスタのリードを繰り返す(ステップS2−3、S2−4)。
【0030】
そして、AD変換器12のフラグレジスタに終了フラグ(81H)が立った場合(ステップS2−4でYESの場合)には、タイマ14のフラグレジスタに02H を書き込み、タイマ動作をスタートさせ(ステップS2−5)、タイマ14のフラグレジスタのリードを行う(ステップS2−6)。
【0031】
以後、タイマ14のフラグレジスタに終了フラグ(82H)が立つまで、タイマ14のフラグレジスタのリードを繰り返す(ステップS2−6、S2−7)。
【0032】
このようにすると、CPU10によりAD変換器12のフラグレジスタの内容がリードされるごとに、このリードデータは、RAM11に書き込まれることになり、その内容は、例えば、図3Aに示すようになる。
【0033】
また、CPU10によりタイマ14のフラグレジスタの内容がリードされるごとに、このリードデータは、RAM11に書き込まれることになり、その内容は、例えば、図3Bに示すようになる。
【0034】
したがって、このようにする場合には、RAM11の内容を読み出すことにより実際の命令実行数を知ることができるので、クロックをトレースすることにより、実際の命令実行数とクロックサイクル数とから命令実行時間を確認することができ、仕様との比較を行うことができる。
【0035】
図4はRAM書き込みモードの第2使用例を説明するためのフローチャートであり、RAM書き込みモードの第2使用例では、まず、通常動作モードに設定して、チャネルCH1についてAD変換器12にAD変換を行わせ(ステップS4−1)、AD変換終了後、RAM書き込みモードに設定して、CPU10にチャネルCH1についてのAD変換結果をリードさせる(ステップS4−2)。
【0036】
次に、通常動作モードにして、チャネルCH2についてAD変換器12にAD変換を行わせ(ステップS4−3)、AD変換終了後、RAM書き込みモードにして、CPU10にチャネルCH2についてのAD変換結果をリードさせる(ステップS4−4)。
【0037】
次に、通常動作モードにして、チャネルCH3についてAD変換器12にAD変換を行わせ(ステップS4−5)、AD変換終了後、RAM書き込みモードにして、CPU10にチャネルCH3についてのAD変換結果をリードさせる(ステップS4−6)。
【0038】
このようにすると、CPU10がAD変換結果をリードするごとに、そのリードデータがRAM11に書き込まれることになり、その内容は、例えば、図5に示すようになる。
【0039】
したがって、このようにする場合には、RAM11の内容を読み出すことにより、AD変換対象チャネルを変えながらAD変換を行うモードにおけるAD変換結果をテーブル化したデータ・テーブルを得ることができる。
【0040】
図6はRAM書き込みモードの第3使用例を説明するためのフローチャートであり、RAM書き込みモードの第3使用例では、まず、RAM書き込みモードに設定し(ステップS6−1)、続いて、1バイト目のUARTデータをUART13の送信バッファに設定する(ステップS6−2)。
【0041】
次に、RAM書き込みモードを解除して通常動作モードとし(ステップS6−3)、UART13の送信バッファに設定した1バイト目のUARTデータの送信を開始する(ステップS6−4)。
【0042】
そして、送信バッファのデータがロードされた場合には、UARTデータ設定許可割り込みフラグがアクティブとなるようにしておき(ステップS6−5)、割込みフラグをクリアし(ステップS6−6)、割り込み処理に移った時、再び、RAM書き込みモードを設定し(ステップS6−7)、UART3の送信バッファに2バイト目のUARTデータを設定する(ステップS6−8)。
【0043】
再び、RAM書き込みモードを解除して通常動作モードとし(ステップS6−9)、割り込み処理を終了させ、8バイト目のUARTデータの送信が終了するまで(ステップS6−10でYESとなるまで)、ステップS6−4〜6−10を繰り返す。
【0044】
このようにすると、UART13の送信バッファにUARTデータが設定されるごとに、このUARTデータがRAM11に書き込まれることになり、RAM11の内容は、例えば、図7に示すようになる。
【0045】
したがって、このようにする場合には、RAM11の内容を読み出すことにより、UART13の送信バッファに設定されたデータと、受信データとの比較を行うことができ、更には、RAM11の内容をデータテーブルとして、次回送信時に活用したりすることが可能となる。
【0046】
このように、本発明の一実施形態によれば、CPU10と、AD変換器12、UART13又はタイマ14との間で伝送されるデータをRAM11に書き込ませるようにRAM11を制御することができるRAM制御回路19を備えるとしたことにより、CPU10と、AD変換器12、UART13又はタイマ14との間で伝送されるデータをRAM11に書き込み、その内容を読み出すことによりプログラム動作の確認を行うことができるので、評価用端子を設ける必要がなく、動作確認用のプログラムを追加する必要もない。
【0047】
なお、本発明の一実施形態においては、RAMアドレス生成回路22は、1づつインクリメントするアドレスを生成するように構成した場合について説明したが、この代わりに、1づつディクリメントするアドレスを生成するように構成しても良い。
【0048】
【発明の効果】
以上のように、本発明によれば、CPUと周辺回路との間で伝送されるデータをRAMに書き込ませるようにRAMを制御することができるRAM制御回路を備えるという構成を採用したことにより、CPUと周辺回路との間で伝送されるデータをRAMに書き込み、その内容を読み出すことによりプログラム動作を確認することができるので、評価用端子を設ける必要がなく、動作確認用のプログラムを追加する必要もない。
【図面の簡単な説明】
【図1】本発明の一実施形態の要部を示す回路図である。
【図2】本発明の一実施形態におけるRAM書き込みモードの第1使用例を説明するためのフローチャートである。
【図3】本発明の一実施形態におけるRAM書き込みモードの第1使用例によりRAMに書き込まれるデータを示す図である。
【図4】本発明の一実施形態におけるRAM書き込みモードの第2使用例を説明するためのフローチャートである。
【図5】本発明の一実施形態におけるRAM書き込みモードの第2使用例によりRAMに書き込まれるデータを示す図である。
【図6】本発明の一実施形態におけるRAM書き込みモードの第3使用例を説明するためのフローチャートである。
【図7】本発明の一実施形態におけるRAM書き込みモードの第3使用例によりRAMに書き込まれるデータを示す図である。
【符号の説明】
17 リード信号線
18 ライト信号線
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a semiconductor device including a central processing unit (CPU), a random access memory (RAM) used for holding data, and a peripheral circuit accessed by the CPU and capable of performing a program operation.
[0002]
[Prior art]
Regarding a semiconductor device capable of performing a program operation, there are a method of using a debug tool and a method of not using a debug tool as a method of debugging a program in a state where the semiconductor device is mounted on a substrate.
[0003]
[Problems to be solved by the invention]
The method of using the debug tool has the problem that the configuration of the evaluation system must be different from the actual configuration because a semiconductor device with an evaluation terminal must be mounted on the substrate. However, there is a problem that an operation check program must be added.
[0004]
In view of the above, the present invention is a semiconductor device capable of performing a program operation, and can confirm a program operation without providing an evaluation terminal and without adding an operation confirmation program. It is an object of the present invention to provide a semiconductor device.
[0005]
[Means for Solving the Problems]
In the present invention, a first invention (semiconductor device according to claim 1) is a semiconductor device including a CPU, a RAM used for holding data, and a peripheral circuit accessed by the CPU. A RAM control circuit capable of controlling the RAM so as to write data transmitted to and from the RAM.
[0006]
According to the first aspect of the present invention, the program operation can be confirmed by writing the data transmitted between the CPU and the peripheral circuit to the RAM and reading the contents.
[0007]
According to a second aspect of the present invention (the semiconductor device according to the second aspect), in the first aspect of the invention, the RAM control circuit is configured to allow the RAM control circuit to write data transmitted between the CPU and the peripheral circuit to the RAM. When controlling the above, a RAM address generation circuit for supplying continuous addresses to the RAM is provided.
[0008]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing the main part of an embodiment of the present invention. In FIG. 1, 10 is a CPU, 11 is a RAM used to hold data. In RAM 11, ADD is an address input terminal, DATA is a data input / output terminal, RD is a read signal input terminal, and WR is a write signal input terminal. It is.
[0009]
Reference numerals 12, 13, and 14 are peripheral circuits, 12 is an AD converter that converts an address signal into a digital signal, 13 is an UART that is an interface controller that handles serial data transmission in an asynchronous manner, and 14 is a timer. .
[0010]
Further, 15 is an address bus for transmitting an address signal, 16 is a data bus for transmitting data, 17 is a read signal line for transmitting a read signal, and 18 is a write signal line for transmitting a write signal.
[0011]
In this example, the read signal and the write signal have “1” as an active logic value and “0” as an inactive logic value.
[0012]
Reference numeral 19 denotes a RAM control circuit for controlling the operation of the RAM 11, and reference numeral 20 denotes a RAM write mode setting circuit for setting a RAM write mode by outputting a RAM write mode setting signal RWM.
[0013]
The RAM write mode setting signal RWM is “1” when the RAM write mode is set, and is “0” when the RAM write mode is not set, that is, when the normal operation mode is set.
[0014]
The RAM write mode is set or not set by applying a predetermined signal to a predetermined external terminal or writing a predetermined value to a predetermined register.
[0015]
Reference numeral 21 denotes an OR circuit for ORing the read signal on the read signal line 17 and the write signal on the write signal line 18, and 22 is a RAM address generation circuit for supplying an address signal to the RAM 11 when the RAM write mode is set. is there.
[0016]
The RAM address generation circuit 22 is activated when the write mode setting signal RWM = “1”, and the initial value is set to 0100 H. Every time the output of the OR circuit 21 becomes “1”, that is, read Each time the signal or the write signal becomes “1”, an address that is incremented by 1 is generated and supplied to the RAM 11.
[0017]
Reference numeral 23 denotes a changeover switch constituted by a transistor circuit that supplies a read signal or ground voltage on the read signal line 17, that is, “0” to the read signal input terminal RD of the RAM 11.
[0018]
When the RAM write mode setting signal RWM = “0”, the changeover switch 23 supplies the read signal on the read signal line 17 to the read signal input terminal RD of the RAM 11 and the RAM write mode setting signal RWM =. When “1” is set, “0” is supplied to the read signal input terminal RD of the RAM 11.
[0019]
Reference numeral 24 denotes a change-over switch constituted by a transistor circuit that supplies the write signal on the write signal line 18 or the output of the OR circuit 21 to the write signal input terminal WR of the RAM 11.
[0020]
When the RAM write mode setting signal RWM = “0”, the changeover switch 24 supplies the write signal on the write signal line 18 to the write signal input terminal WR of the RAM 11 and the RAM write mode setting signal RWM =. When “1” is set, the output of the OR circuit 21 is supplied to the write signal input terminal WR of the RAM 11.
[0021]
Reference numeral 25 denotes a changeover switch constituted by a transistor circuit for supplying an address on the address bus 15 or an address output from the RAM address generation circuit 22 to the address input terminal ADD of the RAM 11.
[0022]
When the RAM write mode setting signal RWM = “0”, the changeover switch 25 supplies the address signal on the address bus 15 to the address input terminal ADD of the RAM 11 and the RAM write mode setting signal RWM = “1”. The address signal output from the RAM address generation circuit 22 is supplied to the address input terminal ADD of the RAM 11.
[0023]
In one embodiment of the present invention thus configured, when the RAM write setting signal RWM = “0”, that is, when the normal operation mode is set, the RAM 11 reads the read signal input terminal RD. A read signal on the signal line 17 is supplied, a write signal on the write signal line 18 is supplied to the write signal input terminal WR, and an address signal on the address bus is supplied to the address input terminal ADD.
[0024]
As a result, when the read signal = “1” and the write signal = “0”, the RAM 11 outputs the data at the address specified by the address signal on the address bus 15 to the data bus 16, and the read signal = When “0” and the write signal = “1”, the data on the data bus 16 is written to the address specified by the address signal on the address bus 15.
[0025]
In contrast, when the RAM write setting signal = “1”, that is, when the RAM write mode is set, the RAM 11 is supplied with “0” to the read signal input terminal RD, and the write signal input terminal WR. The output of the OR circuit 21 is supplied to the address input terminal ADD, and the address signal output from the RAM address generation circuit 22 is supplied to the address input terminal ADD.
[0026]
Therefore, in this case, when either the read signal or the write signal becomes “1”, the RAM 11 writes the data on the data bus 16 to the address specified by the address signal output from the RAM address generation circuit 22.
[0027]
FIG. 2 is a flowchart for explaining a first use example of the RAM write mode. In the first use example of the RAM write mode, first, the RAM write mode is set (step S2-1).
[0028]
Next, 01 H is written into the flag register of the AD converter 12 to start the AD conversion operation by the AD converter 12 (step S2-2), and the flag register of the AD converter 12 is read (step S2-3). ).
[0029]
Thereafter, the reading of the flag register of the AD converter 12 is repeated until the end flag (81 H ) is set in the flag register of the AD converter 12 (steps S2-3 and S2-4).
[0030]
Then, when the end flag in the flag register of the AD converter 12 (81 H) is set (YES at step S2-4), write 02 H flag register of the timer 14 starts a timer operation ( In step S2-5, the flag register of the timer 14 is read (step S2-6).
[0031]
Thereafter, until the end in the flag register of the timer 14 flags (82 H) stand, repeat the read flag register of the timer 14 (step S2-6, S2-7).
[0032]
In this way, every time the CPU 10 reads the contents of the flag register of the AD converter 12, the read data is written into the RAM 11, and the contents are as shown in FIG. 3A, for example.
[0033]
Each time the content of the flag register of the timer 14 is read by the CPU 10, the read data is written in the RAM 11, and the content is as shown in FIG. 3B, for example.
[0034]
Therefore, in this case, the actual instruction execution number can be known by reading the contents of the RAM 11, and therefore, by tracing the clock, the instruction execution time can be calculated from the actual instruction execution number and the clock cycle number. Can be confirmed and compared with the specifications.
[0035]
FIG. 4 is a flowchart for explaining a second use example of the RAM write mode. In the second use example of the RAM write mode, first, the normal operation mode is set and AD conversion is performed on the channel CH1 by the AD converter 12. (Step S4-1), after the AD conversion is completed, the RAM write mode is set, and the CPU 10 is caused to read the AD conversion result for the channel CH1 (step S4-2).
[0036]
Next, in the normal operation mode, the AD converter 12 performs AD conversion for the channel CH2 (step S4-3). After the AD conversion is completed, the RAM write mode is set, and the CPU 10 sends the AD conversion result for the channel CH2 to the CPU 10. Read (step S4-4).
[0037]
Next, in the normal operation mode, the AD converter 12 performs AD conversion for the channel CH3 (step S4-5). After the AD conversion is completed, the RAM write mode is set, and the CPU 10 sends the AD conversion result for the channel CH3. Read (step S4-6).
[0038]
In this way, every time the CPU 10 reads the AD conversion result, the read data is written into the RAM 11, and the contents are as shown in FIG. 5, for example.
[0039]
Therefore, in this case, by reading the contents of the RAM 11, it is possible to obtain a data table that tabulates AD conversion results in a mode in which AD conversion is performed while changing the AD conversion target channel.
[0040]
FIG. 6 is a flowchart for explaining the third usage example of the RAM writing mode. In the third usage example of the RAM writing mode, first, the RAM writing mode is set (step S6-1), and then 1 byte. The UART data of the eye is set in the transmission buffer of UART 13 (step S6-2).
[0041]
Next, the RAM write mode is canceled and the normal operation mode is set (step S6-3), and transmission of the first byte of UART data set in the transmission buffer of the UART 13 is started (step S6-4).
[0042]
When the data in the transmission buffer is loaded, the UART data setting permission interrupt flag is made active (step S6-5), the interrupt flag is cleared (step S6-6), and interrupt processing is performed. When it has moved, the RAM write mode is set again (step S6-7), and the second byte of UART data is set in the transmission buffer of UART3 (step S6-8).
[0043]
Again, the RAM write mode is canceled to enter the normal operation mode (step S6-9), the interrupt process is terminated, and transmission of the UART data of the eighth byte is completed (until YES in step S6-10). Steps S6-4 to 6-10 are repeated.
[0044]
In this way, every time UART data is set in the transmission buffer of the UART 13, this UART data is written into the RAM 11, and the contents of the RAM 11 are as shown in FIG. 7, for example.
[0045]
Therefore, in this case, by reading the contents of the RAM 11, it is possible to compare the data set in the transmission buffer of the UART 13 with the received data. Further, the contents of the RAM 11 can be used as a data table. It can be used at the next transmission.
[0046]
As described above, according to the embodiment of the present invention, the RAM control that can control the RAM 11 so that the data transmitted between the CPU 10 and the AD converter 12, the UART 13, or the timer 14 is written to the RAM 11. Since the circuit 19 is provided, data transmitted between the CPU 10 and the AD converter 12, the UART 13 or the timer 14 can be written to the RAM 11 and the program operation can be confirmed by reading the contents. There is no need to provide an evaluation terminal, and there is no need to add an operation check program.
[0047]
In the embodiment of the present invention, the case where the RAM address generation circuit 22 is configured to generate an address that is incremented by one has been described, but instead, an address that is decremented by one is generated. You may comprise.
[0048]
【The invention's effect】
As described above, according to the present invention, by adopting the configuration including the RAM control circuit that can control the RAM so that the data transmitted between the CPU and the peripheral circuit is written in the RAM, The program operation can be confirmed by writing the data transmitted between the CPU and the peripheral circuit to the RAM and reading the contents thereof, so there is no need to provide an evaluation terminal, and an operation confirmation program is added. There is no need.
[Brief description of the drawings]
FIG. 1 is a circuit diagram showing a main part of an embodiment of the present invention.
FIG. 2 is a flowchart for explaining a first usage example of a RAM write mode in an embodiment of the present invention.
FIG. 3 is a diagram illustrating data written to a RAM according to a first usage example of a RAM write mode according to an embodiment of the present invention.
FIG. 4 is a flowchart for explaining a second usage example of the RAM write mode according to the embodiment of the present invention.
FIG. 5 is a diagram showing data written to a RAM according to a second usage example of a RAM write mode according to an embodiment of the present invention.
FIG. 6 is a flowchart for explaining a third usage example of the RAM write mode according to the embodiment of the present invention.
FIG. 7 is a diagram showing data written to a RAM according to a third usage example of a RAM write mode according to an embodiment of the present invention.
[Explanation of symbols]
17 Read signal line 18 Write signal line

Claims (2)

CPUと、データの保持に使用されるRAMと、前記CPUによりアクセスされる周辺回路と、リード信号の伝送を行うリード信号線と、ライト信号の伝送を行うライト信号線を備える半導体装置において、
RAM書き込みモード時、前記CPUと前記周辺回路との間で伝送されるデータを前記RAMに書き込ませるように前記RAMを制御するRAM制御回路を備え
前記RAM制御回路は、
前記リード信号及び前記ライト信号を入力し、前記リード信号又は前記ライト信号が活性論理値の場合には活性論理値、前記リード信号及び前記ライト信号が非活性論理値の場合には非活性論理値となる信号を出力する論理回路と、
前記ライト信号又は前記論理回路の出力信号を前記RAMのライト信号入力端子に供給するスイッチ回路と、
通常動作モード時には、前記ライト信号を前記RAMのライト信号入力端子に供給し、前記RAM書き込みモード時には、前記論理回路の出力信号を前記ライト信号入力端子に供給するように前記スイッチ回路を制御するRAM書き込みモード設定回路を備えていることを特徴とする半導体装置。
In a semiconductor device including a CPU, a RAM used for holding data, a peripheral circuit accessed by the CPU , a read signal line for transmitting a read signal, and a write signal line for transmitting a write signal ,
A RAM control circuit for controlling the RAM so that data transmitted between the CPU and the peripheral circuit is written to the RAM in the RAM writing mode ;
The RAM control circuit
When the read signal and the write signal are input, and the read signal or the write signal is an active logic value, an active logic value, and when the read signal and the write signal are an inactive logic value, an inactive logic value A logic circuit that outputs a signal
A switch circuit for supplying the write signal or the output signal of the logic circuit to a write signal input terminal of the RAM;
A RAM that controls the switch circuit to supply the write signal to the write signal input terminal of the RAM in the normal operation mode and to supply an output signal of the logic circuit to the write signal input terminal in the RAM write mode. A semiconductor device comprising a write mode setting circuit .
前記RAM制御回路は、前記RAM書き込みモード時に、前記CPUと前記周辺回路との間で伝送されるデータを前記RAMに書き込ませるように前記RAMを制御する場合に、前記RAMに対して連続するアドレスを供給するRAMアドレス生成回路を備えていることを特徴とする請求項1記載の半導体装置。When the RAM control circuit controls the RAM so that data transmitted between the CPU and the peripheral circuit is written to the RAM in the RAM write mode , the RAM control circuit continuously addresses the RAM. 2. The semiconductor device according to claim 1, further comprising a RAM address generation circuit for supplying
JP11492497A 1997-05-06 1997-05-06 Semiconductor device Expired - Fee Related JP3937505B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11492497A JP3937505B2 (en) 1997-05-06 1997-05-06 Semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11492497A JP3937505B2 (en) 1997-05-06 1997-05-06 Semiconductor device

Publications (2)

Publication Number Publication Date
JPH10307734A JPH10307734A (en) 1998-11-17
JP3937505B2 true JP3937505B2 (en) 2007-06-27

Family

ID=14650039

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11492497A Expired - Fee Related JP3937505B2 (en) 1997-05-06 1997-05-06 Semiconductor device

Country Status (1)

Country Link
JP (1) JP3937505B2 (en)

Also Published As

Publication number Publication date
JPH10307734A (en) 1998-11-17

Similar Documents

Publication Publication Date Title
US6175890B1 (en) Device for efficiently handling interrupt request processes
JP3937505B2 (en) Semiconductor device
JP3449189B2 (en) Programmable controller
JPH07244650A (en) Digital signal processor
JP3544769B2 (en) Key telephone equipment
JP3068764U (en) Electronic equipment
US6970984B2 (en) Digital signal processor and modem using the same
JP4190969B2 (en) Bus arbitration system in bus system and AMBA
JPH04205118A (en) Data processing system
JPS6184705A (en) User's program modifying method of programmable controller
JP3350699B2 (en) Programmable controller
JP2007286673A (en) Information processor and information processing method
JPH04216152A (en) Backup controller
JP4684575B2 (en) Semiconductor device and control method thereof
JP2584903B2 (en) External device control method
JP3450549B2 (en) Image processing method and apparatus
JPH0659901A (en) Program loading system
JPH1011388A (en) Direct memory access controller
KR20000021959A (en) Apparatus and method for increasing processing capacity of processor for using eeprom
JP5564854B2 (en) Control device
JPH11149286A (en) Computer device, display controller, and system for bit block transfer processing of display data
JPH03167633A (en) Control method for interruption program
JPH11272642A (en) 1-chip microcomputer and start address setting method
JPH01193948A (en) System for controlling data transfer
JPH09160786A (en) Microprocessor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040309

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061012

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061017

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061218

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070306

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070319

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20100406

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20110406

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110406

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20110406

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120406

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140406

Year of fee payment: 7

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees