JP2826244B2 - DMA unit - Google Patents

DMA unit

Info

Publication number
JP2826244B2
JP2826244B2 JP33710392A JP33710392A JP2826244B2 JP 2826244 B2 JP2826244 B2 JP 2826244B2 JP 33710392 A JP33710392 A JP 33710392A JP 33710392 A JP33710392 A JP 33710392A JP 2826244 B2 JP2826244 B2 JP 2826244B2
Authority
JP
Japan
Prior art keywords
timer
dma
register
count
unit
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
JP33710392A
Other languages
Japanese (ja)
Other versions
JPH06187284A (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.)
Consejo Superior de Investigaciones Cientificas CSIC
Original Assignee
Consejo Superior de Investigaciones Cientificas CSIC
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 Consejo Superior de Investigaciones Cientificas CSIC filed Critical Consejo Superior de Investigaciones Cientificas CSIC
Priority to JP33710392A priority Critical patent/JP2826244B2/en
Publication of JPH06187284A publication Critical patent/JPH06187284A/en
Application granted granted Critical
Publication of JP2826244B2 publication Critical patent/JP2826244B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロコンピュータ
において、タイマ機能を有するDMAユニットに関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a DMA unit having a timer function in a microcomputer.

【0002】[0002]

【従来の技術】従来、メモリとI/0機器間で大量のデ
ータ転送を高速に行うため、DMA(Direct M
emory Access)ユニットを有するマイクロ
コンピュータがある。また、特開平2−40754に開
示されているように、DMA転送を使用しない時のDM
Aユニットの有効活用のため、タイマ機能を有したDM
Aユニットがある。
2. Description of the Related Art Conventionally, to transfer a large amount of data between a memory and an I / O device at high speed, a DMA (Direct M
There is a microcomputer that has a memory access unit. Also, as disclosed in Japanese Patent Application Laid-Open No. 2-40754, the DM when the DMA transfer is not used.
DM with timer function for effective use of A unit
There is an A unit.

【0003】図2に、従来のタイマ機能を有したDMA
ユニットと他の構成を示す。すなわち、CPU31、D
MAユニット32、クロックジェネレータ33より主に
構成され、DMAユニット32は、DMAコントロール
部34、DMA/タイマ切換レジスタ35、カウントレ
ジスタ36、カウントデクリメンタ37より構成されて
いる。上記CPU31とDMAユニット32は、アドレ
スバス41、及び、データバス42、及び、コントロー
ルバス43よりなるバスと接続されている。
FIG. 2 shows a conventional DMA having a timer function.
2 shows a unit and other configurations. That is, the CPU 31, D
The DMA unit 32 mainly includes an MA unit 32 and a clock generator 33. The DMA unit 32 includes a DMA control unit 34, a DMA / timer switching register 35, a count register 36, and a count decrementer 37. The CPU 31 and the DMA unit 32 are connected to a bus including an address bus 41, a data bus 42, and a control bus 43.

【0004】上記従来のタイマ機能を有したDMAユニ
ットの動作について説明する。
The operation of the conventional DMA unit having a timer function will be described.

【0005】まず、CPU31よりDMAユニット32
内のDMA/タイマ切換レジスタ35へデータを入力す
ることにより、DMA動作をするかタイマ動作をするか
選択される。ここで、DMA/タイマ切換レジスタ35
への入力がハイレベルならばDMA動作、ローレベルな
らばタイマ動作をするように構成されている。
First, a DMA unit 32 is sent from a CPU 31.
By inputting data to the DMA / timer switching register 35 in the above, it is selected whether to perform the DMA operation or the timer operation. Here, the DMA / timer switching register 35
It is configured to perform a DMA operation when the input to the LM is high level, and to perform a timer operation when the input is low level.

【0006】DMAユニットがDMA動作を選択された
場合、DMAユニット32は、CPU31にHOLDR
Q信号44を出力し、バスの使用権を明け渡すよう要求
する。CPU31は上記HOLDRQ信号44が入力さ
れるとHOLDAK信号45を出力して、バスの使用権
がDMAユニット32に移ったことを通知する。その結
果、I/0機器(図示せず)にDMA転送が可能になっ
たことを通知し、DMA動作が開始される。DMA転送
が可能になると、DMAユニット32のカウントレジス
タ36に転送回数としてセットしておいた値は、カウン
トデクリメンタ37によってDMA転送が1回行われる
毎に、1づつ減じていく。そして、これを繰り返してカ
ウントレジスタ36の値がマイナスになると、カウント
デクリメンタ37よりDMAコントロール部34にボロ
ー信号46が入力され、決められた回数のDMA転送が
処理されたことを通知する。
When the DMA unit selects the DMA operation, the DMA unit 32 sends a HOLDR to the CPU 31.
It outputs a Q signal 44 requesting that the right to use the bus be surrendered. When the HOLDRQ signal 44 is input, the CPU 31 outputs a HOLDAK signal 45 to notify that the right to use the bus has been transferred to the DMA unit 32. As a result, the I / O device (not shown) is notified that the DMA transfer is enabled, and the DMA operation is started. When DMA transfer becomes possible, the value set as the number of transfers in the count register 36 of the DMA unit 32 is decremented by one each time the count decrementer 37 performs one DMA transfer. When the value of the count register 36 becomes negative by repeating this, the borrow signal 46 is input from the count decrementer 37 to the DMA control unit 34 to notify that a predetermined number of DMA transfers have been processed.

【0007】一方、DMAユニットがタイマ動作を選択
された場合、DMAユニットのカウントレジスタ36に
計時したい値を設定しておき、クロックジェネレータ3
3より入力されるタイマクロック47に同期してカウン
トレジスタ36の値を減じていき、カウントレジスタ3
6の値がマイナスになると、カウント終了信号49が出
力され、定められた時間が経過したことを通知する。
On the other hand, when the DMA unit selects the timer operation, the value to be measured is set in the count register 36 of the DMA unit, and the clock generator 3
3, the value of the count register 36 is reduced in synchronization with the timer clock 47 input from the
When the value of 6 becomes negative, a count end signal 49 is output to notify that a predetermined time has elapsed.

【0008】[0008]

【発明が解決しようとする課題】上記従来のタイマ機能
を有したDMAブロックでは、タイマ動作は、一度のみ
で終了してしまい繰り返し連続して計時することができ
ないため、タイマ機能として不十分であった。
In the above-described conventional DMA block having a timer function, the timer operation is completed only once and cannot be repeated continuously. Was.

【0009】本発明は、上記の点に鑑みてなされたもの
であり、既存の回路を共用し、回路の大幅な増加を招く
ことなく、繰り返し連続計時も可能としてタイマ機能を
より強力なものとしたDMAユニットを提供するもので
ある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above points, and has a more powerful timer function by sharing an existing circuit and enabling repeated continuous timekeeping without causing a significant increase in the circuit. This provides a DMA unit that has been used.

【0010】[0010]

【課題を解決するための手段】本発明は、タイマ機能を
有するDMAユニットにおいて、DMA転送時の転送元
アドレスカウントレジスタ、及び、転送先アドレスカウ
ントレジスタを、タイマ動作時のタイマカウントレジス
タ、及び、転送先アドレスカウントレジスタを、タイマ
動作時のタイマカウントレジスタ、及び、計時カウント
設定値記憶レジスタとして共用し、タイマ動作終了を検
知する手段と検知手段の検知出力に基づき計時カウント
設定値記憶レジスタの内容を前記タイマカウントレジス
タに転送する手段を有することを特徴とするものであ
る。
According to the present invention, in a DMA unit having a timer function, a transfer source address count register and a transfer destination address count register during a DMA transfer are replaced by a timer count register during a timer operation, and The transfer destination address count register is used as a timer count register during timer operation and a timer count setting value storage register, and the contents of the timer count setting value storage register based on the detection output of the timer operation end detection means and the detection means Is transferred to the timer count register.

【0011】[0011]

【作用】本発明によれば、専用回路を大幅に付加せず
に、比較的簡単な構成で、より強力で高性能なタイマ機
能を有するDMAユニットを提供することができる。
According to the present invention, it is possible to provide a DMA unit having a relatively powerful and high-performance timer function with a relatively simple configuration without significantly adding a dedicated circuit.

【0012】[0012]

【実施例】図1に、本発明のDMAユニットの一実施例
を示す。すなわち、CPU1、DMAユニット2、クロ
ックジェネレータ3より主に構成され、DMAユニット
2は、DMAコントロール部4、DMA/タイマ切換レ
ジスタ5、カウントレジスタ6、カウントデクリメンタ
7を含んだ構成である。さらに、DMAコントロール部
4は、転送元アドレスカウントレジスタ8、転送先アド
レスカウントレジスタ9、オーバーフロー検知部10を
含んだ構成である。上記CPU1とDMAユニット2
は、アドレスバス11、及び、データバス12、及び、
コントロールバス13よりなるバスと接続され、14は
HOLDRQ信号、15はHOLDAK信号、16はボ
ロー信号、17はタイマクロック信号、18はタイマオ
ーバーフロー信号を示している。
FIG. 1 shows an embodiment of a DMA unit according to the present invention. That is, it is mainly composed of a CPU 1, a DMA unit 2, and a clock generator 3. The DMA unit 2 has a configuration including a DMA control unit 4, a DMA / timer switching register 5, a count register 6, and a count decrementer 7. Further, the DMA control unit 4 is configured to include a transfer source address count register 8, a transfer destination address count register 9, and an overflow detection unit 10. CPU 1 and DMA unit 2
Are the address bus 11, the data bus 12, and
Reference numeral 14 denotes a HOLDRQ signal, 15 denotes a HOLDAK signal, 16 denotes a borrow signal, 17 denotes a timer clock signal, and 18 denotes a timer overflow signal.

【0013】本実施例ではDMA動作時の上記転送アド
レスカウントレジスタ8を、タイマ動作時にタイマモジ
ュロレジスタ(所望の計時カウント数を設定する計時カ
ウント設定値記憶レジスタのこと。以下「タイマモジュ
ロレジスタ」という。)として用い、DMA動作時の上
記転送先アドレスカウントレジスタ9を、タイマ動作時
に、実際のカウントを行うタイマカウントレジスタとし
て用いる。また、上記オーバーフロー検知部10は、タ
イマ動作時の専用回路として設けられており、DMA動
作時には動作しない。DMA動作とタイマ動作の選択
は、DMA/タイマ切換レジスタ5の入力レベルが、ハ
イレベルならば、DMA動作、ローレベルならば、タイ
マ動作をするように構成されている。
In this embodiment, the transfer address count register 8 at the time of the DMA operation is replaced with a timer modulo register (a timer count set value storage register for setting a desired time count number at the time of the timer operation; hereinafter, referred to as a "timer modulo register"). .), And the transfer destination address count register 9 during the DMA operation is used as a timer count register that performs actual counting during the timer operation. Further, the overflow detection unit 10 is provided as a dedicated circuit at the time of the timer operation, and does not operate at the time of the DMA operation. The DMA operation and the timer operation are selected such that the DMA operation is performed when the input level of the DMA / timer switching register 5 is high, and the timer operation is performed when the input level is low.

【0014】以下、本発明の実施例での動作について説
明する。
The operation of the embodiment of the present invention will be described below.

【0015】DMAユニットがDMA動作を選択された
場合、従来技術で述べた処理と同様な処理を行う。この
時、転送元アドレスカウントレジスタ8は、データ転送
元となるアドレスを指定するレジスタとして動作し、D
MA転送が、1回行われる毎に、指定アドレスをカウン
トアップする。同様に、転送先アドレスカウントレジス
タ9は、データ転送先となるアドレスを指定するレジス
タとして動作し、DMA転送が、1回行われる毎に、指
定アドレスをカウントアップする。
When the DMA unit selects the DMA operation, a process similar to the process described in the prior art is performed. At this time, the transfer source address count register 8 operates as a register for specifying an address as a data transfer source,
Every time the MA transfer is performed once, the designated address is counted up. Similarly, the transfer destination address count register 9 operates as a register for specifying an address to be a data transfer destination, and counts up the specified address every time DMA transfer is performed once.

【0016】DMAユニットがタイマ動作を選択された
場合、転送元アドレスカウントレジスタ8(タイマモジ
ュロレジスタ)及び転送先アドレスカウントレジスタ9
(タイマカウントレジスタ)に所望の計時カウント数を
設定し、クロックジェネレータ3より入力されるタイマ
クロック信号17に同期して、タイマカウントレジスタ
の値をカウントアップする。タイマカウントレジスタの
値がオーバーフローすると、オーバーフロー検知部10
よりタイマオーバーフロー信号18が、DMAユニット
外に出力され、定められた時間が経過したことを知らせ
る。また、タイマオーバーフロー信号18は、タイマモ
ジュロレジスタにも入力され、タイマモジュロレジスタ
に設定していた計時カウント数が、タイマカウントレジ
スタへロードされ、カウントレジスタは、再び、タイマ
クロックに同期してカウントアップを行う。以下、同様
にして、オーバーフロー信号が発生するたびに、定めら
れた時間が経過したことをDMAユニット外に通知し、
タイマ動作を繰り返す。タイマ動作は、再び、DMA動
作が開始されるか、あるいは、タイマのスタート/スト
ップ機能によるストップ指示が入力された時に終了す
る。
When the DMA unit selects the timer operation, the transfer source address count register 8 (timer modulo register) and the transfer destination address count register 9
(Timer count register) is set to a desired count value, and the value of the timer count register is counted up in synchronization with the timer clock signal 17 input from the clock generator 3. When the value of the timer count register overflows, the overflow detection unit 10
A timer overflow signal 18 is output outside the DMA unit to notify that a predetermined time has elapsed. The timer overflow signal 18 is also input to the timer modulo register, and the count value set in the timer modulo register is loaded into the timer count register, and the count register counts up again in synchronization with the timer clock. I do. Hereinafter, similarly, each time an overflow signal is generated, the fact that a predetermined time has elapsed is notified to the outside of the DMA unit,
Repeat the timer operation. The timer operation ends when the DMA operation is started again or when a stop instruction by the start / stop function of the timer is input.

【0017】なお、図1において、タイマ動作時に、転
送元アドレスカウントレジスタをタイマカウントレジス
タ、転送先アドレスカウントレジスタをタイマモジュロ
レジスタとして用いても良く、本発明の範囲内におい
て、上記実施例に限定されない。
In FIG. 1, during the timer operation, the transfer source address count register may be used as a timer count register and the transfer destination address count register may be used as a timer modulo register. Not done.

【0018】[0018]

【発明の効果】以上、説明したように、本発明によれ
ば、繰り返し連続して計時を行うことができ、チップ面
積の増加を抑えつつ、ハードウェアの有効利用を行い、
より強力で、高性能なタイマ機能を有するDMAユニッ
トが実現できる。
As described above, according to the present invention, time can be measured repeatedly and continuously, and the hardware can be effectively used while suppressing an increase in the chip area.
A more powerful and high performance DMA unit having a timer function can be realized.

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

【図1】本発明の一実施例でのDMAユニットと他の構
成を示す図である。
FIG. 1 is a diagram showing a DMA unit and another configuration according to an embodiment of the present invention.

【図2】従来のDMAユニットと他の構成を示す図であ
る。
FIG. 2 is a diagram showing a conventional DMA unit and another configuration.

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

1 CPU(中央処理装置) 2 DMAユニット 3 クロックジェネレータ 4 DMAコントロール部 5 DMA/タイマ切換レジスタ 6 カウントレジスタ 7 カウントデクリメンタ 8 転送元アドレスカウントレジスタ(タイマモジュロ
レジスタ) 9 転送先アドレスカウントレジスタ(タイマカウント
レジスタ) 10 オーバーフロー検知部
1 CPU (Central Processing Unit) 2 DMA Unit 3 Clock Generator 4 DMA Control Unit 5 DMA / Timer Switching Register 6 Count Register 7 Count Decrementer 8 Source Address Count Register (Timer Modulo Register) 9 Destination Address Count Register (Timer) Count register) 10 Overflow detector

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 タイマ機能を有するDMAユニットにお
いて、DMA転送時の転送元アドレスカウントレジス
タ、及び、転送先アドレスカウントレジスタを、タイマ
動作時のタイマカウントレジスタ、及び、計時カウント
設定値記憶レジスタとして共用し、タイマ動作終了を検
知する手段と検知手段の検知出力に基づき計時カウント
設定値記憶レジスタの内容を前記タイマカウントレジス
タに転送する手段を有することを特徴とするDMAユニ
ット。
In a DMA unit having a timer function, a transfer source address count register and a transfer destination address count register during a DMA transfer are shared as a timer count register during a timer operation and a timer count setting value storage register. And a means for detecting the end of the timer operation and a means for transferring the contents of the clock count set value storage register to the timer count register based on the detection output of the detection means.
JP33710392A 1992-12-17 1992-12-17 DMA unit Expired - Fee Related JP2826244B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33710392A JP2826244B2 (en) 1992-12-17 1992-12-17 DMA unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33710392A JP2826244B2 (en) 1992-12-17 1992-12-17 DMA unit

Publications (2)

Publication Number Publication Date
JPH06187284A JPH06187284A (en) 1994-07-08
JP2826244B2 true JP2826244B2 (en) 1998-11-18

Family

ID=18305466

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33710392A Expired - Fee Related JP2826244B2 (en) 1992-12-17 1992-12-17 DMA unit

Country Status (1)

Country Link
JP (1) JP2826244B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE602005017948D1 (en) 2005-06-30 2010-01-07 Freescale Semiconductor Inc DEVICE AND METHOD FOR ARBITRATING BETWEEN DIRECT MEMORY ACCESS TASK REQUIREMENTS
US7930444B2 (en) 2005-06-30 2011-04-19 Freescale Semiconductor, Inc. Device and method for controlling multiple DMA tasks
EP1899826B1 (en) 2005-06-30 2011-03-16 Freescale Semiconductor, Inc. Device and method for controlling an execution of a dma task
US8239587B2 (en) 2006-01-18 2012-08-07 Freescale Semiconductor, Inc. Device having data sharing capabilities and a method for sharing data

Also Published As

Publication number Publication date
JPH06187284A (en) 1994-07-08

Similar Documents

Publication Publication Date Title
JPH01237864A (en) Dma transfer controller
JP2822986B2 (en) Single chip microcomputer with DMA
JPS6191752A (en) Microcomputer
KR100395383B1 (en) Data transfer apparatus
JP2826244B2 (en) DMA unit
JPS61105486A (en) Timer device
JP4309508B2 (en) DMA controller
JPH10320349A (en) Processor and data transfer system using the processor
JPH03263158A (en) Common bus arbitration control system
JP2688245B2 (en) DMA controller
JPH0240754A (en) Dma unit
JP3096382B2 (en) DMA circuit
JPS6012184Y2 (en) Valid data table frame address conversion device
JP2604051B2 (en) Data transfer method
JPH02166549A (en) Shared memory controller
JP2538680B2 (en) CRT control circuit
JPH05282239A (en) Dma transfer system
JPS6318451A (en) Dma transfer control circuit
JPH04369065A (en) Direct memory access controller
JPH047773A (en) Dma controller
JPH10171752A (en) Method for monitoring data transfer of dma
JPS616755A (en) Data transfer system
JPS60222951A (en) Data transfer system
JPS6340955A (en) Direct memory access controller
JPS60231251A (en) Multi-cpu system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20080911

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

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20080911

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

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20090911

LAPS Cancellation because of no payment of annual fees