JP2003177934A - Digital signal processor - Google Patents

Digital signal processor

Info

Publication number
JP2003177934A
JP2003177934A JP2001379362A JP2001379362A JP2003177934A JP 2003177934 A JP2003177934 A JP 2003177934A JP 2001379362 A JP2001379362 A JP 2001379362A JP 2001379362 A JP2001379362 A JP 2001379362A JP 2003177934 A JP2003177934 A JP 2003177934A
Authority
JP
Japan
Prior art keywords
circuit
address
memory
program
value
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.)
Withdrawn
Application number
JP2001379362A
Other languages
Japanese (ja)
Inventor
Hiroaki Harada
裕章 原田
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2001379362A priority Critical patent/JP2003177934A/en
Publication of JP2003177934A publication Critical patent/JP2003177934A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a DSP which can add and correct a program with a small- capacity EEPROM. <P>SOLUTION: Comparing circuits 19a to 19n compare the value of a PC (program counter) 15a with addresses registered in registers 18a to 18n and output a coincidence detection signal to a control circuit 15 through a decision circuit 20 when a match is obtained. Consequently, the value of the PC 15a is set in a specified address in the EEPROM 11b and a performance program is switched from a processing program in a mask ROM 11a to a program for addition and correction in the EEPROM 11b. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、ディジタル信号処
理装置(以下、「DSP」という)、特に書き換え不可
能なメモリと書き換え可能な不揮発性メモリを備えたD
SPに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital signal processing device (hereinafter referred to as "DSP"), particularly a D having a non-rewritable memory and a rewritable nonvolatile memory.
It is about SP.

【0002】[0002]

【従来の技術】図2(a),(b)は、従来のDSPの
概略の構成図であり、同図(a)はハードウエアの構
成、及び同図(b)はソフトウエアの構成を示してい
る。このDSPは、図2(a)に示すように、マスクR
OM(Read Only Memory)1aとEEPROM(Electr
ically Erasable Programmable ROM)1bで構成さ
れたメモリ回路1を有している。マスクROM1aは、
このDSPで行う処理のプログラムとデータを格納した
ものであり、EEPROM1bは、このマスクROM1
aのプログラムの変更や追加部分を書き込むためのメモ
リである。
2. Description of the Related Art FIGS. 2A and 2B are schematic block diagrams of a conventional DSP. FIG. 2A shows a hardware configuration, and FIG. 2B shows a software configuration. Shows. As shown in FIG. 2A, this DSP has a mask R
OM (Read Only Memory) 1a and EEPROM (Electr
It has a memory circuit 1 configured by an erasably programmable programmable ROM) 1b. The mask ROM 1a is
The program and data for the processing performed by this DSP are stored, and the EEPROM 1b is the mask ROM 1
This is a memory for writing changes and additional parts of the program a.

【0003】メモリ回路1には、このメモリ回路1から
命令コード等のデータDATを読み出す読取回路2が接
続され、この読取回路2には、読み出された命令コード
を解読して該当する実行命令に復号する復号回路3が接
続されている。復号回路3には、復号された実行命令に
従って処理を実行する実行回路4及び制御回路5が接続
されている。制御回路5は、アドレスを指定するための
プログラム・カウンタ(以下、「PC」という)5aを
有し、読取回路2がメモリ回路1から読み出すアドレス
の順序や全体の動作の制御を行うものである。
A read circuit 2 for reading data DAT such as an instruction code from the memory circuit 1 is connected to the memory circuit 1, and the read circuit 2 decodes the read instruction code and executes the corresponding execution instruction. A decoding circuit 3 for decoding is connected to. The decoding circuit 3 is connected to an execution circuit 4 and a control circuit 5 that execute processing in accordance with the decoded execution instruction. The control circuit 5 has a program counter (hereinafter referred to as “PC”) 5a for designating an address, and controls the order of addresses read from the memory circuit 1 by the reading circuit 2 and the overall operation. .

【0004】また、このDSPは、制御回路5に対して
周期的あるいは設定されたタイミングで割り込みを行う
割込回路6、サブルーチンの戻り先のアドレス等を格納
するためのスタック7、及びEEPROM1bの書き込
みを行うための書込インタフェース8を有している。
The DSP also writes to the interrupt circuit 6 which interrupts the control circuit 5 periodically or at a set timing, the stack 7 for storing the return address of the subroutine, and the EEPROM 1b. It has a writing interface 8 for performing.

【0005】図2(b)は、マスクROM1aとEEP
ROM1bに格納されたソフトウエアの概略を示してい
る。なお、以下の説明では、分岐を伴わない一般的な命
令、分岐命令、及び無操作命令のニモニック・コード
を、それぞれINS、JMP、NOPと記載する。
FIG. 2B shows a mask ROM 1a and an EEP.
The outline of the software stored in the ROM 1b is shown. In the following description, mnemonic codes of general instructions that do not involve branching, branch instructions, and no-operation instructions are referred to as INS, JMP, and NOP, respectively.

【0006】例えば、マスクROM1aは、0000〜
0999番地が割り当てられ、0000番地から順次処
理プログラムが格納されている。但し、マスクROM1
aの処理プログラムの途中には、後で発見されるかも知
れないプログラムの誤り(バグ)や処理内容の追加に備
えて、要所要所にEEPROM1bの所定の番地への分
岐命令(JMPxxxx)が挿入されている。この図2
(b)の例では、0000番地、0100番地及び02
00番地に、それぞれEEPROM1bの1000番
地、1001番地及び1002番地に分岐する命令が格
納されている。
For example, the mask ROM 1a is 0000 to
Address 0999 is assigned, and processing programs are sequentially stored from address 0000. However, mask ROM1
In the middle of the processing program of a, a branch instruction (JMPxxxx) to a predetermined address of the EEPROM 1b is inserted at a required place in preparation for an error (bug) of a program that may be discovered later or addition of processing content. Has been done. This Figure 2
In the example of (b), addresses 0000, 0100 and 02
At address 00, instructions for branching to addresses 1000, 1001 and 1002 of the EEPROM 1b are stored.

【0007】一方、EEPROM1bは、1000〜1
299番地が割り当てられ、マスクROM1a中の処理
プログラムに対する変更や追加処理のプログラムが書き
込まれている。例えば、マスクROM1aの0000〜
0099番地の処理プログラムに変更がなければ、10
00番地には、0001番地への分岐命令(JMP00
01)が格納される。また、マスクROM1aの020
0番地以降の処理プログラムに変更がなければ、100
2番地には、0201番地への分岐命令(JMP020
1)が格納される。
On the other hand, the EEPROM 1b has 1000 to 1
Address 299 is assigned, and a program for changing or adding processing to the processing program in the mask ROM 1a is written therein. For example, mask ROM 1a 0000 to
10 if there is no change in the processing program at address 0099
At address 00, a branch instruction to address 0001 (JMP00
01) is stored. In addition, the mask ROM 1a 020
If there is no change in the processing program after address 0, 100
A branch instruction to address 0201 (JMP020
1) is stored.

【0008】この図2(b)の例では、マスクROM1
aの0181番地の命令(INS181X)を、別の命
令(INS181A)に変更するために、1001番地
に1003番地への分岐命令(JMP1003)が格納
されている。更に、1003〜1082番地には、01
01〜0180番地に対応するプログラムが格納され、
1083番地には変更後の命令(INS0181A)が
格納されている。そして、1084番地に、マスクRO
M1Aの0182番地への分岐命令(JMP0182)
が格納されている。
In the example of FIG. 2B, the mask ROM 1
In order to change the instruction (INS181X) at address 0181 of a to another instruction (INS181A), a branch instruction (JMP1003) to address 1003 is stored at address 1001. In addition, at addresses 1003 to 1082, 01
The program corresponding to addresses 01 to 0180 is stored,
The changed instruction (INS0181A) is stored at address 1083. Then, at 1084, the mask RO
Branch instruction to address 0182 of M1A (JMP0182)
Is stored.

【0009】次に、動作を説明する。DSPがリセット
されてPC5aに0000がセットされ、その後このD
SPの動作が開始すると、読取回路2によって、メモリ
回路1の0000番地のデータ(JMP1000)が読
み取られる。読取回路2で読み取られたデータは復号回
路3で解読され、その解読結果の命令が実行回路4及び
制御回路5に出力される。これによって、制御回路5で
はPC5aの値が分岐先の1000番地に書き換えられ
る。
Next, the operation will be described. The DSP is reset and 0000 is set in the PC5a, and then this D
When the operation of the SP is started, the reading circuit 2 reads the data at address 0000 (JMP1000) of the memory circuit 1. The data read by the reading circuit 2 is decoded by the decoding circuit 3, and the command resulting from the decoding is output to the execution circuit 4 and the control circuit 5. As a result, in the control circuit 5, the value of PC5a is rewritten to the branch destination address 1000.

【0010】読取回路2では、PC5aから与えられる
アドレス信号に基づいて、EEPROM1bの1000
番地のデータ(JMP0001)が読み取られる。読取
回路2で読み取られたデータは復号回路3で解読され、
その解読結果の命令が実行回路4及び制御回路5に出力
される。これにより、制御回路5ではPC5aの値が分
岐先のアドレスである0001に書き換えられる。
In the reading circuit 2, 1000 of the EEPROM 1b is read based on the address signal given from the PC 5a.
The address data (JMP0001) is read. The data read by the reading circuit 2 is decoded by the decoding circuit 3,
The instruction resulting from the decoding is output to the execution circuit 4 and the control circuit 5. As a result, in the control circuit 5, the value of the PC 5a is rewritten to 0001 which is the branch destination address.

【0011】読取回路2では、PC5aから与えられる
アドレスに基づいて、マスクROM1aの0001番地
のデータ(命令INS0001)が読み取られる。読取
回路2で読み取られたデータは復号回路3で解読され、
その解読結果の命令が実行回路4及び制御回路5に出力
される。復号回路3から出力された命令が分岐命令でな
ければ、実行回路4によって所定の処理が行われると共
に、制御回路5によってPC5aの値が1だけ増加され
る。これにより、PC5aの値は0002となる。
The reading circuit 2 reads the data (command INS0001) at address 0001 of the mask ROM 1a based on the address given from the PC 5a. The data read by the reading circuit 2 is decoded by the decoding circuit 3,
The instruction resulting from the decoding is output to the execution circuit 4 and the control circuit 5. If the instruction output from the decoding circuit 3 is not a branch instruction, the execution circuit 4 performs a predetermined process and the control circuit 5 increases the value of the PC 5a by one. As a result, the value of the PC 5a becomes 0002.

【0012】その後、マスクROM1aの0002〜0
099番地に格納された命令が順次読み取られて実行さ
れる。そして、0100番地の命令(JMP1001)
の実行により、PC5aの値が1001にセットされ、
EEPROM1bの1001番地へ分岐される。
After that, the mask ROM 1a 0002-0
The instructions stored at address 099 are sequentially read and executed. And the instruction at address 0100 (JMP1001)
The value of PC5a is set to 1001 by executing
It branches to the address 1001 of the EEPROM 1b.

【0013】EEPROM1bの1001番地には、1
003番地への分岐命令が格納されているので、PC5
aの値が1003にセットされ、EEPROM1bの1
003番地へ分岐される。そして、1003番地以降に
格納された命令が順次実行される。1083番地に格納
された変更後の命令(INS181A)が実行された
後、次の1084番地に格納された分岐命令(JMP0
182)が実行され、マスクROM1aの0182番地
へ戻る。
At address 1001 of the EEPROM 1b, 1
Since the branch instruction to address 003 is stored, PC5
The value of a is set to 1003, and 1 in EEPROM 1b
Branched to address 003. Then, the instructions stored at address 1003 and thereafter are sequentially executed. After the changed instruction (INS181A) stored in the 1083th address is executed, the branch instruction (JMP0) stored in the next 1084th address is executed.
182) is executed to return to the address 0182 of the mask ROM 1a.

【0014】このように、図2(a)のDSPでは、マ
スクROM1aに加えて、書き換え可能なEEPROM
1bを有しているので、プログラムの修正や変更に柔軟
に対応することができるようになっている。
As described above, in the DSP of FIG. 2A, in addition to the mask ROM 1a, a rewritable EEPROM
Since it has 1b, it is possible to flexibly cope with the correction and change of the program.

【0015】[0015]

【発明が解決しようとする課題】しかしながら、従来の
DSPでは、次のような課題があった。マスクROM1
aに格納するプログラムの要所要所に、EEPROM1
bへ分岐するための命令を予め埋め込んでおく必要があ
り、その配置を決めることが困難であった。また、EE
PROM1bには、マスクROM1aに埋め込まれた分
岐命令に対応して、マスクROM1aに戻るためのプロ
グラムを格納しておく必要があり、EEPROM1bの
使用量と処理時間の負担が増加していた。
However, the conventional DSP has the following problems. Mask ROM 1
EEPROM1 is stored in the key part of the program stored in a.
Since it is necessary to embed an instruction for branching to b in advance, it is difficult to determine the arrangement. Also, EE
It is necessary to store a program for returning to the mask ROM 1a in the PROM 1b corresponding to the branch instruction embedded in the mask ROM 1a, which increases the usage amount and processing time of the EEPROM 1b.

【0016】更に、例えば、図2(b)における100
3〜1083番地のように、EEPROM1bへの分岐
箇所(例えば、図2(b)における0100番地)から
変更を必要とする命令の位置(例えば、図2(b)にお
ける0180番地)までの処理を、EEPROM1b側
のプログラムとして実行する必要がある。このため、予
め埋め込んだ分岐命令の位置と、変更が必要になった命
令の位置が離れている場合を想定して、比較的容量の大
きなEEPROM1bを準備しておく必要があるという
課題があった。
Further, for example, 100 in FIG.
Like addresses 3 to 1083, processing from the branch point to the EEPROM 1b (for example, address 0100 in FIG. 2B) to the position of the instruction that needs to be changed (for example, address 0180 in FIG. 2B). , EEPROM1b side needs to be executed as a program. Therefore, there is a problem that it is necessary to prepare the EEPROM 1b having a relatively large capacity, assuming that the position of the branch instruction embedded in advance and the position of the instruction that needs to be changed are distant from each other. .

【0017】本発明は、前記従来技術が持っていた課題
を解決し、小容量のEEPROMでプログラムの変更や
修正が可能なDSPを提供するものである。
The present invention solves the problems of the prior art and provides a DSP capable of changing or modifying a program with a small capacity EEPROM.

【0018】[0018]

【課題を解決するための手段】前記課題を解決するため
に、本発明の内の第1の発明は、DSPにおいて、書き
換え不可能な第1メモリ及び書き換え可能な不揮発性の
第2メモリを有し、処理プログラムが格納された記憶回
路と、前記第1メモリの特定アドレスが登録された書き
換え可能な不揮発性のレジスタと、前記記憶回路から読
み出して実行する前記処理プログラムのアドレスが順次
格納されるPCと、前記PCの値と前記レジスタの値を
比較し、該PCの値が前記特定アドレスに一致したか否
かを検出する判定回路と、前記判定回路で一致が検出さ
れたときには前記第2メモリの所定のアドレスを前記P
Cにセットし、一致が検出されないときには前記処理プ
ログラムに基づいて該PCの値を更新する制御回路と、
前記PCの値に従って前記記憶回路から前記処理プログ
ラムを読み取る読取回路と、前記読取回路で読み取られ
た前記処理プログラムを解読して対応する実行命令に復
号する復号回路と、前記復号回路で復号された実行命令
を実行する実行回路とを備えている。
In order to solve the above problems, the first invention of the present invention provides a DSP having a non-rewritable first memory and a rewritable non-volatile second memory. Then, a storage circuit in which the processing program is stored, a rewritable nonvolatile register in which a specific address of the first memory is registered, and an address of the processing program to be read and executed from the storage circuit are sequentially stored. PC, a judgment circuit that compares the value of the PC with the value of the register, and detects whether the value of the PC matches the specific address, and the second circuit when the judgment circuit detects a match. The specified address of memory is set to P
A control circuit which sets to C and updates the value of the PC based on the processing program when no match is detected;
A reading circuit that reads the processing program from the storage circuit according to the value of the PC, a decoding circuit that decodes the processing program read by the reading circuit and decodes into a corresponding execution instruction, and a decoding circuit that is decoded by the decoding circuit. And an execution circuit that executes an execution instruction.

【0019】第2の発明は、第1の発明における読取回
路、復号回路及び実行回路を、それぞれが同一時間に並
列してパイプライン処理を行うように構成している。
According to a second aspect of the invention, the reading circuit, the decoding circuit and the execution circuit of the first aspect of the invention are arranged to perform pipeline processing in parallel at the same time.

【0020】第3の発明は、第1または第2の発明にお
けるレジスタを、第1メモリの複数の特定アドレスを登
録できるように構成している。
According to a third aspect of the invention, the register according to the first or second aspect of the invention is configured so that a plurality of specific addresses of the first memory can be registered.

【0021】本発明によれば、以上のようにDSPを構
成したので、次のような作用が行われる。制御回路によ
ってPCの値が順次セットされ、このPCの値に従って
記憶回路から処理プログラムが順次読み出され復号され
て実行される。ここで、PCの値がレジスタに登録され
た第1メモリの特定アドレスに一致すると、判定回路に
よって一致が検出され、更に制御回路によってこのPC
の値が第2メモリの所定のアドレスにセットされる。こ
れにより、実行アドレスは、第2メモリの所定のアドレ
スに切り換えられる。
According to the present invention, since the DSP is constructed as described above, the following operation is performed. The PC value is sequentially set by the control circuit, and the processing program is sequentially read from the storage circuit according to the PC value, decoded, and executed. Here, if the value of the PC matches the specific address of the first memory registered in the register, the determination circuit detects the match, and the control circuit further detects this PC.
Is set to a predetermined address in the second memory. As a result, the execution address is switched to the predetermined address in the second memory.

【0022】[0022]

【発明の実施の形態】図1は、本発明の実施形態を示す
DSPの構成図である。このDSPは、書き換えができ
ないマスクROM11aと電気的に消去及び書き込みが
可能なEEPROM11bで構成されるメモリ回路1
1、このメモリ回路11から命令コード等のデータを読
み出す読取回路12、この読取回路12で読み出された
命令コードを解読して該当する実行命令に復号する復号
回路13、及びこの復号回路13で復号された実行命令
に従って処理を実行する実行回路14を備えている。
1 is a block diagram of a DSP showing an embodiment of the present invention. This DSP is a memory circuit 1 including a non-rewritable mask ROM 11a and an electrically erasable and writable EEPROM 11b.
1, a reading circuit 12 for reading data such as an instruction code from the memory circuit 11, a decoding circuit 13 for decoding the instruction code read by the reading circuit 12 and decoding it into a corresponding execution instruction, and the decoding circuit 13 The execution circuit 14 is provided for executing processing according to the decoded execution instruction.

【0023】また、このDSPは、読取回路12がメモ
リ回路11から読み出すアドレスADRを指定するため
のPC15aを有し、処理の順序や全体の動作の制御を
行う制御回路15、この制御回路15に対して周期的あ
るいは設定されたタイミングで割り込みを行う割込回路
16、及びサブルーチンの戻り先のアドレス等を格納す
るためのスタック17を備えている。
Further, the DSP has a PC 15a for designating an address ADR read from the memory circuit 11 by the reading circuit 12, and a control circuit 15 for controlling the order of processing and the overall operation. On the other hand, it is provided with an interrupt circuit 16 that interrupts periodically or at a set timing, and a stack 17 for storing an address to which a subroutine returns.

【0024】更に、このDSPは、マスクROM11a
中の変更箇所等の特定アドレスを格納するための、電気
的に書き換えが可能な不揮発性のレジスタ(REG)1
8a,18b,…,18n、これらのレジスタ18a〜
18nとPC15aの内容をそれぞれ比較する比較回路
(CMP)19a,19b,…,19n、これらの比較
回路19a〜19nの比較結果に基づいて変更箇所か否
かを判定する判定回路20、及びEEPROM11bと
レジスタ18a〜18nの書き込みを行うための書込イ
ンタフェース21を備えている。
Further, this DSP has a mask ROM 11a.
An electrically rewritable non-volatile register (REG) 1 for storing a specific address such as a changed portion in
8a, 18b, ..., 18n, these registers 18a ...
18n and a comparison circuit (CMP) 19a, 19b, ..., 19n for comparing the contents of the PC 15a with each other, a determination circuit 20 for determining whether or not there is a change based on the comparison result of these comparison circuits 19a to 19n, and an EEPROM 11b. A write interface 21 for writing the registers 18a to 18n is provided.

【0025】マスクROM11aは、このDSPで行う
処理のプログラムとデータを格納したものであり、EE
PROM11bは、このマスクROM11aのプログラ
ムに対する変更や追加部分を書き込むためのメモリであ
る。読取回路12は、制御回路15からの制御に従っ
て、前の周期にメモリ回路11から読み取って保持して
いた命令を復号回路13に送ると同時に、この制御回路
15のPC15aで指定されるアドレスADRのデータ
DATを命令コードとしてメモリ回路11から読み取っ
て新たに保持するものである。
The mask ROM 11a stores programs and data for the processing performed by this DSP.
The PROM 11b is a memory for writing changes and additions to the program of the mask ROM 11a. Under the control of the control circuit 15, the reading circuit 12 sends the instruction read and held from the memory circuit 11 in the previous cycle to the decoding circuit 13 and, at the same time, the address ADR designated by the PC 15a of the control circuit 15 is read. The data DAT is read from the memory circuit 11 as an instruction code and newly held.

【0026】復号回路13は、読取回路12から送られ
てきた命令を解読して該当する実行命令を保持すると共
に、その前の周期に解読して保持しておいた実行命令を
実行回路14及び制御回路15に出力するものである。
実行回路14は、演算器、乗算器、アナログ・ディジタ
ル変換器等で構成され、復号回路13から与えられる実
行命令に従って所定の処理を実行するようになってい
る。これらの読取回路12、復号回路13及び実行回路
14は、それぞれが同一時間に並列して動作するパイプ
ライン処理を行うように構成されている。
The decoding circuit 13 decodes the instruction sent from the reading circuit 12 and holds the corresponding execution instruction, and also decodes and holds the execution instruction that was decoded and held in the previous cycle. It is output to the control circuit 15.
The execution circuit 14 is composed of an arithmetic unit, a multiplier, an analog / digital converter, etc., and executes a predetermined process in accordance with an execution instruction given from the decoding circuit 13. The reading circuit 12, the decoding circuit 13, and the execution circuit 14 are each configured to perform pipeline processing that operates in parallel at the same time.

【0027】図3は、図1のソフトウエアの概略を示す
説明図である。このソフトウエアは、マスクROM11
aとEEPROM11bに格納されている。例えば、マ
スクROM11aには、0000〜0999番地が割り
当てられ、0000番地から順次処理プログラムが格納
されている。この処理プログラム中には、EEPROM
11bへの分岐命令は組み込まれていない。
FIG. 3 is an explanatory diagram showing an outline of the software of FIG. This software is mask ROM11
a and the EEPROM 11b. For example, addresses 0000 to 0999 are allocated to the mask ROM 11a, and processing programs are sequentially stored from addresses 0000. During this processing program, the EEPROM
The branch instruction to 11b is not incorporated.

【0028】一方、EEPROM11bには、1000
〜1019番地が割り当てられ、マスクROM11a中
の処理プログラムに対する変更や追加処理のプログラム
が書き込まれている。例えば、マスクROM11aの0
204番地の命令(INS204X)と0205番地の
命令(INS205X)を、それぞれ命令(INS20
4A)と命令(INS205A)に変更する場合には、
EEPROM11bの1000番地に分岐命令(JMP
1010)が格納される。更に、1010,1011番
地には、変更後の命令(INS204A)と命令(IN
S205A)がそれぞれ格納され、1012番地に、マ
スクROM11aの0206番地へ戻るための分岐命令
(JMP0206)が格納される。
On the other hand, the EEPROM 11b has 1000
Addresses -1019 are assigned, and a program for changing or adding processing to the processing program in the mask ROM 11a is written therein. For example, 0 in the mask ROM 11a
The instruction at address 204 (INS204X) and the instruction at address 0205 (INS205X) are respectively issued as instructions (INS20
4A) and instruction (INS205A),
Branch instruction (JMP) to address 1000 of EEPROM 11b
1010) is stored. Further, at addresses 1010 and 1011, the changed command (INS204A) and the command (IN
S205A) are respectively stored, and a branch instruction (JMP0206) for returning to the address 0206 of the mask ROM 11a is stored in the address 1012.

【0029】更に、マスクROM11aの0204番地
において、EEPROM11bの1000番地へ分岐す
ることを登録するために、レジスタ18aの値は、02
04に設定される。これらのEEPROM11b及びレ
ジスタ18aの内容の変更は、書込インタフェース21
を介して図示しない書込装置等によって行われるように
なっている。
Further, at the address 0204 of the mask ROM 11a, the value of the register 18a is set to 02 in order to register the branch to the address 1000 of the EEPROM 11b.
It is set to 04. The contents of the EEPROM 11b and the register 18a are changed by changing the write interface 21.
Via a writing device (not shown).

【0030】図4は、図1の動作を示す説明図である。
以下、図3及び図4を参照しつつ、図1の動作を説明す
る。周期T000において、DSPがリセット状態のと
き、PC15aの値は0000にセットされ、読取回路
12及び復号回路13には無操作命令(NOP)がセッ
トされる。
FIG. 4 is an explanatory diagram showing the operation of FIG.
Hereinafter, the operation of FIG. 1 will be described with reference to FIGS. 3 and 4. In the cycle T000, when the DSP is in the reset state, the value of the PC 15a is set to 0000, and the no-operation instruction (NOP) is set to the reading circuit 12 and the decoding circuit 13.

【0031】周期T001において、DSPの動作が開
始すると、PC15aにセットされた値に従い、読取回
路12によってメモリ回路11の0000番地のデータ
(INS000)が読み取られて保持される。このと
き、復号回路13に保持されていた無操作命令(NO
P)は実行回路14へ出力されて保持され、読取回路1
2に保持されていた無操作命令(NOP)が、復号回路
13へ出力されて保持される。周期T001の後半で、
PC15aの値は1だけ増加され、0001となる。
When the operation of the DSP is started in the period T001, the reading circuit 12 reads and holds the data (INS000) at the address 0000 of the memory circuit 11 according to the value set in the PC 15a. At this time, the no-operation instruction (NO
P) is output to and held by the execution circuit 14, and the reading circuit 1
The no-operation instruction (NOP) held in 2 is output to the decoding circuit 13 and held therein. In the latter half of cycle T001,
The value of the PC 15a is increased by 1 and becomes 0001.

【0032】周期T002において、PC15aの値に
従って読取回路12によってメモリ回路11の0001
番地のデータ(INS001)が読み取られて保持され
る。このとき、復号回路13に保持されていた無操作命
令(NOP)は実行回路14へ出力されて保持され、読
取回路12に保持されていた命令(INS000)が、
復号回路13へ出力されて解読された後、保持される。
周期T002の後半で、PC15aの値は1だけ増加さ
れ、0002となる。
In the cycle T002, the reading circuit 12 reads 0001 of the memory circuit 11 according to the value of the PC 15a.
The address data (INS001) is read and held. At this time, the no-operation instruction (NOP) held in the decoding circuit 13 is output and held in the execution circuit 14, and the instruction (INS000) held in the reading circuit 12 is changed to
It is output to the decoding circuit 13, decoded, and then held.
In the latter half of the cycle T002, the value of the PC 15a is increased by 1 and becomes 0002.

【0033】周期T003において、PC15aの値に
従って読取回路12によってメモリ回路11の0002
番地のデータ(INS002)が読み取られて保持され
る。このとき、復号回路13に保持されていた命令(I
NS000)は実行回路14へ出力されて実行され、読
取回路12に保持されていた命令(INS001)が、
復号回路13へ出力されて解読された後、保持される。
周期T003の後半で、PC15aの値は1だけ増加さ
れ、0003となる。
In the cycle T003, the reading circuit 12 reads 0002 of the memory circuit 11 according to the value of the PC 15a.
The address data (INS002) is read and held. At this time, the instruction (I
NS000) is output to the execution circuit 14 and executed, and the instruction (INS001) held in the reading circuit 12 is
It is output to the decoding circuit 13, decoded, and then held.
In the latter half of the cycle T003, the value of the PC 15a is increased by 1 and becomes 0003.

【0034】このような動作により、マスクROM11
aに格納されている処理プログラムに従って、読取回路
12、復号回路13及び実行回路14によるパイプライ
ン処理が順次続行される。
By such an operation, the mask ROM 11
According to the processing program stored in a, the pipeline processing by the reading circuit 12, the decoding circuit 13, and the execution circuit 14 is sequentially continued.

【0035】周期T204において、PC15aの値が
0204になると、制御回路15から出力されるアドレ
ス信号ADRが0204となり、レジスタ18aに格納
されている値と一致する。これにより、比較器19aか
ら一致検出信号が出力され、判定回路20に与えられ
る。判定回路20では、どの比較器19から一致検出信
号が出力されたかが判定され、その判定結果が制御回路
15へ与えられる。
In the cycle T204, when the value of the PC 15a becomes 0204, the address signal ADR output from the control circuit 15 becomes 0204, which coincides with the value stored in the register 18a. As a result, the coincidence detection signal is output from the comparator 19a and given to the determination circuit 20. The determination circuit 20 determines which comparator 19 outputs the coincidence detection signal, and the determination result is given to the control circuit 15.

【0036】制御回路15では、判定回路20から与え
られた判定結果に基づいて、PC15aの値が変更され
る。この場合、PC15aには、マスクROM11aの
0204番地の変更プログラムに対応するEEPROM
11bのアドレスである1000がセットされる。ま
た、このとき、既に読取回路12によって読み取られて
いた0204番地の命令(INS204X)は、無操作
命令(NOP)に書き替えられる。
In the control circuit 15, the value of the PC 15a is changed based on the judgment result given from the judgment circuit 20. In this case, the PC 15a has an EEPROM corresponding to the change program at address 0204 of the mask ROM 11a.
The address 11b, 1000, is set. At this time, the command (INS204X) at address 0204 which has already been read by the reading circuit 12 is rewritten to the no-operation command (NOP).

【0037】周期T205において、PC15aの値に
従って読取回路12によってメモリ回路11の1000
番地のデータ(JMP1010)が読み取られて保持さ
れる。このとき、復号回路13に保持されていた命令
(INS203)は実行回路14へ出力されて実行さ
れ、読取回路12に保持されていた命令(NOP)が、
復号回路13へ出力されて解読された後、保持される。
周期T205の後半で、PC15aの値は1だけ増加さ
れ、1001となる。
In the cycle T205, the reading circuit 12 sets 1000 of the memory circuit 11 according to the value of the PC 15a.
The address data (JMP1010) is read and held. At this time, the instruction (INS203) held in the decoding circuit 13 is output to the execution circuit 14 and executed, and the instruction (NOP) held in the reading circuit 12 is changed to
It is output to the decoding circuit 13, decoded, and then held.
In the latter half of the cycle T205, the value of the PC 15a is increased by 1 and becomes 1001.

【0038】周期T206において、PC15aの値に
従って読取回路12によってメモリ回路11の1001
番地のデータ(INS1001=NOP)が読み取られ
て保持される。このとき、復号回路13に保持されてい
た命令(NOP)は実行回路14へ出力されて実行さ
れ、読取回路12に保持されていた命令(JMP101
0)が、復号回路13へ出力されて解読される。
In the cycle T206, the reading circuit 12 causes the memory circuit 111001 to operate in accordance with the value of the PC 15a.
The address data (INS1001 = NOP) is read and held. At this time, the instruction (NOP) held in the decoding circuit 13 is output to the execution circuit 14 and executed, and the instruction (JMP101) held in the reading circuit 12 is executed.
0) is output to the decoding circuit 13 and decoded.

【0039】解読された実行命令は、分岐命令であるの
で、その結果が制御回路15へ与えられ、PC15aの
値は分岐先のアドレスである1010に変更される。ま
た、読取回路12によって読み取られていた命令(IN
S1001)は無操作命令(NOP)に書き替えられ
る。このような処理により、EEPROM11bの10
10〜1012番地の処理が実行され、マスクROM1
1aの0206番地へ戻る。
Since the decoded execution instruction is a branch instruction, the result is given to the control circuit 15, and the value of the PC 15a is changed to the branch destination address 1010. In addition, the command (IN
S1001) is rewritten as a no-operation command (NOP). By such processing, the EEPROM 11b 10
The processing of addresses 10 to 1012 is executed, and the mask ROM 1
Return to address 0206 of 1a.

【0040】以上のように、本実施形態のDSPは、マ
スクROM11aからEEPROM11bへ分岐するア
ドレスをセットするためのレジスタ19a〜19nと、
PC15aの値とこれらのレジスタ19a〜19nの値
を比較して一致したときに、EEPROM11bの所定
のアドレスへ分岐させるための比較回路19a〜19n
及び判定回路20を有している。これにより、マスクR
OM11aの処理プログラムに、予めEEPROM11
bへの分岐命令を埋め込んでおく必要がなくなり、プロ
グラミング上の煩わしさを回避することができる。ま
た、不必要な分岐命令の実行が無くなり、処理速度を向
上させることができる。
As described above, the DSP of this embodiment has the registers 19a to 19n for setting the address branching from the mask ROM 11a to the EEPROM 11b,
The comparison circuits 19a to 19n for branching to a predetermined address of the EEPROM 11b when the value of the PC 15a and the values of these registers 19a to 19n are compared and coincident with each other.
And a determination circuit 20. Thereby, the mask R
The EEPROM 11 is previously set in the processing program of the OM 11a.
It is not necessary to embed a branch instruction to b, and the troublesomeness in programming can be avoided. In addition, unnecessary branch instructions are not executed, and the processing speed can be improved.

【0041】更に、必要な箇所だけをEEPROM11
bへの分岐して処理することができるので、大容量のE
EPROM11bを用意しておく必要がなくなるという
利点がある。
Furthermore, only the necessary parts are stored in the EEPROM 11
Since it can be processed by branching to b,
There is an advantage that it is not necessary to prepare the EPROM 11b.

【0042】なお、本発明は、上記実施形態に限定され
ず、種々の変形が可能である。この変形例としては、例
えば、次のようなものがある。 (a) メモリ回路11の容量は例示したものに限定さ
れず、処理に必要な容量のものを使用することができ
る。
The present invention is not limited to the above embodiment, and various modifications can be made. Examples of this modification include the following. (A) The capacity of the memory circuit 11 is not limited to the illustrated capacity, and the capacity necessary for processing can be used.

【0043】(b) DSPの全体構成は、例示したも
のに限定されない。例えば本実施形態では、読取回路1
2、復号回路13及び実行回路14がパイプライン処理
を行うように構成されているが、パイプライン処理を行
わない構成のDSPにも同様に適用可能である。
(B) The overall structure of the DSP is not limited to the illustrated one. For example, in the present embodiment, the reading circuit 1
2, the decoding circuit 13 and the execution circuit 14 are configured to perform pipeline processing, but the present invention can be similarly applied to a DSP having a configuration that does not perform pipeline processing.

【0044】(c) マスクROM11aからEEPR
OM11bへ分岐するアドレスをセットするために、複
数のレジスタ19a〜19nを有しているが、変更等が
ほとんど考えられない場合には、単一のレジスタ19の
みでも、同様に適用可能であり同様の利点が得られる。
(C) Mask ROM 11a to EEPR
Although a plurality of registers 19a to 19n are provided to set an address for branching to the OM 11b, if a change or the like is rarely considered, the single register 19 alone can be similarly applied. The advantages of

【0045】[0045]

【発明の効果】以上詳細に説明したように、第1の発明
によれば、第1メモリの特定アドレスを登録するレジス
タと、該レジスタの値とPCの値を比較する判定回路
と、該判定回路で一致が検出されたときに第2メモリの
所定のアドレスをこのPCにセットする制御回路を有し
ている。これにより、第1メモリの処理プログラム中に
第2メモリへの分岐命令を予め埋め込んでおく必要がな
くなり、プログラムの作成が容易になる。また、不必要
な分岐命令による処理時間の増加がなくなる。更に、任
意の特定アドレスから第2メモリへ分岐できるので、こ
の第2メモリの処理量、即ちメモリ容量を小さくするこ
とができる。
As described in detail above, according to the first invention, a register for registering a specific address of the first memory, a judgment circuit for comparing the value of the register with the value of PC, and the judgment circuit are provided. It has a control circuit for setting a predetermined address of the second memory in this PC when a match is detected in the circuit. As a result, it is not necessary to embed a branch instruction to the second memory in the processing program of the first memory in advance, which facilitates the creation of the program. Further, the processing time is not increased due to unnecessary branch instructions. Further, since it is possible to branch from the arbitrary specific address to the second memory, the processing amount of the second memory, that is, the memory capacity can be reduced.

【0046】第2の発明によれば、読取回路、復号回路
及び実行回路は、パイプライン処理を行うように構成さ
れている。これにより、処理速度を向上させることがで
きる。
According to the second aspect of the invention, the reading circuit, the decoding circuit and the execution circuit are configured to perform pipeline processing. Thereby, the processing speed can be improved.

【0047】第3の発明によれば、レジスタは、第1メ
モリの複数の特定アドレスを登録できるように構成して
いる。これにより、第1メモリの処理プログラム中の複
数箇所に対して、追加や変更の処理を行うことができ
る。
According to the third invention, the register is constructed so that a plurality of specific addresses of the first memory can be registered. As a result, it is possible to perform addition and change processing on a plurality of locations in the processing program of the first memory.

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

【図1】本発明の実施形態を示すDSPの構成図であ
る。
FIG. 1 is a configuration diagram of a DSP showing an embodiment of the present invention.

【図2】従来のDSPの概略の構成図である。FIG. 2 is a schematic configuration diagram of a conventional DSP.

【図3】図1のソフトウエアの概略を示す説明図であ
る。
3 is an explanatory diagram showing an outline of software of FIG. 1. FIG.

【図4】図1の動作を示す説明図である。FIG. 4 is an explanatory diagram showing the operation of FIG. 1.

【符号の説明】[Explanation of symbols]

11 メモリ回路 11a マスクROM 11b EEPROM 12 読取回路 13 復号回路 14 実行回路 15 制御回路 15a PC(プログラム・カウンタ) 18 レジスタ 19 比較回路 20 判定回路 21 書込インタフェース 11 Memory circuit 11a Mask ROM 11b EEPROM 12 reading circuit 13 Decoding circuit 14 Execution circuit 15 Control circuit 15a PC (program counter) 18 registers 19 Comparison circuit 20 Judgment circuit 21 Writing Interface

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 書き換え不可能な第1メモリ及び書き換
え可能な不揮発性の第2メモリを有し、処理プログラム
が格納された記憶回路と、 前記第1メモリの特定アドレスが登録された書き換え可
能な不揮発性のレジスタと、 前記記憶回路から読み出して実行する前記処理プログラ
ムのアドレスが順次格納されるプログラム・カウンタ
と、 前記プログラム・カウンタの値と前記レジスタの値を比
較し、該プログラム・カウンタの値が前記特定アドレス
に一致したか否かを検出する判定回路と、 前記判定回路で一致が検出されたときには前記第2メモ
リの所定のアドレスを前記プログラム・カウンタにセッ
トし、一致が検出されないときには前記処理プログラム
に基づいて該プログラム・カウンタの値を更新する制御
回路と、 前記プログラム・カウンタの値に従って前記記憶回路か
ら前記処理プログラムを読み取る読取回路と、 前記読取回路で読み取られた前記処理プログラムを解読
して対応する実行命令に復号する復号回路と、 前記復号回路で復号された実行命令を実行する実行回路
とを、 備えたことを特徴とするディジタル信号処理装置。
1. A memory circuit having a non-rewritable first memory and a rewritable non-volatile second memory, in which a processing program is stored, and a rewritable memory in which a specific address of the first memory is registered. A non-volatile register, a program counter in which the addresses of the processing programs read out from the storage circuit and executed are sequentially stored, a value of the program counter and a value of the register are compared, and a value of the program counter Determines whether or not the specified address matches the specific address, and sets a predetermined address of the second memory in the program counter when a match is detected by the determination circuit, and sets a predetermined address in the program counter when a match is not detected. A control circuit for updating the value of the program counter based on a processing program; A reading circuit that reads the processing program from the storage circuit according to a counter value, a decoding circuit that decodes the processing program read by the reading circuit and decodes into a corresponding execution instruction, and an execution that is decoded by the decoding circuit. A digital signal processing device comprising: an execution circuit that executes instructions.
【請求項2】 前記読取回路、前記復号回路及び前記実
行回路は、それぞれが同一時間に並列してパイプライン
処理を行うように構成したことを特徴とする請求項1記
載のディジタル信号処理装置。
2. The digital signal processing apparatus according to claim 1, wherein the reading circuit, the decoding circuit, and the execution circuit are configured to perform pipeline processing in parallel at the same time.
【請求項3】 前記レジスタは、前記第1メモリの複数
の特定アドレスを登録できるように構成したことを特徴
とする請求項1または2記載のディジタル信号処理装
置。
3. The digital signal processing apparatus according to claim 1, wherein the register is configured to be able to register a plurality of specific addresses of the first memory.
JP2001379362A 2001-12-13 2001-12-13 Digital signal processor Withdrawn JP2003177934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001379362A JP2003177934A (en) 2001-12-13 2001-12-13 Digital signal processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001379362A JP2003177934A (en) 2001-12-13 2001-12-13 Digital signal processor

Publications (1)

Publication Number Publication Date
JP2003177934A true JP2003177934A (en) 2003-06-27

Family

ID=19186767

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001379362A Withdrawn JP2003177934A (en) 2001-12-13 2001-12-13 Digital signal processor

Country Status (1)

Country Link
JP (1) JP2003177934A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011154505A (en) * 2010-01-27 2011-08-11 Seiko Epson Corp Arithmetic processing unit and arithmetic execution method
JP2014178938A (en) * 2013-03-15 2014-09-25 Semiconductor Energy Lab Co Ltd Semiconductor device
US9256495B2 (en) 2013-03-25 2016-02-09 Kabushiki Kaisha Toshiba Processing unit and error processing method
CN112700814A (en) * 2021-01-05 2021-04-23 潍柴动力股份有限公司 EEPROM data reading method, device, electric control equipment and medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011154505A (en) * 2010-01-27 2011-08-11 Seiko Epson Corp Arithmetic processing unit and arithmetic execution method
JP2014178938A (en) * 2013-03-15 2014-09-25 Semiconductor Energy Lab Co Ltd Semiconductor device
US9256495B2 (en) 2013-03-25 2016-02-09 Kabushiki Kaisha Toshiba Processing unit and error processing method
CN112700814A (en) * 2021-01-05 2021-04-23 潍柴动力股份有限公司 EEPROM data reading method, device, electric control equipment and medium

Similar Documents

Publication Publication Date Title
US20020188830A1 (en) Bit replacement and extraction instructions
US7243372B2 (en) Modified Harvard architecture processor having data memory space mapped to program memory space with erroneous execution protection
US20120089818A1 (en) Decoding instructions from multiple instructions sets
JP3563768B2 (en) ROM program change device
TW584800B (en) Method, computer and peripheral/expansion bus bridge for booting up with debug system
JP2875842B2 (en) Programmable controller
US7966480B2 (en) Register pointer trap to prevent errors due to an invalid pointer value in a register
KR970016872A (en) Programmable controller
JP2003177934A (en) Digital signal processor
US6981109B2 (en) Digital signal processor system having programmable random access memory that executes processing during downloading of a program
US20030126484A1 (en) Reduced power option
WO2001050251A1 (en) External microcode
JP2004126658A (en) Processor system
JP2003509769A (en) Method and apparatus for modifying microinstructions in static storage
JPH09505428A (en) Microcontroller with page address mode
JPS63156231A (en) Changing method for instruction in read-only memory
JP2002541582A (en) Method and system for updating user memory in an emulator system
JP3097602B2 (en) Data processing device
JP2576899B2 (en) Information processing device
US7003543B2 (en) Sticky z bit
JP3748191B2 (en) Computer and its control method
JP4151497B2 (en) Pipeline processing equipment
JP2001075798A (en) Information processor
JP3705263B2 (en) Sequencer
JPH0535499A (en) Data processing device and method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050301