JPH04227551A - Access control circuit - Google Patents

Access control circuit

Info

Publication number
JPH04227551A
JPH04227551A JP24338990A JP24338990A JPH04227551A JP H04227551 A JPH04227551 A JP H04227551A JP 24338990 A JP24338990 A JP 24338990A JP 24338990 A JP24338990 A JP 24338990A JP H04227551 A JPH04227551 A JP H04227551A
Authority
JP
Japan
Prior art keywords
data
ram
input
output
address
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
JP24338990A
Other languages
Japanese (ja)
Inventor
Hiroya Sakurai
桜井 宏哉
Katsumi Kobayashi
克己 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP24338990A priority Critical patent/JPH04227551A/en
Publication of JPH04227551A publication Critical patent/JPH04227551A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To rewrite data in a RAM with data which are generated at the same period by altering the data, bit by bit, while reading the data out of the RAM. CONSTITUTION:An address generating means 111 generates addresses of the RAM 101 in order in specific cycles and the output of the RAM 101 or alteration information is selected by a selecting means 114 in the former half of each cycle according to the comparison result of a comparing means 113 and written in the RAM 101 in the latter half of the cycle. Thus, respective address data are read out of the RAM 101 and altered, and the data which are altered in the same cycle are stored in the RAM 101, thus rewriting the data.

Description

【発明の詳細な説明】 (目次) 概要 産業上の利用分野 従来の技術(第5図〜第7図) 発明が解決しようとする課題 課題を解決するための手段(第1図) 作用 実施例(第2図〜第4図) 発明の効果 〔概要〕 一定周期でRAMの内容を読み出すアクセス制御回路に
関し、 RAMのデータを読み出しながら、データの変更をビッ
ト単位で行うとともに、同一周期において、変更したデ
ータを用いて書換えを行うことを目的とし、 所定の周期でRAMの各アドレスを順次に生成するアド
レス生成手段の出力をRAMへの入力アドレスとし、該
当するデータを順次に出力するアクセス制御回路におい
て、各周期を2つの部分周期に分割し、前半の部分周期
において、RAMに入力アドレスに対応するデータの出
力を指示し、後半の部分周期において、RAMに入力さ
れるデータの入力アドレスへの書き込みを指示する指示
手段と、変更するデータに対応する変更アドレスが入力
され、RAMへの入力アドレスと変更アドレスとを比較
する比較手段と、比較手段により変更アドレスとRAM
への入力アドレスとが一致しないとされた場合は、RA
Mによって出力されたデータをそのまま出力し、一致す
るとされた場合に、入力される変更情報を出力する選択
手段と、選択手段によって出力されたデータをRAMに
入力する入力手段とを備えて構成する。
[Detailed description of the invention] (Table of contents) Overview Industrial field of application Conventional technology (Figures 5 to 7) Means for solving the problem to be solved by the invention (Figure 1) Working examples (Figures 2 to 4) Effects of the invention [Summary] Regarding the access control circuit that reads the contents of RAM at a constant cycle, while reading the data from RAM, the data is changed bit by bit, and the data is changed at the same cycle. An access control circuit that uses the output of an address generation means that sequentially generates each address of the RAM at a predetermined cycle as an input address to the RAM, and sequentially outputs the corresponding data. , each period is divided into two partial periods, and in the first half period, the RAM is instructed to output data corresponding to the input address, and in the second half period, the data input to the RAM is sent to the input address. an instruction means for instructing writing; a comparison means for inputting a change address corresponding to the data to be changed; and a comparison means for comparing the input address to the RAM with the change address; and a comparison means for comparing the change address and the RAM.
If the input address to the RA does not match, the RA
A selection means for outputting the data outputted by M as is and outputting change information input when it is determined that they match, and an input means for inputting the data outputted by the selection means into the RAM. .

〔産業上の利用分野〕[Industrial application field]

本発明は、一定周期でRAMの内容を読み出すアクセス
制御回路に関する。
The present invention relates to an access control circuit that reads the contents of a RAM at regular intervals.

RAMの各アドレスを順次に指定して、各アドレスに格
納された情報を一定周期で読み出して、順次に送信した
い場合がある。
There is a case where it is desired to sequentially designate each address of the RAM, read out the information stored in each address at a constant cycle, and transmit the information sequentially.

このような場合には、RAMからの読出動作を停止する
ことなく、RAMに格納された情報の書換えを行うこと
が要望されている。
In such a case, it is desired to rewrite the information stored in the RAM without stopping the read operation from the RAM.

〔従来の技術〕[Conventional technology]

第5図に、従来のアクセス制御回路の構成を示す。また
、第6図にアクセス制御回路の動作を表すタイミング図
を示す。
FIG. 5 shows the configuration of a conventional access control circuit. Further, FIG. 6 shows a timing diagram showing the operation of the access control circuit.

図において、アクセス制御回路は、カウンタ511とイ
ネーブル信号生成回路512と読出/書込制御回路51
3とを備え、第6図(d)に示すクロック信号に同期し
て動作するカウンタ511により、RAM501の全ア
ドレスを順次に生成し(第6図(e)参照)、アドレス
としてRAM501に入力する構成となっている、また
、イネーブル信号生成回路512によって出力される出
力イネーブル信号に応じて、RAM501の入出力ポー
トI/Oに入力アドレスに対応するデータが読出データ
として出力され、このデータがD型フリップフロップ(
D−FF)514に保持された後、出力データDOとし
て送出される構成となっている(第6図(f)、(h)
、(i)参照)。
In the figure, the access control circuit includes a counter 511, an enable signal generation circuit 512, and a read/write control circuit 51.
3, and operates in synchronization with the clock signal shown in FIG. 6(d), all addresses of the RAM 501 are sequentially generated (see FIG. 6(e)) and input to the RAM 501 as addresses. In addition, in accordance with the output enable signal output by the enable signal generation circuit 512, data corresponding to the input address is output as read data to the input/output port I/O of the RAM 501, and this data is Type flip-flop (
D-FF) 514 and then sent out as output data DO (Fig. 6 (f), (h)
, (see (i)).

また、読出/書込制御回路513は、比較回路530と
、2つのセットリセット型フリップフロップ(SR−F
F)531、532と、4つのD−FF533、534
、535、536と、ゲート回路537とを備えて構成
されている。この読出/書込制御回路513は、プロセ
ッサ502によって出力される指定アドレスMadr、
読出制御信号Reおよび書込制御信号Weと上述したカ
ウンタ511の出力とに基づいて、制御信号Mreと制
御信号Mweと割り込み信号RWFとを生成し、この割
り込み信号RWFをプロセッサ502に返す構成となっ
ている。
The read/write control circuit 513 also includes a comparison circuit 530 and two set-reset flip-flops (SR-F
F) 531, 532 and four D-FFs 533, 534
, 535, 536, and a gate circuit 537. This read/write control circuit 513 receives a specified address Madr output by the processor 502,
The control signal Mre, the control signal Mwe, and the interrupt signal RWF are generated based on the read control signal Re, the write control signal We, and the output of the counter 511 described above, and the interrupt signal RWF is returned to the processor 502. ing.

次に、上述したような出力データDOの送出動作を停止
することなく、アドレスnのデータを変更する動作につ
いて説明する。第7図は、このような変更処理の流れ図
を示す。
Next, the operation of changing the data at address n without stopping the operation of sending out the output data DO as described above will be described. FIG. 7 shows a flowchart of such a change process.

まず、プロセッサ502は、上述した指定アドレスMa
drとしてアドレスnを出力し(ステップ701)、ま
た、上述した読出制御信号Reとして1クロック分のパ
ルスを出力する(ステップ702、第6図(a)参照)
。その後、プロセッサ502は、読出/書込制御回路5
13によって、割り込み信号RWFとして論理“0”が
返されるまで、ステップ703を繰り返す。
First, the processor 502 executes the specified address Ma mentioned above.
Address n is output as dr (step 701), and one clock pulse is output as the above-mentioned read control signal Re (step 702, see FIG. 6(a)).
. Thereafter, the processor 502 controls the read/write control circuit 5.
Step 703 is repeated until logic "0" is returned as the interrupt signal RWF by 13.

上述した読出制御信号Reが入力された後、カウンタ5
11の出力が『n』となったときに、比較回路530に
よる比較結果に応して、D−FF535により、制御信
号Mreとして1クロック分のパルスが出力される(第
6図(j)、(k)参照)。この制御信号Mreとクロ
ック信号CKとの論理積に同期してD−FF515が動
作し、このときの出力データDOがD−FF515に保
持される(第6図(m)参照)。このとき、SR−FF
531の出力がリセットされ、上述した割り込み信号R
WFは論理“0”となる。
After the readout control signal Re mentioned above is input, the counter 5
11 becomes "n", the D-FF 535 outputs a pulse for one clock as the control signal Mre in accordance with the comparison result by the comparison circuit 530 (FIG. 6(j), (see (k)). The D-FF 515 operates in synchronization with the AND of the control signal Mre and the clock signal CK, and the output data DO at this time is held in the D-FF 515 (see FIG. 6(m)). At this time, SR-FF
The output of 531 is reset, and the above-mentioned interrupt signal R
WF becomes logic "0".

これに応じて、上述したステップ703における肯定判
定となり、プロセッサ502は、制御信号Mreadを
出力する(ステップ704、第6図(n)参照)。これ
に応じて、3ステートバッファ514の動作が有効とな
り、D−FF515に保持されたデータがバスに出力さ
れる(第6図(p)参照)。
In response to this, the determination in step 703 described above is affirmative, and the processor 502 outputs the control signal Mread (step 704, see FIG. 6(n)). In response, the operation of the 3-state buffer 514 is enabled, and the data held in the D-FF 515 is output to the bus (see FIG. 6(p)).

プロセッサ502は、上述したようにしてバスに出力さ
れたデータを読み込んで(ステップ705)、このデー
タの変更するビットの情報を書き換えて、データの変更
を行う(ステップ706)。
The processor 502 reads the data output to the bus as described above (step 705), rewrites the information of the bit to be changed in this data, and changes the data (step 706).

また、この変更したデータをバスに出力し(ステップ7
07、第6図(p)参照)、指定アドレスMadrとし
てアドレスnを出力するとともに書込制御信号Weを出
力する(ステップ708、709、第6図(b)参照)
Also, output this changed data to the bus (step 7).
07, see FIG. 6(p)), outputs the address n as the designated address Madr, and outputs the write control signal We (steps 708, 709, see FIG. 6(b)).
.

上述した書込制御信号Weが入力された後、カウンタ5
11の出力が『n』となったときに、今度は、比較回路
530による比較結果に応じて、ゲート回路537によ
り、制御信号Wreとして1クロック分のパルスが出力
される(第6図(j)参照)。
After the write control signal We mentioned above is input, the counter 5
11 becomes "n", the gate circuit 537 outputs a pulse for one clock as the control signal Wre according to the comparison result by the comparator circuit 530 (Fig. 6(j) )reference).

この制御信号Wreに応じて、イネーブル信号生成回路
512により、出力イネーブル信号Oenの該当するパ
ルスがマスクされ、書込イネーブル信号Wenとしてク
ロック信号CKの1周期の半分のパルスが出力される(
第6図(f)、(g)参照)。この書込イネーブル信号
Wenに応じて、3ステートバッファ517の動作が有
効となり、プロセッサ502によってバスに出力された
データが、書込データとしてRAM501の入出力ポー
トI/Oに入力される(第6図(q)参照)。これによ
り、この書込データが、RAM501のアドレスnに書
き込まれ、また、D−FF514を介して出力データD
Oとして送出される。
In response to this control signal Wre, the enable signal generation circuit 512 masks the corresponding pulse of the output enable signal Oen, and outputs a pulse of half one cycle of the clock signal CK as the write enable signal Wen (
(See Figures 6(f) and (g)). In response to this write enable signal Wen, the operation of the 3-state buffer 517 is enabled, and the data output to the bus by the processor 502 is input to the input/output port I/O of the RAM 501 as write data (6th (See figure (q)). As a result, this write data is written to the address n of the RAM 501, and the output data D
Sent as O.

このとき、上述した読出動作と同様にして、割り込み信
号RWFとして論理“0”が返され、これに応じて、プ
ロセッサ502はステップ710の肯定判定として処理
を終了する。
At this time, similarly to the read operation described above, logic "0" is returned as the interrupt signal RWF, and in response, the processor 502 makes an affirmative determination in step 710 and ends the process.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

ところで、上述した従来のアクセス制御回路においては
、まず、プロセッサ502が該当するデータを読み出し
てこのデータの変更を行い、その後、変更されたデータ
を書き込む必要があり、プロセッサ502の処理負担が
大きいという問題点があった。
By the way, in the conventional access control circuit described above, the processor 502 must first read the relevant data, modify this data, and then write the modified data, which places a large processing load on the processor 502. There was a problem.

また、該当するデータを読み出す手順と書き込む手順と
の両方で、指定されたアドレスnがカウンタ511によ
って出力されるまで待つ必要があるため、データの書換
処理には、少なくとも、カウンタ511の計数値が2回
巡回するのに要する時間がかかっていた。
Furthermore, in both the procedure of reading and writing the corresponding data, it is necessary to wait until the specified address n is output by the counter 511, so at least the count value of the counter 511 is It took the time required to go around twice.

本発明は、このような点をかんがみて創作されたもので
あり、RAMからデータを読み出しながらデータの変更
をビット単位で行い、同一周期において、変更したデー
タを用いて書換えを行うアクセス制御回路を提供するこ
とを目的とする。
The present invention was created in consideration of these points, and provides an access control circuit that changes the data bit by bit while reading data from the RAM, and rewrites the data using the changed data in the same cycle. The purpose is to provide.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は、本発明の原理ブロック図である。 FIG. 1 is a block diagram of the principle of the present invention.

図において、所定の周期でRAM101の各アドレスを
順次に生成するアドレス生成手段111の出力をRAM
101への入力アドレスとし、該当するデータを順次に
出力するアクセス制御回路における指示手段112は、
各周期を2つの部分周期に分割し、前半の部分周期にお
いて、RAM101に入力アドレスに対応するデータの
出力を指示し、後半の部分周期において、RAM101
に入力されるデータの入力アドレスへの書き込みを指示
する。
In the figure, the output of address generation means 111 that sequentially generates each address of RAM 101 at a predetermined period is
The instruction means 112 in the access control circuit inputs the input address to the access control circuit 101 and sequentially outputs the corresponding data.
Each period is divided into two partial periods, and in the first half period, the RAM 101 is instructed to output data corresponding to the input address, and in the second half period, the RAM 101 is instructed to output data corresponding to the input address.
Instructs to write the data input to the input address.

比較手段113は、変更するデータに対応する変更アド
レスが入力され、RAM101への入力アドレスと変更
アドレスとを比較する。
The comparison means 113 receives a change address corresponding to the data to be changed, and compares the input address to the RAM 101 with the change address.

選択手段114は、比較手段113により変更アドレス
とRAM101への入力アドレスとが一致しないとされ
た場合は、RAM101によって出力されたデータをそ
のまま出力し、一致するとされた場合に、入力される変
更情報を出力する。
When the comparison means 113 determines that the changed address and the input address to the RAM 101 do not match, the selection means 114 outputs the data outputted by the RAM 101 as is, and when it is determined that they match, the selection means 114 outputs the input changed information. Output.

入力手段115は、選択手段114によって出力された
データをRAM101に入力する。
The input means 115 inputs the data output by the selection means 114 to the RAM 101.

〔作用〕[Effect]

アドレス生成手段111により、所定の周期でRAM1
01の各アドレスが順次に生成され、このアドレス生成
手段111による出力が、RAM101への入力アドレ
スとされる。上述した各周期は、指示手段112によっ
て2つの部分周期に分割され、この指示手段112によ
り、前半の部分周期において、RAM101に入力アド
レスに対応するデータの出力が指示され、これに応じて
、RAM101により、該当するデータが出力される。
The address generation means 111 causes RAM1 to be
Each address of 01 is generated sequentially, and the output from the address generation means 111 is used as the input address to the RAM 101. Each cycle described above is divided into two partial periods by the instruction means 112, and in the first half period, the instruction means 112 instructs the RAM 101 to output data corresponding to the input address. The corresponding data will be output.

また、比較手段113により、変更アドレスとRAM1
01への入力アドレスとが一致しないとされた場合は、
変更手段114により、RAM101によって出力され
たデータがそのまま出力される。一方、比較手段113
により、変更アドレスとRAM101への入力アドレス
とが一致するとされた場合は、選択手段114により、
変更情報が出力される。また、この選択手段114によ
って出力されたデータは、入力手段115により、RA
M101に入力される。
Furthermore, the comparison means 113 compares the changed address and RAM1.
If it is determined that the input address to 01 does not match,
The changing means 114 outputs the data output by the RAM 101 as is. On the other hand, comparison means 113
If it is determined that the changed address and the input address to the RAM 101 match, the selection means 114 selects
Change information is output. Further, the data outputted by the selection means 114 is inputted to the RA by the input means 115.
It is input to M101.

その後、各周期の後半の部分周期において、指示手段1
12により、RAM101への書込動作が指示され、こ
れに応じて、上述した入力手段115によってRAM1
01に入力されたデータが、入力アドレスに対応してR
AM101に書き込まれる。
Thereafter, in the latter half period of each period, the indicating means 1
12 instructs the write operation to the RAM 101, and in response, the above-mentioned input means 115 writes the data into the RAM 101.
The data input to 01 is input to R corresponding to the input address.
Written to AM101.

本発明にあっては、各周期の前半において、比較手段1
13による比較結果に応じて、選択手段114により、
RAM101の出力と変更情報とのいずれかが選択され
、この選択手段114による出力が、入力手段115に
よってRAM101に入力されて、各周期の後半におい
て、RAM101に書き込まれる。このようにして、R
AM101の各アドレスのデータを順次に読み出しなが
らデータの変更を行うとともに、同一周期において、変
更したデータを用いてRAM101のデータの書換えを
行うことが可能となる。
In the present invention, in the first half of each cycle, the comparison means 1
13, the selection means 114 selects
Either the output of the RAM 101 or the change information is selected, and the output from the selection means 114 is input to the RAM 101 by the input means 115 and written to the RAM 101 in the latter half of each cycle. In this way, R
It is possible to change the data while sequentially reading the data at each address in the AM 101, and to rewrite the data in the RAM 101 using the changed data in the same cycle.

〔実施例〕〔Example〕

以下、図面に基づいて本発明の実施例について詳細に説
明する。
Hereinafter, embodiments of the present invention will be described in detail based on the drawings.

第2図は、本発明の一実施例によるアクセス制御回路の
構成を示す。
FIG. 2 shows the configuration of an access control circuit according to an embodiment of the present invention.

ここで、第1図と実施例との対応関係について説明して
おく。
Here, the correspondence between FIG. 1 and the embodiment will be explained.

RAM101は、RAM201に相当する。RAM101 corresponds to RAM201.

アドレス生成手段111は、カウンタ211に相当する
Address generation means 111 corresponds to counter 211.

指示手段112は、イネーブル信号生成回路212に相
当する。
The instruction means 112 corresponds to the enable signal generation circuit 212.

比較手段113は、比較回路231に相当する。The comparison means 113 corresponds to the comparison circuit 231.

選択手段114は、セレクタ214とアンドゲート23
5とゲート回路236とに相当する。
The selection means 114 includes a selector 214 and an AND gate 23.
5 and the gate circuit 236.

入力手段115は、3ステートバッファ216に相当す
る。
Input means 115 corresponds to 3-state buffer 216.

以上のような対応関係があるものとして、以下実施例の
構成および動作について説明する。
Assuming that the above-mentioned correspondence exists, the configuration and operation of the embodiment will be described below.

第2図において、カウンタ211と、イネーブル信号生
成回路212と、読出/書込制御回路213と、セレク
タ214と、D型フリップフロップ(D−FF)215
と、3ステートバッファ216とは、アクセス制御回路
210を構成している。このアクセス制御回路210は
、プロセッサ202からの指示に応じて、RAM201
に対するアクセスを制御する構成となっている。上述し
たD−FF215および3ステートバッファ216は、
RAM201の各アドレスに格納されたデータのビット
数mに対応して、それぞれm個ずつ設けられている。
In FIG. 2, a counter 211, an enable signal generation circuit 212, a read/write control circuit 213, a selector 214, and a D-type flip-flop (D-FF) 215
and the 3-state buffer 216 constitute an access control circuit 210. This access control circuit 210 controls the RAM 201 according to instructions from the processor 202.
It is configured to control access to. The D-FF 215 and 3-state buffer 216 described above are
There are m pieces each corresponding to the number m of bits of data stored in each address of the RAM 201.

また、イネーブル信号生成回路212は、分周回路22
1を備えており、この分周回路221は、入力される第
1クロック信号CK1を分周して、この第1クロック信
号CK1の2倍の周期を有する第2クロック信号CK2
を生成する構成となっている。
The enable signal generation circuit 212 also includes a frequency dividing circuit 22.
1, the frequency dividing circuit 221 divides the input first clock signal CK1 to generate a second clock signal CK2 having a period twice that of the first clock signal CK1.
It is configured to generate.

また、イネーブル信号生成回路212は、この第2クロ
ック信号CK2と上述した第1クロック信号CK1とに
基づいて、出力イネーブル信号Oenと書込イネーブル
信号Wenとを生成する構成となっている。
Furthermore, the enable signal generation circuit 212 is configured to generate an output enable signal Oen and a write enable signal Wen based on this second clock signal CK2 and the above-mentioned first clock signal CK1.

ここで、イネーブル信号生成回路212は、上述した第
2クロック信号CK2の周期の前半で第1クロック信号
CK1の周期の半分だけ論理“0”となる信号を出力イ
ネーブル信号Oenとして出力し、後半で第1クロック
信号CK1の周期の半分だけ論理“0”となる信号を書
込イネーブル信号Wenとして出力すればよい。
Here, the enable signal generation circuit 212 outputs, as the output enable signal Oen, a signal that becomes logic "0" for half the period of the first clock signal CK1 in the first half of the period of the second clock signal CK2, and in the second half of the period. It is sufficient to output a signal that becomes logic "0" for half the period of the first clock signal CK1 as the write enable signal Wen.

また、上述した第2クロック信号CK2は、カウンタ2
11のクロック端子CKに入力されており、この第2ク
ロック信号CK2に同期してカウンタ211による計数
動作が行われる。このカウンタ211による出力は、ア
ドレスとしてRAM201に入力されている。
Further, the second clock signal CK2 mentioned above is applied to the counter 2.
The counter 211 performs a counting operation in synchronization with this second clock signal CK2. The output from this counter 211 is input to the RAM 201 as an address.

RAM201は、制御端子OEに入力される出力イネー
ブル信号Oenに応じて、入力アドレスに対応するデー
タを入出力ポートI/Oに出力し、制御端子WEに入力
される書込イネーブル信号Wenに応じて、入出力ポー
トI/Oを介して入力されるデータを入力アドレスに格
納する構成となっている。
The RAM 201 outputs data corresponding to an input address to an input/output port I/O in response to an output enable signal Oen input to a control terminal OE, and outputs data corresponding to an input address to an input/output port I/O in response to a write enable signal Wen input to a control terminal WE. , the data input via the input/output port I/O is stored in the input address.

このRAM201の入出力ポートI/Oは、セレクタ2
14の入力ポートP0に接続されており、このセレクタ
214の入力ポートP1はバスを介してプロセッサ20
2に接続されている。
The input/output port I/O of this RAM 201 is the selector 2
14 input port P0 of the selector 214, and the input port P1 of this selector 214 is connected to the processor 20 via the bus.
Connected to 2.

このセレクタ214は、読出/書込制御回路213によ
って出力される選択情報SELの各ビットに応じて、入
力ポートP0、P1に入力されるデータから該当するビ
ットの情報を選択し、選択した各ビットの情報をmビッ
トのデータとして出力する構成となっている。例えば、
当該ビットが論理“1”である場合には、データの該当
するビットの情報として入力ポートP1に入力されるデ
ータの該当するビットを選択し、論理“0”であるとき
に入力ポートP0に入力されるデータの該当するビット
を選択する構成とすればよい。このセレクタ214によ
って出力されるmビットのデータは、D−FF215に
入力されている。
This selector 214 selects the information of the corresponding bit from the data input to the input ports P0 and P1 according to each bit of the selection information SEL outputted by the read/write control circuit 213, and selects the information of the selected bit. The configuration is such that the information is output as m-bit data. for example,
When the relevant bit is logic "1", the corresponding bit of the data input to input port P1 is selected as the information of the corresponding bit of data, and when it is logic "0", it is input to input port P0. The configuration may be such that the corresponding bits of the data to be processed are selected. The m-bit data output by the selector 214 is input to the D-FF 215.

このD−FF215のクロック端子CKには、上述した
出力イネーブル信号Oenが入力されており、このD−
FF215の出力は、出力データDOとして送出される
とともに、3ステートバッファ216に入力されている
。また、この3ステートバッファ216は、制御端子S
に反転入力される書込イネーブル信号Wenに応じて有
効となり、出力データDOをRAM201の入出力ポー
トI/Oに入力する構成となっている。
The above-mentioned output enable signal Oen is input to the clock terminal CK of this D-FF215, and this
The output of the FF 215 is sent out as output data DO and is also input to the 3-state buffer 216. Further, this 3-state buffer 216 has a control terminal S
It becomes valid in response to a write enable signal Wen which is inverted and inputted to input the output data DO to the input/output port I/O of the RAM 201.

また、読出/書込制御回路213は、カウンタ211の
出力とプロセッサ202によって出力される変更アドレ
スMadrとを比較する比較回路231と、プロセッサ
202によって出力される書込制御信号WEに応じて動
作するセットリセット型フリップフロップ(SR−FF
)232と、上述した第2クロック信号CK2に同期し
て動作する2つのD−FF233、234と、アンドゲ
ート235と、ゲート回路236とから構成されている
Further, the read/write control circuit 213 operates according to a comparison circuit 231 that compares the output of the counter 211 and the modified address Madr outputted by the processor 202, and a write control signal WE outputted by the processor 202. Set-reset type flip-flop (SR-FF
) 232, two D-FFs 233 and 234 that operate in synchronization with the second clock signal CK2, an AND gate 235, and a gate circuit 236.

上述したSR−FF232の出力は、D−FF233に
入力されており、このD−FF233の出力と比較回路
231の出力とがアンドゲート235に入力されている
。このアンドゲート235の出力は、ゲート回路236
に入力されており、このゲート回路236は、プロセッ
サ202によって出力される選択制御情報Dselの各
ビットと上述したアンドゲート235の出力との論理積
を選択情報SELとして出力する構成となっている。
The output of the SR-FF 232 described above is input to the D-FF 233, and the output of the D-FF 233 and the output of the comparison circuit 231 are input to the AND gate 235. The output of this AND gate 235 is the gate circuit 236
The gate circuit 236 is configured to output the AND of each bit of the selection control information Dsel output by the processor 202 and the output of the AND gate 235 described above as the selection information SEL.

また、上述したアンドゲート235の出力は、D−FF
234に入力されており、このD−FF234の出力は
、上述したSR−FF232のリセット端子Rに入力さ
れている。また、このSR−FF232の出力は、割り
込み信号WFとして、プロセッサ202に返されている
Moreover, the output of the AND gate 235 mentioned above is the D-FF
The output of this D-FF 234 is input to the reset terminal R of the SR-FF 232 mentioned above. Further, the output of this SR-FF 232 is returned to the processor 202 as an interrupt signal WF.

以下、実施例によるアクセス制御回路の動作について説
明する。
The operation of the access control circuit according to the embodiment will be described below.

第3図に実施例によるアクセス制御回路の動作を表すタ
イミング図を示す。
FIG. 3 shows a timing diagram showing the operation of the access control circuit according to the embodiment.

第3図(a)、(b)に上述した第1クロック信号CK
1と第2クロック信号CK2とのそれぞれを示す。
The first clock signal CK shown in FIGS. 3(a) and 3(b)
1 and a second clock signal CK2, respectively.

第3図(c)に示すように、カウンタ211の出力は、
第2クロック信号CK2に同期して加算され、この第2
クロック信号CK2の1周期ごとに、RAM201のア
ドレスが順次に指定される。
As shown in FIG. 3(c), the output of the counter 211 is
The second clock signal CK2 is added in synchronization with the second clock signal CK2.
Addresses of the RAM 201 are sequentially designated every cycle of the clock signal CK2.

また、第3図(d)に示す出力イネーブル信号Oenに
応じて、RAM201により、入力アドレスに対応する
データが読出データRdatとして入出力ポートI/O
に出力され(第3図(f)参照)、セレクタ214の入
力ポートP0に入力される。
In addition, in response to the output enable signal Oen shown in FIG.
(see FIG. 3(f)) and is input to the input port P0 of the selector 214.

ここで、初期状態においては、読出/書込制御回路のS
R−FF232がリセットされているものとする。この
場合は、アンドゲート235の出力は論理“0”となる
ので、比較回路231の出力にかかわらず、ゲート回路
236により、選択情報の全ビットの情報として論理“
0”が出力される。
Here, in the initial state, S of the read/write control circuit
It is assumed that the R-FF 232 has been reset. In this case, the output of the AND gate 235 becomes logic "0", so regardless of the output of the comparison circuit 231, the gate circuit 236 treats all bits of the selection information as logic "0".
0” is output.

このように選択情報SELの全ビットとして論理“0”
が出力されている場合は、セレクタ214により、入力
ポートP0に入力されるRAM201からの読出データ
Rdatの全ビットが選択されて出力される(第3図(
g)参照)。従って、出力イネーブル信号Oenの立ち
上がりに応じて、上述した読出データRdatがD−F
F215に保持され、出力データDOとして出力される
(第3図(h)参照)。
In this way, all bits of selection information SEL are set to logic “0”.
is output, the selector 214 selects and outputs all bits of the read data Rdat from the RAM 201 input to the input port P0 (see FIG. 3).
(see g)). Therefore, in response to the rise of the output enable signal Oen, the read data Rdat described above is
It is held in F215 and output as output data DO (see FIG. 3(h)).

その後、書込イネーブル信号Wenに応じて、3ステー
トバッファ216の動作が有効となり、D−FF215
に保持された読出データRdatが、書込データとして
RAM201の入出力ポートI/Oに入力され(第3図
(i)参照)、入力アドレスに対応して書き込まれる。
Thereafter, the operation of the 3-state buffer 216 is enabled in response to the write enable signal Wen, and the D-FF 215
The read data Rdat held in the RAM 201 is input as write data to the input/output port I/O of the RAM 201 (see FIG. 3(i)), and is written in correspondence with the input address.

このように、通常は、各アドレスが指定されている第2
クロック信号CK2の1周期の前半に、該当するデータ
が読み出され、この読出データRdatが出力データD
Oとして出力されるとともに、第2クロック信号CK2
の後半にRAM201に書き込まれる。
In this way, each address is usually
In the first half of one cycle of the clock signal CK2, the corresponding data is read out, and this read data Rdat becomes the output data D.
0, and the second clock signal CK2
The data is written to the RAM 201 in the latter half of the process.

次に、アドレスnのデータを変更する動作について説明
する。第4図に、データの変更動作を表す流れ図を示す
Next, the operation of changing data at address n will be explained. FIG. 4 shows a flowchart representing the data changing operation.

プロセッサ202は、まず、変更アドレスMadrとし
て、データの変更を行うアドレスnを出力する(ステッ
プ401)。次に、プロセッサ202は、変更データW
datと選択制御情報Dselとを出力する(ステップ
402)。ここで、変更データWdatとしては、変更
するビットに対応するバスのビット線に変更後のビット
情報を出力すればよい。また、選択制御情報Dsel(
7)該当するビットを論理“1”として変更するビット
を示せばよい。
The processor 202 first outputs the address n at which data is to be changed as the change address Madr (step 401). Next, the processor 202 processes the modified data W
dat and selection control information Dsel are output (step 402). Here, as the changed data Wdat, changed bit information may be output to the bit line of the bus corresponding to the bit to be changed. In addition, selection control information Dsel (
7) It is sufficient to indicate the bit to be changed by setting the corresponding bit to logic "1".

その後、プロセッサ202は、第3図(j)に示すよう
に、書込制御信号WEとして正のパルスを出力し(ステ
ップ403)、割り込み信号WFとして論理“0”が入
力されるまで、ステップ404を繰り返す。
Thereafter, as shown in FIG. 3(j), the processor 202 outputs a positive pulse as the write control signal WE (step 403), and continues in step 404 until logic "0" is input as the interrupt signal WF. repeat.

上述したステップ403において、プロセッサ202に
よって出力される書込制御信号WEに応じて、読出/書
込制御回路213のSR−FF231の出力は論理“1
”となり、第3図(m)に示すように、割り込み信号W
Fとして論理“1”がプロセッサ202に送出される。
In step 403 described above, the output of the SR-FF 231 of the read/write control circuit 213 becomes logic "1" in response to the write control signal WE output by the processor 202.
”, and as shown in FIG. 3(m), the interrupt signal W
A logic “1” is sent to processor 202 as F.

また、このSR−FF231の出力は、D−FF232
によって、第2クロック信号CK2の立ち上がりに同期
して保持され、これにより、アンドゲート235の入力
端子の一方に論理“1”が入力される。従って、このア
ンドゲート235の出力は、カウンタ211の出力が数
値『n』となったときに、比較回路231の出力に応じ
て論理“1”となる(第3図(k)参照)。
Also, the output of this SR-FF231 is the output of D-FF232.
The second clock signal CK2 is held in synchronization with the rising edge of the second clock signal CK2, and as a result, a logic "1" is input to one of the input terminals of the AND gate 235. Therefore, the output of the AND gate 235 becomes logic "1" in accordance with the output of the comparison circuit 231 when the output of the counter 211 reaches the numerical value "n" (see FIG. 3(k)).

このとき、ゲート回路236により、上述した選択制御
情報Dselが選択情報SELとして出力され、これに
応じて、セレクタ214により、選択制御情報Dsel
で示されたビットのデータとして、バスを介してセレク
タ214の入力ポートP1に入力される変更データWd
atの該当するビット情報が選択される。
At this time, the gate circuit 236 outputs the selection control information Dsel as the selection information SEL, and in response, the selector 214 outputs the selection control information Dsel.
The change data Wd input to the input port P1 of the selector 214 via the bus as data of the bit indicated by
The corresponding bit information of at is selected.

従って、この場合は、セレクタ214の出力は、上述し
た選択制御情報Dselで示された各ビットが変更デー
タWdatに応じて変更された新しいデータDとなる(
第3図(g)参照)。この新しいデータDは、上述した
出力イネーブル信号Oenの立ち上がりに同期してD−
FF215に保持され、出力データDOとして出力され
る(第3図(d),(h)参照)。
Therefore, in this case, the output of the selector 214 becomes new data D in which each bit indicated by the selection control information Dsel described above is changed according to the change data Wdat (
(See Figure 3(g)). This new data D is generated in synchronization with the rise of the output enable signal Oen mentioned above.
It is held in the FF 215 and output as output data DO (see FIGS. 3(d) and (h)).

このデータDは、書込イネーブル信号Wenに応じて、
3ステートバッファ216を介してRAM201の入出
力ポートI/Oに書込データとして入力され、アドレス
nに書き込まれる(第3図(i)参照)。
This data D is generated according to the write enable signal Wen.
The data is input as write data to the input/output port I/O of the RAM 201 via the 3-state buffer 216, and written to address n (see FIG. 3(i)).

また、上述したアンドゲート235の出力の変化に応じ
て、D−FF234の出力が論理“1”となり、SR−
FF232がリセットされ、割り込み信号WFとして論
理“0”が出力される。
Further, in accordance with the change in the output of the AND gate 235 mentioned above, the output of the D-FF 234 becomes logic "1", and the SR-
The FF 232 is reset and logic "0" is output as the interrupt signal WF.

これに応じて、プロセッサ202は、アドレスnのデー
タの変更が終了したと判断して、処理を終了する。
In response, the processor 202 determines that the data at address n has been changed, and ends the process.

上述したように、選択情報SELに応じて、読出データ
Rdatと変更データWdatとの選択を行うセレクタ
214を設けて、アクセス制御回路を構成する。また、
各アドレスが指定されている第2クロック信号CK2の
周期を前半と後半とに分割し、前半においてRAM20
1からデータを読み出し、上述したセレクタ214の出
力を出力データDOとして出力するとともに、後半にお
いて、この出力データDOをRAM201に書き込む構
成とする。
As described above, the access control circuit is configured by providing the selector 214 that selects between the read data Rdat and the modified data Wdat in accordance with the selection information SEL. Also,
The period of the second clock signal CK2 to which each address is specified is divided into the first half and the second half, and in the first half, the RAM 20
1, the output of the selector 214 described above is output as output data DO, and in the latter half, this output data DO is written to the RAM 201.

このようにして、RAM201の各アドレスのデータを
順次に読み出しながら、変更アドレスnのデータの変更
をビット単位で行うとともに、同一周期において、変更
したデータを用いてRAM201のデータを書き換える
ことが可能となる。
In this way, while sequentially reading the data at each address in the RAM 201, it is possible to change the data at the change address n bit by bit, and at the same time, it is possible to rewrite the data in the RAM 201 using the changed data in the same cycle. Become.

これにより、プロセッサ202がRAM201の変更ア
ドレスnのデータを読み出して、このデータを変更する
手順を不要として、プロセッサ202の処理負担を軽減
することができる。また、従来のように、プロセッサが
データを読み出すために、該当するアドレスがカウンタ
によって生成されるまで待つ必要はなく、データの変更
処理を高速に行うことができる。
This eliminates the need for the processor 202 to read the data at the change address n in the RAM 201 and change this data, thereby reducing the processing load on the processor 202. Further, unlike the conventional technology, there is no need for a processor to wait until a corresponding address is generated by a counter in order to read data, and data modification processing can be performed at high speed.

また、RAM201に格納されたデータのそれぞれを一
定周期で出力する動作に影響を及ぼすこともない。
Further, it does not affect the operation of outputting each piece of data stored in the RAM 201 at a constant cycle.

〔発明の効果〕〔Effect of the invention〕

上述したように、本発明によれば、RAMのデータを一
定周期で読み出しながら、変更アドレスのデータを変更
するとともに、同一周期において、変更したデータを用
いてRAMのデータを書き換えることが可能となるので
、データを読み出して変更する手順を削減してプロセッ
サの処理負担を軽減することができ、RAMのデータの
変更処理を高速に行うことができる。
As described above, according to the present invention, it is possible to change data at a change address while reading RAM data at a constant cycle, and rewrite the RAM data using the changed data at the same cycle. Therefore, the procedure for reading and changing data can be reduced, the processing load on the processor can be reduced, and data in the RAM can be changed at high speed.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の原理ブロック図、 第2図は本発明の一実施例によるアクセス制御回路の構
成図、 第3図は実施例によるアクセス制御回路の動作を表すタ
イミング図、 第4図は実施例による書換え動作を表す流れ図、第5図
は従来のアクセス制御回路の構成図、第6図は従来のア
クセス制御回路の動作を表すタイミング図、 第7図は従来の書換え動作を表す流れ図である。 図において、 101はRAM、 111はアドレス生成手段、 112は指示手段、 113は比較手段、 114は選択手段、 115は入力手段、 201、501はRAM、 202、502はプロセッサ、 211、511はカウンタ、 212、512はイネーブル信号生成回路、213、5
13は読出/書込制御回路、214はセレクタ、 215、233、234、514、515、533、5
34、535、536はD型フリップフロップ(D−F
F)、 216、516、517は3ステートバッファ、231
、530は比較回路、 232、531、532はセットリセット型フリップフ
ロップ(SR−FF)、 235はアンドゲート、 236、537はゲート回路である。
FIG. 1 is a principle block diagram of the present invention. FIG. 2 is a configuration diagram of an access control circuit according to an embodiment of the present invention. FIG. 3 is a timing diagram showing the operation of the access control circuit according to the embodiment. FIG. 5 is a configuration diagram of a conventional access control circuit; FIG. 6 is a timing diagram representing the operation of a conventional access control circuit; FIG. 7 is a flowchart representing a conventional rewriting operation. be. In the figure, 101 is a RAM, 111 is an address generation means, 112 is an instruction means, 113 is a comparison means, 114 is a selection means, 115 is an input means, 201 and 501 are RAMs, 202 and 502 are processors, and 211 and 511 are counters. , 212, 512 are enable signal generation circuits, 213, 5
13 is a read/write control circuit, 214 is a selector, 215, 233, 234, 514, 515, 533, 5
34, 535, and 536 are D-type flip-flops (D-F
F), 216, 516, 517 are 3-state buffers, 231
, 530 are comparison circuits, 232, 531, and 532 are set-reset flip-flops (SR-FF), 235 is an AND gate, and 236 and 537 are gate circuits.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】所定の周期でRAM(101)の各アドレ
スを順次に生成するアドレス生成手段(111)の出力
を前記RAM(101)への入力アドレスとし、該当す
るデータを順次に出力するアクセス制御回路において、 前記各周期を2つの部分周期に分割し、前半の部分周期
において、前記RAM(101)に入力アドレスに対応
するデータの出力を指示し、後半の部分周期において、
前記RAM(101)に入力されるデータの入力アドレ
スへの書き込みを指示する指示手段(112)と、 変更するデータに対応する変更アドレスが入力され、前
記RAM(101)への入力アドレスと前記変更アドレ
スとを比較する比較手段(113)と、 前記比較手段(113)により前記変更アドレスと前記
RAM(101)への入力アドレスとが一致しないとさ
れた場合は、前記RAM(101)によって出力された
データをそのまま出力し、一致するとされた場合に、入
力される変更情報を出力する選択手段(114)と、 前記選択手段(114)によって出力されたデータを前
記RAM(101)に入力する入力手段(115)と を備えて構成することを特徴とするアクセス制御回路。
1. Access in which the output of an address generating means (111) that sequentially generates each address of a RAM (101) at a predetermined period is used as an input address to the RAM (101), and the corresponding data is sequentially output. The control circuit divides each period into two partial periods, instructs the RAM (101) to output data corresponding to the input address in the first half period, and instructs the RAM (101) to output data corresponding to the input address in the second half period.
an instruction means (112) for instructing writing of data input to the RAM (101) to an input address; and a change address corresponding to the data to be changed is input, and the input address to the RAM (101) and the change are input. If the comparison means (113) determines that the changed address and the input address to the RAM (101) do not match, the address is outputted by the RAM (101). a selection means (114) that outputs the data as is and outputs input change information when it is determined that they match; and an input that inputs the data output by the selection means (114) to the RAM (101). An access control circuit comprising means (115).
JP24338990A 1990-09-13 1990-09-13 Access control circuit Pending JPH04227551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24338990A JPH04227551A (en) 1990-09-13 1990-09-13 Access control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24338990A JPH04227551A (en) 1990-09-13 1990-09-13 Access control circuit

Publications (1)

Publication Number Publication Date
JPH04227551A true JPH04227551A (en) 1992-08-17

Family

ID=17103133

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24338990A Pending JPH04227551A (en) 1990-09-13 1990-09-13 Access control circuit

Country Status (1)

Country Link
JP (1) JPH04227551A (en)

Similar Documents

Publication Publication Date Title
US4514808A (en) Data transfer system for a data processing system provided with direct memory access units
KR0123239B1 (en) Fifo memory
US3359544A (en) Multiple program computer
JPH03180933A (en) Stack memory
JPH0675745A (en) Serialization difference flag circuit
JPS5981721A (en) Accessing of microcomputer peripheral equipment
JPH04227551A (en) Access control circuit
JP2841456B2 (en) Data transfer method and data buffer device
JPH0831033B2 (en) Data processing device
JPH01273132A (en) Microprocessor
JPS59178667A (en) Memory device
JPH064398A (en) Information processor
JP3027765B2 (en) Time mechanism controller
KR910006684Y1 (en) Cpu signal controlling circuit
JPS6017131B2 (en) memory control circuit
KR950011061B1 (en) A i/o data control circuit for shared memory
JPH033047A (en) Memory with arithmetic function
JPH02287732A (en) Register address generating device
JPH0626305B2 (en) Double memory configuration pulse programmer
JPH0419894A (en) Elastic store circuit
JPH03248242A (en) Memory control circuit
JPH06267264A (en) Fifo memory controller
JPS5849960B2 (en) Information check method
JPH05314059A (en) Memory access control circuit
JPH04264620A (en) Status protection circuit using ram