JP3691213B2 - Processor and memory access method - Google Patents

Processor and memory access method Download PDF

Info

Publication number
JP3691213B2
JP3691213B2 JP19362897A JP19362897A JP3691213B2 JP 3691213 B2 JP3691213 B2 JP 3691213B2 JP 19362897 A JP19362897 A JP 19362897A JP 19362897 A JP19362897 A JP 19362897A JP 3691213 B2 JP3691213 B2 JP 3691213B2
Authority
JP
Japan
Prior art keywords
address
data
control signal
write
processor core
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
JP19362897A
Other languages
Japanese (ja)
Other versions
JPH1139278A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP19362897A priority Critical patent/JP3691213B2/en
Publication of JPH1139278A publication Critical patent/JPH1139278A/en
Application granted granted Critical
Publication of JP3691213B2 publication Critical patent/JP3691213B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Microcomputers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、LSI半導体集積回路からなりプロセッサコアとデータメモリを主構成要素とするプロセッサに関するもので、特に内部のデータメモリとプロセッサ外部の入出力装置との間でデータ入出力を行うプロセッサに関するものである。
【0002】
【従来の技術】
データ処理を行う従来のプロセッサにおいては、内蔵されるデータメモリとプロセッサ外部にあるデータ入出力装置との間でデータ転送を行うことが必要である。その方法としては、主にダイレクトメモリアクセス方式(以下、DMA方式と略称する)が使用される。
【0003】
図6の従来のプロセッサの一例を示す。図6において、100はデータメモリ、200はプロセッサコア、400はダイレクトメモリアクセスコントローラ(以下、DMAコントローラと記載する)である。401はDMA送信バッファ、402はDMA受信バッファ、403はDMAアドレスポインタ、404はDMAアドレス加算レジスタである。20はアドレスバス、21はデータバス、22はリードイネーブル信号、23はライトイネーブル信号、60はDMA要求信号である。
【0004】
上記のプロセッサおけるDMA方式では以下のようにデータの転送を続行する。プロセッサの演算処理を行うプロセッサコア200が命令メモリ(図示せず)からのプログラムを読み出して演算を実行している。この演算実行中に入出力装置(図示せず)とデータメモリ100との間でのデータ転送を行う必要が生じた場合、DMAコントローラ400がデータ転送に応じて先頭アドレスおよびDMA転送サイズを設定し、DMA開始状態にする。
【0005】
この状態に入ってから、送信レジスタもしくは受信レジスタに対しDMA開始要求を行う。この開始要求によってプロセッサが使用していたデータバス、アドレスバスを開放し、DMAコントローラを使用可能状態とする。
DMA開始要求が受け付けられてバスが開放になると、データの転送が開始される。DMA受信の場合は入力レジスタが外部端子からのデータを保持し、DMAコントローラ400に内蔵されているDMAアドレスポインタ403が示すアドレスへの転送を行う。DMAアドレスポインタ403の値は転送のたびにDMAコントローラ400内に内蔵されているアドレス加算レジスタ404の値と加算される。この加算されたアドレスは次のデータ転送のアドレスとして使用され、これを指定回数繰り返すことによってDMA転送が完了する。
【0006】
このようにして転送されたデータのメモリイメージを図7および図8に示す。DMAを行う時のアドレスポインタはレジスタに格納されている固有のビットによって加算されていく。例えばアドレスポインタとの加算を行うレジスタの値が1であった場合には図7のようなメモリ格納になり、加算レジスタの値が3であった場合には図8のようなメモリ格納となる。なお、図7および図8において、500はデータが格納されたメモリセル、501はデータが格納されていないメモリセルである。
【0007】
またDMAとは異なった方式で外部のデータ入出力装置とデータメモリとの間でデータ転送が行われる場合もある。一つの例としては、図9に示すように、データメモリと同一のメモリマップ空間にマッピングされていてプロセッサの外部に接続されている他のデータメモリを使用する場合である。図9において、100はデータメモリ、200はプロセッサコア、450は外部メモリインターフェース回路、201は外部端子である。56は外部メモリリードアクセス信号、57は外部メモリライトアクセス信号である。
【0008】
このときのデータの転送手順は次のようになる。まず、プロセッサが外部端子を全て開放(ハイインピーダンス状態)にするように、データ入出力装置がプロセッサに対して要求を出す。この後に、開放されたデータバス、アドレスバスを使用して、データ入出力装置がプロセッサの外部に接続されている他のデータメモリに対してアクセスを行う。データ入出力装置からのデータ転送が終了したところで、データ入出力装置がプロセッサ側からのアクセスを許可する。プロセッサは、アクセスが許可された後で、外部の他のデータメモリのデータを内蔵のデータメモリにコピーして使用するか、もしくは外部データメモリをプロセッサコアが直接アクセスすることによってデータを使用する。
【0009】
【発明が解決しようとする課題】
上記のような従来例を使用した場合には、次のような問題点がある。
まず、DMAによってデータ転送を実行した場合には、外部からのデータメモリのアクセスのアドレスとプロセッサコアからのデータメモリのアクセスとが重なった場合にプロセッサコアによるデータメモリのアクセス動作に影響を与えることになるだけで、基本的にはプロセッサコアの動作に影響を与えることが少ないが、データメモリへのアクセス信号をすべてプロセッサに入力することが必要であるため、プロセッサの端子数が多くなるという問題がある。
【0010】
また、DMAによってデータ転送を実行した場合には、データが規則的に格納されることになる。この際、DMAで使用されるアドレス発生器には、2つ以上のアドレス修飾機能を持つ場合もあるが、DMAの転送中にはそのうちの1つのみが選択されることになり、転送の途中でその値を変更することはできず、外部から入力データを格納する自由度が低い。プロセッサコアが処理する命令によっては、規則的に並んだデータよりも、そうではないデータの場合が処理の面で有利になる場合がある。このような場合に、データ配列を変更しないで処理を実行するにしても、プロセッサコアがデータ配列が最適となるように配列を並べ替える場合でもステップ数の増加を招くことになり、データ処理の効率が低下する。
【0011】
一方、外部のデータメモリを使用した場合には、DMAの場合と異なり、データの格納の配列には自由度が高い。しかしながら、データメモリを外部につけることによってアクセスを行う信号を全てプロセッサ外部に出力する必要があり、端子数が増加するという問題がある。
また、内部のデータメモリとは別に外部のデータメモリを設けてデータ転送を行っているので、プロセッサコアの処理と外部からのデータ入出力のためのデータ転送とを並列的に実行することができ、プロセッサコアの動作に影響を与えることはないが、プロセッサの処理速度に比べて外部で使用されるデータメモリのアクセススピードは遅く、プロセッサが使用するためにはメモリアクセスウエイトを使用する必要がある。このことによってプロセッサのデータ処理の効率は大きく損なわれる。
【0012】
したがって、本発明の第1の目的は、プロセッサコアの処理に影響を与えることが少なく、しかもデータメモリへのアクセスのために外部に設ける端子数を削減することができるプロセッサを提供することである。
また、本発明の第2の目的は、外部からの入力データを格納する自由度が高いプロセッサを提供することである。
【0013】
また、本発明の第3の目的は、プロセッサ外部とプロセッサとのデータ入出力をプロセッサコアの処理に全く影響を与えるがことなく、しかもデータメモリへのアクセスのために外部に設ける端子数を削減することができるプロセッサを提供することである。
また、本発明の第4の目的は、処理効率を高めることができるプロセッサを提供することである。
【0016】
【課題を解決するための手段】
本発明の請求項1記載のプロセッサは、半導体集積回路で一体形成されるプロセッサであって、第1のアドレスを出力するとともにデータの書き込みまたは読み出しを指示する第1の書き込み/読み出し制御信号を出力するプロセッサコアと、外部よりデータを入出力するための第1の端子と、外部よりデータの書き込みまたは読み出しを指示する第2の書き込み/読み出し制御信号を入力するための第2の端子と、外部よりアドレス更新を指示するアドレス更新指示信号を入力するための第3の端子と、第2のアドレスを出力し、第2の書き込み/読み出し制御信号およびアドレス更新指示信号の何れか一方がアクティブとなったときに第2のアドレスを更新するアドレス生成手段と、調停回路を有し第1の書き込み/読み出し制御信号がアクティブとなったときにプロセッサコアから与えられる第1のアドレスを入力としてプロセッサコアとの間でデータの受け渡しを行い、第2の書き込み/読み出し制御信号がアクティブとなったときにアドレス生成手段から与えられる第2のアドレスを入力として第1の端子との間でデータの受け渡しを行うデータメモリとを備えている。
【0017】
この構成によると、プロセッサコアから出力される第1の書き込み/読み出し制御信号がアクティブとなったときには、プロセッサコアから与えられる第1のアドレスを入力としてデータメモリとプロセッサコアとの間でデータの受け渡しが行われる。また、第2の端子より入力される第2の書き込み/読み出し制御信号がアクティブとなったときには、アドレス生成手段から与えられる第2のアドレスを入力としてデータメモリと第1の端子との間でデータの受け渡しが行われるとともに、アドレス生成手段における第2のアドレスが更新される。また、第3の端子より入力されるアドレス更新指示信号がアクティブとなったときには、アドレス生成手段における第2のアドレスが更新される。
【0018】
このように外部とのデータ入出力を行うためのアドレス生成手段を設けたことにより、プロセッサコアの処理に影響を与えることが少なく、しかもアドレス生成手段を半導体集積回路に内蔵したことにより、データメモリへのアクセスのために外部に設ける端子数を削減することができる。
また、アドレス更新指示信号によって、データメモリのアクセスを行わずに第2のアドレスを更新することを可能としたので、不規則に並んだアドレスにデータを書き込むこと、ならびに不規則にデータが格納されている場合において各データを読み出すことが可能となり、外部からのデータを格納する自由度を高くすることができる。そのため、プロセッサコアの処理効率を高くすることができる。
【0019】
本発明の請求項記載のプロセッサは、請求項1記載のプロセッサにおいて、アドレス生成手段を、第2のアドレスを保持するレジスタと、このレジスタの値を所定値だけ増加させるアドレス更新用の加算器とで構成している。この構成によると、第2のアドレスが所定値ずつ更新されることになる。
【0024】
本発明の請求項3記載のプロセッサは、半導体集積回路で一体形成されるプロセッサであって、第1のアドレスを出力するとともにデータの書き込みまたは読み出しを指示する第1の書き込み/読み出し制御信号を出力するプロセッサコアと、外部よりデータを入出力するための第1の端子と、外部よりデータの書き込みまたは読み出しを指示する第2の書き込み/読み出し制御信号を入力するための第2の端子と、外部よりアドレス更新を指示するアドレス更新指示信号を入力するための第3の端子と、第2のアドレスを出力し、第2の書き込み/読み出し制御信号およびアドレス更新指示信号の何れか一方がアクティブとなったときに第2のアドレスを更新するアドレス生成手段と、第1の書き込み/読み出し制御信号がアクティブとなったときにプロセッサコアから与えられる第1のアドレスを入力としてプロセッサコアとの間でデータの受け渡しを行い、第2の書き込み/読み出し制御信号がアクティブとなったときにアドレス生成手段から与えられる第2のアドレスを入力として第1の端子との間でデータの受け渡しを行う第1のデータメモリと、第1のデータメモリと同一アドレス空間にマッピングされ、第1の書き込み/読み出し制御信号がアクティブとなったときにプロセッサコアから与えられる第1のアドレスを入力としてプロセッサコアとの間でデータの受け渡しを行い、第2の書き込み/読み出し制御信号がアクティブとなったときにアドレス生成手段から与えられる第2のアドレスを入力として第1の端子との間でデータの受け渡しを行う第2のデータメモリと、プロセッサコアから与えられるアクセス対象選択制御信号の一方の状態に対応して、第1の書き込み/読み出し制御信号がアクティブとなったときにプロセッサコアから与えられる第1のアドレスを入力とするプロセッサコアとの間のデータの受け渡しを第1のデータメモリに行わせ、プロセッサコアから与えられるアクセス対象選択制御信号の他方の状態に対応して、第2の書き込み/読み出し制御信号がアクティブとなったときにアドレス生成手段から与えられる第2のアドレスを入力とする第1の端子との間のデータの受け渡しを第1のデータメモリに行わせる第1の選択回路と、プロセッサコアから与えられるアクセス対象選択制御信号の一方の状態に対応して、第2の書き込み/読み出し制御信号がアクティブとなったときにアドレス生成手段から与えられる第2のアドレスを入力とする第1の端子との間のデータの受け渡しを第2のデータメモリに行わせ、プロセッサコアから与えられるアクセス対象選択制御信号の他方の状態に対応して、第1の書き込み/読み出し制御信号がアクティブとなったときにプロセッサコアから与えられる第1のアドレスを入力とするプロセッサコアとの間のデータの受け渡しを第2のデータメモリに行わせる第2の選択回路とを備えている。
【0025】
この構成によると、アクセス対象選択制御信号が一方の状態になっている場合は、第1の選択回路がプロセッサコアを選択し、プロセッサコアから出力される第1の書き込み/読み出し制御信号がアクティブとなったときにプロセッサコアから与えられる第1のアドレスを入力として第1のデータメモリとプロセッサコアとの間でデータの受け渡しが行われる。またこのときに、第2の選択回路が第1,第2および第3の端子とアドレス生成手段とを選択し、第2の端子より入力される第2の書き込み/読み出し制御信号がアクティブとなったときにアドレス生成手段から与えられる第2のアドレスを入力として第2のデータメモリと第1の端子との間でデータの受け渡しが行われるとともに、アドレス生成手段における第2のアドレスが更新され、第3の端子より入力されるアドレス更新指示信号がアクティブとなったときにアドレス生成手段における第2のアドレスが更新される。
【0026】
また、アクセス対象選択制御信号が他方の状態になっている場合は、第1の選択回路が第1,第2および第3の端子とアドレス生成手段とを選択し、第2の端子より入力される第2の書き込み/読み出し制御信号がアクティブとなったときにアドレス生成手段から与えられる第2のアドレスを入力として第1のデータメモリと第1の端子との間でデータの受け渡しが行われるとともに、アドレス生成手段における第2のアドレスが更新され、第3の端子より入力されるアドレス更新指示信号がアクティブとなったときにアドレス生成手段における第2のアドレスが更新される。またこのときに、第2の選択回路がプロセッサコアを選択し、プロセッサコアから出力される第1の書き込み/読み出し制御信号がアクティブとなったときにプロセッサコアから与えられる第1のアドレスを入力として第2のデータメモリとプロセッサコアとの間でデータの受け渡しが行われる。
【0027】
このように、同一アドレス空間を有する第1および第2のデータメモリと、アドレス生成手段と、第1および第2の選択回路を設けたので、外部からのデータ入出力とプロセッサコアの処理とを並列に実行することが可能となり、プロセッサコアの処理に全く影響を与えることがなく、しかも、第1および第2のデータメモリと、アドレス生成手段と、第1および第2の選択回路を半導体集積回路に内蔵したことにより、データメモリへのアクセスのために外部に設ける端子数を削減することができる。さらに、第1および第2のデータメモリともに、半導体集積回路に内蔵しているため、第1および第2のデータメモリのアクセスを高速に実行することが可能となり、プロセッサコアにメモリアクセスウエイトを設定することが必要なくなり、処理効率を高めることができる。
【0028】
また、アドレス更新指示信号によって、データメモリのアクセスを行わずに第2のアドレスを更新することが可能となることで、不規則に並んだアドレスにデータを書き込むこと、ならびに不規則にデータが格納されている場合において各データを読み出すことが可能となり、外部からのデータを格納する自由度を高くすることができる。そのため、プロセッサコアの処理効率を高くすることができる。
【0029】
本発明の請求項記載のプロセッサは、請求項記載のプロセッサにおいて、アドレス生成手段を、第2のアドレスを保持するレジスタと、このレジスタの値を所定値だけ増加させるアドレス更新用の加算器とで構成している。この構成によると、第2のアドレスが所定値ずつ更新されることになる。
【0030】
本発明の請求項5記載のメモリアクセス方法は、請求項1または3記載のプロセッサにおけるデータメモリをアクセスする方法であり、第2の端子から第2の書き込み/読み出し制御信号を入力する第1のステップと、第1のステップにより入力された第2の書き込み/読み出し制御信号に従って、予め保持した第2のアドレスをデータメモリに供給すると同時に、第2のアドレスの値を更新する第2のステップと、第2のステップにより与えられる第2のアドレスでデータメモリをアクセスし、データメモリと第1の端子との間でデータの受け渡しを行う第3のステップとを含む。
【0031】
以下、本発明の実施の形態を図面を参照しながら説明する。
〔第1の実施の形態〕
図1に本発明の第1の実施の形態におけるプロセッサのブロック図を示す。図1において、データメモリ100は、アドレスバス20を通して第1のアドレスを出力するとともにデータの書き込みまたは読み出しを指示するリードイネーブル信号22またはライトイネーブル信号23を出力するプロセッサコア200とデータバス21で接続され、外部端子201とデータバス11で接続されている。
【0032】
アクセスするアドレスはプロセッサコア200でアクセスする場合はアドレスバス20を利用し、外部端子201からのアクセスを行う場合はアドレス発生器202のアドレスバス10からの出力を利用する。プロセッサ外部からのアクセスとプロセッサコア200からのアクセスが重なった場合のためにデータメモリ100の入出力部には調停回路204を設置しておく。
【0033】
アドレス発生器202は、外部からのライトイネーブル信号(特許請求の範囲における書き込み制御信号に対応し、以下、WEと略す)12やリードイネーブル信号(特許請求の範囲における読み出し制御信号に対応し、以下、REと略す)13の立ち上がりエッジを検出するエッジ検出回路203からのエッジ検出信号51を受けてアドレスの値を+1増加させる機構を持つ。
【0034】
上記のアドレス発生器202とエッジ検出回路203とで特許請求の範囲における、第2のアドレスを出力し、第2の読み出し/書き込み制御信号がアクティブとなったときに第2のアドレスを更新するアドレス生成手段、つまりアドレスポインタを構成している。
また、外部端子201の中のINC信号14の立ち上がりエッジを検出することによって、データメモリ100にアクセスすることなく、アドレス発生器202の出力値21を1増加させることができる。
【0035】
ここで、外部端子201において、データバス11に対応したDIO端子が特許請求の範囲における、外部よりデータを入出力するための第1の端子に相当する。また、WE信号またはRE信号に対応したWE端子またはRE端子が特許請求の範囲における、外部よりデータの書き込みまたは読み出しを指示する第2の読み出し/書き込み制御信号を入力するための第2の端子に相当する。また、アドレス制御(以下、INCと略す)信号に対応したINC端子が特許請求の範囲における、外部よりアドレス更新を指示するアドレス更新指示信号を入力するための第3の端子に相当する。
【0036】
上記のデータメモリ100は、リードイネーブル信号22またはライトイネーブル信号23がアクティブとなったときにプロセッサコア200からアドレスバス20を通して与えられる第1のアドレスを入力としてプロセッサコア200との間でデータの受け渡しを行い、第2のライトイネーブル信号12またはリードイネーブル信号13がアクティブとなったときにアドレス発生器202からアドレスバス10を通して与えられる第2のアドレスを入力としてDIO端子との間でデータの受け渡しを行う。
【0037】
つぎに、アドレス発生器202の構成を図2に示す。アドレス発生器202は、レジスタ300と加算器301と選択回路302とからなる。外部端子201のINC端子からのINC信号14のエッジを検出した時、あるいはWE端子またはRE端子のエッジを検出した時に、エッジ検出回路203から出力されるエッジ検出信号51がイネーブルになるが、このエッジ検出信号51がイネーブルになった場合に、選択回路302は加算器301の出力ラインであるデータバス52を選択し、レジスタ300が加算器301のデータバス52のデータ、つまり加算結果を格納する。プロセッサコア200からのアクセスによって、このレジスタ300の値を設定する場合には、ライト信号54をイネーブルにすることによって、選択回路302はデータバス53の値を選択し、レジスタ300がデータバス53の値を格納する。
【0038】
上記のアドレスの修飾は次のような動作で行われる。エッジ検出回路203によってエッジを検出した次のマシンサイクルにエッジ検出信号51をイネーブルにする。アドレス発生器202に内蔵されている選択回路302はエッジ検出信号51がイネーブルとなることによって加算器301の出力ラインであるデータバス52を選択し、アドレスレジスタ300は、制御信号51によってデータバス21の出力に1を加算した値が出力されているデータバス52上のデータを格納する。
【0039】
また、プロセッサコア200によってアドレスレジスタ300を設定する場合はプロセッサコア200がライト信号54をイネーブルにし、プロセッサコア200が設定する値をデータバス52に出力する。これを受けて、アドレス発生器202に内蔵されている選択回路302はデータバス53を選択し、アドレスレジスタ300は、データバス53のデータを格納する。
データメモリアクセスを行わずにアドレスだけを1増加させる場合は次のような動作で行われる。INC端子の立ち上がりエッジをエッジ検出回路203によって検出する。エッジが検出された場合、次のマシンサイクルでエッジ検出信号51をイネーブル状態にする。これを受けてアドレス発生器202に内蔵される選択回路302がデータバス52を選択し、アドレスレジスタ300が出力されているアドレスバス21の値を1加算した値が出力されているデータバス52の値を格納する。
【0040】
上記のような方法をとった場合、プロセッサ外部からのアクセスがあった時のタイミングチャートの例を図3に示す。動作の例として、外部入出力回路から外部端子201を経由してデータメモリ100へとデータを書き込んでいる。データメモリ100は、プロセッサコア200のシステムクロックに同期させて動かす必要があるので、外部からのWE信号は、その立ち上がりエッジを検出して、一度プロセッサコア200のシステムクロックとの同期を取ってデータメモリ100へ出力している。また、これと同様の信号を利用することでアドレスの更新を行っている。アドレスの更新はデータメモリ100へのアクセスが終了して後実施する。
【0041】
図3のタイミングによってデータメモリ100に格納されるデータの配列を図4に示す。例として外部入出力装置のデータはデータメモリ100の先頭から書き込まれるとしている。このとき、外部入出力装置からデータメモリ100へ格納されているデータは先頭アドレスから順番に並んでいく。転送の途中でINC信号の立ち上がりエッジが検出された場合はデータは書き込まれずにアドレスが1増加するので、データの格納されていないアドレスが存在することになる。図4のアドレス2,5がこれに対応する。
【0042】
この実施の形態のプロセッサによると、外部とのデータ入出力を行うためのアドレス生成手段としてアドレス発生器202およびエッジ検出回路203を設けたことにより、プロセッサコア200の処理に影響を与えることが少なく、しかもアドレス発生器202およびエッジ検出回路203を半導体集積回路に内蔵したことにより、データメモリ100へのアクセスのために外部に設ける端子数を削減することができる。
【0043】
また、INC信号によって、データメモリ100のアクセスを行わずに第2のアドレスを更新することを可能としたので、不規則に並んだアドレスにデータを書き込むこと、ならびに不規則にデータが格納されている場合において各データを読み出すことが可能となり、外部からの入力データを格納する自由度を高くすることができる。そのため、プロセッサコアの処理効率を高くすることができる。
【0044】
〔第2の実施の形態〕
図5に本発明の第1の実施の形態におけるプロセッサのブロック図を示す。この実施の形態のプロセッサには、半導体集積回路で一体化されていて、同一のアドレス空間にマッピングされた2個以上のデータメモリ(本例では2個のデータメモリとする)100,101が存在し、データメモリ100とデータメモリ101に対するアクセス信号(データバス21のデータ入出力、アドレスバス20のアドレス入力、RE信号22、WE信号23など)を、プロセッサコア200からの出力と外部端子201からの出力とから選択する選択回路205、206を設ける。
【0045】
この選択回路205,206は、アクセス対象制御信号55によって、一方がプロセッサコア200のアクセス専用として動作する場合には、他方のデータメモリが外部とのデータ入出力専用として動作するように設定されている。
上記の第1の選択回路205は、プロセッサコア200から与えられるアクセス対象選択制御信号55の一方の状態(例えば、ハイレベル)に対応して、リードイネーブル信号22またはライトイネーブル信号23がアクティブとなったときにプロセッサコア200のアドレスバス20から与えられる第1のアドレスを入力とするプロセッサコア200との間のデータの受け渡しを第1のデータメモリ100に行わせ、プロセッサコア200から与えられるアクセス対象選択制御信号55の他方の状態(例えば、ローレベル)に対応して、ライトイネーブル信号12またはリードイネーブル信号13がアクティブとなったときにアドレス発生器202のアドレスバス10から与えられる第2のアドレスを入力とするDIO端子との間のデータの受け渡しを第1のデータメモリ100に行わせる。
【0046】
また、第2の選択回路206は、プロセッサコア200から与えられるアクセス対象選択制御信号55の一方の状態に対応して、ライトイネーブル信号12またはリードイネーブル信号13がアクティブとなったときにアドレス発生器202のアドレスバス10から与えられる第2のアドレスを入力とするDIO端子との間のデータの受け渡しを第2のデータメモリ101に行わせ、プロセッサコア200から与えられるアクセス対象選択制御信号55の他方の状態に対応して、リードイネーブル信号22またはライトイネーブル信号23がアクティブとなったときにプロセッサコア200のアドレスバス20から与えられる第1のアドレスを入力とするプロセッサコア200との間のデータの受け渡しを第2のデータメモリ101に行わせる。
【0047】
ここで、始めにデータメモリ100がプロセッサ外部とのデータ入出力専用として設定されているとする。
外部入出力回路とのアクセスを行うデータメモリ100は、第1の実施の形態と同じようにアドレス、データ、制御信号(WE,RE)の供給を受け、アクセスを実行する。また、プロセッサコア200はプロセッサコア200の専用として設けられているデータメモリ101へのアクセスを行って処理を実行していく。この2つの動作は互いに影響をすることなく並列に実行される。
【0048】
プロセッサの外部にあるデータ入出力装置からの転送が終了し、プロセッサが内蔵している他のデータメモリ101の処理を終了したところで、プロセッサコア200とのアクセス専用としていたデータメモリ101と外部との入出力専用としていたデータメモリ100を入れ替えるために、アクセス対象選択制御信号55のレベルを反転する。
【0049】
アクセス対象選択制御信号55を受けてデータメモリ100とデータメモリ101はアクセスを行う対象を入れ替える。データメモリ101はこれまでデータメモリ100が行っていた動作と同様にアドレスの供給をアドレス発生器202から、データ入出力を外部端子201とのデータバス11で、アクセス信号を外部端子201からの入力によってアクセスを実行する。一方、データメモリ100はプロセッサコア200からの要求によってアクセスを実行する。
【0050】
この実施の形態によると、同一アドレス空間を有する第1および第2のデータメモリ100,101と、アドレス生成手段としてのアドレス発生器202およびエッジ検出回路203と、第1および第2の選択回路205,206を設けたので、外部からのデータ入出力とプロセッサコア200の処理とを並列に実行することが可能となり、プロセッサコア200の処理に全く影響を与えることがない。しかも、第1および第2のデータメモリ100,101と、アドレス発生器202およびエッジ検出回路203と、第1および第2の選択回路205,206を半導体集積回路に内蔵したことにより、第1および第2のデータメモリ100,101へのアクセスのために外部に設ける端子数を削減することができる。さらに、第1および第2のデータメモリ100,101ともに、半導体集積回路に内蔵しているため、第1および第2のデータメモリ100,101のアクセスを高速に実行することが可能となり、プロセッサコア00にメモリアクセスウエイトを設定することが必要なくなり、処理効率を高めることができる。
【0051】
また、INC信号によって、データメモリ100,101のアクセスを行わずに第2のアドレスを更新することが可能となることで、不規則に並んだアドレスにデータを書き込むこと、ならびに不規則にデータが格納されている場合において各データを読み出すことが可能となり、外部からのデータを格納する自由度を高くすることができる。そのため、プロセッサコア00の処理効率を高くすることができる。
【0052】
さらに、第2の実施の形態のような構成を取ることで、アドレス発生器202に加えてデータメモリ100または101もプロセッサコア00からのアクセスから分離してプロセッサ外部とのデータ入出力を行い、必要になった時点でプロセッサコア00のメモリマップに組み入れることで、バス調停回路を使用する必要がなくなり、プロセッサ処理に影響を与えることが無い。
【0053】
なお、本発明の実施の形態ではアドレス発生器202から出力されるアドレスバス21を制御するためのイベントをWE信号、RE信号、INC信号の立ち上がりエッジとしたが、その他のイベントによって制御することも可能である。また、この実施の形態ではアドレスの制御信号を1本として、その制御はアドレスの1増加としたが、アドレスの制御信号を複数用意して複数のレジスタとの加算を行うことで、増加させる値を複数の値の中から選択できるようにしてもよい。また、アドレスレジスタ300の設定範囲を定めるレジスタを設け、その範囲を超えることになった時には、初期値を設定しているレジスタから自動的にロードさせることができるようにしてもよい。
【0055】
【発明の効果】
本発明の請求項記載のプロセッサによれば、外部とのデータ入出力を行うためのアドレス生成手段を設けたことにより、プロセッサコアの処理に影響を与えることが少なく、しかもアドレス生成手段を半導体集積回路に内蔵したことにより、データメモリへのアクセスのために外部に設ける端子数を削減することができる。
【0056】
また、アドレス更新指示信号によって、データメモリのアクセスを行わずに第2のアドレスを更新することを可能としたので、不規則に並んだアドレスにデータを書き込むこと、ならびに不規則にデータが格納されている場合において各データを読み出すことが可能となり、外部からのデータを格納する自由度を高くすることができる。そのため、プロセッサコアの処理効率を高くすることができる。
【0057】
本発明の請求項記載のプロセッサによれば、レジスタと加算器とからなる簡単な構成で、第2のアドレスの所定値ずつ更新を行うことができる
【0058】
本発明の請求項記載のプロセッサによれば、同一アドレス空間を有する第1および第2のデータメモリと、アドレス生成手段と、第1および第2の選択回路を設けたので、外部からのデータ入出力とプロセッサコアの処理とを並列に実行することが可能となり、プロセッサコアの処理に全く影響を与えることがなく、しかも、第1および第2のデータメモリと、アドレス生成手段と、第1および第2の選択回路を半導体集積回路に内蔵したことにより、データメモリへのアクセスのために外部に設ける端子数を削減することができる。さらに、第1および第2のデータメモリともに、半導体集積回路に内蔵しているため、第1および第2のデータメモリのアクセスを高速に実行することが可能となり、プロセッサコアにメモリアクセスウエイトを設定することが必要なくなり、処理効率を高めることができる。
【0059】
また、アドレス更新指示信号によって、データメモリのアクセスを行わずに第2のアドレスを更新することが可能となることで、不規則に並んだアドレスにデータを書き込むこと、ならびに不規則にデータが格納されている場合において各データを読み出すことが可能となり、外部からのデータを格納する自由度を高くすることができる。そのため、プロセッサコアの処理効率を高くすることができる。
【0060】
本発明の請求項記載のプロセッサによれば、レジスタと加算器とからなる簡単な構成で、第2のアドレスの所定値ずつ更新を行うことができる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態のプロセッサの構成を示すブロック図である。
【図2】第1の実施の形態におけるプロセッサの中のアドレス発生器202の構成を示すブロック図である。
【図3】本発明の第1の実施の形態のプロセッサの動作を示すタイムチャートである。
【図4】本発明の第1の実施の形態におけるメモリ格納の配列のイメージを示す概略図である。
【図5】本発明の第2の実施の形態のプロセッサの構成を示すブロック図である。
【図6】従来のプロセッサの一例の構成を示すブロック図である。
【図7】従来のプロセッサにおけるデータ入出力方法を示すメモリ格納の配列のイメージを示す概略図である。
【図8】従来のプロセッサにおけるデータ入出力方法を示すメモリ格納の配列のイメージを示す概略図である。
【図9】従来のプロセッサの他の例の構成を示すブロック図である。
【符号の説明】
10 アドレスバス
11 データバス
12 ライトイネーブル信号
13 リードイネーブル信号
14 制御信号
20 アドレスバス
21 データバス
22 ライトイネーブル信号
23 ライトイネーブル信号
51 エッジ検出信号
52 データバス
53 データバス
54 ライト信号
55 アクセス対象選択制御信号
100,101 データメモリ
200 プロセッサコア
201 外部端子
202 アドレス発生装置
203 エッジ検出回路
204 調停回路
205,206 選択回路
300 アドレスレジスタ
301 加算器
302 選択回路
500 メモリセル
501 メモリセル
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a processor comprising an LSI semiconductor integrated circuit and having a processor core and a data memory as main components, and more particularly to a processor for inputting and outputting data between an internal data memory and an input / output device outside the processor It is.
[0002]
[Prior art]
In a conventional processor that performs data processing, it is necessary to transfer data between a built-in data memory and a data input / output device outside the processor. As the method, a direct memory access method (hereinafter abbreviated as DMA method) is mainly used.
[0003]
An example of the conventional processor of FIG. 6 is shown. In FIG. 6, 100 is a data memory, 200 is a processor core, and 400 is a direct memory access controller (hereinafter referred to as a DMA controller). 401 is a DMA transmission buffer, 402 is a DMA reception buffer, 403 is a DMA address pointer, and 404 is a DMA address addition register. 20 is an address bus, 21 is a data bus, 22 is a read enable signal, 23 is a write enable signal, and 60 is a DMA request signal.
[0004]
  Above processorInIn the DMA method, data transfer is continued as follows. A processor core 200 that performs arithmetic processing of the processor reads a program from an instruction memory (not shown) and executes arithmetic. When it is necessary to perform data transfer between the input / output device (not shown) and the data memory 100 during the execution of the operation, the DMA controller 400 sets the start address and the DMA transfer size according to the data transfer. The DMA start state is set.
[0005]
After entering this state, a DMA start request is sent to the transmission register or reception register. In response to this start request, the data bus and address bus used by the processor are released, and the DMA controller is enabled.
When the DMA start request is accepted and the bus is released, data transfer is started. In the case of DMA reception, the input register holds data from the external terminal and transfers to the address indicated by the DMA address pointer 403 built in the DMA controller 400. The value of the DMA address pointer 403 is added to the value of the address addition register 404 built in the DMA controller 400 at every transfer. This added address is used as an address for the next data transfer, and the DMA transfer is completed by repeating this for a specified number of times.
[0006]
The memory image of the data transferred in this way is shown in FIGS. The address pointer when performing DMA is incremented by unique bits stored in the register. For example, when the value of the register for addition with the address pointer is 1, the memory is stored as shown in FIG. 7, and when the value of the adder is 3, the memory is stored as shown in FIG. . 7 and 8, reference numeral 500 denotes a memory cell in which data is stored, and reference numeral 501 denotes a memory cell in which data is not stored.
[0007]
Data transfer may be performed between an external data input / output device and a data memory by a method different from DMA. As an example, as shown in FIG. 9, another data memory mapped to the same memory map space as the data memory and connected to the outside of the processor is used. In FIG. 9, 100 is a data memory, 200 is a processor core, 450 is an external memory interface circuit, and 201 is an external terminal. 56 is an external memory read access signal, and 57 is an external memory write access signal.
[0008]
The data transfer procedure at this time is as follows. First, the data input / output device issues a request to the processor so that the processor opens all external terminals (high impedance state). Thereafter, using the released data bus and address bus, the data input / output device accesses another data memory connected to the outside of the processor. When the data transfer from the data input / output device is completed, the data input / output device permits access from the processor side. After the access is permitted, the processor uses the data by copying the data in another external data memory to the built-in data memory or by directly accessing the external data memory by the processor core.
[0009]
[Problems to be solved by the invention]
When the conventional example as described above is used, there are the following problems.
First, when data transfer is executed by DMA, the data memory access operation by the processor core is affected when the external data memory access address and the data memory access from the processor core overlap. However, there is little influence on the operation of the processor core, but it is necessary to input all access signals to the data memory to the processor, so the problem is that the number of terminals of the processor increases. There is.
[0010]
In addition, when data transfer is executed by DMA, data is regularly stored. At this time, the address generator used in the DMA may have two or more address modification functions, but only one of them is selected during the DMA transfer, and the transfer is in progress. The value cannot be changed in the above, and the degree of freedom of storing input data from outside is low. Depending on the instructions processed by the processor core, data that is not so may be more advantageous in terms of processing than data that is regularly arranged. In such a case, even if the processing is executed without changing the data array, the number of steps is increased even when the processor core rearranges the array so that the data array becomes optimal. Efficiency is reduced.
[0011]
On the other hand, when an external data memory is used, the data storage arrangement has a high degree of freedom, unlike the case of DMA. However, it is necessary to output all the signals to be accessed to the outside of the processor by attaching the data memory to the outside, and there is a problem that the number of terminals increases.
In addition, since the external data memory is provided separately from the internal data memory for data transfer, the processing of the processor core and the data transfer for data input / output from the outside can be executed in parallel. Although it does not affect the operation of the processor core, the access speed of data memory used externally is slower than the processing speed of the processor, and it is necessary to use the memory access weight for the processor to use . This greatly impairs the data processing efficiency of the processor.
[0012]
Therefore, a first object of the present invention is to provide a processor that has little influence on the processing of the processor core and can reduce the number of terminals provided externally for accessing the data memory. .
A second object of the present invention is to provide a processor having a high degree of freedom for storing externally input data.
[0013]
A third object of the present invention is to reduce the number of terminals provided outside for accessing the data memory without affecting the processing of the processor core at all for data input / output between the processor and the processor. It is to provide a processor that can.
The fourth object of the present invention is to provide a processor capable of improving the processing efficiency.
[0016]
[Means for Solving the Problems]
  The processor according to claim 1 of the present invention is a processor integrally formed with a semiconductor integrated circuit, and outputs a first address and a first write / read control signal instructing writing or reading of data. Processor core, a first terminal for inputting / outputting data from outside, and a second for instructing data writing or reading from outsideWrite / readA second terminal for inputting a control signal, a third terminal for inputting an address update instruction signal for instructing an address update from the outside, a second address, and a second addressWrite / readWhen one of the control signal and the address update instruction signal becomes active, an address generation means for updating the second address and an arbitration circuit, and when the first write / read control signal becomes active The first address given from the processor core is inputted and data is exchanged with the processor core, and the second address given from the address generating means when the second write / read control signal becomes active. And a data memory for transferring data to and from the first terminal as an input.
[0017]
According to this configuration, when the first write / read control signal output from the processor core becomes active, data is transferred between the data memory and the processor core with the first address supplied from the processor core as an input. Is done. Further, when the second write / read control signal input from the second terminal becomes active, data is transmitted between the data memory and the first terminal with the second address provided from the address generation means as an input. And the second address in the address generation means is updated. When the address update instruction signal input from the third terminal becomes active, the second address in the address generation means is updated.
[0018]
By providing the address generation means for inputting / outputting data to / from the outside as described above, the processing of the processor core is hardly affected, and the address generation means is incorporated in the semiconductor integrated circuit, so that the data memory It is possible to reduce the number of terminals provided outside for access to the network.
In addition, the second address can be updated without accessing the data memory by the address update instruction signal, so that data can be written to irregularly arranged addresses and data can be irregularly stored. In this case, each data can be read out, and the degree of freedom for storing data from the outside can be increased. Therefore, the processing efficiency of the processor core can be increased.
[0019]
  Claims of the invention2The described processor is claimed.1In the above-described processor, the address generation means includes a register that holds the second address and an adder for updating the address that increases the value of the register by a predetermined value. According to this configuration, the second address is updated by a predetermined value.
[0024]
  A processor according to a third aspect of the present invention is a processor integrally formed with a semiconductor integrated circuit, which outputs a first address and outputs a first write / read control signal instructing writing or reading of data. Processor core, a first terminal for inputting / outputting data from outside, and a second for instructing data writing or reading from outsideWrite / readA second terminal for inputting a control signal, a third terminal for inputting an address update instruction signal for instructing an address update from the outside, a second address, and a second addressWrite / readAddress generation means for updating the second address when one of the control signal and the address update instruction signal becomes active, and is given from the processor core when the first write / read control signal becomes active Data is transferred to and from the processor core using the first address as an input, and the first address given from the address generation means when the second write / read control signal becomes active is used as the input. A first data memory that transfers data to and from the terminal and is mapped to the same address space as the first data memory, and is supplied from the processor core when the first write / read control signal becomes active Data is exchanged with the processor core using the first address as input, and the second address A second data memory for transferring data to and from the first terminal with a second address given from the address generation means as an input when the write / read control signal becomes active, and given from the processor core Corresponding to one state of the access target selection control signal, the data of the processor core that receives the first address given from the processor core when the first write / read control signal becomes active is input. Deliver to the first data memory, and from the address generation means when the second write / read control signal becomes active corresponding to the other state of the access target selection control signal given from the processor core The first data is transferred to and from the first terminal using the second address as an input. Corresponding to one state of the first selection circuit to be performed by the memory and the access target selection control signal provided from the processor core, the second generation read / write control signal is provided from the address generation means when activated. In response to the other state of the access target selection control signal provided from the processor core, the second data memory is used to transfer data to and from the first terminal having the second address as an input. A second selection circuit for causing the second data memory to transfer data to and from the processor core that receives the first address given from the processor core when one write / read control signal becomes active And.
[0025]
According to this configuration, when the access target selection control signal is in one state, the first selection circuit selects the processor core, and the first write / read control signal output from the processor core is active. Then, the data is transferred between the first data memory and the processor core with the first address given from the processor core as an input. At this time, the second selection circuit selects the first, second and third terminals and the address generation means, and the second write / read control signal input from the second terminal becomes active. When the second address given from the address generation means is input, data is transferred between the second data memory and the first terminal, and the second address in the address generation means is updated, When the address update instruction signal input from the third terminal becomes active, the second address in the address generating means is updated.
[0026]
When the access target selection control signal is in the other state, the first selection circuit selects the first, second, and third terminals and the address generation means, and is input from the second terminal. When the second write / read control signal is activated, data is transferred between the first data memory and the first terminal with the second address given from the address generation means as an input. The second address in the address generation means is updated when the second address in the address generation means is updated and the address update instruction signal input from the third terminal becomes active. At this time, the second selection circuit selects the processor core, and the first address supplied from the processor core when the first write / read control signal output from the processor core becomes active is input. Data is exchanged between the second data memory and the processor core.
[0027]
Thus, since the first and second data memories having the same address space, the address generation means, and the first and second selection circuits are provided, data input / output from outside and processing of the processor core can be performed. It can be executed in parallel, has no influence on the processing of the processor core, and the first and second data memories, the address generation means, and the first and second selection circuits are integrated in a semiconductor integrated circuit. By incorporating in the circuit, the number of terminals provided outside for accessing the data memory can be reduced. Furthermore, since both the first and second data memories are built in the semiconductor integrated circuit, the first and second data memories can be accessed at high speed, and a memory access weight is set in the processor core. It is not necessary to do so, and the processing efficiency can be increased.
[0028]
In addition, the second address can be updated without accessing the data memory by the address update instruction signal, so that data can be written to irregularly arranged addresses and data can be irregularly stored. In this case, each data can be read out, and the degree of freedom for storing external data can be increased. Therefore, the processing efficiency of the processor core can be increased.
[0029]
  Claims of the invention4The described processor is claimed.3In the processor described above, the address generation means includes a register that holds the second address and an adder for updating the address that increases the value of the register by a predetermined value. According to this configuration, the second address is updated by a predetermined value.
[0030]
  A memory access method according to claim 5 of the present invention is a method for accessing a data memory in the processor according to claim 1 or 3, wherein a first write / read control signal is input from a second terminal. And a second step of supplying the second address held in advance to the data memory and simultaneously updating the value of the second address in accordance with the second write / read control signal input in the first step. Accessing the data memory at the second address given by the second step,FirstBetween terminalsTransfer dataAnd a third step.
[0031]
  Embodiments of the present invention will be described below with reference to the drawings.
  [First Embodiment]
  FIG. 1 is a block diagram of a processor according to the first embodiment of the present invention. In FIG. 1, a data memory 100 outputs a first address through an address bus 20 and outputs a read enable signal 22 or a write enable signal 23 instructing writing or reading of data.core200 and the data bus 21, and the external terminal 201 and the data bus 11.
[0032]
  The address to access is the processorcoreWhen accessing with 200, the address bus 20 is used, and when accessing from the external terminal 201, the output from the address bus 10 of the address generator 202 is used. An arbitration circuit 204 is installed in the input / output unit of the data memory 100 in a case where access from outside the processor and access from the processor core 200 overlap.
[0033]
The address generator 202 corresponds to an external write enable signal (corresponding to a write control signal in the claims, hereinafter abbreviated as WE) 12 and a read enable signal (corresponding to a read control signal in the claims). , RE (abbreviated as RE)), and has a mechanism that increases the address value by +1 in response to the edge detection signal 51 from the edge detection circuit 203 that detects the rising edge of 13.
[0034]
The address generator 202 and the edge detection circuit 203 output the second address in the claims and the second address is updated when the second read / write control signal becomes active A generation means, that is, an address pointer is configured.
Further, by detecting the rising edge of the INC signal 14 in the external terminal 201, the output value 21 of the address generator 202 can be increased by 1 without accessing the data memory 100.
[0035]
Here, in the external terminal 201, the DIO terminal corresponding to the data bus 11 corresponds to a first terminal for inputting / outputting data from outside in the claims. Also, the WE terminal or RE terminal corresponding to the WE signal or RE signal is connected to the second terminal for inputting a second read / write control signal for instructing data writing or reading from outside in the claims. Equivalent to. An INC terminal corresponding to an address control (hereinafter abbreviated as INC) signal corresponds to a third terminal for inputting an address update instruction signal for instructing address update from the outside in the scope of claims.
[0036]
The data memory 100 receives and transfers data to and from the processor core 200 using the first address given from the processor core 200 through the address bus 20 when the read enable signal 22 or the write enable signal 23 becomes active. When the second write enable signal 12 or the read enable signal 13 becomes active, the second address supplied from the address generator 202 through the address bus 10 is input to exchange data with the DIO terminal. Do.
[0037]
  Next, the configuration of the address generator 202 is shown in FIG. The address generator 202 includes a register 300, an adder 301, and a selection circuit 302. When the edge of the INC signal 14 from the INC terminal of the external terminal 201 is detected, or when the edge of the WE terminal or the RE terminal is detected, the edge detection signal 51 output from the edge detection circuit 203 is enabled. When the edge detection signal 51 is enabled, the selection circuit 302 selects the data bus 52 that is the output line of the adder 301, and the register 300 stores the data on the data bus 52 of the adder 301, that is, the addition result. . When the value of the register 300 is set by access from the processor core 200, the write signal 54 is enabled to select the selection circuit.302Selects the value of the data bus 53 and the register 300 stores the value of the data bus 53.
[0038]
  The above address modification is performed by the following operation. The edge detection signal 51 is enabled in the next machine cycle in which the edge is detected by the edge detection circuit 203. Selection circuit built in address generator 202302When the edge detection signal 51 is enabled, the data bus 52 which is the output line of the adder 301 is selected, and the address register 300 outputs a value obtained by adding 1 to the output of the data bus 21 by the control signal 51. The data on the existing data bus 52 is stored.
[0039]
When the address register 300 is set by the processor core 200, the processor core 200 enables the write signal 54 and outputs the value set by the processor core 200 to the data bus 52. In response to this, the selection circuit 302 built in the address generator 202 selects the data bus 53, and the address register 300 stores the data on the data bus 53.
In the case where only the address is incremented by 1 without performing the data memory access, the following operation is performed. The edge detection circuit 203 detects the rising edge of the INC terminal. When an edge is detected, the edge detection signal 51 is enabled in the next machine cycle. In response to this, the selection circuit 302 included in the address generator 202 selects the data bus 52, and the value of the address bus 21 to which the address register 300 is output is added by 1. Stores a value.
[0040]
  FIG. 3 shows an example of a timing chart when there is an access from outside the processor when the above method is adopted. As an example of the operation, data is written from the external input / output circuit to the data memory 100 via the external terminal 201. The data memory 100 is a processorcoreSince it is necessary to move in synchronization with the system clock of 200, the rising edge of the WE signal from the outside is detected, and once synchronized with the system clock of the processor core 200, it is output to the data memory 100. . Further, the address is updated by using a signal similar to this. The address update is performed after the access to the data memory 100 is completed.
[0041]
FIG. 4 shows an arrangement of data stored in the data memory 100 at the timing of FIG. As an example, the data of the external input / output device is written from the top of the data memory 100. At this time, data stored in the data memory 100 from the external input / output device is arranged in order from the top address. If the rising edge of the INC signal is detected during the transfer, the data is not written and the address is incremented by 1, so that there is an address in which no data is stored. Addresses 2 and 5 in FIG. 4 correspond to this.
[0042]
According to the processor of this embodiment, since the address generator 202 and the edge detection circuit 203 are provided as address generation means for performing data input / output with the outside, the processing of the processor core 200 is hardly affected. In addition, since the address generator 202 and the edge detection circuit 203 are built in the semiconductor integrated circuit, the number of terminals provided outside for accessing the data memory 100 can be reduced.
[0043]
In addition, since the second address can be updated by the INC signal without accessing the data memory 100, data can be written to irregularly arranged addresses and data can be irregularly stored. In this case, each data can be read out, and the degree of freedom for storing input data from the outside can be increased. Therefore, the processing efficiency of the processor core can be increased.
[0044]
[Second Embodiment]
FIG. 5 is a block diagram of the processor according to the first embodiment of the present invention. The processor according to this embodiment includes two or more data memories (in this example, two data memories) 100 and 101 that are integrated with a semiconductor integrated circuit and mapped to the same address space. Then, access signals to the data memory 100 and the data memory 101 (data input / output of the data bus 21, address input of the address bus 20, RE signal 22, WE signal 23, etc.) are output from the processor core 200 and the external terminal 201. The selection circuits 205 and 206 are provided for selecting from the outputs.
[0045]
The selection circuits 205 and 206 are set by the access target control signal 55 so that when one of them operates exclusively for accessing the processor core 200, the other data memory operates exclusively for data input / output with the outside. Yes.
In the first selection circuit 205, the read enable signal 22 or the write enable signal 23 becomes active in response to one state (for example, high level) of the access target selection control signal 55 given from the processor core 200. The first data memory 100 is used to transfer data to and from the processor core 200 that receives the first address given from the address bus 20 of the processor core 200 as an input. In response to the other state (for example, low level) of the selection control signal 55, the second address given from the address bus 10 of the address generator 202 when the write enable signal 12 or the read enable signal 13 becomes active. To and from the DIO terminal To perform the transfer to the first data memory 100.
[0046]
Further, the second selection circuit 206 corresponds to one state of the access target selection control signal 55 given from the processor core 200, and when the write enable signal 12 or the read enable signal 13 becomes active, the address generator The second data memory 101 is used to transfer data to and from the DIO terminal that receives the second address given from the address bus 10 at 202, and the other of the access target selection control signals 55 given from the processor core 200. Corresponding to the state of the above, when the read enable signal 22 or the write enable signal 23 becomes active, the data of the data with the processor core 200 to which the first address given from the address bus 20 of the processor core 200 is input is input. Let the second data memory 101 perform the transfer. .
[0047]
Here, first, it is assumed that the data memory 100 is set exclusively for data input / output with the outside of the processor.
As in the first embodiment, the data memory 100 that accesses the external input / output circuit receives an address, data, and control signals (WE, RE) and performs access. Further, the processor core 200 accesses the data memory 101 provided exclusively for the processor core 200 to execute processing. These two operations are executed in parallel without affecting each other.
[0048]
When the transfer from the data input / output device outside the processor is finished and the processing of the other data memory 101 built in the processor is finished, the data memory 101 dedicated to access to the processor core 200 and the outside In order to replace the data memory 100 dedicated to input / output, the level of the access target selection control signal 55 is inverted.
[0049]
In response to the access target selection control signal 55, the data memory 100 and the data memory 101 exchange the access target. In the same manner as the operation performed by the data memory 100 so far, the data memory 101 supplies an address from the address generator 202, inputs / outputs data to / from the external terminal 201, and inputs an access signal from the external terminal 201. Perform access by On the other hand, the data memory 100 executes access according to a request from the processor core 200.
[0050]
  According to this embodiment, the first and second data memories 100 and 101 having the same address space, the address generator 202 and the edge detection circuit 203 as address generation means, and the first and second selection circuits 205 are used. , 206 are provided, it is possible to execute external data input / output and processing of the processor core 200 in parallel, and the processing of the processor core 200 is not affected at all. In addition, since the first and second data memories 100 and 101, the address generator 202 and the edge detection circuit 203, and the first and second selection circuits 205 and 206 are built in the semiconductor integrated circuit, the first and second data memories 100 and 101, The number of terminals provided externally for accessing the second data memories 100 and 101 can be reduced. Furthermore, since both the first and second data memories 100 and 101 are built in the semiconductor integrated circuit, the first and second data memories 100 and 101 can be accessed at high speed, and the processor core2It becomes unnecessary to set the memory access weight to 00, and the processing efficiency can be improved.
[0051]
  In addition, since the second address can be updated without accessing the data memories 100 and 101 by the INC signal, data can be written to irregularly arranged addresses and data can be irregularly stored. When stored, each data can be read out, and the degree of freedom for storing data from the outside can be increased. Therefore, the processor core2The processing efficiency of 00 can be increased.
[0052]
  Furthermore, by adopting the configuration as in the second embodiment, in addition to the address generator 202, the data memory 100 or 101 is also a processor core.2The data is input / output to / from the outside of the processor separately from the access from 00, and the processor core when it becomes necessary2Incorporation into the 00 memory map eliminates the need to use a bus arbitration circuit and does not affect processor processing.
[0053]
In the embodiment of the present invention, the event for controlling the address bus 21 output from the address generator 202 is the rising edge of the WE signal, the RE signal, and the INC signal. However, the event may be controlled by other events. Is possible. In this embodiment, the address control signal is set to one and the address is increased by one. However, the value is increased by preparing a plurality of address control signals and performing addition with a plurality of registers. May be selected from a plurality of values. In addition, a register that defines a setting range of the address register 300 may be provided, and when the range is exceeded, it may be automatically loaded from the register in which the initial value is set.
[0055]
【The invention's effect】
  Claims of the invention1According to the described processor, by providing the address generation means for performing data input / output with the outside, the processing of the processor core is hardly affected, and the address generation means is incorporated in the semiconductor integrated circuit. Thus, the number of terminals provided outside for accessing the data memory can be reduced.
[0056]
In addition, the second address can be updated without accessing the data memory by the address update instruction signal, so that data can be written to irregularly arranged addresses and data can be irregularly stored. In this case, each data can be read out, and the degree of freedom for storing data from the outside can be increased. Therefore, the processing efficiency of the processor core can be increased.
[0057]
  Claims of the invention2According to the processor described, LesWith a simple configuration comprising a register and an adder, the second address can be updated by a predetermined value..
[0058]
  Claims of the invention3According to the described processor, since the first and second data memories having the same address space, the address generation means, and the first and second selection circuits are provided, the data input / output from the outside and the processor core The processing can be executed in parallel, the processing of the processor core is not affected at all, and the first and second data memories, the address generation means, and the first and second selection circuits Is incorporated in the semiconductor integrated circuit, the number of terminals provided outside for accessing the data memory can be reduced. Furthermore, since both the first and second data memories are built in the semiconductor integrated circuit, the first and second data memories can be accessed at high speed, and a memory access weight is set in the processor core. It is not necessary to do so, and the processing efficiency can be increased.
[0059]
In addition, the second address can be updated without accessing the data memory by the address update instruction signal, so that data can be written to irregularly arranged addresses and data can be irregularly stored. In this case, each data can be read out, and the degree of freedom for storing external data can be increased. Therefore, the processing efficiency of the processor core can be increased.
[0060]
  Claims of the invention4According to the described processor, the second address can be updated by a predetermined value with a simple configuration including a register and an adder.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a processor according to a first embodiment of this invention.
FIG. 2 is a block diagram showing a configuration of an address generator 202 in the processor according to the first embodiment.
FIG. 3 is a time chart showing an operation of the processor according to the first embodiment of this invention;
FIG. 4 is a schematic diagram showing an image of an array of memory storage according to the first embodiment of the present invention.
FIG. 5 is a block diagram illustrating a configuration of a processor according to a second embodiment of this invention.
FIG. 6 is a block diagram illustrating a configuration of an example of a conventional processor.
FIG. 7 is a schematic diagram showing an image of an array of memory storage showing a data input / output method in a conventional processor.
FIG. 8 is a schematic diagram showing an image of an array of memory storage showing a data input / output method in a conventional processor.
FIG. 9 is a block diagram showing a configuration of another example of a conventional processor.
[Explanation of symbols]
10 Address bus
11 Data bus
12 Write enable signal
13 Read enable signal
14 Control signal
20 Address bus
21 Data bus
22 Write enable signal
23 Write enable signal
51 Edge detection signal
52 Data bus
53 Data bus
54 Write signal
55 Access target selection control signal
100, 101 data memory
200 processor cores
201 External terminal
202 Address generator
203 Edge detection circuit
204 Arbitration circuit
205, 206 selection circuit
300 Address register
301 Adder
302 Selection circuit
500 memory cells
501 memory cell

Claims (5)

半導体集積回路で一体形成されるプロセッサであって、第1のアドレスを出力するとともにデータの書き込みまたは読み出しを指示する第1の書き込み/読み出し制御信号を出力するプロセッサコアと、外部よりデータを入出力するための第1の端子と、外部よりデータの書き込みまたは読み出しを指示する第2の書き込み/読み出し制御信号を入力するための第2の端子と、外部よりアドレス更新を指示するアドレス更新指示信号を入力するための第3の端子と、第2のアドレスを出力し、前記第2の書き込み/読み出し制御信号および前記アドレス更新指示信号の何れか一方がアクティブとなったときに前記第2のアドレスを更新するアドレス生成手段と、調停回路を有し前記第1の書き込み/読み出し制御信号がアクティブとなったときに前記プロセッサコアから与えられる前記第1のアドレスを入力として前記プロセッサコアとの間でデータの受け渡しを行い、前記第2の書き込み/読み出し制御信号がアクティブとなったときに前記アドレス生成手段から与えられる前記第2のアドレスを入力として前記第1の端子との間でデータの受け渡しを行うデータメモリとを備えたプロセッサ。A processor integrated with a semiconductor integrated circuit, which outputs a first address and outputs a first write / read control signal for instructing data write or read; and data input / output from outside A second terminal for inputting a second write / read control signal for instructing data writing or reading from the outside, and an address update instruction signal for instructing address updating from the outside. A third terminal for inputting and a second address are output, and when either one of the second write / read control signal and the address update instruction signal becomes active, the second address is set. An address generation means for updating, an arbitration circuit, and the first write / read control signal becomes active The first address provided from the processor core is input to the processor core, and data is transferred to and from the processor core. When the second write / read control signal becomes active, the first address is supplied from the address generator. And a data memory for transferring data to and from the first terminal using the second address as an input. アドレス生成手段を、第2のアドレスを保持するレジスタと、このレジスタの値を所定値だけ増加させるアドレス更新用の加算器とで構成している請求項1記載のプロセッサ。  2. The processor according to claim 1, wherein the address generating means comprises a register for holding the second address and an adder for address updating for increasing the value of the register by a predetermined value. 半導体集積回路で一体形成されるプロセッサであって、第1のアドレスを出力するとともにデータの書き込みまたは読み出しを指示する第1の書き込み/読み出し制御信号を出力するプロセッサコアと、外部よりデータを入出力するための第1の端子と、外部よりデータの書き込みまたは読み出しを指示する第2の書き込み/読み出し制御信号を入力するための第2の端子と、外部よりアドレス更新を指示するアドレス更新指示信号を入力するための第3の端子と、第2のアドレスを出力し、前記第2の書き込み/読み出し制御信号および前記アドレス更新指示信号の何れか一方がアクティブとなったときに前記第2のアドレスを更新するアドレス生成手段と、前記第1の書き込み/読み出し制御信号がアクティブとなったときに前記プロセッサコアから与えられる前記第1のアドレスを入力として前記プロセッサコアとの間でデータの受け渡しを行い、前記第2の書き込み/読み出し制御信号がアクティブとなったときに前記アドレス生成手段から与えられる前記第2のアドレスを入力として前記第1の端子との間でデータの受け渡しを行う第1のデータメモリと、前記第1のデータメモリと同一アドレス空間にマッピングされ、前記第1の書き込み/読み出し制御信号がアクティブとなったときに前記プロセッサコアから与えられる前記第1のアドレスを入力として前記プロセッサコアとの間でデータの受け渡しを行い、前記第2の書き込み/読み出し制御信号がアクティブとなったときに前記アドレス生成手段から与えられる前記第2のアドレスを入力として前記第1の端子との間でデータの受け渡しを行う第2のデータメモリと、前記プロセッサコアから与えられるアクセス対象選択制御信号の一方の状態に対応して、前記第1の書き込み/読み出し制御信号がアクティブとなったときに前記プロセッサコアから与えられる前記第1のアドレスを入力とする前記プロセッサコアとの間のデータの受け渡しを前記第1のデータメモリに行わせ、前記プロセッサコアから与えられるアクセス対象選択制御信号の他方の状態に対応して、前記第2の書き込み/読み出し制御信号がアクティブとなったときに前記アドレス生成手段から与えられる前記第2のアドレスを入力とする前記第1の端子との間のデータの受け渡しを前記第1のデータメモリに行わせる第1の選択回路と、前記プロセッサコアから与えられるアクセス対象選択制御信号の前記一方の状態に対応して、前記第2の書き込み/読み出し制御信号がアクティブとなったときに前記アドレス生成手段から与えられる前記第2のアドレスを入力とする前記第1の端子との間のデータの受け渡しを前記第2のデータメモリに行わせ、前記プロセッサコアから与えられるアクセス対象選択制御信号の前記他方の状態に対応して、前記第1の書き込み/読み出し制御信号がアクティブとなったときに前記プロセッサコアから与えられる前記第1のアドレスを入力とする前記プロセッサコアとの間のデータの受け渡しを前記第2のデータメモリに行わせる第2の選択回路とを備えたプロセッサ。A processor integrated with a semiconductor integrated circuit, which outputs a first address and outputs a first write / read control signal for instructing data write or read; and data input / output from outside A second terminal for inputting a second write / read control signal for instructing data writing or reading from the outside, and an address update instruction signal for instructing address updating from the outside. A third terminal for inputting and a second address are output, and when either one of the second write / read control signal and the address update instruction signal becomes active, the second address is set. The address generation means to be updated and the process when the first write / read control signal becomes active. Data is exchanged with the processor core using the first address given from the Sacoa as an input, and the second address given by the address generation means when the second write / read control signal becomes active. a first data memory for transferring data between said as input a second address first terminal is mapped to the first data memory in the same address space, the first read / write When the control signal becomes active, the first address given from the processor core is used as an input to exchange data with the processor core, and the second write / read control signal becomes active wherein as input the second address given from the address generating means first terminal when When the first write / read control signal becomes active in response to one state of the second data memory for transferring data between and the access target selection control signal given from the processor core The other of the access target selection control signals given from the processor core by causing the first data memory to exchange data with the processor core having the first address given from the processor core as an input. Corresponding to the state of the data, when the second write / read control signal becomes active, the data of the first terminal to which the second address given from the address generating means is input is inputted. A first selection circuit for causing the first data memory to perform the transfer, and an access given from the processor core In response to the one state of the target selection control signal, the first to enter the second address given from said address generating means when said second write / read control signal is active the transfer of data between the terminal to perform the second data memory, in correspondence to the other state of the access target selection control signal supplied from the processor core, the first write / read control signal A second selection circuit that causes the second data memory to exchange data with the processor core that receives the first address given from the processor core when activated. Processor. アドレス生成手段を、第2のアドレスを保持するレジスタと、このレジスタの値を所定値だけ増加させるアドレス更新用の加算器とで構成している請求項3記載のプロセッサ。  4. The processor according to claim 3, wherein the address generating means comprises a register for holding the second address and an adder for address updating for increasing the value of the register by a predetermined value. 請求項1または3記載のプロセッサにおけるデータメモリをアクセスするメモリアクセス方法であって、第2の端子から第2の書き込み/読み出し制御信号を入力する第1のステップと、前記第1のステップにより入力された前記第2の書き込み/読み出し制御信号に従って、予め保持した第2のアドレスをデータメモリに供給すると同時に、前記第2のアドレスの値を更新する第2のステップと、前記第2のステップにより与えられる前記第2のアドレスで前記データメモリをアクセスし、前記データメモリと前記第1の端子との間でデータの受け渡しを行う第3のステップとを含むメモリアクセス方法。4. A memory access method for accessing a data memory in a processor according to claim 1, wherein a first step of inputting a second write / read control signal from a second terminal, and an input by said first step In accordance with the second write / read control signal, a second address stored in advance is supplied to the data memory, and at the same time, a value of the second address is updated, and the second step And a third step of accessing the data memory at the given second address, and transferring data between the data memory and the first terminal.
JP19362897A 1997-07-18 1997-07-18 Processor and memory access method Expired - Fee Related JP3691213B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19362897A JP3691213B2 (en) 1997-07-18 1997-07-18 Processor and memory access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19362897A JP3691213B2 (en) 1997-07-18 1997-07-18 Processor and memory access method

Publications (2)

Publication Number Publication Date
JPH1139278A JPH1139278A (en) 1999-02-12
JP3691213B2 true JP3691213B2 (en) 2005-09-07

Family

ID=16311112

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19362897A Expired - Fee Related JP3691213B2 (en) 1997-07-18 1997-07-18 Processor and memory access method

Country Status (1)

Country Link
JP (1) JP3691213B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3906964B2 (en) * 2000-10-02 2007-04-18 株式会社リコー Image processing apparatus and image forming apparatus
JP3793062B2 (en) 2001-09-27 2006-07-05 株式会社東芝 Data processing device with built-in memory

Also Published As

Publication number Publication date
JPH1139278A (en) 1999-02-12

Similar Documents

Publication Publication Date Title
JP2004529403A (en) User configurable on-chip memory system
EP0348240B1 (en) Microprocessor equipped with parity control unit on same chip
JP3691213B2 (en) Processor and memory access method
JP3108080B2 (en) Access control circuit device
US20030181994A1 (en) Microprocessor performing efficient external bus access
US5430853A (en) Update of control parameters of a direct memory access system without use of associated processor
JP7468112B2 (en) INTERFACE CIRCUIT AND METHOD FOR CONTROLLING INTERFACE CIRCUIT - Patent application
JP2000099452A (en) Dma control device
JP2003280998A (en) Device and method for testing internal bus
US20040250038A1 (en) Information processing apparatus and memory access arranging method
JPH0756803A (en) High-speed dma transfer device
JP2912090B2 (en) Time slot interchange circuit
JP2003228546A (en) Control device for direct memory access
JPH05265753A (en) Extended central processing unit
JPH03214275A (en) Semiconductor integrated circuit
JP2608286B2 (en) Data transfer device
JP2606824Y2 (en) Multiport memory device
JPH0261749A (en) Data transfer device
JPH05196694A (en) Pattern generator
JPH10134013A (en) Multi-cpu system
JP2005339426A (en) Data processing system and setting method
JP2004334257A (en) Memory access system and memory access device
JPH05150995A (en) Image processing device
JP2000148574A (en) Device and method for register control
JP2004280291A (en) Card interface circuit and card interface device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040817

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050322

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050520

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050615

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

Free format text: PAYMENT UNTIL: 20080624

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090624

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100624

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100624

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110624

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees