JP3251670B2 - PCM audio data processing method - Google Patents

PCM audio data processing method

Info

Publication number
JP3251670B2
JP3251670B2 JP30913492A JP30913492A JP3251670B2 JP 3251670 B2 JP3251670 B2 JP 3251670B2 JP 30913492 A JP30913492 A JP 30913492A JP 30913492 A JP30913492 A JP 30913492A JP 3251670 B2 JP3251670 B2 JP 3251670B2
Authority
JP
Japan
Prior art keywords
transfer
data
audio data
main memory
interrupt signal
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
JP30913492A
Other languages
Japanese (ja)
Other versions
JPH06161500A (en
Inventor
具成 足立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP30913492A priority Critical patent/JP3251670B2/en
Publication of JPH06161500A publication Critical patent/JPH06161500A/en
Application granted granted Critical
Publication of JP3251670B2 publication Critical patent/JP3251670B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、PCM音声データ処理
方式に関し、特に、PCM音声データの転送をDMA転
送によって行なう場合のPCM音声データ処理方式に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a PCM audio data processing system, and more particularly to a PCM audio data processing system in which PCM audio data is transferred by DMA transfer.

【0002】いわゆるマルチメディアパーソナルコンピ
ュータやその他音声処理装置においては、音声を録音
し、加工し、編集し、必要な時に音声メッセージを利用
者に通知することが行なわれる。
[0002] In a so-called multimedia personal computer or other audio processing apparatus, audio is recorded, processed, edited, and a voice message is notified to a user when necessary.

【0003】このような装置における音声データの処理
の方式としては、PCM(パルス符号変調)方式の録音
/再生方式が用いられ、PCM音声データの転送方式と
しては、DMA(ダイレクトメモリアクセス)方式が用
いられる。
As a method of processing audio data in such an apparatus, a PCM (pulse code modulation) recording / reproducing method is used, and as a PCM audio data transfer method, a DMA (direct memory access) method is used. Used.

【0004】[0004]

【従来の技術】録音動作の場合、ADC(アナログデジ
タルコンバータ)から録音データをホストのメモリバッ
ファ(メインメモリ)へ転送し、再生の場合は再生情報
をホストのメモリバッファからDAC(デジタルアナロ
グコンバータ)に転送する。この際、ホストシステムが
並行して他の仕事ができるようにするため、DMA転送
が使用される。一度に転送できる転送バイト数はDMA
C(DMAコントローラ)の転送バイトカウンタにより
示され、録音データの送り先又は再生データの格納元の
アドレスはDMAコントローラのバイトアドレスにより
示される。転送バイト数は転送バイトカウンタのビット
数によって制限され、バイトカウンタが0になると転送
が終了する。転送の終了時にはデータの更新動作が発生
する。
2. Description of the Related Art In the case of a recording operation, recording data is transferred from an ADC (analog-digital converter) to a memory buffer (main memory) of a host, and in the case of reproduction, reproduction information is transferred from the memory buffer of the host to a DAC (digital-analog converter). Transfer to At this time, DMA transfer is used to allow the host system to perform other tasks in parallel. The number of transfer bytes that can be transferred at one time is DMA
The transfer destination of the recorded data is indicated by the transfer byte counter of the C (DMA controller), and the storage source address of the reproduced data is indicated by the byte address of the DMA controller. The number of transfer bytes is limited by the number of bits of the transfer byte counter, and the transfer ends when the byte counter becomes 0. At the end of the transfer, a data update operation occurs.

【0005】このような更新動作に対しては、例えば再
生動作の場合、ホストのメモリバッファへ次に続く音声
データを転送終了前に予め用意しておき、転送終了通知
があった直後にその音声データを指定することが要求さ
れる。一方、PCMのサンプリング周波数が11KHz
〜44KHzの範囲とすると、サンプリング周期は90
〜22μsとなる。従って、転送終了が通知されてから
遅くとも22μs以内に次の情報の更新動作を完了する
必要があるが、これは一般的なホストシステムでは殆ど
不可能である。
For such an update operation, for example, in the case of a reproduction operation, the following audio data is prepared in advance in the memory buffer of the host before the end of the transfer, and immediately after the transfer end notification is received, Required to specify data. On the other hand, the sampling frequency of PCM is 11 KHz
If the sampling frequency is in the range of ~ 44 KHz, the sampling period is 90
2222 μs. Therefore, it is necessary to complete the update operation of the next information at the latest within 22 μs after the notification of the transfer end, but this is almost impossible with a general host system.

【0006】そこで、図5に示す如く、DMAコントロ
ーラ8は通常この更新動作を自動的に処理するためのオ
ートイニシャライズ機能を備える。DMAコントローラ
8は、DMA転送開始時に、その内部レジスタに格納さ
れたベースアドレスBA及びベースカウントBCを、所
定のカウンタに転送する。これにより、ベースアドレス
BAはカレントアドレスCAとされ、ベースカウントB
CはカレントカウントCCとされる。
Therefore, as shown in FIG. 5, the DMA controller 8 usually has an auto-initialize function for automatically processing this update operation. When starting the DMA transfer, the DMA controller 8 transfers the base address BA and the base count BC stored in its internal register to a predetermined counter. As a result, the base address BA becomes the current address CA, and the base count B
C is the current count CC.

【0007】次に、例えば再生動作の場合、DMAコン
トローラ8は、メインメモリ7上のPCM音声データを
DAC側のバッファメモリ5にDMA転送する。この
時、メインメモリ7において、カレントアドレスCAを
先頭として順にデータ転送が行なわれる。1バイトのデ
ータをメインメモリ7からDMA転送する毎に、カレン
トカウントCCが−1だけ減少され、CC=0か否かが
判断される。CC≠0ならDMA転送がくり返され、C
C=0なら転送終了となる。
Next, for example, in the case of a reproducing operation, the DMA controller 8 DMA-transfers the PCM audio data in the main memory 7 to the buffer memory 5 on the DAC side. At this time, in the main memory 7, data transfer is performed sequentially starting from the current address CA. Each time 1-byte data is DMA-transferred from the main memory 7, the current count CC is reduced by -1 and it is determined whether or not CC = 0. If CC ≠ 0, DMA transfer is repeated and C
If C = 0, the transfer ends.

【0008】この転送終了をトリガとして、DMAコン
トローラ8は、再び、ベースアドレスBA及びベースカ
ウントBCを所定のカウンタに転送してこれらを各々カ
レントアドレスCA及びカレントカウントCCとする。
[0008] With the end of the transfer as a trigger, the DMA controller 8 transfers the base address BA and the base count BC to predetermined counters again and sets them as the current address CA and the current count CC, respectively.

【0009】[0009]

【発明が解決しようとする課題】前述したDMAコント
ローラ8のオートイニシャライズ機能においては、ベー
スアドレスBAとカレントアドレスCA、ベースカウン
トBCとカレントカウントCCは別々に更新することが
できない。即ち、データ転送のためにカレントアドレス
CA及びカレントカウントCCが使用されている間は、
ベースアドレスBA及びベースカウントBCを更新する
ことはできない。
In the above-mentioned auto-initialization function of the DMA controller 8, the base address BA and the current address CA, and the base count BC and the current count CC cannot be updated separately. That is, while the current address CA and the current count CC are used for data transfer,
The base address BA and the base count BC cannot be updated.

【0010】従って、転送終了をトリガとして、常に同
一のベースアドレスBA及びベースカウントBCが、カ
レントアドレスCA及びカレントカウントCCとして格
納されることになる。また、この場合、DMA転送中の
メインメモリ7の当該領域には、次に続くPCM音声デ
ータを書込むことはできない。このため、メインメモリ
7の大きさ(メインメモリ7のPCM音声データ書込み
のために獲得できる領域の大きさ)又はバッファメモリ
5の大きさ以上の音声データを連続して再生又は録音す
ることはできなかった。換言すれば、このような大きさ
の音声データを再生又は録音しようとすると必ず音声が
途切れることになる。
Therefore, the same base address BA and the same base count BC are always stored as the current address CA and the current count CC with the transfer end as a trigger. Further, in this case, the following PCM audio data cannot be written in the area of the main memory 7 during the DMA transfer. For this reason, it is not possible to continuously reproduce or record audio data larger than the size of the main memory 7 (the size of the area that can be obtained for writing PCM audio data in the main memory 7) or the size of the buffer memory 5. Did not. In other words, when trying to reproduce or record audio data of such a size, the audio is always interrupted.

【0011】一方、転送終了を待って、ベースアドレス
BA及びベースカウントBCを更新することにより、カ
レントアドレスCA及びカレントカウントCCを更新す
ることは可能である。この場合、メインメモリ7の他の
アドレスへ次に続くPCM音声データを展開できるが、
先の転送終了から転送の再開までに数十μs(前述の2
2μsよりは長い)を要する。このため、前述と同様
に、所定の大きさ以上の音声データを連続して再生又は
録音することはできなかった。
On the other hand, the current address CA and the current count CC can be updated by updating the base address BA and the base count BC after the completion of the transfer. In this case, the following PCM audio data can be expanded to another address of the main memory 7,
It takes several tens μs from the end of the previous transfer to the resumption of the transfer (2
Longer than 2 μs). For this reason, as described above, it has been impossible to continuously reproduce or record audio data having a predetermined volume or more.

【0012】なお、最新のDMAコントローラでは、そ
のオートイニシャライズ機能を改善して、ベースアドレ
スBAとカレントアドレスCA、ベースカウントBCと
カレントカウントCCを別々に更新できる機能としたも
のがある。即ち、データ転送のためにカレントアドレス
CA及びカレントカウントCCが使用中であっても、ベ
ースアドレスBA及びベースカウントBCを更新可能で
ある。従って、次に続くPCM音声データをメインメモ
リ7の他のアドレスに展開し、これを連続してDMA転
送できる(連続して音声として再生又は録音できる。)
しかし、このようなDMAコントローラを備えた機種
は、複雑なハードウェアを必要とするので、一般に高級
(高価)となる。また、DMAコントローラはパーソナ
ルコンピュータ等の本体ボードにマウントされているの
が通常であるので、DMAコントローラのみを交換する
ことはできず、前述したオートイニシャライズ機能のD
MAコントローラ8を備えたパーソナルコンピュータ等
では、依然として前述の如き問題が残る。
Some of the latest DMA controllers have improved auto-initialization functions so that the base address BA and the current address CA and the base count BC and the current count CC can be updated separately. That is, even when the current address CA and the current count CC are being used for data transfer, the base address BA and the base count BC can be updated. Therefore, the following PCM audio data is developed at another address of the main memory 7 and can be continuously DMA-transferred (can be continuously reproduced or recorded as audio).
However, models equipped with such a DMA controller require complicated hardware and are generally expensive (expensive). Further, since the DMA controller is usually mounted on a main body board of a personal computer or the like, it is not possible to replace only the DMA controller, and the D for the auto-initialization function described above.
In a personal computer or the like provided with the MA controller 8, the above-mentioned problem still remains.

【0013】なお、この問題は、かかるパーソナルコン
ピュータの販売時から存在したものではなく、当初は十
分と考えられていた音声データの大きさがマルチメディ
ア通信等の発達により不足するに到ったために生じたも
のである。
This problem does not exist at the time of selling such a personal computer, but the size of audio data, which was initially considered to be sufficient, has become insufficient due to the development of multimedia communication and the like. It has occurred.

【0014】本発明は、また、連続した音声の録音/再
生が可能なPCM音声データ処理方式を提供することを
目的とする。
Another object of the present invention is to provide a PCM audio data processing system capable of recording / reproducing continuous audio.

【0015】[0015]

【課題を解決するための手段】図1は本発明の原理構成
図であり、本発明によるデータ処理装置を示す。図1に
おいて、メインメモリ7及び外部記憶装置9はPCM音
声データを格納する。バッファメモリ25は音声の入出
力のためにPCM音声データを一時的に格納する。DM
Aコントローラ8はメインメモリ7とバッファメモリ2
5との間でのPCM音声データの転送を行なうデータ転
送制御手段である。
FIG. 1 is a block diagram showing the principle of the present invention, and shows a data processing apparatus according to the present invention. In FIG. 1, a main memory 7 and an external storage device 9 store PCM audio data. The buffer memory 25 temporarily stores PCM audio data for audio input / output. DM
The A controller 8 has a main memory 7 and a buffer memory 2
Data transfer control means for transferring PCM voice data to and from PCM voice data.

【0016】割込信号発生手段36はDMAコントロー
ラ8に設定された転送データ量の1/n毎に割込み信号
を発生する。データ転送手段11は割込み信号に応じて
メインメモリ7と外部記憶装置9との間でPCM音声デ
ータの転送を行なう。
The interrupt signal generating means 36 generates an interrupt signal every 1 / n of the transfer data amount set in the DMA controller 8. The data transfer means 11 transfers PCM audio data between the main memory 7 and the external storage device 9 according to the interrupt signal.

【0017】割込み信号発生手段36は、前記メインメ
モリ7とバッファメモリ25との間でのPCM音声デー
タの転送量が転送データ量の1/nに達する毎に割込み
信号を発生し、データ転送手段11は、割込み信号に応
じてメインメモリ7のうちバッファメモリ25との間で
のPCM音声データの転送が終了した領域について、外
部記憶装置9との間でPCM音声データの転送を行な
う。
The interrupt signal generating means 36 generates an interrupt signal every time the transfer amount of PCM audio data between the main memory 7 and the buffer memory 25 reaches 1 / n of the transfer data amount. Reference numeral 11 transfers the PCM audio data to and from the external storage device 9 in the area of the main memory 7 where the transfer of the PCM audio data to and from the buffer memory 25 has been completed in response to the interrupt signal.

【0018】[0018]

【作用】図1はn=2とした場合の音声の連続再生処理
について示す。なお、図1においてメインメモリ7は2
つ示してあるが、実際は1つであり、説明の便宜上同一
のものを2つ示したものである。
FIG. 1 shows a continuous sound reproduction process when n = 2. It should be noted that in FIG.
However, the number is actually one, and two identical ones are shown for convenience of explanation.

【0019】DMAコントローラ8において、PCM音
声データの転送量はベースカウントBCとして設定され
ている。従って、割込み信号発生手段36は、その1/
2(1/2BC)毎に割込み信号を発生する。
In the DMA controller 8, the transfer amount of the PCM voice data is set as a base count BC. Therefore, the interrupt signal generation means 36 calculates 1 /
An interrupt signal is generated every 2 (1 / 2BC).

【0020】DMAコントローラ8は、メインメモリ7
からバッファメモリ25へのPCM音声データの転送
(DMA転送)を、ベースアドレスBAを転送して得た
カレントアドレスCAから開始する(図中で示す)。
The DMA controller 8 has a main memory 7
Transfer (DMA transfer) of the PCM audio data from the buffer memory 25 to the buffer memory 25 is started from the current address CA obtained by transferring the base address BA (shown in the figure).

【0021】このDMA転送がメインメモリ7の1/2
即ち1/2BCまで行なわれると(図中終了)、割込
み信号発生手段36がこれを検出して割込み信号を発生
し、データ転送手段11に通知する。
This DMA transfer is performed in half of the main memory 7.
That is, when the processing is performed up to 1 / 2BC (end in the figure), the interrupt signal generating means 36 detects this and generates an interrupt signal to notify the data transfer means 11.

【0022】これに応じて、データ転送手段11は、メ
インメモリ7のうちDMA転送の終了した領域Xについ
て、外部記憶装置9からPCM音声データを書込む(図
中で示す)。
In response, the data transfer means 11 writes PCM audio data from the external storage device 9 to the area X of the main memory 7 where the DMA transfer has been completed (shown in the figure).

【0023】この時、同時、にDMAコントローラ8
は、メインメモリ7のうち残りの領域Yについて、バッ
ファメモリ25へのDMA転送を行なっている。この領
域YについてのDMA転送が終了すると(図中終
了)、再び割込み信号が発生される。これにより、今度
は、領域Yについてのデータ転送手段11による外部記
憶装置9からのデータの書込み(図中で示す)と、領
域XについてのDMAコントローラ8によるバッファメ
モリ25へのDMA転送(図中で示す)とが同時に行
なわれる。ここでDMA転送されるデータは、先に図中
で示す処理において書込まれたデータである。
At this time, the DMA controller 8
Performs a DMA transfer to the buffer memory 25 for the remaining area Y in the main memory 7. When the DMA transfer for this area Y ends (end in the figure), an interrupt signal is generated again. Thereby, writing of data from the external storage device 9 for the area Y by the data transfer means 11 (shown in the figure) and DMA transfer of the area X by the DMA controller 8 to the buffer memory 25 (FIG. ) Are performed simultaneously. Here, the data to be DMA-transferred is data written in the processing shown in FIG.

【0024】以上をくり返すことにより、メインメモリ
7の同一の領域を用いつつ(ベースアドレスBA等を別
々に更新できないままで)、連続した音声データをDM
A転送でき、連続して音声として再生又は録音ができ
る。
By repeating the above, continuous audio data can be transferred to the DM while using the same area of the main memory 7 (without updating the base address BA etc. separately).
A-transfer and continuous playback or recording as voice.

【0025】また、DMAコントローラ8は従来のもの
を用いつつ、割込み信号発生手段36(これは簡単なカ
ウンタで構成できる)とデータ転送手段11(これは既
存のプログラムの簡単な修正で実現できる)を追加する
だけで、連続した音声の再生、録音が可能となる。
The DMA controller 8 uses a conventional DMA controller, while the interrupt signal generating means 36 (which can be constituted by a simple counter) and the data transfer means 11 (which can be realized by a simple modification of an existing program). By simply adding, continuous sound reproduction and recording can be performed.

【0026】[0026]

【実施例】図2は実施例構成図であり、本発明のデータ
処理装置又はパーソナルコンピュータ装置の構成を示
す。
FIG. 2 is a block diagram of an embodiment, showing the configuration of a data processing device or a personal computer device of the present invention.

【0027】このデータ処理装置は、音声データを処理
するために、以下の構成を備える。音声の録音時、マイ
ク(図示せず)等を介して得たアナログ音声入力を、A
DC(アナログ/デジタルコンバータ)1がデジタル信
号(PCM音声データ)に変換し、バッファメモリ2に
格納する。バッファメモリ2はADC1とのタイミング
微調整バッファである。バッファメモリ2のデータは、
CPU(中央処理装置)10のデータバスを介してメイ
ンメモリ7へ転送される。
This data processing device has the following configuration for processing audio data. At the time of voice recording, the analog voice input obtained through a microphone (not shown)
A DC (analog / digital converter) 1 converts the signal into a digital signal (PCM audio data) and stores it in a buffer memory 2. The buffer memory 2 is a timing fine adjustment buffer with the ADC 1. The data in the buffer memory 2 is
The data is transferred to the main memory 7 via the data bus of the CPU (Central Processing Unit) 10.

【0028】音声の再生時、メインメモリ7上のデータ
は、データバスを介してバッファメモリ5へ転送され
る。バッファメモリ5のデータ(PCM音声データ)
を、DAC(デジタル/アナログコンバータ)4がアナ
ログ信号に変換し、スピーカ(図示せず)等を介してア
ナログ音声出力として出力する。バッファメモリ5はD
AC4とのタイミング微調整バッファである。
At the time of audio reproduction, data on the main memory 7 is transferred to the buffer memory 5 via the data bus. Data in buffer memory 5 (PCM audio data)
(Digital / Analog Converter) 4 converts this into an analog signal and outputs it as an analog audio output via a speaker (not shown) or the like. Buffer memory 5 is D
This is a timing fine adjustment buffer for AC4.

【0029】なお、図2におけるバッファメモリ2及び
5を図1においてはバッファメモリ25として示してい
る。バッファメモリ2及び5とメインメモリ7との間の
データ転送(DMA転送)は、DMAコントローラ8が
行なう。
The buffer memories 2 and 5 in FIG. 2 are shown as a buffer memory 25 in FIG. Data transfer (DMA transfer) between the buffer memories 2 and 5 and the main memory 7 is performed by the DMA controller 8.

【0030】メインメモリ7は、その領域の一部が、当
該メインメモリ7とバッファメモリ2及び5との間での
DMA転送のための領域(バッファ)として用いられ
る。この領域のサイズは、図示の如く、後述の転送バイ
ト数と同一とされる。
A part of the area of the main memory 7 is used as an area (buffer) for DMA transfer between the main memory 7 and the buffer memories 2 and 5. The size of this area is the same as the number of transfer bytes described later, as shown in the figure.

【0031】このバッファとされる領域は、1/n毎に
割込み信号が発生される場合、n分割して使用される。
この実施例では、n=2とし、バッファとされる領域を
X及びYの2つの領域に分割して用いる。
When an interrupt signal is generated every 1 / n, the buffer area is divided into n parts.
In this embodiment, n = 2, and a region to be a buffer is divided into two regions of X and Y and used.

【0032】メインメモリ7上のPCM音声データは、
録音時にはデータバスを介して外部記憶装置9へ転送さ
れ、再生時にはデータバスを介して外部記憶装置9から
転送される。このデータ転送は、データ転送手段11が
行なう。
The PCM audio data on the main memory 7 is
At the time of recording, the data is transferred to the external storage device 9 via the data bus, and at the time of reproduction, the data is transferred from the external storage device 9 via the data bus. This data transfer is performed by the data transfer means 11.

【0033】外部記憶装置9は、例えば磁気ディスク
(ハードディスク)装置からなり、種々のデータ、例え
ばPCM音声データを格納する。データ転送手段11は
メインメモリ7と外部記憶装置9との間のデータ転送を
行なう処理プログラムからなり、予め起動され、1/n
毎の割込み信号の発生を待って、所定の処理(データ転
送)を行なう。この処理プログラムは、例えばパーソナ
ルコンピュータへ挿入するカード形式で用意できる。従
って、ハードウェアの変更は不要であり、既存のパーソ
ナルコンピュータにも容易に適用できる。なお、データ
転送手段11は後述の複数存在するDMAコントローラ
8の別チャネル又はCPU10の持つ連続移動命令であ
ってもよい。
The external storage device 9 comprises, for example, a magnetic disk (hard disk) device and stores various data, for example, PCM audio data. The data transfer means 11 comprises a processing program for transferring data between the main memory 7 and the external storage device 9 and is started up in advance and used for
A predetermined process (data transfer) is performed after each interrupt signal is generated. This processing program can be prepared, for example, in the form of a card to be inserted into a personal computer. Therefore, there is no need to change hardware, and the present invention can be easily applied to existing personal computers. The data transfer means 11 may be a separate channel of the plurality of DMA controllers 8 to be described later or a continuous movement command of the CPU 10.

【0034】DMAコントローラ8は、サブチャネル
“0”乃至“2”の複数設けられる。例えば、サブチャ
ネル“0”はメインメモリ7とメモリバッファ2及び5
との間のDMA転送を行ない、サブチャネル“1”はメ
インメモリ7と外部記憶装置9との間のデータ転送(D
MA転送)を行なう。
A plurality of DMA controllers 8 are provided for sub-channels "0" to "2". For example, the sub-channel “0” corresponds to the main memory 7 and the memory buffers 2 and 5
DMA transfer between the main memory 7 and the external storage device 9 is performed on the sub-channel "1".
MA transfer).

【0035】DMAコントローラ8は、音声の録音時、
バッファメモリ2のデータをメインメモリへDMA転送
し、音声の再生時、メインメモリ7のデータをバッファ
メモリ2へDMA転送する。このDMA転送はバイト単
位で複数回くり返し行なわれる。
The DMA controller 8 is used to record a voice,
The data in the buffer memory 2 is DMA-transferred to the main memory, and the data in the main memory 7 is DMA-transferred to the buffer memory 2 when audio is reproduced. This DMA transfer is repeated a plurality of times in byte units.

【0036】DMAコントローラ8は、その各々が、ベ
ースアドレスBA、カレントアドレスCA、ベースカウ
ントBC及びカレントカウントCCを格納する内部レジ
スタを有し(以下、必要に応じてBAレジスタ等と呼
ぶ)これらを用いてオートイニシャライズを行なう。
Each of the DMA controllers 8 has an internal register for storing a base address BA, a current address CA, a base count BC, and a current count CC (hereinafter referred to as a BA register or the like as necessary). Auto-initialize using

【0037】即ち、DMAコントローラ8は、DMA転
送開始時に、BA及びBCレジスタに格納されたベース
アドレスBA及びベースカウントBCを、各々、CA及
びCCカウンタに転送する。これにより、ベースアドレ
スBAはカレントアドレスCAとされ、ベースカウント
BCはカレントカウントCCとされる。更に、転送終了
をトリガとして、DMAコントローラ8は、再び、ベー
スアドレスBA及びベースカウントBCを各々CA及び
CCカウンタに転送してこれらを各々カレントアドレス
CA及びカレントカウントCCとする。
That is, at the start of the DMA transfer, the DMA controller 8 transfers the base address BA and the base count BC stored in the BA and BC registers to the CA and CC counters, respectively. Thus, the base address BA is set to the current address CA, and the base count BC is set to the current count CC. Further, triggered by the end of the transfer, the DMA controller 8 transfers the base address BA and the base count BC to the CA and CC counters, respectively, and sets them as the current address CA and the current count CC, respectively.

【0038】以上のオートイニシャライズ機能において
は、ベースアドレスBAとカレントアドレスCA、ベー
スカウントBCとカレントカウントCCは別々に更新す
ることができない。即ち、データ転送のためにカレント
アドレスCA及びカレントカウントCCが使用されてい
る間は、ベースアドレスBA及びベースカウントBCを
更新することはできない。従って、転送終了をトリガと
して、常に同一のベースアドレスBA及びベースカウン
トBCが、カレントアドレスCA及びカレントカウント
CCとして格納されることになる。
In the above-described auto-initialization function, the base address BA and the current address CA, and the base count BC and the current count CC cannot be updated separately. That is, while the current address CA and the current count CC are used for data transfer, the base address BA and the base count BC cannot be updated. Therefore, the same base address BA and the same base count BC are always stored as the current address CA and the current count CC with the transfer end as a trigger.

【0039】ベースアドレスBA及びベースカウントB
Cは、所定の処理プログラムによって予め設定される。
ベースアドレスBAは、音声の録音時、メインメモリ7
の転送先アドレスを指示し、音声の再生時、メインメモ
リ7の転送元アドレスを指示する。ベースカウントBC
は、当該DMA転送により転送すべきバイト数を指示す
る。
Base address BA and base count B
C is set in advance by a predetermined processing program.
The base address BA is stored in the main memory 7 when recording audio.
Of the main memory 7 during audio reproduction. Base count BC
Indicates the number of bytes to be transferred by the DMA transfer.

【0040】カレントアドレスCAは、ベースアドレス
BAのCAレジスタへのセットによって得られ、1バイ
ト(1回)のPCM音声データのDMA転送毎に+1だ
け加算される(インクリメントされる)。カレントカウ
ントは、ベースカウントBCのCCレジスタへのセット
によって得られ、1バイト(1回)のPCM音声データ
のDMA転送毎に−1だけ減算される(デクリメントさ
れる)。
The current address CA is obtained by setting the base address BA in the CA register, and is added (incremented) by +1 every time one byte (one time) of the DMA transfer of the PCM audio data. The current count is obtained by setting the base count BC in the CC register, and is decremented (decremented) by -1 for each DMA transfer of one byte (one time) of PCM voice data.

【0041】オートイニシャライズ機能を補うために、
DMAコントローラ8とバッファメモリ2及び5との間
に各々1/nカウンタ3及び6が設けられる。なお、図
2における1/nカウンタ3及び6は図1における割込
み信号発生手段36を構成する。
To supplement the auto-initialize function,
1 / n counters 3 and 6 are provided between the DMA controller 8 and the buffer memories 2 and 5, respectively. The 1 / n counters 3 and 6 in FIG. 2 constitute the interrupt signal generating means 36 in FIG.

【0042】1/nカウンタ3及び6は、DMAコント
ローラ8の行なうDMA転送の転送バイト数(転送回
数)をカウントし、所定のカウント値となった時に割込
み信号を発生しCPU10へ割込みを通知する。
The 1 / n counters 3 and 6 count the number of transfer bytes (the number of transfers) of the DMA transfer performed by the DMA controller 8, generate an interrupt signal when the count value reaches a predetermined value, and notify the CPU 10 of the interrupt. .

【0043】1/nカウンタ3及び6は、パーソナルコ
ンピュータの追加ボードに実装する形式で用意できる。
1/nカウンタ3及び6は、nの値及びベースカウント
BCの値が定まれば、簡単なハードウェアとして構成で
きる。従って、簡単なハードウェアの追加により、既存
のパーソナルコンピュータにも容易に適用できる。
The 1 / n counters 3 and 6 can be prepared in a form mounted on an additional board of a personal computer.
If the value of n and the value of the base count BC are determined, the 1 / n counters 3 and 6 can be configured as simple hardware. Therefore, it can be easily applied to an existing personal computer by adding simple hardware.

【0044】この実施例では、n=2とし、1/2カウ
ンタを1/nカウンタ3及び6として用いる。即ち、1
/nカウンタ3及び6は、DMA転送されたバイト数を
カウントし、その値が1/2BC(=1/2CC)とな
った時に割込み信号を発生する。領域X及びYの大きさ
も1/2BCに相当するので、この割込み信号は領域X
又はYについてDMA転送が終了する毎に発生される。
In this embodiment, n = 2, and 1/2 counters are used as 1 / n counters 3 and 6. That is, 1
The / n counters 3 and 6 count the number of bytes transferred by DMA and generate an interrupt signal when the value becomes 1 / 2BC (= 1 / 2CC). Since the sizes of the regions X and Y also correspond to 1 / 2BC, this interrupt signal
Or, it is generated every time the DMA transfer for Y is completed.

【0045】なお、nの値は言うまでもなく“2”に限
られるものではなく、3以上の適当な値に設定でき、よ
り細くDMA転送及びバッファメモリのリードライトを
制御できる。
It is needless to say that the value of n is not limited to "2", but can be set to an appropriate value of 3 or more, so that DMA transfer and read / write of the buffer memory can be controlled more finely.

【0046】図3はn=2とした場合の音声再生時のデ
ータ転送シーケンスを示す。外部記憶装置(ハードディ
スク)9には、連続したPCM音声データA乃至Hが格
納されている。このデータは出力周波数を44KHzと
したときの2秒分に相当する88Kバイトあるとする。
FIG. 3 shows a data transfer sequence at the time of audio reproduction when n = 2. The external storage device (hard disk) 9 stores continuous PCM audio data A to H. This data is assumed to be 88 Kbytes, which is equivalent to 2 seconds when the output frequency is 44 KHz.

【0047】メインメモリ7において、DMA転送のた
めの領域として、総数22Kバイトの領域が確保されて
いるとする。DMAコントローラ8のBAレジスタには
この領域の先頭アドレスが設定され、BCレジスタには
この領域の大きさ(22Kバイト)が設定される。ま
た、n=2であるから、(再生用)1/nカウンタ6は
1/2カウンタであり、11Kバイトの転送をカウント
し、11Kバイト毎に割込み信号を発生する。
It is assumed that a total area of 22 Kbytes is secured in the main memory 7 as an area for DMA transfer. The start address of this area is set in the BA register of the DMA controller 8, and the size (22 Kbytes) of this area is set in the BC register. Since n = 2, the (for reproduction) 1 / n counter 6 is a 1/2 counter, counts the transfer of 11 Kbytes, and generates an interrupt signal every 11 Kbytes.

【0048】所定の処理プログラムが、外部記憶装置9
上のデータA及びBを、各々、メインメモリ7の領域X
及びYに転送した上で、DMAコントローラ8を起動す
る。これにより、音声の再生が開始される。
A predetermined processing program is stored in the external storage device 9.
The above data A and B are stored in the area X of the main memory 7, respectively.
After that, the DMA controller 8 is activated. Thereby, the reproduction of the sound is started.

【0049】まず、DMAコントローラ8において、ベ
ースアドレスBA及びベースカウントBCがカレントア
ドレスCA及びカレントカウントCCとされる。そし
て、領域X及びYのデータA及びBが順にバッファメモ
リ5にDMA転送され、DAC4から音声出力される。
First, in the DMA controller 8, the base address BA and the base count BC are used as the current address CA and the current count CC. Then, the data A and B in the areas X and Y are sequentially DMA-transferred to the buffer memory 5 and output from the DAC 4 as sound.

【0050】このDMA転送の中間点、即ち、領域Xの
データAのDMA転送終了時点で、1/nカウンタ6が
DMA転送が11Kバイトだけ行なわれたことを検出
し、割込み信号を発生する。なお、この時点は時間的に
は、図示の如く250ms後である。
At the intermediate point of the DMA transfer, that is, at the end of the DMA transfer of the data A in the area X, the 1 / n counter 6 detects that the DMA transfer has been performed for 11 Kbytes, and generates an interrupt signal. Note that this point in time is 250 ms later as shown in the figure.

【0051】この割込み信号は、領域Xのデータの転送
終了を意味し、領域Xへ次のデータの転送が可能である
ことを示す。領域Xの空きを知ることにより、次の領域
Xのデータの転送までの期間を、次のデータを予め用意
する時間として用いることができる。
This interrupt signal means that the transfer of the data in the area X has been completed, and indicates that the next data can be transferred to the area X. By knowing the availability of the area X, the period until the transfer of the data of the next area X can be used as the time for preparing the next data in advance.

【0052】この割込み信号により、データ転送手段1
1である1/n割込み処理ルーチン(プログラム)が起
動され、外部記憶装置9上のデータCを領域Xに転送す
る。この転送は、図示の如く、データBのDMA転送の
間に終了できる。
The data transfer means 1 is generated by this interrupt signal.
The 1 / n interrupt processing routine (program), which is 1, is started, and the data C on the external storage device 9 is transferred to the area X. This transfer can be completed during the DMA transfer of data B, as shown.

【0053】次に、領域YのデータBのDMA転送が終
了すると、DMAコントローラ8において、そのオート
イニシャライズ機能により、再びカレントアドレスCA
及びカレントカウントCCがセットされる。一方、この
時点で、DMA転送が再度11Kバイトだけ行なわれた
ので、1/nカウンタ6が割込み信号を発生する。
Next, when the DMA transfer of the data B in the area Y is completed, the DMA controller 8 again uses the auto-initialization function to execute the current address CA.
And the current count CC are set. On the other hand, at this point, since the DMA transfer has been performed again for only 11 Kbytes, the 1 / n counter 6 generates an interrupt signal.

【0054】従って、領域XのデータCのDMA転送が
行なわれ、一方、空いた領域YへのデータDの転送が行
なわれる。データDの転送は、データCのDMA転送の
間に終了できる。
Therefore, DMA transfer of data C in area X is performed, while data D is transferred to empty area Y. The transfer of data D can be completed during the DMA transfer of data C.

【0055】以後、同様の処理のくり返しにより、連続
して音声を再生することができる。図4はn=2とした
場合の音声録音時のデータ転送シーケンスを示す。この
シーケンスにおける各条件は、図3のシーケンスと同様
であるとする。
Thereafter, the sound can be continuously reproduced by repeating the same processing. FIG. 4 shows a data transfer sequence at the time of voice recording when n = 2. Each condition in this sequence is assumed to be the same as the sequence in FIG.

【0056】アナログ音声入力に応じてADC1からP
CM音声データが出力され、バッファメモリ2に格納さ
れる。直ちにDMAコントローラ8が起動され、音声の
録音が開始される。
ADC1 to P according to analog audio input
The CM audio data is output and stored in the buffer memory 2. Immediately, the DMA controller 8 is activated, and the recording of voice is started.

【0057】DMAコントローラ8において、カレント
アドレスCA及びカレントカウントCCがセットされ
る。そして、バッファメモリ2から領域X及びYへデー
タA及びBが順にDMA転送される。
In the DMA controller 8, a current address CA and a current count CC are set. Then, the data A and B are sequentially DMA-transferred from the buffer memory 2 to the areas X and Y.

【0058】このDMA転送の中間点、即ち、領域Xへ
のデータAのDMA転送の終了時点で、1/nカウンタ
3がDMA転送が11Kバイトだけ行なわれたことを検
出し、割込み信号を発生する。
At the intermediate point of this DMA transfer, that is, at the end of the DMA transfer of data A to area X, 1 / n counter 3 detects that 11 Kbytes of DMA transfer have been performed, and generates an interrupt signal. I do.

【0059】この割込み信号により、1/n割込み処理
ルーチンが起動され、領域XのデータAを外部記憶装置
9へ転送する。この転送は、図示の如く、データBの領
域Yへの転送終了までに終了できる。
The 1 / n interrupt processing routine is started by this interrupt signal, and the data A in the area X is transferred to the external storage device 9. This transfer can be completed by the end of the transfer of the data B to the area Y as shown.

【0060】次に、領域YへのデータBのDMA転送が
終了すると、再びカレントアドレスCA及びカレントカ
ウントCCがセットされ、一方、割込み信号が発生され
る。これにより、空いた領域XへのデータCのDMA転
送が行なわれ、一方、データ格納の終了した(満になっ
た)領域YのデータBが外部記憶装置9へ転送される。
以後、同様のくり返しにより、連続して音声を録音す
る。
Next, when the DMA transfer of the data B to the area Y is completed, the current address CA and the current count CC are set again, and an interrupt signal is generated. Thus, the DMA transfer of the data C to the empty area X is performed, and the data B of the area Y in which the data storage is completed (filled) is transferred to the external storage device 9.
Thereafter, the sound is continuously recorded by the same repetition.

【0061】[0061]

【発明の効果】以上説明したように、本発明によれば、
DMA転送を用いるPCM音声データ処理において、ハ
ードウェアとして1/nカウンタを追加することによ
り、メインメモリを見かけ上n分割して外部記憶装置と
の間でのデータ転送を行なうことができるので、メイン
メモリとバッファメモリとの間でのDMA転送を連続し
て行なうことができ、音声の連続した録音再生ができ
る。更に、既存のパーソナルコンピュータ等に1/nカ
ウンタ等の簡単な構成を追加することにより、前記DM
A転送を連続して行なうことが可能となり、音声の連続
した録音再生が可能となる。
As described above, according to the present invention,
In PCM audio data processing using DMA transfer, by adding a 1 / n counter as hardware, the main memory can be apparently divided into n and data can be transferred to and from an external storage device. DMA transfer between the memory and the buffer memory can be performed continuously, and continuous recording and reproduction of audio can be performed. Further, by adding a simple configuration such as a 1 / n counter to an existing personal computer or the like, the DM
A transfer can be performed continuously, and continuous recording and reproduction of audio can be performed.

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

【図1】本発明の原理構成図である。FIG. 1 is a principle configuration diagram of the present invention.

【図2】実施例構成図である。FIG. 2 is a configuration diagram of an embodiment.

【図3】転送シーケンス(再生時)を示す図である。FIG. 3 is a diagram showing a transfer sequence (during reproduction).

【図4】転送シーケンス(録音時)を示す図である。FIG. 4 is a diagram showing a transfer sequence (during recording).

【図5】従来技術説明図である。FIG. 5 is an explanatory view of a conventional technique.

【符号の説明】 1 ADC 2,5 バッファメモリ 3,6 1/nカウンタ 4 DAC 7 メインメモリ 8 DMAコントローラ 9 外部記憶装置 10 CPU 11 データ転送手段 25 バッファメモリ 36 割込み信号発生手段[Description of Signs] 1 ADC 2, 5 Buffer memory 3, 6 1 / n counter 4 DAC 7 Main memory 8 DMA controller 9 External storage device 10 CPU 11 Data transfer means 25 Buffer memory 36 Interrupt signal generation means

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G10L 19/00 Continuation of the front page (58) Field surveyed (Int.Cl. 7 , DB name) G10L 19/00

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 PCM音声データを格納するメインメモ
リ(7)及び外部記憶装置(9)と、 音声の入出力のために前記PCM音声データを一時的に
格納するバッファメモリ(25)と、 前記メインメモリ(7)とバッファメモリ(25)との
間での前記PCM音声データの転送を行なうDMAコン
トローラ(8)とを備えるデータ処理装置において、 前記DMAコントローラ(8)に設定された転送データ
量の1/n毎に割込み信号を発生する割込み信号発生手
段(36)と、 前記割込み信号に応じて前記メインメモリ(7)と外部
記憶装置(9)との間で前記PCM音声データの転送を
行なうデータ転送手段(11)とを設け、 前記割込み信号発生手段(36)が、前記メインメモリ
(7)とバッファメモリ(25)との間での前記PCM
音声データの転送量が前記転送データ量の1/nに達す
る毎に前記割込み信号を発生し、 前記データ転送手段(11)が、前記割込み信号に応じ
て前記メインメモリ(7)のうち前記バッファメモリ
(25)との間での前記PCM音声データの転送が終了
した領域について、前記外部記憶装置(9)との間で前
記PCM音声データの転送を行なうことを特徴とするP
CM音声データ処理方式。
A main memory for storing PCM audio data and an external storage device; a buffer memory for temporarily storing the PCM audio data for inputting / outputting audio; A data processing apparatus comprising: a DMA controller (8) for transferring the PCM audio data between a main memory (7) and a buffer memory (25); a transfer data amount set in the DMA controller (8) An interrupt signal generating means (36) for generating an interrupt signal every 1 / n of the time, transferring the PCM audio data between the main memory (7) and the external storage device (9) according to the interrupt signal. And an interrupt signal generating means (36) for transferring the P data between the main memory (7) and the buffer memory (25). M
The interrupt signal is generated every time the transfer amount of the audio data reaches 1 / n of the transfer data amount, and the data transfer means (11) responds to the interrupt signal by using the buffer in the main memory (7). The PCM audio data is transferred to and from the external storage device (9) in an area where the transfer of the PCM audio data to and from the memory (25) is completed.
CM audio data processing method.
【請求項2】 前記メインメモリ(7)とバッファメモ
リ(25)との間での前記PCM音声データの転送はバ
イト単位で行なわれ、 前記転送データ量は転送バイト数として設定され、 前記割込み信号発生手段(36)は前記転送バイト数の
1/nのカウント値毎に割込み信号を発生する1/nカ
ウンタ(3,6)からなることを特徴とする請求項1記
載のPCM音声データ処理方式。
2. The transfer of the PCM audio data between the main memory (7) and the buffer memory (25) is performed in byte units, the transfer data amount is set as a transfer byte number, and the interrupt signal 2. The PCM audio data processing system according to claim 1, wherein said generating means comprises a 1 / n counter for generating an interrupt signal for each 1 / n count value of said transfer byte number. .
【請求項3】 前記メインメモリ(7)のうち前記バッ
ファメモリ(25)との間での前記PCM音声データの
転送のために用いられる領域のサイズを、前記転送バイ
ト数と同一とすることを特徴とする請求項2記載のPC
M音声データ処理方式。
3. The size of an area of the main memory (7) used for transferring the PCM audio data between the main memory (7) and the buffer memory (25) may be equal to the number of transfer bytes. 3. The PC according to claim 2, wherein:
M audio data processing system.
JP30913492A 1992-11-19 1992-11-19 PCM audio data processing method Expired - Fee Related JP3251670B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30913492A JP3251670B2 (en) 1992-11-19 1992-11-19 PCM audio data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30913492A JP3251670B2 (en) 1992-11-19 1992-11-19 PCM audio data processing method

Publications (2)

Publication Number Publication Date
JPH06161500A JPH06161500A (en) 1994-06-07
JP3251670B2 true JP3251670B2 (en) 2002-01-28

Family

ID=17989310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30913492A Expired - Fee Related JP3251670B2 (en) 1992-11-19 1992-11-19 PCM audio data processing method

Country Status (1)

Country Link
JP (1) JP3251670B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100889730B1 (en) 2006-12-01 2009-03-24 한국전자통신연구원 Method and Apparatus for Direct Memory Access Controlling

Also Published As

Publication number Publication date
JPH06161500A (en) 1994-06-07

Similar Documents

Publication Publication Date Title
JP3687090B2 (en) Storage device with sound source
JP2976429B2 (en) Address control circuit
JP3251670B2 (en) PCM audio data processing method
US6801961B2 (en) Method for solving intermission of streaming data and associated device thereof
JP3569592B2 (en) Codec
JP3066282B2 (en) Memory write control circuit
JPH0721700A (en) Memory system for correcting error
JPH10162559A (en) Method for controlling soft data
JP2709965B2 (en) Music transmission / reproduction system used for BGM reproduction
JP3323877B2 (en) Sound generation control device
JPS6118995A (en) Performance system
JP3252426B2 (en) Digital sound recording and playback device
US20010029402A1 (en) Electronic device for the recording/reproduction of voice data
JPH05135228A (en) Digital signal transfer system and digital voice signal processing circuit and signal conversion circuit
JP2823033B2 (en) Recording device
JP3332639B2 (en) Read / write control method and control circuit for memory for audio recording / reproducing device
JPH0492297A (en) Recording and reproducing device
JP3081492B2 (en) Memory read / write control circuit
JPH0785593A (en) Digital sound recording and reproducing device
JPH0619629A (en) Data storage
JPS59113498A (en) Voice processor
JPH0514933B2 (en)
JPH01269351A (en) Sound digital recording device and sound digital reproducing device
JPH0546200A (en) Speech recording and reproduction device
JP2005182967A (en) Audio information apparatus

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20011106

LAPS Cancellation because of no payment of annual fees