[go: up one dir, main page]

JP2008097098A - Information processor and interface circuit - Google Patents

Information processor and interface circuit Download PDF

Info

Publication number
JP2008097098A
JP2008097098A JP2006275047A JP2006275047A JP2008097098A JP 2008097098 A JP2008097098 A JP 2008097098A JP 2006275047 A JP2006275047 A JP 2006275047A JP 2006275047 A JP2006275047 A JP 2006275047A JP 2008097098 A JP2008097098 A JP 2008097098A
Authority
JP
Japan
Prior art keywords
flag
register
bus master
state
state machine
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.)
Pending
Application number
JP2006275047A
Other languages
Japanese (ja)
Inventor
Naotoshi Nishioka
直俊 西岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2006275047A priority Critical patent/JP2008097098A/en
Publication of JP2008097098A publication Critical patent/JP2008097098A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an information processor and an interface circuit for effectively reducing latency when a bus mater performs access to a peripheral module such as a register. <P>SOLUTION: This information processor is provided with a bus master (1100) operating synchronously with a first clock signal; a peripheral module (1200) operating synchronously with a second clock signal; and a dual port RAM (1210) as a storage means having a first access port for transferring data with a bus master synchronously with the first clock signal and a second access port for transferring data with the peripheral module synchronously with the second clock signal, wherein data transfer between the bus master (1100) and the peripheral module (1200) is executed via the dual port RAM. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、マルチポートRAMを利用した情報処理装置およびインターフェイス回路に関する。   The present invention relates to an information processing apparatus and an interface circuit using a multiport RAM.

従来、システムLSI等の情報処理装置において、CPU等のバスマスタとレジスタ等の周辺モジュールとの間はバスで接続され、このバスを介してデータ転送が行われる。一般に、バスマスタの動作クロック周波数と周辺モジュールの動作クロック周波数とは異なるので、これらの間でデータ転送を行う際にはデータ信号を同期化する必要がある。   Conventionally, in an information processing apparatus such as a system LSI, a bus master such as a CPU and peripheral modules such as registers are connected by a bus, and data transfer is performed via this bus. In general, since the operation clock frequency of the bus master is different from the operation clock frequency of the peripheral modules, it is necessary to synchronize the data signals when performing data transfer between them.

図8に、上述のデータ信号を同期化する機能を備えた情報処理装置の構成例を示す。同図に示すように、バスマスタ810と周辺モジュール820とはバス830を介して接続され、周辺モジュール820内のレジスタ部822は同期化回路821を介してバス830に接続される。   FIG. 8 shows a configuration example of an information processing apparatus having a function of synchronizing the above-described data signal. As shown in the figure, the bus master 810 and the peripheral module 820 are connected via a bus 830, and the register unit 822 in the peripheral module 820 is connected to the bus 830 via a synchronization circuit 821.

この情報処理装置によれば、バスマスタ810からバス830を介して周辺モジュール820に送出されたデータ信号は、周辺モジュール820内の同期化回路821によりレジスタ部822の動作クロック信号PCLKに同期したデータ信号に加工されてレジスタ部822に供給される。このように同期化回路821を備えることにより、異なるクロック周波数で動作するバスマスタ810とレジスタ部822との間のデータ転送を可能としている。   According to this information processing apparatus, a data signal sent from the bus master 810 to the peripheral module 820 via the bus 830 is a data signal synchronized with the operation clock signal PCLK of the register unit 822 by the synchronization circuit 821 in the peripheral module 820. And is supplied to the register unit 822. By providing the synchronization circuit 821 in this manner, data transfer between the bus master 810 operating at different clock frequencies and the register unit 822 is enabled.

図9ないし図12を参照して更に詳細に説明する。
図9に、従来技術に係る情報処理装置の詳細構成を示す。図9に示すバスマスタ9100および周辺モジュール9200は、上述の図8に示すバスマスタ810および周辺モジュール820にそれぞれ対応し、図9に示す同期化回路9211,9221,9240,9250,9260は図8に示す同期化回路821に対応し、図9に示すレジスタ9230は図8に示すレジスタ822に対応している。
This will be described in more detail with reference to FIGS.
FIG. 9 shows a detailed configuration of an information processing apparatus according to the related art. The bus master 9100 and the peripheral module 9200 shown in FIG. 9 correspond to the bus master 810 and the peripheral module 820 shown in FIG. 8, respectively, and the synchronization circuits 9211, 9221, 9240, 9250, and 9260 shown in FIG. 9 are shown in FIG. Corresponding to the synchronization circuit 821, the register 9230 shown in FIG. 9 corresponds to the register 822 shown in FIG.

ここで、図9に示すステートマシン9210は、バスマスタ9100に対するインターフェイスとして機能し、バスマスタ9100の動作クロック信号SCLKに同期して動作する。ステートマシン9220は、レジスタ9230に対するインターフェイスとして機能し、レジスタ9230の動作クロック信号PCLKに同期して動作する。   Here, the state machine 9210 shown in FIG. 9 functions as an interface to the bus master 9100 and operates in synchronization with the operation clock signal SCLK of the bus master 9100. The state machine 9220 functions as an interface to the register 9230 and operates in synchronization with the operation clock signal PCLK of the register 9230.

これらステートマシン9210とステートマシン9220との間では、バスマスタ9100からレジスタ9230に対するデータ転送の内容に応じた各種の制御信号がハンドシェークにより伝達される。この制御信号の伝達を可能とするために、一方のステートマシン9210は、ステートマシン9220から入力する信号を同期化するための同期化回路9211を備え、他方のステートマシン9220は、ステートマシン9210から入力する信号を同期化するための同期化回路9221を備えている。   Between the state machine 9210 and the state machine 9220, various control signals corresponding to the contents of data transfer from the bus master 9100 to the register 9230 are transmitted by handshaking. In order to enable transmission of this control signal, one state machine 9210 includes a synchronization circuit 9211 for synchronizing signals input from the state machine 9220, and the other state machine 9220 includes the state machine 9210. A synchronization circuit 9221 is provided for synchronizing input signals.

次に、図10ないし図12を参照して、上述の従来技術に係る情報処理装置の動作を説明する。ここで、図10は、ステートマシン9210及びステートマシン9220の状態遷移図であり、図11および図12は、それぞれ、バスマスタ9100からレジスタ部9230に対するライト動作及びリード動作のタイミングチャートである。
なお、その動作説明において、各ステートマシンの状態遷移については図10を参照され、各時刻での動作については図11及び図12を適宜参照されたい。
Next, the operation of the information processing apparatus according to the above-described prior art will be described with reference to FIGS. 10 is a state transition diagram of the state machine 9210 and the state machine 9220. FIGS. 11 and 12 are timing charts of a write operation and a read operation from the bus master 9100 to the register unit 9230, respectively.
In the description of the operation, refer to FIG. 10 for the state transition of each state machine, and appropriately refer to FIGS. 11 and 12 for the operation at each time.

先ず、図10及び図11を参照してライト動作を説明する。
周辺モジュール9200内のステートマシン9210は、プリセット信号が入力されると、バスマスタ9100からのアクセスを待ち受けるアイドルステートSIDLEに状態遷移する。
First, the write operation will be described with reference to FIGS.
When a preset signal is input to the state machine 9210 in the peripheral module 9200, the state machine 9210 makes a state transition to an idle state SIDLE waiting for access from the bus master 9100.

このアイドルステートSIDLEから、バスマスタ9100がライトトランザクションを開始し、時刻t1においてライト信号WRNをローレベルにし、且つチップセレクト信号CSNをローレベルにすると、これを入力するステートマシン9210はライトトランザクションを検出してウェイトステートSWWAITに状態遷移し(図10;B)、時刻t2においてウェイト信号WAITをハイレベルにアサートする(図11;B)。これによりバスマスタ9100にウェイトをかける。   From this idle state SIDLE, the bus master 9100 starts a write transaction. When the write signal WRN is set to low level at time t1 and the chip select signal CSN is set to low level, the state machine 9210 that inputs this detects the write transaction. Then, the state transitions to the wait state SWWAIT (FIG. 10; B), and the wait signal WAIT is asserted to the high level at time t2 (FIG. 11; B). This puts a wait on the bus master 9100.

他方、ステートマシン9220は、時刻t3においてステートマシン9210がウェイトステートSWWAITに状態遷移したことを検出すると、時刻t3から2クロック後の時刻t4においてライトステートPWRITEに状態遷移し(図10及び図11;C)、それから1クロック後の時刻t6において、同期化されたライトデータWDATAをレジスタ9230にライトしてウェイトステートPWAITに状態遷移する(図11;D)。この動作により、アドレス信号ADDRに対するライトデータWDATAのセットアップタイムtSUが確保される。   On the other hand, when the state machine 9220 detects that the state machine 9210 transitions to the wait state SWWAIT at time t3, the state machine 9220 transitions to the write state PWRITE at time t4, which is two clocks after time t3 (FIGS. 10 and 11; C) Then, at time t6 after one clock, the synchronized write data WDATA is written to the register 9230, and the state transitions to the wait state PWAIT (FIG. 11; D). By this operation, the setup time tSU of the write data WDATA for the address signal ADDR is ensured.

一方、ステートマシン9210は、時刻t5においてステートマシン9220がライトステートPWRITE(またはウェイトステートPWAIT)状態遷移したことを検出すると、ウェイトステートSWWAITからライトステートSWRITEに2クロックで状態遷移し(図10及び図11;E)、時刻t7においてウェイト信号WAITをローレベルにネゲートする(図11;F)。この動作によりアドレス信号ADDRに対するライトデータWDATAのホールドタイムtHDが確保される。   On the other hand, when the state machine 9210 detects that the state machine 9220 transitions to the write state PWRITE (or wait state PWAIT) at time t5, the state machine 9210 transitions from the wait state SWWAIT to the write state SWRITE in two clocks (FIGS. 10 and 10). 11; E), at time t7, the wait signal WAIT is negated to a low level (FIG. 11; F). By this operation, the hold time tHD of the write data WDATA for the address signal ADDR is ensured.

バスマスタ9100は、ウェイト信号WAITがローレベルにネゲートされたことを検出すると、時刻t8において、ライト信号WRN及びチップセレクト信号CSNをハイレベルにネゲートし(図11のG)、ライトトランザクションを終了する。
この後、ステートマシン9220は、時刻t9において、ステートマシン9210がウェイトステートSWWAITにないことを検出すると、2クロック後の時刻t10においてウェイトステートPWAITからアイドルステートPIDLEに状態遷移し(図10及び図11;H)、次のトランザクションに備える。
When the bus master 9100 detects that the wait signal WAIT is negated to the low level, the bus master 9100 negates the write signal WRN and the chip select signal CSN to the high level at time t8 (G in FIG. 11), and ends the write transaction.
Thereafter, when the state machine 9220 detects that the state machine 9210 is not in the wait state SWWAIT at time t9, the state machine 9220 transitions from the wait state PWAIT to the idle state PIDLE at time t10 two clocks later (FIGS. 10 and 11). H), preparing for the next transaction.

次に、図10及び図12を参照してリード動作を説明する。
上述と同様に、初期状態において、周辺モジュール9200内のステートマシン9210はアイドルステートSIDLEにあるものとする。
Next, the read operation will be described with reference to FIGS.
Similarly to the above, it is assumed that the state machine 9210 in the peripheral module 9200 is in the idle state SIDLE in the initial state.

この状態から、バスマスタ9100がリードトランザクションを開始し、時刻t1においてリード信号RDN及びチップセレクト信号CSNをローレベルにアサートすると、ステートマシン9210は、時刻t2において、リードトランザクションを検出してウェイトステートSRWAITに状態遷移し(図10及び図12;a)、ウェイト信号WAITをハイレベルにアサートする(図12;b)。これにより周辺モジュール9200に対してバスマスタ9100がウェイト状態とされる。   From this state, the bus master 9100 starts a read transaction, and when the read signal RDN and the chip select signal CSN are asserted to a low level at time t1, the state machine 9210 detects the read transaction and enters the wait state SRWAIT at time t2. State transition is made (FIGS. 10 and 12; a), and the wait signal WAIT is asserted to a high level (FIG. 12; b). As a result, the bus master 9100 is put into a wait state for the peripheral module 9200.

他方、ステートマシン9220は、時刻t3においてステートマシン9210がウェイトステートSWWAITに状態遷移したことを検出すると、2クロック後の時刻t4においてリードステートPREADに状態遷移して(図10及び図12;c)、リードデータRDATAをレジスタ9230からフリップフロップ9280にフェッチし、その後、ウエィトステートPWAITに状態遷移する(図10;h)。これまでの動作により、アドレス信号ADDRのセットアップタイムtSUAが確保される。   On the other hand, when the state machine 9220 detects that the state machine 9210 has transitioned to the wait state SWWAIT at time t3, the state machine 9220 transitions to the read state PREAD at time t4 after two clocks (FIGS. 10 and 12; c). The read data RDATA is fetched from the register 9230 to the flip-flop 9280, and then the state transitions to the wait state PWAIT (FIG. 10; h). By the operation so far, the setup time tSUA of the address signal ADDR is secured.

一方、ステートマシン9210は、その後の時刻t5においてステートマシン9220がウェイトステートPWAITに状態遷移したことを検出すると、その2クロック後の時刻t7においてリードステートSREADに状態遷移すると共に(図10及び図12;d)、ウェイト信号WAITをローレベルにネゲートする(図12;e)。また、リードデータRDATAは、時刻t6において、クロック信号SCLKに同期化されて周辺モジュール9200からバスに出力される。この動作によりリードデータRDATAのセットアップタイムtSUDが確保される。   On the other hand, when the state machine 9210 detects that the state machine 9220 transitions to the wait state PWAIT at time t5 thereafter, the state machine 9210 transitions to the read state SREAD at time t7 two clocks later (FIGS. 10 and 12). D) The wait signal WAIT is negated to a low level (FIG. 12; e). The read data RDATA is output from the peripheral module 9200 to the bus in synchronization with the clock signal SCLK at time t6. This operation secures the setup time tSUD for the read data RDATA.

バスマスタ9100は、ウェイト信号WAITがローレベルにネゲートされたことを検出すると、時刻t9において、リード信号RDN及びチップセレクト信号CSNをハイレベルにネゲートし(図12;f)、リードトランザクションを終了する。
他方、ステートマシン9220は、時刻t8において、ステートマシン9210がウェイトステートSRWAITにないことを検出すると、2クロック後の時刻t10においてウェイトステートPWAITからアイドルステートPIDLEに状態遷移し(図12;g)、次のトランザクションに備える。
特開平9−044395号公報
When detecting that the wait signal WAIT is negated to the low level, the bus master 9100 negates the read signal RDN and the chip select signal CSN to the high level at time t9 (FIG. 12; f), and ends the read transaction.
On the other hand, when the state machine 9220 detects that the state machine 9210 is not in the wait state SRWAIT at time t8, the state machine 9220 transitions from the wait state PWAIT to the idle state PIDLE at time t10 two clocks later (FIG. 12; g). Prepare for the next transaction.
Japanese Patent Laid-Open No. 9-044395

ところで、一般に、高速なバスを介してバスマスタに周辺モジュールを接続したとしても、周辺モジュールが低速であれば、周辺モジュールに対する1回のデータ転送に多くのサイクルを費やす。このため、バスマスタが低速な周辺モジュールをアクセスする際に多くのレイテンシが発生するという問題があり、バスを高速化した意味がなくなる。   By the way, in general, even if a peripheral module is connected to a bus master via a high-speed bus, if the peripheral module is low speed, many cycles are spent for one data transfer to the peripheral module. Therefore, there is a problem that a lot of latency occurs when the bus master accesses a low-speed peripheral module, and the meaning of speeding up the bus is lost.

上述の従来技術に係る情報処理装置について言えば、上記レイテンシが増加する主な原因は二つある。一つは、バスの動作クロック信号SCLKとは異なる非同期なクロック信号PCLKが周辺モジュールの動作クロック信号として使用されることが挙げられる。もう一つは、バスの動作クロック周波数に比べ、周辺モジュールの動作クロック周波数が低いことが挙げられる。何れにおいても、バスマスタと周辺モジュールとの間でデータ転送する際のデータの同期化に要するディレイタイムと、データのセットアップ/ホールドタイムがレイテンシを増加させている。   Speaking of the information processing apparatus according to the above-described prior art, there are two main causes for the increase in the latency. One is that an asynchronous clock signal PCLK different from the bus operation clock signal SCLK is used as the operation clock signal of the peripheral module. Another is that the operation clock frequency of the peripheral module is lower than the operation clock frequency of the bus. In any case, the delay time required for data synchronization when transferring data between the bus master and the peripheral module and the setup / hold time of the data increase the latency.

このようにレイテンシが発生する結果、上述の図11に示すライト動作では、時刻t2から時刻t6までの7サイクル分のウェイトサイクルを必要とし、図12に示すリード動作では、時刻t2から時刻t6までの6サイクル分のウェイトサイクルを必要とし、その分、レイテンシが増加して次のトランザクションの開始が遅くなる。   As a result of the occurrence of latency as described above, the write operation shown in FIG. 11 requires seven wait cycles from time t2 to time t6, and the read operation shown in FIG. 12 from time t2 to time t6. 6 wait cycles are required, the latency is increased by that amount, and the start of the next transaction is delayed.

なお、上述の従来技術のように、バスマスタが周辺モジュール内のレジスタをアクセスする場合に限れば、バスマスタ用のクロック信号でレジスタを動作させるように周辺モジュールを設計すれば、上述のレイテンシに関する問題を回避することができる。しかし、昨今、周辺モジュールは様々な製品に適用されることを前提として設計されるため、特定のシステムに特化して設計すると、周辺モジュールの汎用性が損なわれる。このため、レジスタであっても周辺モジュール用のクロック信号に同期するように設計されるのが通例となっており、従って上記の問題は依然として存在する。   In addition, as in the above-described prior art, if the peripheral module is designed so that the register is operated by the clock signal for the bus master only when the bus master accesses the register in the peripheral module, the above-described latency problem can be solved. It can be avoided. However, recently, peripheral modules are designed on the premise that they are applied to various products. Therefore, if they are designed specifically for a specific system, the versatility of the peripheral modules is impaired. For this reason, even a register is usually designed to be synchronized with a clock signal for a peripheral module, and thus the above problem still exists.

本発明は、上記事情に鑑みてなされたものであり、バスマスタがレジスタ等を内蔵する周辺モジュールをアクセスする際のレイテンシを有効に低減することができる情報処理装置およびインターフェイス回路を提供することを目的とする。   The present invention has been made in view of the above circumstances, and it is an object of the present invention to provide an information processing apparatus and an interface circuit capable of effectively reducing latency when a bus master accesses a peripheral module containing a register or the like. And

本発明に係る情報処理装置は、第1クロック信号に同期して動作するバスマスタと、第2クロック信号に同期して動作する周辺モジュールと、前記第1クロック信号に同期して前記バスマスタとの間でデータ転送するための第1アクセスポートと前記第2クロック信号に同期して前記周辺モジュールとの間でデータ転送するための第2アクセスポートとを有する記憶手段を有し、該記憶手段を介して前記バスマスタと前記周辺モジュールとの間のデータ転送を遂行するインターフェイス回路とを備えた情報処理装置の構成を有する。   An information processing apparatus according to the present invention includes a bus master that operates in synchronization with a first clock signal, a peripheral module that operates in synchronization with a second clock signal, and the bus master in synchronization with the first clock signal. Storage means having a first access port for transferring data and a second access port for transferring data to and from the peripheral module in synchronization with the second clock signal, via the storage means And an interface circuit that performs data transfer between the bus master and the peripheral module.

上記情報処理装置において、例えば、前記インターフェイス回路は、前記バスマスタからのアクセスに基づき前記第1アクセスポートに供給すべき第1制御信号を生成すると共に、前記バスマスタからのアクセスがライト動作である場合に該アクセスがあったこと示すフラグを発生する第1ステートマシンと、前記フラグを格納するフラグレジスタと、前記フラグレジスタに格納されたフラグを検索するフラグ検索回路と、前記フラグ検索回路による検索結果に基づき前記第2アクセスポートに供給すべき第2制御信号を生成する第2ステートマシンとを備えたことを特徴とする。   In the information processing apparatus, for example, the interface circuit generates a first control signal to be supplied to the first access port based on an access from the bus master, and the access from the bus master is a write operation. A first state machine that generates a flag indicating that the access has occurred, a flag register that stores the flag, a flag search circuit that searches for a flag stored in the flag register, and a search result by the flag search circuit And a second state machine for generating a second control signal to be supplied to the second access port.

上記情報処理装置において、例えば、前記周辺モジュールは、複数の第1レジスタから構成され、前記フラグレジスタは、前記複数の第1レジスタに対応する複数の第2レジスタから構成され、前記フラグ検索回路は、前記複数の第2レジスタのうち、前記フラグが格納された第1レジスタに対応するレジスタを指定するアドレス信号を出力するように構成されたことを特徴とする。     In the information processing apparatus, for example, the peripheral module includes a plurality of first registers, the flag register includes a plurality of second registers corresponding to the plurality of first registers, and the flag search circuit includes: An address signal for designating a register corresponding to the first register in which the flag is stored among the plurality of second registers is output.

上記情報処理装置において、例えば、前記フラグ検索回路は、前記複数の第2レジスタの各アドレスに対応するカウント値を巡回的に発生して前記周辺モジュール及び前記記憶手段に供給するカウンタと、前記カウント値を前記第1クロック信号で同期化してフラグポインタとして前記フラグレジスタに供給すると共に、該フラグポインタで指定されるフラグレジスタに前記フラグが格納されていることを示すレジスタポインタを前記第2クロック信号に同期化する同期化回路と、前記同期化回路で同期化された前記レジスタポインタと前記カウント値とを比較し、その比較結果を前記第2ステートマシンに供給する比較器とを備えて構成され、前記第2ステートマシンは、前記比較結果が前記レジスタポインタと前記カウント値との一致を示す場合に、前記第2制御信号としてリード動作に関する制御信号を生成して出力することを特徴とする。   In the information processing apparatus, for example, the flag search circuit cyclically generates a count value corresponding to each address of the plurality of second registers and supplies the count value to the peripheral module and the storage unit, and the count A value is synchronized with the first clock signal and supplied to the flag register as a flag pointer, and a register pointer indicating that the flag is stored in the flag register designated by the flag pointer is set to the second clock signal. And a comparator for comparing the register pointer synchronized with the synchronization circuit with the count value and supplying the comparison result to the second state machine. In the second state machine, the comparison result indicates that the register pointer matches the count value. If you, and wherein the generating and outputting a control signal related to the read operation as said second control signal.

上記情報処理装置において、例えば、前記複数の第2レジスタのそれぞれは、前記バスマスタからのアクセスの種別を示すフラグを格納するレジスタと、前記バスマスタからアクセスがあったことを示すフラグを格納するレジスタとから構成されたことを特徴とする請求項1ないし4の何れか1項記載の情報処理装置。   In the information processing apparatus, for example, each of the plurality of second registers includes a register that stores a flag indicating a type of access from the bus master, and a register that stores a flag indicating that the bus master has accessed The information processing apparatus according to any one of claims 1 to 4, wherein the information processing apparatus comprises:

上記情報処理装置において、例えば、前記第1及び第2ステートマシンは、これら第1及び第2ステートマシンの一方が前記記憶手段をアクセスする際に、これら第1及び第2ステートマシンの他方をロックステートに状態遷移させることを特徴とする。   In the information processing apparatus, for example, the first and second state machines lock the other of the first and second state machines when one of the first and second state machines accesses the storage unit. It is characterized by making a state transition to a state.

上記情報処理装置において、例えば、前記記憶手段は、前記第2アクセスポートとして複数のアクセスポートを備えたマルチポートRAMから構成され、前記マルチポートRAMの前記複数のアクセスポートには、前記周辺モジュールとして複数のモジュールがそれぞれ接続されたことを特徴とする。   In the information processing apparatus, for example, the storage unit includes a multi-port RAM including a plurality of access ports as the second access port, and the plurality of access ports of the multi-port RAM include the peripheral module. A plurality of modules are connected to each other.

本発明に係るインターフェイス回路は、第1クロック信号に同期して動作するバスマスタと第2クロック信号に同期して動作する周辺モジュールとの間のデータ転送を遂行するインターフェイス回路であって、前記第1クロック信号に同期して前記バスマスタとの間でデータ転送するための第1アクセスポートと前記第2クロック信号に同期して前記周辺モジュールとの間でデータ転送するための第2アクセスポートとを有する記憶手段と、前記バスマスタからのアクセスに基づき前記第1アクセスポートに供給すべき第1制御信号を生成すると共に、前記バスマスタからのアクセスがライト動作である場合に該アクセスがあったこと示すフラグを発生する第1ステートマシンと、前記フラグを格納するフラグレジスタと、前記フラグレジスタに格納されたフラグを検索するフラグ検索回路と、前記フラグ検索回路による検索結果に基づき前記第2アクセスポートに供給すべき第2制御信号を生成する第2ステートマシンとを備えたインターフェイス回路の構成を有する。   An interface circuit according to the present invention is an interface circuit that performs data transfer between a bus master that operates in synchronization with a first clock signal and a peripheral module that operates in synchronization with a second clock signal. A first access port for transferring data to and from the bus master in synchronization with a clock signal; and a second access port for transferring data to and from the peripheral module in synchronization with the second clock signal. A storage means and a first control signal to be supplied to the first access port based on an access from the bus master, and a flag indicating that the access has occurred when the access from the bus master is a write operation A generated first state machine, a flag register for storing the flag, and the flag register A configuration of an interface circuit comprising: a flag search circuit that searches for a flag stored in the second search machine; and a second state machine that generates a second control signal to be supplied to the second access port based on a search result by the flag search circuit Have

本発明によれば、バスマスタからのアクセスを受け付けるための第1アクセスポートと周辺モジュールからのアクセスを受け付けるための第2アクセスポートとを有する記憶手段を介してバスマスタと周辺モジュールとの間のデータ転送を遂行するようにしたので、バスマスタがレジスタ等の周辺モジュールをアクセスする際のレイテンシを有効に低減することができる。   According to the present invention, data transfer between a bus master and a peripheral module via a storage means having a first access port for receiving access from the bus master and a second access port for receiving access from the peripheral module Thus, the latency when the bus master accesses a peripheral module such as a register can be effectively reduced.

以下、図面を参照しながら、本発明の実施形態を説明する。
図1に、本発明の実施形態に係る情報処理装置の概略構成を示す。同図において、符号1100は、バスクロック信号(第1クロック信号)SCLKに同期して動作するCPU等のバスマスタを示し、符号1200は、周辺クロック信号(第2クロック信号)PCLKに同期して動作する周辺モジュールを示す。これらバスマスタ1100と周辺モジュール1200はバス1300を介して相互に接続されている。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows a schematic configuration of an information processing apparatus according to an embodiment of the present invention. In the figure, reference numeral 1100 denotes a bus master such as a CPU that operates in synchronization with a bus clock signal (first clock signal) SCLK, and reference numeral 1200 operates in synchronization with a peripheral clock signal (second clock signal) PCLK. Indicates peripheral modules to be used. The bus master 1100 and the peripheral module 1200 are connected to each other via a bus 1300.

周辺モジュール1200は、バスマスタ1100に対してレジスタ機能を提供するものであり、マルチポートRAMの一種であるデュアルポートRAM1210とレジスタ群1220とを含み、このレジスタ群1220は複数のレジスタRA〜RZから構成される。デュアルポートRAM1210は、上記複数のレジスタRA〜RZと一対一に対応するデータ記憶領域MA〜MZを備え、このデータ記憶領域MA〜MZにはレジスタRA〜RZの全ての値が格納される。即ち、デュアルポートRAM1210は、いわばレジスタRA〜RZのミラー値を格納するミラー回路として機能する。   The peripheral module 1200 provides a register function to the bus master 1100, and includes a dual port RAM 1210, which is a kind of multi-port RAM, and a register group 1220. The register group 1220 includes a plurality of registers RA to RZ. Is done. The dual port RAM 1210 includes data storage areas MA to MZ corresponding one-to-one with the plurality of registers RA to RZ, and all the values of the registers RA to RZ are stored in the data storage areas MA to MZ. That is, the dual port RAM 1210 functions as a mirror circuit that stores the mirror values of the registers RA to RZ.

また、デュアルポートRAM1210は、バスマスタ1100とレジスタ群1220との間のインターフェイス回路としても機能し、以下に詳細に説明するように、このデュアルポートRAM1210を介してバスマスタ1100とレジスタ群1220との間のデータ転送が遂行されるように構成されている。   The dual port RAM 1210 also functions as an interface circuit between the bus master 1100 and the register group 1220. As described in detail below, the dual port RAM 1210 is connected between the bus master 1100 and the register group 1220 via the dual port RAM 1210. Data transfer is performed.

図2に、上記周辺モジュール1200の詳細構成を示す。同図において、上述の図1に示す要素と同一要素には同一符号を付す。
図2において、符号1211及び符号1212は、デュアルポートRAM1210が備える第1及び第2アクセスポートを示す。このうち、第1アクセスポート1211は、バスクロック信号SCLKに同期してバスマスタ1100との間でデータ転送するためのものであり、この第1アクセスポート1211には、後述の第1ステートマシン(SFSM)1230からアドレス信号mADDRと各種の制御信号(CSN,WRN,RDN)が供給される。
FIG. 2 shows a detailed configuration of the peripheral module 1200. In the figure, the same elements as those shown in FIG.
In FIG. 2, reference numerals 1211 and 1212 indicate first and second access ports provided in the dual port RAM 1210. Among them, the first access port 1211 is for transferring data to and from the bus master 1100 in synchronization with the bus clock signal SCLK. The first access port 1211 has a first state machine (SFSM) to be described later. ) 1230 is supplied with an address signal mADDR and various control signals (CSN, WRN, RDN).

第2アクセスポート1212は、周辺クロック信号PCLKに同期して周辺モジュール1200との間でデータ転送するためのものであり、後述のフラグ検索回路1260からアドレス信号maddrが供給されると共に、後述の第2ステートマシン(PFSM)1240から各種の制御信号(mcsn,mwrn,mrdn)が供給される。   The second access port 1212 is for transferring data to and from the peripheral module 1200 in synchronization with the peripheral clock signal PCLK. The second access port 1212 is supplied with an address signal “maddr” from a flag search circuit 1260 described later, Various control signals (mcsn, mwrn, mrdn) are supplied from a two-state machine (PFSM) 1240.

符号1230は、第1アクセスポート1211を介してデュアルポートRAM1210をアクセスするための第1ステートマシン(SFSM)を示す。この第1ステートマシン1230には、バスマスタ1100から、アドレス信号ADDR、チップセレクト信号CSN、ライト信号WRN、リード信号RDNが供給される。符号1240は、第2アクセスポート1212を介してデュアルポートRAM1210をアクセスするための第2ステートマシン(PFSM)を示す。   Reference numeral 1230 indicates a first state machine (SFSM) for accessing the dual port RAM 1210 via the first access port 1211. The first state machine 1230 is supplied with an address signal ADDR, a chip select signal CSN, a write signal WRN, and a read signal RDN from the bus master 1100. Reference numeral 1240 denotes a second state machine (PFSM) for accessing the dual port RAM 1210 via the second access port 1212.

符号1250はフラグレジスタを示す。このフラグレジスタ1250は、第1ステートマシン1230が発生する後述のフラグを格納するためのものであり、複数のレジスタSA〜SZと複数のレジスタFA〜FZとの2種類のレジスタ群から構成される。ここで、レジスタSA〜SZは、バスマスタ1100が発行するトランザクションの種別(ライトトランザクション/リードトランザクション等)を表すフラグを格納するためのものであり、レジスタFA〜FZは、上記トランザクションの有無を表すフラグを格納するためのものである。   Reference numeral 1250 indicates a flag register. The flag register 1250 is for storing a flag, which will be described later, generated by the first state machine 1230, and is composed of two types of register groups, a plurality of registers SA to SZ and a plurality of registers FA to FZ. . Here, the registers SA to SZ are for storing a flag indicating the type of transaction issued by the bus master 1100 (write transaction / read transaction, etc.), and the registers FA to FZ are flags indicating the presence / absence of the transaction. Is for storing.

これら二種類のレジスタSA〜SZ及びレジスタFA〜FZは、上述のレジスタ群1220のレジスタRA〜RZと一対一に対応していると共に、デュアルポートRAM1210のデータ記憶領域MA〜MZにも一対一に対応している。例えば、フラグレジスタ1250内のレジスタSAとレジスタFAは、レジスタ群1220内のレジスタRAに対応すると共に、デュアルポートRAM1210のデータ記憶領域MAに対応している。以下同様に、レジスタ群1220内の各レジスタに対して、フラグレジスタ1250内の二種類のレジスタ及びデュアルポートRAM1210内の各データ記憶領域が対応している。   These two types of registers SA to SZ and registers FA to FZ have a one-to-one correspondence with the registers RA to RZ of the register group 1220 and have a one-to-one correspondence with the data storage areas MA to MZ of the dual port RAM 1210. It corresponds. For example, the register SA and the register FA in the flag register 1250 correspond to the register RA in the register group 1220 and also correspond to the data storage area MA of the dual port RAM 1210. Similarly, two types of registers in the flag register 1250 and each data storage area in the dual port RAM 1210 correspond to each register in the register group 1220.

ここで、第1ステートマシン1230は、バスマスタ1100からデュアルポートRAM1210にデータが書き込まれると、このデータが書き込まれたデュアルポートRAM1210内のデータ記憶領域に対応するフラグレジスタ1250内のレジスタにフラグをセットする。また、第2ステートマシン1240は、そのデータがデュアルポートRAM1210から読み出されると、そのフラグをクリアする。このフラグは、第1ステートマシン1230に対しては、デュアルポートRAM1210に対するライト動作を禁止する意味を有し、第2ステートマシン1240に対してはデュアルポートRAM1210からのリード動作を許容する意味を有している。   Here, when data is written from the bus master 1100 to the dual port RAM 1210, the first state machine 1230 sets a flag in a register in the flag register 1250 corresponding to the data storage area in the dual port RAM 1210 to which this data has been written. To do. The second state machine 1240 clears the flag when the data is read from the dual port RAM 1210. This flag has a meaning of prohibiting the write operation to the dual port RAM 1210 for the first state machine 1230 and has a meaning of permitting a read operation from the dual port RAM 1210 to the second state machine 1240. is doing.

例えば、後述するように、第1ステートマシン1230は、デュアルポートRAM1210にデータを書き込む際にフラグレジスタ1250を参照し、フラグがセットされていると、そのフラグに対応するデュアルポートRAM1210のデータ記憶領域に対するライト動作を中止する。これにより、デュアルポートRAM1210から読み出されていないデータ、即ちレジスタ群1220への転送が完了していないデータの更新(破壊)を防止する。   For example, as described later, the first state machine 1230 refers to the flag register 1250 when writing data to the dual port RAM 1210, and when the flag is set, the data storage area of the dual port RAM 1210 corresponding to the flag. Cancels the write operation for. This prevents updating (destruction) of data that has not been read from the dual port RAM 1210, that is, data that has not been transferred to the register group 1220.

また、第2ステートマシン1240は、フラグレジスタ1250にフラグがセットされていると、そのフラグに対応するデュアルポートRAM1210のデータ記憶領域のリード動作を遂行すると共に、そのフラグをクリアする。このようにフラグをクリアすることにより、その後、このフラグが格納されていたレジスタに対応するデュアルポートRAM1210内のデータ記憶領域へのライト動作が許可されるようになる。   When the flag is set in the flag register 1250, the second state machine 1240 performs a read operation of the data storage area of the dual port RAM 1210 corresponding to the flag and clears the flag. By clearing the flag in this way, the write operation to the data storage area in the dual port RAM 1210 corresponding to the register in which the flag is stored is permitted thereafter.

符号1260はフラグ検索回路を示す。このフラグ検索回路1260は、同期化回路1261、比較器1262、カウンタ1263から構成され、フラグレジスタ1250内のフラグを検索し、その検索結果として、検索されたフラグの位置(フラグが格納されているフラグレジスタ1250内のレジスタ)に対応するレジスタ群1220内のレジスタと、デュアルポートRAM1210内のデータ記憶領域とを指定するためのアドレス信号maddrを生成するものである。   Reference numeral 1260 denotes a flag search circuit. The flag search circuit 1260 includes a synchronization circuit 1261, a comparator 1262, and a counter 1263. The flag search circuit 1260 searches for a flag in the flag register 1250, and stores the position of the searched flag (the flag is stored) as a search result. The address signal “maddr” for designating the register in the register group 1220 corresponding to the register in the flag register 1250 and the data storage area in the dual port RAM 1210 is generated.

符号1221はデコーダを示す。このデコーダ1221は、上記アドレス信号maddrに基づきレジスタ群1220内の一つのレジスタを選択的に特定するものである。レジスタ群1220内の各レジスタのデータ入力部は、リードデータrdata用のバスを介してデュアルポートRAM1210の第2アクセスポート1212と接続されている。
符号1222はマルチプレクサを示す。マルチプレクサ1222の入力部には、レジスタ群1220内の各レジスタの出力部が接続されると共に、このマルチプレクサ1222の出力部は、ライトデータwdata用のバスを介して上記第2アクセスポート1212に接続されている。
Reference numeral 1221 denotes a decoder. The decoder 1221 selectively specifies one register in the register group 1220 based on the address signal maddr. The data input section of each register in the register group 1220 is connected to the second access port 1212 of the dual port RAM 1210 via a read data rdata bus.
Reference numeral 1222 denotes a multiplexer. The output section of each register in the register group 1220 is connected to the input section of the multiplexer 1222, and the output section of the multiplexer 1222 is connected to the second access port 1212 via the bus for write data wdata. ing.

上述のデュアルポートRAM1210、第1ステートマシン1230、第2ステートマシン1240、フラグレジスタ1250、フラグ検索回路1260は、このデュアルポートRAM1210を介してバスマスタ1100と周辺モジュール内のレジスタ群1220との間のデータ転送を遂行するインターフェイス回路として機能する。このインターフェイス回路は、周辺モジュール1200に内蔵されている必要はなく、周辺モジュール1200の外部に単体で備えられても良い。   The dual port RAM 1210, the first state machine 1230, the second state machine 1240, the flag register 1250, and the flag search circuit 1260 described above receive data between the bus master 1100 and the register group 1220 in the peripheral module via the dual port RAM 1210. It functions as an interface circuit that performs transfer. The interface circuit does not need to be built in the peripheral module 1200, and may be provided alone outside the peripheral module 1200.

次に、図3ないし図5を参照して、本実施形態の情報処理装置の動作を説明する。
図3は、本情報処理装置の第1ステートマシン1230及び第2ステートマシン1240の状態遷移図であり、図4および図5は、それぞれ、本情報処理装置のライト動作及びリード動作のタイミングチャートである。
なお、その動作説明において、各ステートマシンの状態遷移については図3を参照され、各時刻での動作については図4及び図5を適宜参照されたい。
Next, the operation of the information processing apparatus according to the present embodiment will be described with reference to FIGS.
FIG. 3 is a state transition diagram of the first state machine 1230 and the second state machine 1240 of the information processing apparatus, and FIGS. 4 and 5 are timing charts of the write operation and the read operation of the information processing apparatus, respectively. is there.
In the description of the operation, refer to FIG. 3 for the state transition of each state machine, and appropriately refer to FIGS. 4 and 5 for the operation at each time.

先ず、図3の状態遷移図に示される各ステートの意味を説明しておく。
(1)第1ステートマシン1230のステート(SCLK同期)
SIDLE;バスマスタ1100によるライトトランザクション、リードトランザクションを待ち受けるアイドルステート。
SWAIT;バスマスタ1100に対しウェイトをかけるためのウェイトステート。現在アクセスしようとしているレジスタに対応するフラグレジスタ1250のレジスタフラグREG_FLGがフラグセットステートFLGSETにある場合に状態遷移する。
SWRITE;第1ステートマシン1230で認識するライトステート。次のサイクルでバスマスタ1100はライトトランザクションを終了する。
SREAD;第1ステートマシン1230で認識するリードステート。次のサイクルでバスマスタ1100はリードトランザクションを終了する。
First, the meaning of each state shown in the state transition diagram of FIG. 3 will be described.
(1) State of first state machine 1230 (SCLK synchronization)
SIDE: Idle state waiting for a write transaction and a read transaction by the bus master 1100.
SWAIT; a wait state for applying a wait to the bus master 1100. The state transition is made when the register flag REG_FLG of the flag register 1250 corresponding to the register to be accessed is in the flag set state FLGSET.
SWRITE: Write state recognized by the first state machine 1230. In the next cycle, the bus master 1100 ends the write transaction.
SREAD: Read state recognized by the first state machine 1230. In the next cycle, the bus master 1100 ends the read transaction.

(2)フラグレジスタ1250のステート(SCLK同期)
FLGCLR;フラグレジスタ1250のレジスタフラグREG_FLGがクリアされたステート。
FLGSET;フラグレジスタ1250のレジスタフラグREG_FLGがセットされたステート。
(2) State of flag register 1250 (SCLK synchronization)
FLGCLR: a state in which the register flag REG_FLG of the flag register 1250 is cleared.
FLGSET: a state in which the register flag REG_FLG of the flag register 1250 is set.

(3)第2ステートマシン1240のステート(PCLK同期)
PIDLE;第1ステートマシン1230によるライトトランザクション、リードトランザクションを待ち受けるアイドルステート。
PREAD;第2ステートマシン1240で認識するリードステート。
PFCLR;第2ステートマシン1240で認識するライトステート。
以上で、各ステートの意味を説明した。
(3) State of second state machine 1240 (PCLK synchronization)
PIDLE: an idle state waiting for a write transaction and a read transaction by the first state machine 1230.
PREAD: Read state recognized by the second state machine 1240.
PFCLR; a write state recognized by the second state machine 1240.
The meaning of each state has been described above.

続いて、バスマスタ1100からデュアルポートRAM1210へのライト動作(バスマスタ1100からレジスタ群1220へのデータ転送)と、リード動作(レジスタ群1220からバスマスタ1100へのデータ転送)を順に説明する。
(1)ライト動作
図3および図4を参照してデュアルポートRAM1210へのライト動作を説明する。
初期状態では、第1ステートマシン1230がバスマスタ1100からのトランザクション(アクセス)を待ち受けるアイドルステートSIDLEにあり、且つ、フラグレジスタ1250内の全レジスタがクリアされた状態にあるものとする。
Next, a write operation (data transfer from the bus master 1100 to the register group 1220) from the bus master 1100 to the dual port RAM 1210 and a read operation (data transfer from the register group 1220 to the bus master 1100) will be described in order.
(1) Write Operation A write operation to the dual port RAM 1210 will be described with reference to FIGS.
In the initial state, it is assumed that the first state machine 1230 is in the idle state SIDLE waiting for a transaction (access) from the bus master 1100 and that all the registers in the flag register 1250 are cleared.

この状態から、バスマスタ1100がライトトランザクションを開始すると、時刻t1において、第1ステートマシン1230に供給されるライト信号WRNがローレベルになり、チップセレクト信号CSNがローレベルになり、アドレス信号ADDRが、レジスタRZに対応するデータ記憶領域MZを指定する値に変化する。   When the bus master 1100 starts a write transaction from this state, at time t1, the write signal WRN supplied to the first state machine 1230 becomes low level, the chip select signal CSN becomes low level, and the address signal ADDR is The value changes to a value that designates the data storage area MZ corresponding to the register RZ.

第1ステートマシン1230は、これらの信号状態から、バスマスタ1100によるライトトランザクションを検出すると、まず、フラグレジスタ1250を参照し、フラグがセットされているか否かを調べる。この場合は全てのフラグがクリアされている状態にあるため、デュアルポートRAM1210に対するライト動作は禁止されない。そこで、第1ステートマシン1230は、時刻t2においてライトステートSWRITEに状態遷移し、デュアルポートRAM1210のデータ記憶領域MZにライトデータWDATAを書き込む(図4;A)。   When the first state machine 1230 detects a write transaction by the bus master 1100 from these signal states, the first state machine 1230 first refers to the flag register 1250 to check whether the flag is set. In this case, since all the flags are cleared, the write operation to the dual port RAM 1210 is not prohibited. Therefore, the first state machine 1230 makes a transition to the write state SWRITE at time t2, and writes the write data WDATA in the data storage area MZ of the dual port RAM 1210 (FIG. 4; A).

そして、時刻t2から1サイクル後の時刻t3において、第1ステートマシン1230は、ライトステートSWRITEからアイドルステートSIDLEに状態遷移してデータ記憶領域MZに対するライトを完了する。このとき、第1ステートマシン1230は、レジスタRZに対応するフラグレジスタ1250内のレジスタFZにフラグをセットすると共に(図4;B)、且つ、レジスタSZには、ライトした旨を示すフラグをセットする。   Then, at time t3, one cycle after time t2, the first state machine 1230 transitions from the write state WRITE to the idle state SIDE to complete the writing to the data storage area MZ. At this time, the first state machine 1230 sets a flag in the register FZ in the flag register 1250 corresponding to the register RZ (FIG. 4B), and sets a flag indicating that writing has been performed in the register SZ. To do.

また、時刻t3においてアドレス信号ADDRの値がデータ記憶領域MAを指定する値に変化すると、第1ステートマシン1230は、同様に、フラグレジスタ1250を参照して時刻t4においてライトステートSWRITEに状態遷移し、データ記憶領域MAにライトデータWDATAを書き込む(図4;C)。そして、時刻t5において、ライトステートSWRITEからアイドルステートSIDLEに状態遷移してデータ記憶領域MAに対するライトを完了し、ライトが完了したことを表すフラグを、レジスタRAに対応するフラグレジスタ1250内のレジスタFAにセットすると共に(図4;D)、レジスタSAには、トランザクションがライトアクセスである旨のフラグをセットする。   When the value of the address signal ADDR changes to a value specifying the data storage area MA at time t3, the first state machine 1230 similarly makes a state transition to the write state SWRITE at time t4 with reference to the flag register 1250. Write data WDATA is written in the data storage area MA (FIG. 4C). At time t5, the state transition from the write state SWRITE to the idle state SIDE is completed to complete the write to the data storage area MA, and a flag indicating the completion of the write is displayed in the register FA in the flag register 1250 corresponding to the register RA. (FIG. 4; D), a flag indicating that the transaction is a write access is set in the register SA.

また、時刻t5においてアドレス信号ADDRの値がデータ記憶領域MBを指定する値に変化すると、同様に、第1ステートマシン1230は、フラグレジスタ1250を参照して時刻t6においてライトステートSWRITEに状態遷移し、データ記憶領域MBにライトデータWDATAを書き込む(図4;E)。そして、時刻t7において、ライトステートSWRITEからアイドルステートSIDLEに状態遷移してデータ記憶領域MBに対するライトを完了し、ライトが完了したことを表すフラグを、レジスタRBに対応するフラグレジスタ1250内のレジスタFBにセットすると共に(図4;F)、レジスタSBには、トランザクションがライトアクセスである旨のフラグをセットする。   Similarly, when the value of the address signal ADDR changes to a value specifying the data storage area MB at time t5, the first state machine 1230 similarly makes a transition to the write state SWRITE at time t6 with reference to the flag register 1250. Write data WDATA is written in the data storage area MB (FIG. 4E). At time t7, the state transition from the write state SWRITE to the idle state SIDLE completes the writing to the data storage area MB, and a flag indicating that the writing is completed is displayed in the register FB in the flag register 1250 corresponding to the register RB. (FIG. 4; F), a flag indicating that the transaction is a write access is set in the register SB.

更に、時刻t7において、再び、アドレス信号ADDRの値がデータ記憶領域MZを指定する値に変化すると、第1ステートマシン1230は、再び、上述のレジスタRZに対するライトトランザクションを検出し、フラグレジスタ1250を参照して、レジスタFZ,SZにフラグがセットされているか否かを調べる。この場合、これらのレジスタにはフラグが既にセットされているため、データ記憶領域MZに対するライトが禁止される。そこで、時刻t8において、第1ステートマシン1230は、アイドルステートIDLEからウェイトステートSWAITに状態遷移して、ウェイト信号WAITをアサートし、バスマスタ1100に対してウェイトをかける(図4;G)。   Furthermore, at time t7, when the value of the address signal ADDR again changes to a value that designates the data storage area MZ, the first state machine 1230 detects the write transaction for the register RZ again, and sets the flag register 1250. With reference to it, it is checked whether or not a flag is set in the registers FZ and SZ. In this case, since flags are already set in these registers, writing to the data storage area MZ is prohibited. Therefore, at time t8, the first state machine 1230 makes a state transition from the idle state IDLE to the wait state SWAIT, asserts the wait signal WAIT, and applies a wait to the bus master 1100 (FIG. 4; G).

その後の時刻t9において、第2ステートマシン1240は、データ記憶領域MZのデータが読み出されると、フラグレジスタ1250のレジスタFZ,SZの各フラグをクリアする。第1ステートマシン1230は、レジスタFZ,SZの各フラグがクリアされたことを検出すると、時刻t10において、ウェイトステートSWAITからライトステートSWRITEに状態遷移し、ウェイト信号WAITをローレベルにネゲートする(図4;H)。これ以後、バスマスタ1100は、データ記憶領域RZに対するライト動作が再び可能となる。そこで、第1ステートマシン1230は、ライトステートに状態遷移して1サイクルでデータ記憶領域MZに対するライトを終了し、レジスタFZ,SZに各フラグをセットする(図4;J)。   After that, at time t9, when the data in the data storage area MZ is read, the second state machine 1240 clears the flags of the registers FZ and SZ of the flag register 1250. When detecting that the flags of the registers FZ and SZ are cleared, the first state machine 1230 makes a transition from the wait state SWAIT to the write state SWRITE at time t10, and negates the wait signal WAIT to a low level (FIG. 4; H). Thereafter, the bus master 1100 can again perform the write operation on the data storage area RZ. Therefore, the first state machine 1230 transitions to the write state, finishes writing to the data storage area MZ in one cycle, and sets the flags in the registers FZ and SZ (FIG. 4; J).

このように、第1ステートマシン1230及び第2ステートマシン1240によるデュアルポートRAM1210に対するアクセスは、常にフラグレジスタ1250を参照して行われ、そのフラグの状態によって各ステートマシンのアクセスが許可/禁止される。   As described above, the access to the dual port RAM 1210 by the first state machine 1230 and the second state machine 1240 is always performed with reference to the flag register 1250, and access of each state machine is permitted / prohibited depending on the state of the flag. .

ここで、デュアルポートRAM1210からレジスタ群1220へのデータ転送を説明する。上述のように、バスマスタ1100からデュアルポートRAM1210にデータがライトされると、フラグレジスタ1250内の該当するレジスタにフラグがセットされるが、このフラグレジスタ1250内のフラグは、常時、フラグ検索回路1260によって監視されている。   Here, data transfer from the dual port RAM 1210 to the register group 1220 will be described. As described above, when data is written from the bus master 1100 to the dual port RAM 1210, a flag is set in the corresponding register in the flag register 1250. The flag in the flag register 1250 is always the flag search circuit 1260. Is being monitored by.

即ち、フラグ検索回路1260内のカウンタ1263は、レジスタ群1220内のレジスタRA〜RZの各アドレスに対応するカウント値を巡回的に発生する。このカウント値は、アドレス信号maddrとしてデュアルポートRAM1210の第2アクセスポート1212とデコーダ1221に供給されると共に、フラグレジスタ1250内のレジスタを指定するためのフラグポインタfpとされる。   That is, the counter 1263 in the flag search circuit 1260 cyclically generates count values corresponding to the addresses of the registers RA to RZ in the register group 1220. This count value is supplied as the address signal “maddr” to the second access port 1212 and the decoder 1221 of the dual port RAM 1210, and is used as a flag pointer fp for designating a register in the flag register 1250.

このフラグポインタfbは、同期化回路1261でバスクロック信号SCLKに同期化された後にフラグポインタFPとしてフラグレジスタ1250に供給される。フラグレジスタ1250では、フラグポインタFPで指定されるレジスタにフラグがセットされていると、その格納されたフラグレジスタに対応するデュアルポートRAM1210内のデータ記憶領域のアドレスに相当するリードポインタRPを出力する。   The flag pointer fb is synchronized with the bus clock signal SCLK by the synchronization circuit 1261 and then supplied to the flag register 1250 as the flag pointer FP. When a flag is set in the register specified by the flag pointer FP, the flag register 1250 outputs a read pointer RP corresponding to the address of the data storage area in the dual port RAM 1210 corresponding to the stored flag register. .

リードポインタRPは同期化回路1261で周辺クロック信号PCLKに同期化されて比較器1262に供給される。比較器1262は、同期化回路1261で同期化されたフラグポインタの値とカウンタ1263からのカウント値とを比較し、これらが一致した場合に一致検出信号matをアサートする。この一致検出信号matがアサートされたときにカウンタ1263から出力されているアドレス信号maddrが、レジスタ群1220にライトすべきデータが存在するデュアルポートRAM1210内のデータ記憶領域のアドレスとなる。   The read pointer RP is synchronized with the peripheral clock signal PCLK by the synchronization circuit 1261 and supplied to the comparator 1262. The comparator 1262 compares the value of the flag pointer synchronized by the synchronization circuit 1261 with the count value from the counter 1263, and asserts the coincidence detection signal mat if they match. The address signal madr output from the counter 1263 when the coincidence detection signal mat is asserted becomes the address of the data storage area in the dual port RAM 1210 where the data to be written to the register group 1220 exists.

そこで、第2ステートマシン1240は、一致検出信号matがアサートされたときに、デュアルポートRAM1210の第2アクセスポート1212にリード信号mrdnをアサートして、このときのアドレス信号mrdnで指定されるデュアルポートRAM1210内のデータ記憶領域からリードデータrdataを読み出す。このリードデータrdataはレジスタ群1220のレジスタRA〜RZに向けて送出される。デコーダ1221は、カウンタ1263からのアドレス信号maddrに基づき、レジスタRA〜RZの一つを選択し、そのレジスタに上記リードデータrdataを格納させる。   Therefore, the second state machine 1240 asserts the read signal mrdn to the second access port 1212 of the dual port RAM 1210 when the match detection signal mat is asserted, and the dual port designated by the address signal mrdn at this time. Read data rdata is read from the data storage area in the RAM 1210. The read data rdata is sent to the registers RA to RZ of the register group 1220. The decoder 1221 selects one of the registers RA to RZ based on the address signal “maddr” from the counter 1263, and stores the read data “rdata” in the register.

以上により、デュアルポートRAM1210を介してバスマスタ1100からレジスタ群1220にデータが転送される。このとき、バスマスタ1100からみれば、デュアルポートRAM1210はバスマスタの動作クロック信号と同じバスクロック信号SCLKで動作するので、レイテンシを要することなく、バスマスタ1100からデュアルポートRAM1210に高速にデータが転送される。従って、バスマスタ1100からレジスタ群1220への見かけ上のデータ転送速度を向上させることができる。   As described above, data is transferred from the bus master 1100 to the register group 1220 via the dual port RAM 1210. At this time, from the perspective of the bus master 1100, the dual port RAM 1210 operates with the same bus clock signal SCLK as the bus master operation clock signal, so data is transferred from the bus master 1100 to the dual port RAM 1210 at high speed without requiring latency. Therefore, the apparent data transfer rate from the bus master 1100 to the register group 1220 can be improved.

このライト動作では、周辺モジュールがデュアルポートRAM1210のデータ記憶領域からデータをリードしているときにバスマスタ1100がこのデータ記憶領域にデータをライトしようとした場合に、デュアルポートRAM1210に対するアクセスが競合するので、このような場合にバスマスタ1100にウェイトがかけられる。しかしながら、CPUが実行する処理において、実際上、レジスタ群1220内のレジスタRA〜RZに一旦設定した値を連続して書き換えるケースは極めて稀であるため、アクセスの競合を防止するための上記ウェイトに起因してデータ転送効率が低下することは事実上ないと言える。   In this write operation, when the peripheral module is reading data from the data storage area of the dual port RAM 1210 and the bus master 1100 tries to write data to this data storage area, access to the dual port RAM 1210 competes. In such a case, a weight is applied to the bus master 1100. However, in the process executed by the CPU, in practice, it is extremely rare that the values once set in the registers RA to RZ in the register group 1220 are continuously rewritten. As a result, it can be said that there is virtually no decrease in data transfer efficiency.

(2)リード動作
次に、図3および図5を参照して、バスマスタ1100によるデュアルポートRAM1210からのリード動作を説明する。
ここでは、上述のライト動作でデュアルポートRAM1210のデータ記憶領域MZにデータを書き込んだ後、データ記憶領域MA,MB,MZからデータを順次読み出す場合を説明する。
(2) Read Operation Next, a read operation from the dual port RAM 1210 by the bus master 1100 will be described with reference to FIGS.
Here, a case will be described in which data is sequentially read from the data storage areas MA, MB, and MZ after data is written to the data storage area MZ of the dual port RAM 1210 by the above-described write operation.

リードトランザクションに先だって、バスマスタ1100がライトトランザクションを開始すると、時刻t1において、第1ステートマシン1230に供給されるライト信号WRN及びチップセレクト信号CSNがローレベルになり、アドレス信号ADDRが、レジスタRZに対応するデータ記憶領域MZを指定する値に変化する。   When the bus master 1100 starts a write transaction prior to the read transaction, at time t1, the write signal WRN and the chip select signal CSN supplied to the first state machine 1230 become low level, and the address signal ADDR corresponds to the register RZ. The data storage area MZ to be changed is changed to a specified value.

これらの信号状態から、第1ステートマシン1230はライトトランザクションを検出すると、上述と同様にフラグレジスタ1250を参照し、フラグがセットされているか否かを調べる。この場合、フラグレジスタ1250内のレジスタFZ,SZのフラグはクリアされているため、第1ステートマシン1230は、時刻t2においてライトステートSWRITEに状態遷移し、データ記憶領域MZにライトデータWDATAを書き込む(図5;A)。そして1サイクル後の時刻t3においてライトステートSWRITEからアイドルステートSIDLEに状態遷移し、データ記憶領域MZに対するライトを完了する。このとき、第1ステートマシン1230は、レジスタFZ,SZにフラグをセットする。(図5;B)   From these signal states, when the first state machine 1230 detects a write transaction, the first state machine 1230 refers to the flag register 1250 in the same manner as described above to check whether or not the flag is set. In this case, since the flags of the registers FZ and SZ in the flag register 1250 are cleared, the first state machine 1230 changes to the write state SWRITE at time t2 and writes the write data WDATA in the data storage area MZ ( FIG. 5; A). Then, at time t3 after one cycle, the state transitions from the write state SWRITE to the idle state SIDE, and the writing to the data storage area MZ is completed. At this time, the first state machine 1230 sets a flag in the registers FZ and SZ. (Fig. 5; B)

その後、時刻t8において、バスマスタ1100がリードトランザクションを開始すると、ライト信号WRNがハイレベルにネゲートされ、リード信号RDNがローレベルにアサートされ、アドレス信号ADDRがデータ記憶領域MZを指定する値に変化する。これらの信号状態から、第1ステートマシン1230はリードトランザクションを検出すると、上述と同様にフラグレジスタ1250を参照し、レジスタFA,SAにフラグがセットされているか否かを調べる。この場合、レジスタFZ,SZにフラグがセットされた状態にあるため、第1ステートマシン1230は、ウェイトステートSWAITに状態遷移して、ウェイト信号WAITをハイレベルにアサートし、バスマスタ1100にウェイトをかける(図5;C)。   Thereafter, when the bus master 1100 starts a read transaction at time t8, the write signal WRN is negated to a high level, the read signal RDN is asserted to a low level, and the address signal ADDR changes to a value designating the data storage area MZ. . From these signal states, when the first state machine 1230 detects a read transaction, the first state machine 1230 refers to the flag register 1250 in the same manner as described above, and checks whether or not the flags are set in the registers FA and SA. In this case, since the flags are set in the registers FZ and SZ, the first state machine 1230 makes a transition to the wait state SWAIT, asserts the wait signal WAIT to a high level, and puts a wait on the bus master 1100. (FIG. 5; C).

また、図5において、例えば時刻t10において、第2ステートマシン1240によりレジスタFZ,SAのフラグがクリアされ、第1ステートマシン1230がフラグFZのクリアを検出すると、時刻t11において、第1ステートマシン1230はウェイトステートSWAITからリードステートSREADに状態遷移する(図5;D)。そして、第1ステートマシン1230は、リードステートSREADでデュアルポートRAM1210からデータを読み出し、時刻t10から2サイクルでリードアクセスを終了する。   In FIG. 5, for example, at time t10, the flags of the registers FZ and SA are cleared by the second state machine 1240, and when the first state machine 1230 detects clearing of the flag FZ, the first state machine 1230 is detected at time t11. Changes from the wait state SWAIT to the read state SREAD (FIG. 5; D). The first state machine 1230 reads data from the dual port RAM 1210 in the read state SREAD, and finishes the read access in two cycles from time t10.

また、第1ステートマシン1230は、時刻t3のサイクルでのアイドルステートSIDLEにおいて、デュアルポートRAM1210内のデータ記憶領域MA(レジスタRAに対応する記憶領域)に対するアクセスを検出すると、フラグレジスタ1250内のレジスタFAを参照する。この場合、レジスタFAがクリアされた状態(アクセス許可の状態)にあるため、第1ステートマシン1230は、リードステートSREADに状態遷移し(図5;E)、リードデータRDATAをデュアルポートRAM1210から読み出す。このバスマスタ1100によるリード時には、フラグレジスタ1250にフラグをセットする必要はない(図5;F)。   When first state machine 1230 detects an access to data storage area MA (storage area corresponding to register RA) in dual port RAM 1210 in idle state SIDLE in the cycle at time t 3, register in flag register 1250 Refer to FA. In this case, since the register FA is in a cleared state (access permission state), the first state machine 1230 makes a transition to the read state SREAD (FIG. 5E) and reads the read data RDATA from the dual port RAM 1210. . At the time of reading by the bus master 1100, it is not necessary to set a flag in the flag register 1250 (FIG. 5; F).

このリード動作では、周辺モジュールがデュアルポートRAM1210のデータ記憶領域にデータをライトしているときにバスマスタ1100がこのデータ記憶領域からデータ読み出そうとした場合にデュアルポートRAM1210に対するアクセスが競合するので、このような場合にバスマスタ1100にウェイトがかけられる。
以上で、ライト動作とリード動作を説明した。
In this read operation, access to the dual port RAM 1210 competes when the bus master 1100 tries to read data from the data storage area while the peripheral module is writing data to the data storage area of the dual port RAM 1210. In such a case, a wait is applied to the bus master 1100.
The write operation and read operation have been described above.

次に、図6の状態遷移図を参照して、バスマスタ1100と周辺モジュール1200の両方がデュアルポートRAM1210を同時に書き換えようとした場合のアクセス競合防止動作を説明する。概略的には、このアクセス競合防止動作では、第1ステートマシン1230及び第2ステートマシン1240は、これら第1及び第2ステートマシンの一方がデュアルポートRAM1210をアクセスする際に、これら第1及び第2ステートマシンの他方をロックステートに状態遷移させる。   Next, referring to the state transition diagram of FIG. 6, an access conflict prevention operation when both the bus master 1100 and the peripheral module 1200 attempt to rewrite the dual port RAM 1210 simultaneously will be described. In general, in this access contention prevention operation, the first state machine 1230 and the second state machine 1240 have the first and second state machines when one of the first and second state machines accesses the dual port RAM 1210. The other of the two-state machines is changed to the lock state.

先ず、図6の状態遷移図に示される各ステートの意味を説明しておく。
FLGCLR;フラグレジスタ1250のレジスタフラグREG_FLGがクリアされた状態のステート。
(1)第1ステートマシン1230のステート
SIDLE;バスマスタ1100によるライトトランザクション、リードトランザクションを待ち受けるステート。
SWAIT;バスマスタ1100に対しウェイトをかけるためのウェイトステート。現在アクセスしようとしているレジスタのレジスタフラグREG_FLGがフラグセットステートFLGSETにある場合に状態遷移する。
SWRITE;第1ステートマシン1230で認識するライトステート。次のサイクルでバスマスタ1100はライトトランザクションを終了する。
SREAD;第1ステートマシン1230で認識するリードステート。次のサイクルでバスマスタ1100はリードトランザクションを終了する。
First, the meaning of each state shown in the state transition diagram of FIG. 6 will be described.
FLGCLR: a state in which the register flag REG_FLG of the flag register 1250 is cleared.
(1) State SIDLE of the first state machine 1230: A state waiting for a write transaction and a read transaction by the bus master 1100.
SWAIT; a wait state for applying a wait to the bus master 1100. When the register flag REG_FLG of the register to be accessed is in the flag set state FLGSET, the state is changed.
SWRITE: Write state recognized by the first state machine 1230. In the next cycle, the bus master 1100 ends the write transaction.
SREAD: Read state recognized by the first state machine 1230. In the next cycle, the bus master 1100 ends the read transaction.

(2)フラグレジスタ1250のステート
FLGCLR;レジスタフラグREG_FLGがクリアされたステート。
FLGSET;レジスタフラグREG_FLGがセットされたステート。
FLGLOCK;フラグクリアステートで第2ステートマシン1240からのロック要求を受信すると、本ステートに状態遷移する。本ステートでバスマスタ1100からのリード/ライトトランザクションが開始されると、ウェイト信号を出力してバスマスタ1100にウェイトをかける。この期間中、第2ステートマシン1240はデュアルポートRAM1210に割り込みフラグレジスタの値をライトする。
(2) State of flag register 1250 FLGCLR; State in which register flag REG_FLG is cleared.
FLGSET: a state in which the register flag REG_FLG is set.
When a lock request is received from the second state machine 1240 in the flag clear state, the state transitions to this state. When a read / write transaction from the bus master 1100 is started in this state, a wait signal is output to put a wait on the bus master 1100. During this period, the second state machine 1240 writes the value of the interrupt flag register to the dual port RAM 1210.

(3)第2ステートマシン1240のステート
PIDLE;第1ステートマシン1230によるライトトランザクション、リードトランザクションを待ち受けるステート。
PLOCKREQ;割り込みフラグレジスタの値の更新を検出すると、本ステートに状態遷移し、レジスタフラグREG_FLGに対しロック要求を発行する。
PWRITE;レジスタフラグREG_FLGをロックした状態で本ステートに状態遷移し、デュアルポートRAM1210に割り込みフラグレジスタの値をライトする。
PUNLOCK;デュアルポートRAM1210に割り込みフラグレジスタの値をライトし終えると、本ステートに状態遷移し、レジスタフラグREG_FLGに対しアンロック要求を発行する。
PREAD;第2ステートマシン1240で認識するリードステート。
PFCLR;第2ステートマシン1240で認識するライトステート。
(3) State PIDLE of the second state machine 1240; a state waiting for a write transaction and a read transaction by the first state machine 1230.
PLOCKREQ; When the update of the value of the interrupt flag register is detected, the state transitions to this state, and a lock request is issued to the register flag REG_FLG.
PWRITE: The state transition is made to this state while the register flag REG_FLG is locked, and the value of the interrupt flag register is written to the dual port RAM 1210.
PUNLOCK; When writing of the value of the interrupt flag register to the dual port RAM 1210 is completed, the state transitions to this state, and an unlock request is issued to the register flag REG_FLG.
PREAD: Read state recognized by the second state machine 1240.
PFCLR; a write state recognized by the second state machine 1240.

上記各ステートに基づくアクセス競合防止方法を説明する。
図2に示す周辺モジュール1200内の第2ステートマシン1240は、プリセット信号PRESETに応答してアイドルステートPIDLEに状態遷移し(図6;A)、この状態で割り込みフラグレジスタの更新を検出すると、ロック要求ステートPLOCKREQに状態遷移して、フラグレジスタ1250内のレジスタフラグREG_FLGに対してロック要求を発行する。
An access conflict prevention method based on the above states will be described.
The second state machine 1240 in the peripheral module 1200 shown in FIG. 2 makes a transition to the idle state PIDLE in response to the preset signal PRESET (FIG. 6; A). When the update of the interrupt flag register is detected in this state, the second state machine 1240 A state transition is made to the request state PLOCKCKREQ, and a lock request is issued to the register flag REG_FLG in the flag register 1250.

フラグレジスタ1250内のレジスタフラグREG_FLGは、フラグクリアステートFLGCLRにおいて第2ステートマシン1240から上記ロック要求を受信すると、フラグクリアステートFLGCLRからフラグロックステートFLGLOCKに状態遷移する(図6;B)。第1ステートマシン1230は、フラグレジスタ1250がフラグロックステートFLGLOCKに状態遷移したことを検出し、その状態でバスマスタ1100からのライトトランザクションを検出すると、ウェイトステートSWAITに状態遷移して(図6;C)、バスマスタ1100にウェイトをかける。   When the register request REG_FLG in the flag register 1250 receives the lock request from the second state machine 1240 in the flag clear state FLGCLR, the state shifts from the flag clear state FLGCLR to the flag lock state FLGLOCK (FIG. 6; B). The first state machine 1230 detects that the flag register 1250 has made a state transition to the flag lock state FLGLOCK, and when it detects a write transaction from the bus master 1100 in that state, makes a transition to the wait state SWAIT (FIG. 6; C ), A wait is applied to the bus master 1100.

第2ステートマシン1240は、ロック要求ステートPLOCKREQにおいて、レジスタフラグREG_FLGがフラグロックステートFLGLOCKに遷移したことを検出すると、ライトステートPWRITEに状態遷移し(図6;D)、デュアルポートRAM1210に対し、割り込みフラグレジスタの値をライトする。第2ステートマシン1240は、ライトステートPWRITEにおいて、デュアルポートRAM1210に対する上記割り込みフラグのライトを終了すると、アンロックステートPUNLOCKに状態遷移し(図6;E)、フラグレジスタ1250内のレジスタフラグREG_FLGに対しアンロック要求を発行する。   When detecting that the register flag REG_FLG has transitioned to the flag lock state FLGLOCK in the lock request state PLOCKREQ, the second state machine 1240 transitions to the write state PWRITE (FIG. 6; D), and interrupts the dual port RAM 1210. Write the value of the flag register. When the second state machine 1240 finishes writing the interrupt flag to the dual port RAM 1210 in the write state PWRITE, the second state machine 1240 transitions to the unlock state PUNLOCK (FIG. 6; E), and the register flag REG_FLG in the flag register 1250 Issue an unlock request.

レジスタフラグREG_FLGは、第2ステートマシン1240から上記アンロック要求を受信すると、フラグロックステートFLGLOCKからフラグクリアステートFLGCLRに状態遷移し(図6;F)、上記ロックを解除する。ロックが解除されると、第1ステートマシン1230はウェイトを解除し、バスマスタ1100からのトランザクションを受け付けて実行する。   When the register flag REG_FLG receives the unlock request from the second state machine 1240, the state shifts from the flag lock state FLGLOCK to the flag clear state FLGCLR (FIG. 6; F), and the lock is released. When the lock is released, the first state machine 1230 releases the wait and accepts and executes a transaction from the bus master 1100.

このように、フラグレジスタ1250のレジスタフラグREG_FLGに、バスマスタ1100からのアクセスに対してロックをかけるフラグロックステートFLGLOCKを持たせることにより、デュアルポートRAM1210に対するアクセスの競合を防止している。   As described above, by causing the register flag REG_FLG of the flag register 1250 to have the flag lock state FLGLOCK that locks the access from the bus master 1100, contention of access to the dual port RAM 1210 is prevented.

上述の本実施形態に係る情報処理装置の特徴をまとめる。
本情報処理装置では、周辺モジュール1200の本体をなすレジスタ群1220とバスマスタ1100との間にデュアルポートRAM1210がいわばミラー回路として存在し、このミラー回路を介してデータ転送が遂行される。このデータ転送に関する制御は、バスクロック信号SCLKに同期して動作する第1ステートマシン1230と周辺クロック信号PCLKに同期して動作する第2ステートマシン1240とで遂行される。バスマスタ1100が上記ミラー回路に対しレジスタライトを行うと、第1ステートマシン1230は、該当するフラグレジスタ1250内のレジスタにライトフラグをセットする。
The characteristics of the information processing apparatus according to the above-described embodiment will be summarized.
In this information processing apparatus, a dual port RAM 1210 exists as a mirror circuit between the register group 1220 forming the main body of the peripheral module 1200 and the bus master 1100, and data transfer is performed via this mirror circuit. The control related to the data transfer is performed by the first state machine 1230 that operates in synchronization with the bus clock signal SCLK and the second state machine 1240 that operates in synchronization with the peripheral clock signal PCLK. When the bus master 1100 performs a register write to the mirror circuit, the first state machine 1230 sets a write flag in a register in the corresponding flag register 1250.

ライトフラグがセットされると、第2ステートマシン1240がレジスタフラグのライトイベントを検出する。このイベントを検出すると、第2ステートマシン1240は、上記ミラー回路にライトされたデータを読み出し、該当するレジスタ群1220内のレジスタの値を更新する。このとき、該当するアドレスの割り出しは、フラグ検索回路1260により、フラグの立っているフラグレジスタ1250のアドレスを割り出すことにより行われ、第2ステートマシン1240は、この割り出されたアドレスで特定されるデュアルポートRAM1210のデータ記憶領域からデータを読み出す。フラグ検索回路1260によるアドレスの割り出しは、フラグ検索回路1260内のカウンタのカウント値とレジスタのアドレスを示すリードポインタRPとを比較することにより行われる。   When the write flag is set, the second state machine 1240 detects a register flag write event. When this event is detected, the second state machine 1240 reads the data written in the mirror circuit and updates the value of the register in the corresponding register group 1220. At this time, the corresponding address is determined by determining the address of the flag register 1250 in which the flag is set by the flag search circuit 1260, and the second state machine 1240 is specified by the determined address. Data is read from the data storage area of the dual port RAM 1210. The address search by the flag search circuit 1260 is performed by comparing the count value of the counter in the flag search circuit 1260 with the read pointer RP indicating the register address.

第2ステートマシン1240は、レジスタ値の更新が完了すると、該当するレジスタのフラグをクリアする。同一アドレスへの同時アクセスを行うと、デュアルポートRAM1210内のデータが破壊されるおそれがある。しかしながら、本実施形態に係る情報処理装置によれば、同時にアクセスが発生した場合、フラグレジスタ1250を参照して、バスマスタ1100にウェイトをかけるので、データの破壊を回避することができる。また、設定されたレジスタの値は頻繁に書き換えられることはないので、上記ウェイトによりデータ転送効率が犠牲になることは事実上ない。   When the update of the register value is completed, the second state machine 1240 clears the flag of the corresponding register. If simultaneous access to the same address is performed, the data in the dual port RAM 1210 may be destroyed. However, according to the information processing apparatus according to the present embodiment, when access occurs simultaneously, a wait is applied to the bus master 1100 with reference to the flag register 1250, so that data destruction can be avoided. Further, since the set register value is not frequently rewritten, the data transfer efficiency is not sacrificed by the wait.

このような本情報処理送致によれば、バスマスタ1100によるデュアルポートRAM1210に対するリード/ライドアクセスは、バスクロック信号SCLKを使用して行われるため、レイテンシを増加させる原因となる非同期データの同期化と、特別なデータのセットアップ/ホールドタイムを確保する必要がなくなる。従って、バスマスタ1100から見たレジスタアクセス時のレイテンシを大幅に低減することが可能となる。これにより、バスを高速化すればする程、レジスタアクセスにおけるバスマスタの占有率を下げることが可能となり、システム全体のパフォーマンスを向上させることができる。   According to this information processing transmission, since read / ride access to the dual port RAM 1210 by the bus master 1100 is performed using the bus clock signal SCLK, synchronization of asynchronous data that causes an increase in latency, It is not necessary to secure setup / hold time for special data. Accordingly, it is possible to greatly reduce the latency at the time of register access as viewed from the bus master 1100. As a result, the higher the bus speed, the lower the occupancy rate of the bus master in register access, and the overall system performance can be improved.

次に、図7を参照して本実施形態の変形例を説明する。
上述の実施形態では、周辺モジュール1200にデュアルポートRAM1210を組み込んで、この周辺モジュール1200とバスマスタ1100との間で一対一のデータ転送を行う場合を説明したが、ここでは、デュアルポートRAM1210に代えて、マルチポートRAMの一種である5ポートRAM700を介して、CPU等のバスマスタ710を含めた複数の周辺モジュール720,730,740,750の間でデータ転送を行う場合を説明する。
Next, a modification of the present embodiment will be described with reference to FIG.
In the above embodiment, the case where the dual port RAM 1210 is incorporated in the peripheral module 1200 and the one-to-one data transfer is performed between the peripheral module 1200 and the bus master 1100 has been described. A case where data transfer is performed between a plurality of peripheral modules 720, 730, 740, and 750 including a bus master 710 such as a CPU via a 5-port RAM 700 which is a kind of multi-port RAM will be described.

この変形例では、5ポートRAM700は、周辺モジュール720〜750の全レジスタに対応するデータ記憶領域を備え、このデータ記憶領域には周辺モジュール720〜750の全レジスタの値が格納される。また、この5ポートRAM700の各アクセスポートには、クロック信号CLKで動作するCPU等のバスマスタ710と、クロック信号CLKAで動作する周辺モジュール720と、クロック信号CLKBで動作する周辺モジュール730と、クロック信号CLKCで動作する周辺モジュール740と、クロック信号CLKDで動作する周辺モジュール740とが接続され、この5ポートRAM700は、これらバスマスタ710及び周辺モジュール720〜750間のデータ転送を遂行するインターフェイス回路として機能する。   In this modification, the 5-port RAM 700 includes data storage areas corresponding to all the registers of the peripheral modules 720 to 750, and the values of all the registers of the peripheral modules 720 to 750 are stored in this data storage area. Each access port of the 5-port RAM 700 includes a bus master 710 such as a CPU that operates with the clock signal CLK, a peripheral module 720 that operates with the clock signal CLKA, a peripheral module 730 that operates with the clock signal CLKB, and a clock signal. A peripheral module 740 operating with CLKC and a peripheral module 740 operating with the clock signal CLKD are connected, and this 5-port RAM 700 functions as an interface circuit that performs data transfer between the bus master 710 and the peripheral modules 720-750. .

また、5ポートRAM700は、上述の第1ステートマシン1230、第2ステートマシン1240、フラグレジスタ1250、フラグ検索回路1260にそれぞれ対応する構成を備え、5ポートRAM700の各アクセスポートにステートマシンが設けられる。このうち、バスマスタ710が接続されるアクセスポートに設けられるステートマシンは上述の第1ステートマシン1230と同様の機能を有し、周辺モジュール720〜750が接続された他のアクセスポートに設けられるステートマシンは上述の第2ステートマシン1240と同様の機能を有している。また、フラグ検索回路1260に対応する構成は、フラグレジスタ1250に対応するフラグレジスタを検索してモジュール別に検索結果を通知する機能を有している。   The 5-port RAM 700 has a configuration corresponding to the first state machine 1230, the second state machine 1240, the flag register 1250, and the flag search circuit 1260 described above, and a state machine is provided for each access port of the 5-port RAM 700. . Among these, the state machine provided in the access port to which the bus master 710 is connected has the same function as the first state machine 1230 described above, and is provided in other access ports to which the peripheral modules 720 to 750 are connected. Has the same function as the second state machine 1240 described above. The configuration corresponding to the flag search circuit 1260 has a function of searching for a flag register corresponding to the flag register 1250 and notifying the search result for each module.

このような変形例によれば、バスマスタ710は、仮に周辺モジュール720〜750で使用されるクロック信号がバスマスタ710で使用されるクロック信号と完全に非同期であり且つ低速であったとしても、バスマスタ710は、周辺モジュール720〜750の全レジスタに対してクロック信号SCLKの2サイクル分の時間でアクセスを終了することが可能となる。このため、上述の本実施形態と同様に、バスマスタ710が各周辺モジュールをアクセスする際のレイテンシを有効に低減することが可能になり、システム全体のパフォーマンスを向上させることができる。   According to such a modification, even if the clock signal used in the peripheral modules 720 to 750 is completely asynchronous with the clock signal used in the bus master 710 and is low in speed, the bus master 710 may Can complete access to all the registers of the peripheral modules 720 to 750 in a time corresponding to two cycles of the clock signal SCLK. For this reason, as in the above-described embodiment, the latency when the bus master 710 accesses each peripheral module can be effectively reduced, and the performance of the entire system can be improved.

本発明の実施形態に係る情報処理装置の概略構成を示す図である。It is a figure which shows schematic structure of the information processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る情報処理装置が備える周辺モジュールの詳細構成を示す図である。It is a figure which shows the detailed structure of the peripheral module with which the information processing apparatus which concerns on embodiment of this invention is provided. 本発明の実施形態に係る情報処理装置が備えるステートマシンの状態遷移図である。It is a state transition diagram of the state machine with which the information processing apparatus which concerns on embodiment of this invention is provided. 本発明の実施形態に係る情報処理装置のライト動作を説明するためのタイミングチャートである。6 is a timing chart for explaining a write operation of the information processing apparatus according to the embodiment of the present invention. 本発明の実施形態に係る情報処理装置のリード動作を説明するためのタイミングチャートである。5 is a timing chart for explaining a read operation of the information processing apparatus according to the embodiment of the present invention. 本発明の実施形態に係るアクセス競合防止のための各ステートマシンの状態遷移図である。It is a state transition diagram of each state machine for preventing access conflict according to an embodiment of the present invention. 本発明の実施形態に係る情報処理装置の変形例を説明するための図である。It is a figure for demonstrating the modification of the information processing apparatus which concerns on embodiment of this invention. 従来技術の情報処理装置の概略構成を示す図である。It is a figure which shows schematic structure of the information processing apparatus of a prior art. 従来技術に係る情報処理装置を構成する周辺モジュールの詳細図である。It is detail drawing of the peripheral module which comprises the information processing apparatus which concerns on a prior art. 従来技術の情報処理装置が備えるステートマシンの状態遷移図である。It is a state transition diagram of the state machine with which the information processing apparatus of a prior art is provided. 従来技術の情報処理装置のライト動作を説明するためのタイミングチャートである。It is a timing chart for demonstrating the write operation of the information processing apparatus of a prior art. 従来技術の情報処理装置のリード動作を説明するためのタイミングチャートである。It is a timing chart for demonstrating the read operation | movement of the information processing apparatus of a prior art.

符号の説明Explanation of symbols

1100;バスマスタ、1200;周辺モジュール、1210;デュアルポートRAM、1211;第1アクセスポート、1212;第2アクセスポート、1230;第1ステートマシン、1240;第2ステートマシン、1250;フラグレジスタ、1260;フラグ検索回路、1220;レジスタ群、1221;デコーダ、1222;マルチプレクサ、700;5ポートRAM、710;バスマスタ(CPU)、720〜750;周辺モジュール。   1100; bus master, 1200; peripheral module, 1210; dual port RAM, 1211; first access port, 1212; second access port, 1230; first state machine, 1240; second state machine, 1250; flag register, 1260; Flag search circuit, 1220; register group, 1221; decoder, 1222; multiplexer, 700; 5-port RAM, 710; bus master (CPU), 720 to 750;

Claims (8)

第1クロック信号に同期して動作するバスマスタと、
第2クロック信号に同期して動作する周辺モジュールと、
前記第1クロック信号に同期して前記バスマスタとの間でデータ転送するための第1アクセスポートと前記第2クロック信号に同期して前記周辺モジュールとの間でデータ転送するための第2アクセスポートとを有する記憶手段を有し、該記憶手段を介して前記バスマスタと前記周辺モジュールとの間のデータ転送を遂行するインターフェイス回路と
を備えた情報処理装置。
A bus master that operates in synchronization with the first clock signal;
A peripheral module operating in synchronization with the second clock signal;
A first access port for transferring data to and from the bus master in synchronization with the first clock signal and a second access port for transferring data to and from the peripheral module in synchronization with the second clock signal And an interface circuit for performing data transfer between the bus master and the peripheral module via the storage means.
前記インターフェイス回路は、
前記バスマスタからのアクセスに基づき前記第1アクセスポートに供給すべき第1制御信号を生成すると共に、前記バスマスタからのアクセスがライト動作である場合に該アクセスがあったこと示すフラグを発生する第1ステートマシンと、
前記フラグを格納するフラグレジスタと、
前記フラグレジスタに格納されたフラグを検索するフラグ検索回路と、
前記フラグ検索回路による検索結果に基づき前記第2アクセスポートに供給すべき第2制御信号を生成する第2ステートマシンと
を備えたことを特徴とする請求項1記載の情報処理装置。
The interface circuit is
Generating a first control signal to be supplied to the first access port based on an access from the bus master, and generating a flag indicating that the access has occurred when the access from the bus master is a write operation; A state machine,
A flag register for storing the flag;
A flag search circuit for searching for a flag stored in the flag register;
The information processing apparatus according to claim 1, further comprising: a second state machine that generates a second control signal to be supplied to the second access port based on a search result by the flag search circuit.
前記周辺モジュールは、複数の第1レジスタから構成され、
前記フラグレジスタは、前記複数の第1レジスタに対応する複数の第2レジスタから構成され、
前記フラグ検索回路は、前記複数の第2レジスタのうち、前記フラグが格納された第1レジスタに対応するレジスタを指定するアドレス信号を出力するように構成されたことを特徴とする請求項2記載の情報処理装置。
The peripheral module includes a plurality of first registers,
The flag register includes a plurality of second registers corresponding to the plurality of first registers,
3. The flag search circuit is configured to output an address signal designating a register corresponding to the first register in which the flag is stored among the plurality of second registers. Information processing device.
前記フラグ検索回路は、
前記複数の第2レジスタの各アドレスに対応するカウント値を巡回的に発生して前記周辺モジュール及び前記記憶手段に供給するカウンタと、
前記カウント値を前記第1クロック信号で同期化してフラグポインタとして前記フラグレジスタに供給すると共に、該フラグポインタで指定されるフラグレジスタに前記フラグが格納されていることを示すレジスタポインタを前記第2クロック信号に同期化する同期化回路と、
前記同期化回路で同期化された前記レジスタポインタと前記カウント値とを比較し、その比較結果を前記第2ステートマシンに供給する比較器と
を備えて構成され、
前記第2ステートマシンは、前記比較結果が前記レジスタポインタと前記カウント値との一致を示す場合に、前記第2制御信号としてリード動作に関する制御信号を生成して出力することを特徴とする請求項3記載の情報処理装置。
The flag search circuit
A counter that cyclically generates a count value corresponding to each address of the plurality of second registers and supplies the count value to the peripheral module and the storage unit;
The count value is synchronized with the first clock signal and supplied to the flag register as a flag pointer, and a register pointer indicating that the flag is stored in the flag register specified by the flag pointer is A synchronization circuit for synchronizing with the clock signal;
A comparator that compares the register pointer synchronized with the synchronization circuit with the count value and supplies the comparison result to the second state machine;
The second state machine generates and outputs a control signal related to a read operation as the second control signal when the comparison result indicates a match between the register pointer and the count value. 3. The information processing apparatus according to 3.
前記複数の第2レジスタのそれぞれは、
前記バスマスタからのアクセスの種別を示すフラグを格納するレジスタと、
前記バスマスタからアクセスがあったことを示すフラグを格納するレジスタと
から構成されたことを特徴とする請求項1ないし4の何れか1項記載の情報処理装置。
Each of the plurality of second registers is
A register for storing a flag indicating the type of access from the bus master;
5. The information processing apparatus according to claim 1, further comprising a register that stores a flag indicating that the bus master has accessed.
前記第1及び第2ステートマシンは、これら第1及び第2ステートマシンの一方が前記記憶手段をアクセスする際に、これら第1及び第2ステートマシンの他方をロックステートに状態遷移させることを特徴とする請求項1乃至5何れか1項記載の情報処理装置。   The first and second state machines, when one of the first and second state machines accesses the storage means, causes the other of the first and second state machines to transition to the lock state. The information processing apparatus according to any one of claims 1 to 5. 前記記憶手段は、前記第2アクセスポートとして複数のアクセスポートを備えたマルチポートRAMから構成され、
前記マルチポートRAMの前記複数のアクセスポートには、前記周辺モジュールとして複数のモジュールがそれぞれ接続されたことを特徴とする請求項1ないし5の何れか1項記載の情報処理装置。
The storage means is composed of a multi-port RAM having a plurality of access ports as the second access port,
6. The information processing apparatus according to claim 1, wherein a plurality of modules as the peripheral modules are connected to the plurality of access ports of the multi-port RAM, respectively.
第1クロック信号に同期して動作するバスマスタと第2クロック信号に同期して動作する周辺モジュールとの間のデータ転送を遂行するインターフェイス回路であって、
前記第1クロック信号に同期して前記バスマスタとの間でデータ転送するための第1アクセスポートと前記第2クロック信号に同期して前記周辺モジュールとの間でデータ転送するための第2アクセスポートとを有する記憶手段と、
前記バスマスタからのアクセスに基づき前記第1アクセスポートに供給すべき第1制御信号を生成すると共に、前記バスマスタからのアクセスがライト動作である場合に該アクセスがあったこと示すフラグを発生する第1ステートマシンと、
前記フラグを格納するフラグレジスタと、
前記フラグレジスタに格納されたフラグを検索するフラグ検索回路と、
前記フラグ検索回路による検索結果に基づき前記第2アクセスポートに供給すべき第2制御信号を生成する第2ステートマシンと
を備えたインターフェイス回路。
An interface circuit that performs data transfer between a bus master that operates in synchronization with a first clock signal and a peripheral module that operates in synchronization with a second clock signal,
A first access port for transferring data to and from the bus master in synchronization with the first clock signal and a second access port for transferring data to and from the peripheral module in synchronization with the second clock signal Storage means comprising:
Generating a first control signal to be supplied to the first access port based on an access from the bus master, and generating a flag indicating that the access has occurred when the access from the bus master is a write operation; A state machine,
A flag register for storing the flag;
A flag search circuit for searching for a flag stored in the flag register;
An interface circuit comprising: a second state machine that generates a second control signal to be supplied to the second access port based on a search result by the flag search circuit.
JP2006275047A 2006-10-06 2006-10-06 Information processor and interface circuit Pending JP2008097098A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006275047A JP2008097098A (en) 2006-10-06 2006-10-06 Information processor and interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006275047A JP2008097098A (en) 2006-10-06 2006-10-06 Information processor and interface circuit

Publications (1)

Publication Number Publication Date
JP2008097098A true JP2008097098A (en) 2008-04-24

Family

ID=39379920

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006275047A Pending JP2008097098A (en) 2006-10-06 2006-10-06 Information processor and interface circuit

Country Status (1)

Country Link
JP (1) JP2008097098A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112639674A (en) * 2018-08-28 2021-04-09 超威半导体公司 Power management advisor program supporting power management control

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112639674A (en) * 2018-08-28 2021-04-09 超威半导体公司 Power management advisor program supporting power management control
US12393256B2 (en) 2018-08-28 2025-08-19 Advanced Micro Devices, Inc. Power management advisor to support power management control

Similar Documents

Publication Publication Date Title
US5577229A (en) Computer system and method for pipelined transfer of data between modules utilizing a shared memory and a pipeline having a plurality of registers
US6601126B1 (en) Chip-core framework for systems-on-a-chip
US6490642B1 (en) Locked read/write on separate address/data bus using write barrier
EP1163598B1 (en) Microprocessing device having programmable wait states
JPH08235850A (en) Depth-/width-adjustable fifo buffer for variable-width data transfer
US5922076A (en) Clocking scheme for digital signal processor system
JP2010055440A (en) Distributed shared memory multiprocessor and data processing method
JP3444154B2 (en) Memory access control circuit
US10467181B2 (en) Interface apparatus and method
US6954873B2 (en) Implementation of wait-states
JP2002149591A (en) Method and device for optimizing bus in processor local bus system
JP2008097098A (en) Information processor and interface circuit
JP4633334B2 (en) Information processing apparatus and memory access arbitration method
JPH03144990A (en) Memory device
JPS5927938B2 (en) multiprocessing device
US6806881B2 (en) Graphics controller for high speed transmission of memory read commands
JPH0991194A (en) Arbitration system and arbitration method
WO2005045679A1 (en) Controller of synchronous memory and electronic device
JPH0258152A (en) microprocessor
JP2008003786A (en) Logic simulation method and its device
JPH01209556A (en) data processing system
JP2006164119A (en) Data processing unit
JPH02211571A (en) Information processor
JP2000187641A (en) Information transmission circuit
Herlev et al. Clock domain crossing modules for OCP-style read/write interfaces