JP5003070B2 - Digital signal processor - Google Patents

Digital signal processor Download PDF

Info

Publication number
JP5003070B2
JP5003070B2 JP2006244890A JP2006244890A JP5003070B2 JP 5003070 B2 JP5003070 B2 JP 5003070B2 JP 2006244890 A JP2006244890 A JP 2006244890A JP 2006244890 A JP2006244890 A JP 2006244890A JP 5003070 B2 JP5003070 B2 JP 5003070B2
Authority
JP
Japan
Prior art keywords
memory
instruction
read
coefficient
instructions
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
JP2006244890A
Other languages
Japanese (ja)
Other versions
JP2008065718A (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.)
Yamaha Corp
Original Assignee
Yamaha Corp
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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP2006244890A priority Critical patent/JP5003070B2/en
Publication of JP2008065718A publication Critical patent/JP2008065718A/en
Application granted granted Critical
Publication of JP5003070B2 publication Critical patent/JP5003070B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Executing Machine-Instructions (AREA)

Description

この発明は、オーディオ機器等に好適なデジタル信号処理装置に関する。   The present invention relates to a digital signal processing apparatus suitable for audio equipment and the like.

周知の通り、DSP(Digital Signal Processor;デジタル信号処理装置)は、所定時間長のサンプリング周期毎に、入力オーディオサンプル列に対して所定の係数列を畳み込むための積和演算等、各種の演算処理を繰り返し実行する機能を有しており、様々な音場効果を入力オーディオサンプル列に付与するエフェクタ等に利用されている。なお、この種のDSPは、例えば特許文献1、2等に開示されている。最近、DSPは、携帯電話機等の小型の機器にも搭載されるようになってきている。このため、小規模であり、かつ、多彩な信号処理を実行することが可能なDSPが求められている。そして、このような要求を満たすため、信号処理の制御のためのプログラムをRAMに記憶し、このRAMに記憶されたプログラムを実行しつつ、それと並行してRAM内のプログラムを外部から書き換えることが可能な構成のDSP、あるいは信号処理に用いる係数列をRAMに記憶し、このRAMに記憶された係数列を用いて信号処理を実行しつつ、それと並行してRAM内の係数列を外部から書き換えることが可能な構成のDSPが提供されるに至った。この種のDSPによれば、RAM内のプログラムあるいは係数列を外部から書き換えることができるので、RAMの記憶容量が少ない場合でも、多彩な信号処理を実行させることができる。
特開平8−263297号公報 特開2002−73341号公報
As is well known, a DSP (Digital Signal Processor) performs various kinds of arithmetic processing such as a product-sum operation for convolving a predetermined coefficient sequence with an input audio sample sequence every sampling period of a predetermined time length. Is used for an effector or the like that gives various sound field effects to an input audio sample sequence. This type of DSP is disclosed in, for example, Patent Documents 1 and 2. Recently, DSPs have been installed in small devices such as mobile phones. For this reason, there is a demand for a DSP that is small and capable of executing various signal processing. In order to satisfy such a requirement, a program for controlling signal processing is stored in the RAM, and while executing the program stored in the RAM, the program in the RAM can be rewritten from the outside in parallel. A DSP having a possible configuration or a coefficient sequence used for signal processing is stored in a RAM, and signal processing is executed using the coefficient sequence stored in the RAM, and at the same time, the coefficient sequence in the RAM is rewritten from the outside. It has come to be provided with a DSP having a configuration that can be used. According to this type of DSP, a program or coefficient sequence in the RAM can be rewritten from the outside, so that various signal processing can be executed even when the storage capacity of the RAM is small.
JP-A-8-263297 JP 2002-73341 A

ところで、上述した従来のDSPでは、信号処理の実行のためにRAMからプログラムや係数列を読み出すことと並行してRAMに記憶されたプログラムや係数列を書き換えることを可能にするため、プログラムや係数列を記憶するためのRAMとしてデュアルポート構成のRAMを用いていた。このため、DSPのチップ上においてRAMの必要とする面積が広くなり、DSPをさらに小規模化、低コスト化する上での障害となっていた。   By the way, in the above-mentioned conventional DSP, in order to be able to rewrite the program and coefficient sequence stored in the RAM in parallel with reading the program and coefficient sequence from the RAM for executing signal processing, A dual port RAM is used as a RAM for storing the columns. For this reason, the area required for the RAM on the DSP chip is widened, which is an obstacle to further downsizing and cost reduction of the DSP.

この発明は、以上説明した事情に鑑みてなされたものであり、プログラムや係数列を記憶するRAMとして小規模なシングルポート構成のRAMを用いることができ、かつ、RAM内のデータ(プログラムや係数列)を利用した信号処理の実行と並行してRAM内のデータの書き換えが可能なDSPを提供することを目的としている。   The present invention has been made in view of the circumstances described above. A RAM having a small single port configuration can be used as a RAM for storing a program and a coefficient sequence, and data (programs and coefficients) in the RAM can be used. An object of the present invention is to provide a DSP capable of rewriting data in a RAM in parallel with the execution of signal processing using a column.

この発明は、複数のデータを各々記憶する複数のエリアを有するメモリと、前記メモリから複数のデータを読み出す制御を繰り返し行う読み出し制御手段と、前記メモリから読み出されたデータを使用した処理を行う処理手段と、前記メモリからの複数のデータの読み出しが行われてから次に前記メモリからの複数のデータの読み出しが行われるまでの間に前記メモリから読み出された複数のデータの少なくとも一部を前記処理手段に順次供給するデータ供給制御手段と、前記メモリからデータの読み出しが行われない期間を利用して、前記メモリへデータを書き込む制御を行う書き込み制御手段とを具備することを特徴とするデジタル信号処理装置を提供する。
かかる発明によれば、読み出し制御手段により、メモリから複数のデータを読み出す制御が繰り返され、データ供給制御手段により、メモリからの複数のデータの読み出しが行われてから次にメモリからの複数のデータの読み出しが行われるまでの間にメモリから読み出された複数のデータの少なくとも一部が処理手段に順次供給される。そして、書き込み制御手段により、メモリからデータの読み出しが行われない期間を利用して、メモリへデータを書き込む制御が行われる。従って、メモリとして小規模なシングルポートRAMを使用した場合においても、メモリ内のデータ(プログラムや係数列)を利用した信号処理の実行と並行してメモリ内のデータの書き換えを行うことができる。
The present invention performs a process using a memory having a plurality of areas each storing a plurality of data, a read control means for repeatedly reading a plurality of data from the memory, and a process using the data read from the memory Processing means and at least a part of the plurality of data read from the memory between the time when the plurality of data is read from the memory and the time when the next plurality of data is read from the memory Data supply control means for sequentially supplying data to the processing means, and write control means for performing control to write data into the memory using a period during which data is not read from the memory. A digital signal processing apparatus is provided.
According to this invention, the read control unit repeats the control of reading a plurality of data from the memory, and after the data supply control unit reads the plurality of data from the memory, the next plurality of data from the memory At least a part of the plurality of data read from the memory until the reading is performed is sequentially supplied to the processing means. Then, the write control means controls to write data to the memory using a period during which data is not read from the memory. Therefore, even when a small single-port RAM is used as the memory, the data in the memory can be rewritten in parallel with the execution of the signal processing using the data (program or coefficient sequence) in the memory.

以下、図面を参照し、この発明の実施の形態を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

<第1実施形態>
図1はこの発明の第1実施形態であるDSPの構成を示すブロック図である。
図1において、クロック発生部1は、所定周波数のクロックφを発生する回路である。このクロックφは、DSPの各部のタイミング制御に用いられる。プログラムメモリ2は、DSPが実行するプログラムの構成要素である一連の命令を記憶するメモリであり、1つのデータ入力ポートと、1つのデータ出力ポートと、1つのアドレスポートを有するシングルポートRAMにより構成されている。
<First Embodiment>
FIG. 1 is a block diagram showing the configuration of a DSP according to the first embodiment of the present invention.
In FIG. 1, a clock generator 1 is a circuit that generates a clock φ having a predetermined frequency. This clock φ is used for timing control of each part of the DSP. The program memory 2 is a memory for storing a series of instructions that are components of a program executed by the DSP, and is configured by a single port RAM having one data input port, one data output port, and one address port. Has been.

プログラムメモリ2は、各々2Nビット(Nは所定の複数)の記憶容量を有する複数のエリア(この例では128個のエリア)を有している。これらの各エリアは、各々固有のメモリアドレス(この例ではメモリアドレス「0」〜「127」)を有している。   The program memory 2 has a plurality of areas (128 areas in this example) each having a storage capacity of 2N bits (N is a predetermined plurality). Each of these areas has a unique memory address (memory addresses “0” to “127” in this example).

プログラムメモリ2の各エリアには、Nビットの命令が2個ずつ記憶される。これらの各命令は各々固有の命令アドレスを有している。図示のように、メモリアドレスがk(k=0、1、2、…)であるエリアには、上位Nビットのデータとして、命令アドレス2kの命令#2k(k=0、1、2、…)が記憶され、下位Nビットのデータとして、命令アドレス2k+1の命令#2k+1(k=0、1、2、…)が記憶される。   In each area of the program memory 2, two N-bit instructions are stored. Each of these instructions has a unique instruction address. As shown in the drawing, in the area where the memory address is k (k = 0, 1, 2,...), The instruction # 2k (k = 0, 1, 2,. ) And the instruction # 2k + 1 (k = 0, 1, 2,...) Of the instruction address 2k + 1 is stored as the lower N bits of data.

プログラムメモリ2からのデータ読み出しは、エリア単位(2Nビット単位)で実行可能である。すなわち、読み出し対象であるエリアのメモリアドレスを指定するメモリアドレスデータADRc(この例では7ビットのメモリアドレスデータ)がアドレスポートに与えられ、かつ、アクティブレベルの読み出し指令REが与えられたとき、プログラムメモリ2は、メモリアドレスデータADRcにより指定されたメモリアドレスのエリア内の2Nビットのデータをデータ出力ポートから出力する。読み出し指令REは、クロックφに同期してアクティブレベルとされるが、ジャンプ命令の実行時等の例外的な場合を除き、クロックφが2回発生する毎に1回の割合でアクティブレベルとされる。   Data reading from the program memory 2 can be executed in area units (2N bit units). That is, when memory address data ADRc (in this example, 7-bit memory address data) specifying the memory address of the area to be read is applied to the address port and an active level read command RE is applied, The memory 2 outputs 2N-bit data in the memory address area specified by the memory address data ADRc from the data output port. The read command RE is set to the active level in synchronization with the clock φ. However, except for exceptional cases such as when a jump instruction is executed, the read command RE is set to the active level once every time the clock φ is generated twice. The

一方、プログラムメモリ2へのデータ書き込みは、命令単位(Nビット単位)で実行可能である。さらに詳述すると、プログラムメモリ2へのデータ書き込み時、メモリアドレスデータADRcがプログラムメモリ2のアドレスポートに与えられ、Nビットの書き込みデータWDがプログラムメモリ2のデータ入力ポートに与えられ、さらにプログラムメモリ2には、アクティブレベルの書き込み指令WEと、領域指定信号U/Lが与えられる。領域指定信号U/LがLレベルである場合、書き込みデータWDは、メモリアドレスデータADRcにより指定されたメモリアドレスのエリアの上位Nビットの領域に書き込まれ、領域指定信号U/LがHレベルである場合、書き込みデータWDは、アドレスデータADRcにより指定されたメモリアドレスのエリアの下位Nビットの領域に書き込まれる。書き込み指令WEは、プログラムメモリ2に書き込むべきデータWDがあり、かつ、プログラムメモリ2からのデータ読み出しが行われないとき、クロックφに同期してアクティブレベルとされる。   On the other hand, data writing to the program memory 2 can be executed in units of instructions (in units of N bits). More specifically, when writing data to the program memory 2, the memory address data ADRc is applied to the address port of the program memory 2, the N-bit write data WD is applied to the data input port of the program memory 2, and the program memory 2, an active level write command WE and a region designation signal U / L are given. When area designating signal U / L is at L level, write data WD is written into the upper N bits of the memory address area designated by memory address data ADRc, and area designating signal U / L is at H level. In some cases, the write data WD is written to the lower N bits of the memory address area specified by the address data ADRc. The write command WE is set to an active level in synchronization with the clock φ when there is data WD to be written to the program memory 2 and data reading from the program memory 2 is not performed.

信号処理部3は、順次与えられる命令に従って、外部から与えられる入力信号に対して効果付与等の信号処理を施し、この信号処理により得られた信号を外部に出力する回路である。周知のDSPと同様、この信号処理部3は、効果付与等のためのフィルタ係数列を記憶した係数メモリ、入力信号に対するフィルタ係数列の畳み込み演算を行うための演算部、演算の途中結果を保持するためのRAM等を有している。この信号処理部3と、後述する読み出し制御部6内のアドレス設定部62は、メモリ(本実施形態ではプログラムメモリ2)から読み出されたデータ(本実施形態の場合は命令)を使用した処理を行う処理手段、より具体的にはメモリから読み出された命令を実行する命令実行手段を構成している。   The signal processing unit 3 is a circuit that performs signal processing such as effecting on an input signal given from the outside in accordance with a sequentially given command, and outputs a signal obtained by this signal processing to the outside. Similar to a known DSP, the signal processing unit 3 stores a coefficient memory that stores a filter coefficient sequence for applying an effect, a calculation unit for performing a convolution operation of the filter coefficient sequence on an input signal, and an intermediate result of the calculation. RAM and the like are provided. The signal processing unit 3 and an address setting unit 62 in the read control unit 6 to be described later are processes using data (commands in this embodiment) read from the memory (program memory 2 in the present embodiment). And more specifically, an instruction execution means for executing an instruction read from the memory.

プログラムメモリ2のデータ出力ポートとこの信号処理部3との間には、図示のようにレジスタ4とデータ選択手段であるセレクタ5とが介在している。プログラムメモリ2のデータ出力ポートから読み出される命令は、このレジスタ4とセレクタ5とからなる部分を介することにより、実行対象命令OPeとして信号処理部3に供給される。   Between the data output port of the program memory 2 and the signal processing unit 3, a register 4 and a selector 5 as data selection means are interposed as shown. An instruction read from the data output port of the program memory 2 is supplied to the signal processing unit 3 as an execution target instruction OPe through a portion including the register 4 and the selector 5.

さらに詳述すると、プログラムメモリ2のデータ出力ポートから出力される2Nビットのデータのうち上位Nビットを占める命令OP0はセレクタ5に供給され、下位Nビットを占める命令OP1は、セレクタ5に供給されるとともに、レジスタ4に供給される。このレジスタ4には、クロックφが与えられる。レジスタ4は、このクロックφの立ち上がり時点における命令OP1を保持し、この保持した命令OP1を命令OP1dとしてセレクタ5に出力する。   More specifically, the instruction OP0 occupying the upper N bits of the 2N-bit data output from the data output port of the program memory 2 is supplied to the selector 5, and the instruction OP1 occupying the lower N bits is supplied to the selector 5. And supplied to the register 4. The register 4 is supplied with a clock φ. The register 4 holds the instruction OP1 at the rising edge of the clock φ, and outputs the held instruction OP1 to the selector 5 as the instruction OP1d.

セレクタ5には、選択制御部10から2ビットからなる選択信号SEL2が与えられる。セレクタ5は、選択信号SEL2が「0」(=00B)であるときにはプログラムメモリ2のデータ出力ポートから出力される命令OP0を、選択信号SEL2が「1」(=01B)であるときにはレジスタ4から出力される命令OP1dを、選択信号SEL2が「2」(=10B)であるときにはプログラムメモリ2のデータ出力ポートから出力される命令OP1を選択し、選択した命令を実行対象命令OPeとして出力する。   The selector 5 is provided with a 2-bit selection signal SEL2 from the selection control unit 10. The selector 5 receives an instruction OP0 output from the data output port of the program memory 2 when the selection signal SEL2 is “0” (= 00B), and from the register 4 when the selection signal SEL2 is “1” (= 01B). When the selection signal SEL2 is “2” (= 10B), the instruction OP1 output from the data output port of the program memory 2 is selected, and the selected instruction is output as the execution target instruction OPe.

以上説明したレジスタ4およびセレクタ5と、選択制御部10は、メモリ(本実施形態の場合はプログラムメモリ2)からの複数のデータ(本実施形態の場合は命令)の読み出しが行われてから次にメモリからの複数のデータの読み出しが行われるまでの間にメモリから読み出された複数のデータの少なくとも一部を処理手段(本実施形態の場合は信号処理部3およびアドレス設定部62)に順次供給するデータ供給制御手段を構成している。   The register 4 and the selector 5 described above and the selection control unit 10 read a plurality of data (instructions in this embodiment) from the memory (in the case of this embodiment, the program memory 2), and then At least a part of the plurality of data read from the memory before the reading of the plurality of data from the memory is performed on the processing means (in this embodiment, the signal processing unit 3 and the address setting unit 62). Data supply control means for supplying sequentially is configured.

読み出し制御部6は、アドレスカウンタ61と、アドレス設定部62と、読み出し指令発生部63とを有している。アドレスカウンタ61は、カウント値のプリセットが可能な8ビットのアップカウンタであり、クロックφをカウントし、そのカウント値を読み出し命令アドレスADRaとして出力する。この読み出し命令アドレスADRaは、プログラムメモリ2から読み出すべき命令を特定する命令アドレスである。アドレス設定部62は、命令実行手段の一部をなす回路であり、セレクタ5からジャンプ命令が出力されたとき、その次のクロックφの立ち上がりに同期して、このジャンプ命令に含まれるジャンプ先の命令アドレスをアドレスカウンタ61にプリセットする回路である。   The read control unit 6 includes an address counter 61, an address setting unit 62, and a read command generation unit 63. The address counter 61 is an 8-bit up counter capable of presetting a count value, counts the clock φ, and outputs the count value as a read instruction address ADRa. The read instruction address ADRa is an instruction address that specifies an instruction to be read from the program memory 2. The address setting unit 62 is a circuit that forms part of the instruction execution means. When a jump instruction is output from the selector 5, the address setting unit 62 is synchronized with the next rising edge of the clock φ and the jump destination included in the jump instruction. This is a circuit for presetting an instruction address in the address counter 61.

読み出し指令発生部63は、上述した読み出し指令REを発生するとともに、読み出し指令REの発生しない期間を書き込み制御部8に知らせる書き込み許可信号ENを発生する回路である。この読み出し指令発生部63は、次のようにして読み出し指令REと書き込み許可信号ENを発生する。   The read command generation unit 63 is a circuit that generates the above-described read command RE and generates a write permission signal EN that informs the write control unit 8 of a period during which the read command RE does not occur. The read command generator 63 generates a read command RE and a write enable signal EN as follows.

a.クロックφがHレベルになったとき、読み出し命令アドレスADRaが奇数となり、かつ、そのときセレクタ5から出力されている命令がジャンプ命令でない場合
この場合、読み出し指令発生部63は、次のクロックφが立ち上がって読み出し命令アドレスADRaが偶数になったとき、所定期間に亙って読み出し指令REをアクティブレベル(Hレベル)とし、また、クロックφの1周期相当の期間、書き込み許可信号ENを非アクティブレベル(Lレベル)とする。
a. When the clock φ becomes H level, the read command address ADRa becomes an odd number, and the command output from the selector 5 at that time is not a jump command. In this case, the read command generator 63 determines that the next clock φ is When the read instruction address ADRa becomes an even number and rises, the read command RE is set to the active level (H level) for a predetermined period, and the write enable signal EN is set to the inactive level for a period corresponding to one cycle of the clock φ. (L level).

b.クロックφがHレベルになったとき、読み出し命令アドレスADRaが偶数となり、かつ、セレクタ5から出力されている命令がジャンプ命令でない場合
この場合、読み出し指令発生部63は、次のクロックφが立ち上がって読み出し命令アドレスADRaが奇数になったとき、クロックφの1周期相当の期間、書き込み許可信号ENをアクティブレベル(Hレベル)とする。
b. When the clock φ becomes H level, the read command address ADRa is an even number, and the command output from the selector 5 is not a jump command. In this case, the read command generator 63 causes the next clock φ to rise When the read instruction address ADRa becomes an odd number, the write enable signal EN is set to an active level (H level) for a period corresponding to one cycle of the clock φ.

c.クロックφがHレベルになったとき、セレクタ5から出力されている命令がジャンプ命令である場合
この場合、読み出し指令発生部63は、次にクロックφが立ち上がったとき、読み出し命令アドレスADRaが奇数になったか偶数になったかに拘わらず、所定期間に亙って、読み出し指令REをアクティブレベル(Hレベル)とし、また、クロックφの1周期相当の期間、書き込み許可信号ENを非アクティブレベル(Lレベル)とする。
c. When the clock φ becomes H level and the instruction output from the selector 5 is a jump instruction In this case, the read command generator 63 sets the read command address ADRa to an odd number when the clock φ rises next time. Regardless of whether or not it has become an even number, the read command RE is set to an active level (H level) for a predetermined period, and the write enable signal EN is set to an inactive level (L) for a period corresponding to one cycle of the clock φ. Level).

書き込みデータ受信部7は、プログラムメモリ2に書き込むべきデータ(すなわち、プログラムを構成する命令群)を、このDSPを制御する外部CPU(図示略)から受信する装置である。この書き込みデータ受信部7は、受信データを一時格納するFIFO(First−In First−Out)を内蔵している。書き込みデータ受信部7は、このFIFOに残存する受信データ量が減ってくると、データ要求を外部CPUに送り、外部CPUからデータを受信してFIFOに格納する。   The write data receiving unit 7 is a device that receives data to be written to the program memory 2 (that is, a group of instructions constituting the program) from an external CPU (not shown) that controls the DSP. The write data receiving unit 7 includes a FIFO (First-In First-Out) for temporarily storing received data. When the amount of received data remaining in the FIFO decreases, the write data receiving unit 7 sends a data request to the external CPU, receives data from the external CPU, and stores it in the FIFO.

書き込み制御部8は、外部CPUからプログラム書き換え要求を受け取ったとき、プログラムメモリ2に書き込むべきデータを書き込みデータ受信部7により受信し、プログラムメモリ2に書き込むための制御を行う回路である。ここで、プログラム書き換え要求は、プログラムメモリ2に書き込むべき命令群の中の先頭の命令の命令アドレスADRsと、この命令群を構成する命令の個数Ncomを含んでいる。書き込み制御部8は、プログラム書き換え要求を受け取ると、命令アドレスADRsと命令の個数Ncomを内蔵のレジスタに格納して、書き込みデータ受信部7に外部CPUからのデータの受信およびFIFOへの格納を開始させる。以後、書き込み制御部8は、書き込み許可信号ENがアクティブレベル(Hレベル)となる毎に、書き込みデータ受信部7によって外部CPUから受信されたデータをプログラムメモリ2に書き込むための制御を行う。   The write control unit 8 is a circuit that receives data to be written to the program memory 2 by the write data receiving unit 7 when receiving a program rewrite request from the external CPU and performs control for writing to the program memory 2. Here, the program rewrite request includes the instruction address ADRs of the first instruction in the instruction group to be written in the program memory 2 and the number Ncom of instructions constituting this instruction group. Upon receiving the program rewrite request, the write control unit 8 stores the instruction address ADRs and the number of instructions Ncom in a built-in register, and starts receiving data from the external CPU in the write data receiving unit 7 and storing it in the FIFO. Let Thereafter, the write control unit 8 performs control for writing the data received from the external CPU by the write data receiving unit 7 to the program memory 2 every time the write enable signal EN becomes the active level (H level).

さらに詳述すると、書き込み制御部8は、書き込み許可信号ENがアクティブレベル(Hレベル)となる毎に、ADRsから始まるNcom個の書き込み命令アドレスADRbを1個ずつ順次発生するとともに、書き込みデータ受信部7のFIFOにリードクロックRDCKを送って同FIFO内の受信データを古いものから順に読み出し、書き込みデータWDとしてプログラムメモリ2のデータ入力ポートに供給する。ここで、書き込み命令アドレスADRbは、8ビットのアドレスであり、そのLSBは上述した領域指定信号U/Lとしてプログラムメモリ2に供給される。また、書き込み制御部8は、書き込み命令アドレスADRbを発生し、かつ、書き込みデータWDをプログラムメモリ2のデータ入力ポートに供給するとき、クロックφに同期させて、書き込み指令WEを所定期間に亙ってアクティブレベル(Hレベル)とする。また、書き込み制御部8は、書き込み命令アドレスADRbを発生し、かつ、書き込みデータWDをプログラムメモリ2のデータ入力ポートに供給するときに限って、セレクタ9に与える選択信号SEL1をHレベルとし、それ以外の期間は選択信号SEL1をLレベルとする。   More specifically, the write control unit 8 sequentially generates Ncom write command addresses ADRb starting from ADRs one by one every time the write enable signal EN becomes an active level (H level), and a write data receiving unit. The read clock RDCK is sent to the FIFO 7 and the received data in the FIFO is read in order from the oldest, and supplied to the data input port of the program memory 2 as the write data WD. Here, the write command address ADRb is an 8-bit address, and the LSB thereof is supplied to the program memory 2 as the region designation signal U / L described above. The write control unit 8 generates the write command address ADRb and supplies the write command WE for a predetermined period in synchronization with the clock φ when supplying the write data WD to the data input port of the program memory 2. The active level (H level). The write control unit 8 sets the selection signal SEL1 to be supplied to the selector 9 to the H level only when the write command address ADRb is generated and the write data WD is supplied to the data input port of the program memory 2. During other periods, the selection signal SEL1 is set to L level.

セレクタ9は、選択信号SEL1がLレベルであるときには、アドレスカウンタ61から出力される読み出し命令アドレスADRaを選択し、選択信号SEL1がHレベルであるときには、書き込み制御部8から出力される書き込み命令アドレスADRbを選択し、選択した8ビットの読み出し命令アドレスADRaまたは書き込み命令アドレスADRbの上位7ビットをメモリアドレスデータADRcとしてプログラムメモリ2に供給する回路である。   The selector 9 selects the read command address ADRa output from the address counter 61 when the selection signal SEL1 is at the L level, and the write command address output from the write control unit 8 when the selection signal SEL1 is at the H level. This is a circuit that selects ADRb and supplies the upper 7 bits of the selected 8-bit read instruction address ADRa or write instruction address ADRb to the program memory 2 as memory address data ADRc.

このセレクタ9と、上述した読み出し制御部6は、メモリ(本実施形態の場合はプログラムメモリ2)から複数のデータ(本実施形態の場合は命令)を読み出す制御を繰り返し行う読み出し制御手段を構成している。また、このセレクタ9と、上述した書き込み制御部8は、メモリ(本実施形態の場合はプログラムメモリ2)からデータ(本実施形態の場合は命令)の読み出しが行われない期間を利用して、同メモリへデータを書き込む制御を行う書き込み制御手段を構成している。   The selector 9 and the above-described read control unit 6 constitute read control means for repeatedly controlling a plurality of data (commands in this embodiment) to be read from the memory (program memory 2 in this embodiment). ing. Further, the selector 9 and the write control unit 8 described above use a period in which data (instruction in this embodiment) is not read from the memory (in the case of this embodiment, the program memory 2), Write control means for controlling writing data into the memory is configured.

選択制御部10は、読み出し命令アドレスADRaを監視し、監視結果に基づいてセレクタ5の切り換え制御を行う回路である。ジャンプ命令が実行される場合を除き、アドレスカウンタ61が出力する読み出し命令アドレスADRaは、クロックφに同期して「1」ずつ増加する。この場合、選択制御部10は、増加後の読み出し命令アドレスADRaが偶数であれば、選択信号SEL2を「0」として、プログラムメモリ2のデータ出力ポートから出力される命令OP0をセレクタ5に選択させ、増加後の読み出し命令アドレスADRaが奇数であれば、選択信号SEL2を「1」として、レジスタ4から出力される命令OP1dをセレクタ5に選択させる。また、ジャンプ命令が実行され、アドレス設定部62によりジャンプ先の命令アドレスがアドレスカウンタ61にプリセットされると、アドレスカウンタ61が出力する読み出し命令アドレスADRaは「1」より大きな変化量だけ変化する。この場合、選択制御部10は、変化後の読み出し命令アドレスADRaが偶数であれば、選択信号SEL2を「0」として、プログラムメモリ2のデータ出力ポートから出力される命令OP0をセレクタ5に選択させ、変化後の読み出し命令アドレスADRaが奇数であれば、選択信号SEL2を「2」として、プログラムメモリ2のデータ出力ポートから出力される命令OP1をセレクタ5に選択させる。
以上が本実施形態によるDSPの構成の詳細である。
The selection control unit 10 is a circuit that monitors the read instruction address ADRa and performs switching control of the selector 5 based on the monitoring result. Except when the jump instruction is executed, the read instruction address ADRa output from the address counter 61 increases by “1” in synchronization with the clock φ. In this case, if the read instruction address ADRa after the increase is an even number, the selection control unit 10 sets the selection signal SEL2 to “0” and causes the selector 5 to select the instruction OP0 output from the data output port of the program memory 2. If the read instruction address ADRa after the increase is an odd number, the selection signal SEL2 is set to “1”, and the instruction OP1d output from the register 4 is selected by the selector 5. When the jump instruction is executed and the address setting unit 62 presets the jump destination instruction address in the address counter 61, the read instruction address ADRa output from the address counter 61 changes by an amount larger than “1”. In this case, if the read instruction address ADRa after the change is an even number, the selection control unit 10 sets the selection signal SEL2 to “0” and causes the selector 5 to select the instruction OP0 output from the data output port of the program memory 2. If the read instruction address ADRa after the change is an odd number, the selection signal SEL2 is set to “2”, and the instruction OP1 output from the data output port of the program memory 2 is selected.
The above is the detailed configuration of the DSP according to the present embodiment.

図2〜図5は本実施形態の動作例を示すタイムチャートである。各動作例では、プログラムメモリ2から命令が順次読み出されて実行されるのと並行し、命令アドレス「128」から始まる一連の命令の書き換えが行われている。また、各動作例では、ジャンプ命令が実行されている。   2 to 5 are time charts showing an operation example of the present embodiment. In each operation example, a series of instructions starting from the instruction address “128” is rewritten in parallel with the instructions being sequentially read from the program memory 2 and executed. In each operation example, a jump instruction is executed.

本実施形態では、例えば図2に示すように、読み出し指令発生部63により、アドレスカウンタ61から出力される読み出し命令アドレスADRaが偶数(図2の例では、ADRa=「98」、「100」、「12」、「14」、「16」)になるときに、読み出し指令REがアクティブレベル(Hレベル)とされる。   In the present embodiment, for example, as shown in FIG. 2, the read command address ADDR output from the address counter 61 by the read command generator 63 is an even number (in the example of FIG. 2, ADRa = “98”, “100”, When “12”, “14”, “16”), the read command RE is set to the active level (H level).

ここで、読み出し指令REがアクティブレベル(Hレベル)となるときには書き込み許可信号ENが非アクティブレベルとされるので、選択信号SEL1は書き込み制御部8によりLレベルとされ、セレクタ9は読み出し命令アドレスADRaの上位7ビットを選択し、メモリアドレスデータADRcとして出力する。このため、読み出し命令アドレスADRaが偶数であるとき、この読み出し命令アドレスADRaの1/2であるメモリアドレスデータADRc(図2の例では、ADRc=「49」、「50」、「6」、「7」、「8」)がセレクタ9からプログラムメモリ2に供給され、このメモリアドレスデータADRcにより指定されたエリア内の2個の命令(図2の例では、命令#98および#99の組、命令#100および#101の組、命令#12および#13の組、命令#14および#15の組、命令#16および#17の組)が命令OP0およびOP1としてプログラムメモリ2から順次読み出される。   Here, when the read command RE becomes an active level (H level), the write enable signal EN is set to an inactive level, so that the selection signal SEL1 is set to L level by the write control unit 8 and the selector 9 is set to the read command address ADRa. Are output as memory address data ADRc. For this reason, when the read instruction address ADRa is an even number, the memory address data ADRc (1/2 in the read instruction address ADRa) (ADRc = “49”, “50”, “6”, “ 7 "and" 8 ") are supplied from the selector 9 to the program memory 2, and two instructions in the area specified by the memory address data ADRc (in the example of FIG. 2, a set of instructions # 98 and # 99, Instruction # 100 and # 101, instruction # 12 and # 13, instruction # 14 and # 15, instruction # 16 and # 17) are sequentially read from the program memory 2 as instructions OP0 and OP1.

プログラムメモリ2から読み出された2個の命令OP0およびOP1のうち、命令OP0は、プログラムメモリ2からの読み出し後、直ちにセレクタ5により選択され、実行対象命令OPeとして処理手段(より具体的には命令実行手段)たる信号処理部3およびアドレス設定部62に供給される(図2の例では、OPe=#98、#100、#12、#14、#16)。一方、命令OP1は、プログラムメモリ2からの読み出し後、レジスタ4によって命令OP1dとして保持され、命令OP0よりもクロックφの1周期相当の時間だけ遅れてセレクタ5により選択され、実行対象命令OPeとして処理手段(より具体的には命令実行手段)たる信号処理部3およびアドレス設定部62に供給される(図2の例では、OPe=#99、#101、#13、#15、#17)。   Of the two instructions OP0 and OP1 read from the program memory 2, the instruction OP0 is selected by the selector 5 immediately after being read from the program memory 2 and is processed as the execution target instruction OPe (more specifically, It is supplied to the signal processing unit 3 and the address setting unit 62 (instruction execution means) (in the example of FIG. 2, OPe = # 98, # 100, # 12, # 14, # 16). On the other hand, the instruction OP1 is read as the instruction OP1d by the register 4 after being read from the program memory 2, and is selected by the selector 5 with a delay corresponding to one cycle of the clock φ from the instruction OP0, and is processed as the execution target instruction OPe. The signal is supplied to the signal processing unit 3 and the address setting unit 62 (more specifically, the instruction execution unit) (OPe = # 99, # 101, # 13, # 15, # 17 in the example of FIG. 2).

ジャンプ命令が実行され、かつ、そのジャンプ先の命令の命令アドレスADRaが奇数であるような例外的な場合を除き、読み出し命令アドレスADRaが奇数(図2の例では、ADRa=「99」、「101」、「13」、「15」、「17」)となるときには、レジスタ4に保持された命令OP1d(図2の例ではOP1d=#99、#101、#13、#15、#17)がセレクタ5により実行対象命令OPeとして選択され、信号処理部3およびアドレス設定部62に供給される。この間、実行読み出し指令発生部63によって読み出し指令REは非アクティブレベル(Lレベル)とされ、命令の読み出しは行われない。その一方、この命令の読み出しが行われない期間は、読み出し指令発生部63により書き込み許可信号ENがアクティブレベル(Hレベル)とされる。そして、プログラムメモリ2に書き込むべき命令が書き込みデータ受信部7のFIFO内にある場合、書き込み制御部8は、書き込み許可信号ENがアクティブレベルである期間を利用し、書き込みデータ受信部7のFIFOから命令を読み出してプログラムメモリ2に書き込むための制御を行う。   Unless the jump instruction is executed and the instruction address ADRa of the jump destination instruction is odd, the read instruction address ADRa is odd (in the example of FIG. 2, ADRa = “99”, “ 101 ”,“ 13 ”,“ 15 ”,“ 17 ”), the instruction OP1d held in the register 4 (OP1d = # 99, # 101, # 13, # 15, # 17 in the example of FIG. 2) Is selected as the execution target instruction OPe by the selector 5 and supplied to the signal processing unit 3 and the address setting unit 62. During this time, the read command RE is set to the inactive level (L level) by the execution read command generator 63, and the command is not read. On the other hand, during a period in which this command is not read, the read command generation unit 63 sets the write enable signal EN to the active level (H level). When the command to be written to the program memory 2 is in the FIFO of the write data receiving unit 7, the write control unit 8 uses the period during which the write enable signal EN is at the active level, from the FIFO of the write data receiving unit 7. Control for reading out the instruction and writing it into the program memory 2 is performed.

図2に示す動作例では、書き込み許可信号ENがアクティブレベル(Hレベル)である期間を利用して、一連の命令#128、#129、#130、#131が書き込みデータ受信部7のFIFOから読み出され、書き込みデータWDとしてプログラムメモリ2に供給される。また、書き込み制御部8により、それらの命令の命令アドレスADRb=「128」、「129」、「130」、「131」が発生され、その際に選択信号SEL1がHレベルとされることにより、命令アドレスADRbの上位7ビットであるメモリアドレスデータADRc=「64」、「64」、「65」、「65」がセレクタ9からプログラムメモリ2に与えられる。また、命令アドレスADRbのLSBが領域指定信号U/Lとしてプログラムメモリ2に与えられる。そして、書き込みデータWD=#128、#129、#130、#131がプログラムメモリ2に与えられる各期間に、書き込み指令WEが一定時間に亙ってアクティブレベル(Hレベル)とされ、メモリアドレスデータADRc=「64」、「64」、「65」、「65」および領域指定信号U/L=“1”、“0”、“1”、“0”により各々指定されるプログラムメモリ2内の各領域に書き込みデータWD=#128、#129、#130、#131が書き込まれる。   In the operation example shown in FIG. 2, a series of commands # 128, # 129, # 130, and # 131 are sent from the FIFO of the write data receiving unit 7 using a period in which the write enable signal EN is at the active level (H level). It is read and supplied to the program memory 2 as write data WD. Further, the write control unit 8 generates instruction addresses ADRb = “128”, “129”, “130”, “131” of those instructions, and at this time, the selection signal SEL1 is set to the H level. Memory address data ADRc = “64”, “64”, “65”, “65”, which is the upper 7 bits of the instruction address ADRb, is given from the selector 9 to the program memory 2. Further, the LSB of the instruction address ADRb is given to the program memory 2 as the area designation signal U / L. Then, during each period when the write data WD = # 128, # 129, # 130, and # 131 is given to the program memory 2, the write command WE is set to the active level (H level) for a certain time, and the memory address data ADRc = “64”, “64”, “65”, “65” and the area designation signal U / L = “1”, “0”, “1”, “0” in the program memory 2 designated respectively Write data WD = # 128, # 129, # 130, # 131 is written in each area.

仮にプログラムメモリ2から読み出される命令の中にジャンプ命令がない場合には、読み出し命令アドレスADRaが偶数と奇数を交互に繰り返し、命令アドレスADRaが偶数であるときに読み出し指令REがアクティブレベルとされる、という規則性が維持される。そして、図2に示す動作例のように、ジャンプ命令の命令アドレスADRaが奇数であり、ジャンプ先の命令の命令アドレスADRaが偶数である場合には、ジャンプ命令が実行されたとしても、ジャンプ命令が実行されない場合と同様な規則性が維持される。このため、クロックφに同期して、プログラムメモリ2からのデータ読み出しとプログラムメモリ2へのデータ書き込みとを交互に行うことができる。しかし、ジャンプ命令の命令アドレスとジャンプ先の命令の命令アドレスの組み合わせ如何によっては、ジャンプ命令の実行の影響により、上記の規則性が失われ、プログラムメモリ2へのデータの書き込みのタイミングは、図2の動作例とは異なったものとなる。   If there is no jump instruction in the instruction read from the program memory 2, the read instruction address ADRa is alternately repeated even and odd, and the read command RE is set to the active level when the instruction address ADRa is even. The regularity is maintained. If the instruction address ADRa of the jump instruction is an odd number and the instruction address ADRa of the jump destination instruction is an even number as in the operation example shown in FIG. 2, even if the jump instruction is executed, the jump instruction The same regularity is maintained as when no is executed. Therefore, data reading from the program memory 2 and data writing to the program memory 2 can be alternately performed in synchronization with the clock φ. However, depending on the combination of the instruction address of the jump instruction and the instruction address of the jump destination instruction, the above regularity is lost due to the execution of the jump instruction, and the timing of writing data to the program memory 2 is as shown in FIG. This is different from the operation example 2.

図3に示す動作例では、命令アドレスADRaが偶数「102」である命令から命令アドレスADRaが偶数「12」である命令へのジャンプが行われている。この場合、命令アドレスADRa=「102」のジャンプ命令のプログラムメモリ2からの読み出しと、ジャンプ先である命令アドレスADRa=「12」の命令のプログラムメモリ2からの読み出しが続けて行われるため、クロックφの2周期に亙って、書き込み許可信号ENが非アクティブレベル(Lレベル)とされ、データ書き込みが行われない。   In the operation example illustrated in FIG. 3, a jump is performed from an instruction having an even address “102” to an instruction address ADRa having an even address “12”. In this case, since reading of the jump instruction with the instruction address ADRa = “102” from the program memory 2 and reading of the instruction with the instruction address ADRa = “12” as the jump destination are continuously performed, The write enable signal EN is set to an inactive level (L level) over two periods of φ, and data writing is not performed.

図4に示す動作例では、命令アドレスADRaが奇数「101」である命令から命令アドレスADRaが奇数「13」である命令へのジャンプが行われている。この場合、奇数命令アドレス「101」のジャンプ命令として、レジスタ4に保持された命令OP1d=#101がセレクタ5により実行対象命令OPeとして選択されて実行される。従って、この命令OP1d=#101が実行される期間は、書き込み許可信号ENがアクティブレベル(Hレベル)とされ、書き込みデータWD(=#128)がプログラムメモリ2に書き込まれる。しかし、その後の奇数命令アドレス「13」の命令#14は、ジャンプ先の命令であり、未だレジスタ4に保持されていないので、プログラムメモリ2から読み出す必要がある。さらにその次の命令は偶数命令アドレス「14」の命令#14なので、これもプログラムメモリ2から読み出す必要がある。このため、命令#13のプログラムメモリ2からの読み出しと、命令#14のプログラムメモリ2からの読み出しが連続して行われ、クロックφの2周期に亙って、書き込み許可信号ENが非アクティブレベル(Lレベル)とされ、データ書き込みが行われない。   In the operation example illustrated in FIG. 4, a jump is performed from an instruction having an odd instruction address “ADRa” to an instruction having an odd instruction address “DRa”. In this case, the instruction OP1d = # 101 held in the register 4 is selected as the execution target instruction OPe by the selector 5 and executed as the jump instruction of the odd instruction address “101”. Accordingly, during the period in which the instruction OP1d = # 101 is executed, the write enable signal EN is set to the active level (H level), and the write data WD (= # 128) is written to the program memory 2. However, the subsequent instruction # 14 at the odd instruction address “13” is a jump destination instruction and is not yet held in the register 4, and therefore needs to be read from the program memory 2. Further, since the next instruction is the instruction # 14 of the even instruction address “14”, it is also necessary to read from the program memory 2. For this reason, the reading of the instruction # 13 from the program memory 2 and the reading of the instruction # 14 from the program memory 2 are continuously performed, and the write enable signal EN is inactive for two cycles of the clock φ. (L level) and no data is written.

図5に示す動作例では、命令アドレスADRaが偶数「102」である命令から命令アドレスADRaが奇数「13」である命令へのジャンプが行われている。この場合、偶数命令アドレス「102」のジャンプ命令のプログラムメモリ2からの読み出しと、ジャンプ先である奇数命令アドレス「13」の命令のプログラムメモリ2からの読み出しと、その次の偶数命令アドレス「14」の命令のプログラムメモリ2からの読み出しが続けて行われるため、クロックφの3周期に亙って、書き込み許可信号ENが非アクティブレベル(Lレベル)とされ、データ書き込みが行われない。   In the operation example shown in FIG. 5, a jump is performed from an instruction whose instruction address ADRa is an even number “102” to an instruction whose instruction address ADRa is an odd number “13”. In this case, the jump instruction at the even instruction address “102” is read from the program memory 2, the instruction at the odd instruction address “13” as the jump destination is read from the program memory 2, and the next even instruction address “14”. ”Is continuously read from the program memory 2, the write enable signal EN is set to the inactive level (L level) over three cycles of the clock φ, and data writing is not performed.

以上のように、ジャンプ命令が実行される場合には、クロックφの2周期または3周期に亙ってプログラムメモリ2へのデータ書き込みを行うことができない期間が生じることもある。しかし、ジャンプ命令が何回も連続して実行されることは一般的にありえないので、プログラムメモリ2内の命令の読み出しおよび実行と並行して、プログラムメモリ2内のプログラムの書き換えを支障なく行うことができる。   As described above, when a jump instruction is executed, there may occur a period during which data cannot be written to the program memory 2 over two or three cycles of the clock φ. However, since it is generally not possible for jump instructions to be executed many times in succession, the program in the program memory 2 can be rewritten without any trouble in parallel with the reading and execution of instructions in the program memory 2. Can do.

ジャンプ先の命令の実行時におけるセレクタ5の動作は、ジャンプ先の命令の命令アドレスが偶数であるか奇数であるかにより異なったものとなる。図2および図3に示す動作例では、ジャンプ先の命令の命令アドレスが偶数「12」であるため、この命令を含む2個の命令の読み出し時に、選択信号SEL2が「0」とされ、プログラムメモリ2から読み出される命令OP0(=#12)が実行対象命令OPeとして選択される。また、図4および図5に示す動作例では、ジャンプ先の命令の命令アドレスが奇数「13」であるため、この命令を含む2個の命令の読み出し時に、選択信号SEL2が「2」とされ、プログラムメモリ2から読み出される命令OP1(=#13)が実行対象命令OPeとして選択される。   The operation of the selector 5 during execution of the jump destination instruction differs depending on whether the instruction address of the jump destination instruction is an even number or an odd number. In the operation example shown in FIGS. 2 and 3, since the instruction address of the jump destination instruction is an even number “12”, the selection signal SEL2 is set to “0” when reading two instructions including this instruction, and the program The instruction OP0 (= # 12) read from the memory 2 is selected as the execution target instruction OPe. In the operation example shown in FIGS. 4 and 5, since the instruction address of the jump destination instruction is an odd number “13”, the selection signal SEL2 is set to “2” when reading two instructions including this instruction. The instruction OP1 (= # 13) read from the program memory 2 is selected as the execution target instruction OPe.

以上のように、本実施形態によれば、プログラムメモリ2の各エリアに命令を2個ずつ格納し、プログラムメモリ2から1度に2個の命令を読み出し、読み出した2個の命令を順次実行するようにしたので、プログラムメモリ2がシングルポートRAMにより構成されている場合であっても、プログラムメモリ2からの命令読み出しの行われない期間を利用して、プログラムメモリ2内の命令の書き換えを行うことができる。   As described above, according to the present embodiment, two instructions are stored in each area of the program memory 2, two instructions are read from the program memory 2 at a time, and the two read instructions are sequentially executed. As a result, even if the program memory 2 is composed of a single port RAM, the instruction in the program memory 2 can be rewritten using a period in which the instruction is not read from the program memory 2. It can be carried out.

<第2実施形態>
図6は、この発明の第2実施形態であるDSPの構成を示すブロック図である。なお、この図において、上記第1実施形態(図1)の各部と対応する部分には同一の符号を付し、その説明を省略する。
Second Embodiment
FIG. 6 is a block diagram showing a configuration of a DSP according to the second embodiment of the present invention. In this figure, parts corresponding to those in the first embodiment (FIG. 1) are denoted by the same reference numerals, and description thereof is omitted.

上記第1実施形態では、プログラムメモリ2として、同一メモリアドレスのエリア内の2Nビットのデータを上位Nビットと下位Nビットに分け、Nビット単位で書き換えることができる構成のシングルポートRAMを用いた。   In the first embodiment, as the program memory 2, a single port RAM having a configuration in which 2N-bit data in the area of the same memory address can be divided into upper N bits and lower N bits and rewritten in units of N bits is used. .

これに対し、本実施形態において、プログラムメモリ2Aは、メモリアドレスデータADRcにより指定されるエリア単位(2Nビット単位)でのみデータ書き換えが可能な構成となっている。そして、このような構成のプログラメモリ2Aを採用したことに伴い、上記第1実施形態における書き込み制御部8とは制御内容が一部異なった書き込み制御部8Aが設けられ、さらにORゲート21が追加されている。   On the other hand, in the present embodiment, the program memory 2A is configured such that data can be rewritten only in area units (2N bit units) designated by the memory address data ADRc. With the adoption of the program memory 2A having such a configuration, a write control unit 8A having a partially different control content from the write control unit 8 in the first embodiment is provided, and an OR gate 21 is further added. Has been.

本実施形態と上記第1実施形態との相違は、プログラムメモリ2Aに対するデータ書き込みの際の制御内容にある。本実施形態において、図7に示すように、奇数命令アドレスを持つ命令から偶数命令アドレスを持つ命令までの一連の命令の書き換えを行う場合、書き込み制御部8Aは、次のようにしてプログラムメモリ2A内の命令の書き換えを行う。   The difference between the present embodiment and the first embodiment lies in the control contents at the time of data writing to the program memory 2A. In the present embodiment, as shown in FIG. 7, when rewriting a series of instructions from an instruction having an odd instruction address to an instruction having an even instruction address, the write control unit 8A performs program memory 2A as follows. Rewrite the instruction inside.

まず、書き込み制御部8Aは、エリア内の上位Nビットと下位Nビットの両方が書き換え対象である各エリアについては、以下に述べる書き換え方法(1)によりプログラムメモリ2A内の命令の書き換えを行う。すなわち、書き換え制御部8Aは、書き込み許可信号ENがアクティブレベルとなる期間を利用し、偶数命令アドレスの命令とこれに続く奇数命令アドレスの命令からなる2Nビットの書き込みデータWDをプログラムメモリ2Aに供給し、偶数命令アドレスである命令アドレスADRbをセレクタ9に供給し、選択信号SEL1をHレベルとし、さらに書き込み指令WEを一定時間に亙ってアクティブレベルとする。これにより、プログラムメモリ2A内においてメモリアドレスデータADRc=ADRb/2に対応したエリアに2個の命令からなる2Nビットのデータが格納される。   First, the write control unit 8A rewrites instructions in the program memory 2A by the rewrite method (1) described below for each area in which both the upper N bits and the lower N bits in the area are to be rewritten. That is, the rewrite control unit 8A uses the period in which the write enable signal EN is at the active level, and supplies 2N-bit write data WD including the instruction of the even instruction address and the instruction of the odd instruction address following to the program memory 2A. Then, the instruction address ADRb, which is an even instruction address, is supplied to the selector 9, the selection signal SEL1 is set to the H level, and the write command WE is set to the active level over a predetermined time. As a result, 2N-bit data consisting of two instructions is stored in an area corresponding to the memory address data ADRc = ADRb / 2 in the program memory 2A.

そして、エリア内の下位Nビットのみが書き換え対象であるエリアおよびエリア内の上位Nビットのみが書き換え対象であるエリアについては、書き換え制御部8Aは、以下に述べる書き換え方法(2)によりプログラムメモリ2A内の命令の書き換えを行う。   Then, for the area where only the lower N bits in the area are to be rewritten and the area in which only the upper N bits in the area are to be rewritten, the rewrite control unit 8A performs the program memory 2A by the rewriting method (2) described below. Rewrite the instruction inside.

図8は書き換え方法(2)の手順を示す図である。この書き換え方法(2)では、書き込み許可信号ENがアクティブレベルとなる期間を2期間利用してプログラムメモリ2A内の1つの命令の書き換えを行う。例えば命令アドレスが「100」である命令#100または命令アドレスが「101」である命令#101の書き換えを行う場合、書き込み制御部8Aは、命令アドレスADRb=「100」を出力し、これをセレクタ9に選択させ、セレクタ9からプログラムメモリ2AにメモリアドレスデータADRc=「50」を供給させる。そして、書き込み制御部8Aは、読み出し指令RE2をアクティブレベルとする。この読み出し指令RE2は、ORゲート21を介してプログラムメモリ2Aに供給される。このORゲート21は、上記第1実施形態と同様に読み出し制御部6が発生する読み出し指令REに加えて、このようにして書き込み制御部8Aが発生する読み出し指令RE2をプログラムメモリ2Aに供給するために設けられたゲートである。   FIG. 8 is a diagram showing the procedure of the rewriting method (2). In this rewriting method (2), one instruction in the program memory 2A is rewritten using two periods in which the write enable signal EN is at the active level. For example, when rewriting instruction # 100 whose instruction address is “100” or instruction # 101 whose instruction address is “101”, the write control unit 8A outputs the instruction address ADRb = “100”. 9, and the memory address data ADRc = “50” is supplied from the selector 9 to the program memory 2 </ b> A. Then, the write control unit 8A sets the read command RE2 to the active level. The read command RE2 is supplied to the program memory 2A via the OR gate 21. This OR gate 21 supplies the program memory 2A with the read command RE2 generated by the write control unit 8A in this way in addition to the read command RE generated by the read control unit 6 as in the first embodiment. It is the gate provided in.

アクティブレベルの読み出し指令RE2の供給により、プログラムメモリ2Aにおけるメモリアドレス「50」のエリアから命令#100および101からなる2Nビットのデータが読み出されると、書き込み制御部8Aは、この2Nビットのデータを内蔵のレジスタに取り込む。そして、書き換え対象が命令#100である場合には、このレジスタ内の2Nビットの上位Nビットを新たな命令#100に書き換え、書き換え対象が命令#101である場合には、このレジスタ内の2Nビットの下位Nビットを新たな命令#101に書き換える。   When the 2N-bit data consisting of the instructions # 100 and 101 is read from the area of the memory address “50” in the program memory 2A by the supply of the read command RE2 at the active level, the write control unit 8A reads the 2N-bit data. Load into the built-in register. When the rewrite target is the instruction # 100, the upper N bits of 2N bits in this register are rewritten to a new instruction # 100. When the rewrite target is the instruction # 101, 2N in this register The lower N bits of the bit are rewritten to a new instruction # 101.

そして、書き込み制御部8Aは、次に書き込み許可信号ENがアクティブレベルとなる期間を利用し、書き換えを終えたレジスタ内の2Nビットのデータをプログラムメモリ2A内のメモリアドレス「50」に対応したエリアに書き込むための制御を行うのである。すなわち、書き込み制御部8Aは、書き換えを終えたレジスタ内の2Nビットのデータを書き込みデータWDとしてプログラムメモリ2Aに与え、命令アドレスADRb=「100」を出力してこれをセレクタ9に選択させ、書き込み指令WEを一定期間に亙ってアクティブレベルとするのである。このようにしてプログラムメモリ2A内の命令#100または#101の一方が新たな内容に書き換えられる。   Then, the write control unit 8A uses the period in which the write enable signal EN is at the next active level, and uses the 2N-bit data in the rewritten register in the area corresponding to the memory address “50” in the program memory 2A. Control is performed to write the data. That is, the write control unit 8A gives the 2N-bit data in the register that has been rewritten to the program memory 2A as the write data WD, outputs the instruction address ADRb = “100”, causes the selector 9 to select, and writes The command WE is set to the active level over a certain period. In this way, one of the instructions # 100 or # 101 in the program memory 2A is rewritten with new contents.

本実施形態の場合、奇数命令アドレスの命令のみ、あるいは偶数命令アドレスの命令のみを書き換える場合には、命令の書き換えを行うのに、書き込み許可信号ENがアクティブレベルとなる期間を2期間必要とするので、第1実施形態と比べて効率が良くない。しかし、多数のエリアについて各エリア内の2Nビットのデータの書き換えを行うような場合には、書き込み許可信号ENがアクティブレベルとなる期間に、1つのエリアの2Nビットのデータの書き換えを済ませることができるので、書き換えを効率的に行うことができる。   In the case of this embodiment, when only an instruction with an odd instruction address or only an instruction with an even instruction address is rewritten, two periods are required for the write enable signal EN to become an active level in order to rewrite the instruction. Therefore, the efficiency is not good as compared with the first embodiment. However, when 2N-bit data in each area is rewritten for many areas, the 2N-bit data in one area may be rewritten during the period when the write enable signal EN is at the active level. Therefore, rewriting can be performed efficiently.

<他の実施形態>
以上、この発明の第1実施形態および第2実施形態について説明したが、この発明には他にも実施形態が考えられる。例えば次の通りである。
<Other embodiments>
Although the first and second embodiments of the present invention have been described above, other embodiments are conceivable for the present invention. For example:

(1)上記第1および第2実施形態では、プログラムメモリ2または2Aの各エリアに命令を2個ずつ記憶させたが、各エリアに3個以上の命令を記憶させ、エリア単位でそれらの命令の読み出しを行うようにしてもよい。この場合も、上記各実施形態と同様、プログラムメモリ2または2Aからの複数の命令の読み出しが行われてから次にプログラムメモリ2または2Aから複数のデータの読み出しが行われるまでの間に、プログラムメモリ2または2Aから読み出された複数の命令が順次実行されるように制御し、プログラムメモリ2または2Aから複数の命令の読み出しが行われない期間を利用して、プログラムメモリ2または2Aに対する命令の書き込みを行うようにすればよい。 (1) In the first and second embodiments, two instructions are stored in each area of the program memory 2 or 2A, but three or more instructions are stored in each area, and those instructions are stored in area units. May be read out. In this case as well, in the same manner as in the above-described embodiments, the program is read after a plurality of instructions are read from the program memory 2 or 2A until the next data is read from the program memory 2 or 2A Instructions for program memory 2 or 2A are controlled using a period in which a plurality of instructions read from memory 2 or 2A are sequentially executed and a plurality of instructions are not read from program memory 2 or 2A Should be written.

(2)上記第1および第2実施形態では、この発明をプログラムメモリ2または2Aとその読み出し制御および書き込み制御を行う回路に適用した。しかし、この発明は、DSP内のプログラムメモリ以外のRAMとその読み出し制御および書き込み制御を行う回路にも適用可能である。例えば上記第1および第2実施形態において、信号処理部3は、フィルタ処理等の信号処理ための係数を記憶する係数メモリと、この係数メモリから読み出された係数を使用した演算を行うことにより信号処理を行う演算手段とを有している。ここで、DSPを小規模な構成とし、かつ、多彩なフィルタ処理等を実現するためには、信号処理のために係数メモリから係数の読み出しが行われるのと並行し、係数メモリ内の係数の書き換えを行う機能がDSPに求められる。そこで、上記第1および第2実施形態と同様、係数メモリの各エリアに複数の係数を記憶させ、エリア単位で係数メモリから複数の係数を読み出すようにする。そして、係数メモリからの複数の係数の読み出しが行われてから次に係数メモリから複数の係数の読み出しが行われるまでの間に、係数メモリから読み出された複数の係数が信号処理のための演算に順次使用されるように制御し、係数メモリから複数の係数の読み出しが行われない期間を利用して、係数メモリに対する係数の書き込みを行うようにするのである。このようにすることにより、係数メモリとしてシングルポートのRAMを使用する場合でも、係数メモリからの係数の読み出しと並行して係数メモリへの係数の書き込みを行うことが可能になり、DSPを小規模な構成とし、かつ、多彩なフィルタ処理等を実現することが可能になる。 (2) In the first and second embodiments, the present invention is applied to the program memory 2 or 2A and a circuit for performing read control and write control thereof. However, the present invention can also be applied to a RAM other than the program memory in the DSP and a circuit that performs read control and write control thereof. For example, in the first and second embodiments, the signal processing unit 3 performs a calculation using a coefficient memory that stores a coefficient for signal processing such as filter processing and the coefficient read from the coefficient memory. Arithmetic means for performing signal processing. Here, in order to realize a small-scale configuration of the DSP and various filter processes, the coefficients in the coefficient memory are read in parallel with the reading of the coefficients from the coefficient memory for signal processing. A function for performing rewriting is required of the DSP. Therefore, as in the first and second embodiments, a plurality of coefficients are stored in each area of the coefficient memory, and a plurality of coefficients are read from the coefficient memory in area units. A plurality of coefficients read out from the coefficient memory are used for signal processing after the reading of the plurality of coefficients from the coefficient memory until the next reading of the plurality of coefficients from the coefficient memory. Control is performed so that the coefficients are sequentially used in the calculation, and the coefficient is written into the coefficient memory using a period during which the plurality of coefficients are not read from the coefficient memory. In this way, even when a single-port RAM is used as the coefficient memory, it is possible to write the coefficient into the coefficient memory in parallel with the reading of the coefficient from the coefficient memory, and the DSP can be reduced in scale. It becomes possible to realize various filter processes and the like.

この発明の第1実施形態であるDSPの構成を示すブロック図である。It is a block diagram which shows the structure of DSP which is 1st Embodiment of this invention. 同実施形態の第1の動作例を示すタイムチャートである。It is a time chart which shows the 1st operation example of the embodiment. 同実施形態の第2の動作例を示すタイムチャートである。It is a time chart which shows the 2nd operation example of the embodiment. 同実施形態の第3の動作例を示すタイムチャートである。It is a time chart which shows the 3rd operation example of the embodiment. 同実施形態の第4の動作例を示すタイムチャートである。It is a time chart which shows the 4th operation example of the embodiment. この発明の第2実施形態であるDSPの構成を示すブロック図である。It is a block diagram which shows the structure of DSP which is 2nd Embodiment of this invention. 同実施形態におけるプログラムメモリ2における命令の書き換えの態様を例示する図である。It is a figure which illustrates the mode of rewriting of the instruction in program memory 2 in the embodiment. 同実施形態において行われるプログラムメモリ2内の命令の書き換え方法(2)の手順を説明する図である。It is a figure explaining the procedure of the rewriting method (2) of the instruction in the program memory 2 performed in the same embodiment.

符号の説明Explanation of symbols

1……クロック発生部、2,2A……プログラムメモリ、3……信号処理部、4……レジスタ、5,9……セレクタ、6……読み出し制御部、61……アドレスカウンタ、62……アドレス設定部、63……読み出し指令発生部、7……書き込みデータ受信部、8,8A……書き込み制御部、10……選択制御部、21……ORゲート。 DESCRIPTION OF SYMBOLS 1 ... Clock generation part, 2, 2A ... Program memory, 3 ... Signal processing part, 4 ... Register, 5, 9 ... Selector, 6 ... Reading control part, 61 ... Address counter, 62 ... Address setting unit, 63... Read command generation unit, 7... Write data reception unit, 8, 8A... Write control unit, 10.

Claims (4)

入力信号に対して施す信号処理の一連の命令の各々を2個ずつ記憶するメモリと、
前記メモリから命令を2個ずつ読み出す制御をクロック1つおきに繰り返し行う読み出し制御手段と、
前記メモリから読み出された命令を実行する処理手段と、
前記メモリからの命令の読み出しが行われてから次に前記メモリからの命令の読み出しが行われるまでの間に前記メモリから読み出された2個の命令の少なくとも一方を前記処理手段に供給するデータ供給制御手段であって、前記メモリから読み出された2個の命令のうち後に実行される方の命令を記憶するレジスタと、前記メモリから読み出された2個の命令および前記レジスタに記憶された命令の中か1個の命令を選択して前記処理手段に供給する処理をクロックに同期させて実行するデータ選択手段と、を具備するデータ供給制御手段と、
前記読み出し制御手段は、前記データ選択手段により選択された命令がジャンプ命令である場合には、次のクロックで前記メモリを読み出す制御を行い、
前記データ選択手段により選択された命令がジャンプ命令であり、ジャンプ先が、対にして前記メモリに記憶された2個の命令のうちの後に実行される方の命令である場合には、前記メモリから読み出された2個の命令のうち後に実行される方の命令を前記データ選択手段に選択させ、その他の場合には、前記メモリから読み出された2個の命令のうち先に実行される方の命令を前記データ選択手段に選択させ、さらに、前記レジスタに記憶された命令を次のクロックにて前記データ選択手段に選択させる選択制御手段と、
前記メモリから命令の読み出しが行われない期間を利用して、前記メモリへ命令を書き込む制御を行う書き込み制御手段と、をさらに備える、
ことを特徴とするデジタル信号処理装置。
A memory for storing two each of a series of signal processing instructions applied to an input signal ;
And read control means for repeatedly controlling reading said memory or Rainochi Ordinance two by two the clock every second
Processing means for executing an instruction read from said memory,
Supplied to the processing means at least one of the two instructions read from said memory until instruction of reading the instruction read from then the memory from being performed is carried out from said memory A data supply control means for storing a command to be executed later among the two instructions read from the memory, the two instructions read from the memory, and the register and data supply control means comprises a data selection unit that executes processing by selecting the stored or found one instruction in the instruction is supplied to the processing means in synchronization with a clock, and
When the instruction selected by the data selection means is a jump instruction, the read control means performs control to read the memory at the next clock,
When the instruction selected by the data selection means is a jump instruction and the jump destination is the instruction executed after one of the two instructions stored in the memory as a pair, the memory Of the two instructions read out from the memory, the instruction to be executed later is selected by the data selection means. In other cases, the instruction is executed first out of the two instructions read out from the memory. Selection control means for causing the data selection means to select an instruction to be stored, and further causing the data selection means to select an instruction stored in the register at a next clock;
Write control means for performing control to write an instruction to the memory using a period during which no instruction is read from the memory ,
A digital signal processing device.
前記書き込み制御手段は、対にして前記メモリに記憶された2個の命令の何れか一方の書き換えを行う場合には、当該2個の命令を前記メモリから読み出して一方の書き換えを行い、一方の書き換えが行われた2個の命令を対にして前記メモリへ書き戻すことを特徴とする請求項1に記載のデジタル信号処理装置。  When rewriting one of the two instructions stored in the memory as a pair, the write control means reads the two instructions from the memory and rewrites one of the two instructions. The digital signal processing apparatus according to claim 1, wherein the two rewritten instructions are written back to the memory as a pair. 入力信号に対して施す信号処理において使用する係数であって、前記メモリに記憶されている命令の各々に対応する係数を2個ずつ記憶する係数メモリを、さらに有し、  A coefficient memory for storing two coefficients corresponding to each of the instructions stored in the memory, which are coefficients used in signal processing applied to the input signal;
前記読み出し制御手段は、前記メモリから命令を2個ずつ読み出す際に、当該2個の命令の各々に対応する係数を前記係数メモリから読み出し、  The read control means reads the coefficient corresponding to each of the two instructions from the coefficient memory when reading the instructions two by two from the memory,
前記処理手段は、前記係数メモリから読み出される係数を利用して信号処理を行い、  The processing means performs signal processing using a coefficient read from the coefficient memory,
前記データ供給制御手段は、前記係数メモリから読み出された2個の係数のうち、後に実行される方の命令に対応する係数を記憶する係数レジスタをさらに備え、  The data supply control means further includes a coefficient register for storing a coefficient corresponding to an instruction to be executed later, out of the two coefficients read from the coefficient memory,
前記データ選択手段は、前記処理手段に命令を供給する際に、前記係数メモリから読み出された2個の係数および前記係数レジスタに記憶された係数の中から当該命令に対応する1個の係数を選択して前記処理手段に供給し、  When the data selection means supplies an instruction to the processing means, one coefficient corresponding to the instruction is selected from the two coefficients read from the coefficient memory and the coefficient stored in the coefficient register. To supply to the processing means,
前記書き込み制御手段は、前記係数メモリから係数の読み出しが行われない期間を利用して、前記係数メモリへ係数を書き込む制御を行う  The write control unit performs control to write a coefficient into the coefficient memory using a period during which the coefficient is not read from the coefficient memory.
ことを特徴とする請求項1または2に記載のデジタル信号処理装置。  The digital signal processing device according to claim 1, wherein the digital signal processing device is a digital signal processing device.
前記書き込み制御手段は、対にして前記係数メモリに記憶された2個の係数の何れか一方の書き換えを行う場合には、当該2個の係数を前記係数メモリから読み出して一方の書き換えを行い、一方の書き換えが行われた2個の係数を対にして前記係数メモリへ書き戻すことを特徴とする請求項1〜3の何れか1項に記載のデジタル信号処理装置。  When rewriting one of the two coefficients stored in the coefficient memory as a pair, the write control means reads the two coefficients from the coefficient memory and rewrites one of the two coefficients. 4. The digital signal processing apparatus according to claim 1, wherein one of the two rewritten coefficients is written back to the coefficient memory as a pair.
JP2006244890A 2006-09-09 2006-09-09 Digital signal processor Expired - Fee Related JP5003070B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006244890A JP5003070B2 (en) 2006-09-09 2006-09-09 Digital signal processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006244890A JP5003070B2 (en) 2006-09-09 2006-09-09 Digital signal processor

Publications (2)

Publication Number Publication Date
JP2008065718A JP2008065718A (en) 2008-03-21
JP5003070B2 true JP5003070B2 (en) 2012-08-15

Family

ID=39288365

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006244890A Expired - Fee Related JP5003070B2 (en) 2006-09-09 2006-09-09 Digital signal processor

Country Status (1)

Country Link
JP (1) JP5003070B2 (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01161438A (en) * 1987-12-17 1989-06-26 Nec Corp Prefetch instruction invalidation processing system
JPH0375945A (en) * 1989-08-18 1991-03-29 Nec Corp Data processor
EP0651331B1 (en) * 1993-10-18 2002-01-09 National Semiconductor Corporation A write buffer for a superpipelined, superscalar microprocessor
JPH09282221A (en) * 1996-04-19 1997-10-31 Hitachi Ltd Main memory controller
JP3934710B2 (en) * 1996-09-13 2007-06-20 株式会社ルネサステクノロジ Microprocessor
JPH11272546A (en) * 1998-03-23 1999-10-08 Nec Corp Variable length register device
JP3740321B2 (en) * 1999-06-15 2006-02-01 株式会社ルネサステクノロジ Data processing device
US6986028B2 (en) * 2002-04-22 2006-01-10 Texas Instruments Incorporated Repeat block with zero cycle overhead nesting
JP3683248B2 (en) * 2002-10-22 2005-08-17 富士通株式会社 Information processing apparatus and information processing method
JP4479370B2 (en) * 2004-06-25 2010-06-09 日本電気株式会社 Processor

Also Published As

Publication number Publication date
JP2008065718A (en) 2008-03-21

Similar Documents

Publication Publication Date Title
JP5431003B2 (en) Reconfigurable circuit and reconfigurable circuit system
JP2008085923A (en) Digital filter
JP2006260411A (en) Signal processor, and communication equipment using the same
JP5003070B2 (en) Digital signal processor
JP2005084907A (en) Memory band control unit
WO2009098737A1 (en) External device access apparatus, its controlling method and system lsi
JPS63266576A (en) Digital signal processor
JP2000215068A (en) Multitask scheduling device
JPWO2008105494A1 (en) DMA transfer apparatus and method
JP2007206924A (en) Arithmetic processing system
JP2007140858A (en) Method for accessing memory, and device for accessing memory
WO2021035715A1 (en) Data processing method and device
JP4661169B2 (en) Digital signal processor
KR100396189B1 (en) Digital signal processing apparatus and method for controlling the same
JPH01179515A (en) Digital signal processor and signal processing method
JP2008113295A (en) Video signal processor
JP5007560B2 (en) Signal processing device
US20080301401A1 (en) Processor
JP4404065B2 (en) Digital signal processor
JP2007172299A (en) Information processor
JP2005056033A (en) Register circuit
JP2001184855A (en) Memory controller
JP2009152815A (en) Digital filter circuit
JPH08202582A (en) Data transferring device for microprocessor
JP2001084139A (en) Arithmetic processor and arithmetic processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100629

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100706

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100903

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110517

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110719

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: 20120424

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120507

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

Free format text: PAYMENT UNTIL: 20150601

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees