JPH0778103A - Shared access control device - Google Patents

Shared access control device

Info

Publication number
JPH0778103A
JPH0778103A JP22271593A JP22271593A JPH0778103A JP H0778103 A JPH0778103 A JP H0778103A JP 22271593 A JP22271593 A JP 22271593A JP 22271593 A JP22271593 A JP 22271593A JP H0778103 A JPH0778103 A JP H0778103A
Authority
JP
Japan
Prior art keywords
data
cpu
bits
shared
data transfer
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
JP22271593A
Other languages
Japanese (ja)
Inventor
Yuki Ito
祐樹 伊東
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 JP22271593A priority Critical patent/JPH0778103A/en
Publication of JPH0778103A publication Critical patent/JPH0778103A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PURPOSE:To efficiently attain data processing through a shared device without generating discrepancy by providing a control part for controlling access to the shared device with a counting part and a waiting part. CONSTITUTION:The control part 1 is provided with the counting part 12 and the waiting part 13. When one (a5 e.g.) of plural processors accesses the shared device 2, the counting part 12 calculates the number K of continuous accesses and the waiting part 13 exclusively controls the access of the other processor b6 among the plural processors to the device 2 until the count value K (k is a positive integer) reaches K=p/m. Namely the control part 1 holds the connected state of a data transfer path between a certain specific processor and the device 2 until at least the count value of the counting part 12 reaches a prescribed value based upon a signal outputted from the waiting part 13.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、マルチプロセッサ構成
において、共通にアクセスされる装置を介して、複数の
プロセッサ間でデータを授受することに関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to transmitting and receiving data between a plurality of processors via a commonly accessed device in a multiprocessor configuration.

【0002】近年、マイクロプロセッサを始めとして各
種のプロセッサの処理単位のビット数は、8ビット,1
6ビット,32ビット,64ビットと増加してきてい
る。これに伴い、プロセッサと他装置との間のデータ転
送インタフェースのビット数(例えば、データバスのビ
ット幅)も増加してきている。
In recent years, the number of bits of processing units of various processors including a microprocessor is 8 bits and 1
It is increasing to 6 bits, 32 bits, and 64 bits. Along with this, the number of bits of the data transfer interface between the processor and other devices (for example, the bit width of the data bus) is also increasing.

【0003】一方、複数のプロセッサ間で一回に授受さ
れるデータのビット数は、英数字では「8」ビット、か
な漢字文字では「16」ビット、64ビットの倍精度浮
動少数点データでは「64」ビット、メモリのアドレス
データはそのメモリ容量によるが「16〜」ビット等の
ように、各種の場合が存在する。さらに、大量のデータ
を転送する場合には数KB(キロバイト)〜数十KBと
なる。
On the other hand, the number of bits of data transmitted and received at one time between a plurality of processors is "8" bits for alphanumeric characters, "16" bits for kana-kanji characters, and "64" for double precision floating point data of 64 bits. There are various cases such as "16" bits, etc., although the bit and the address data of the memory depend on the memory capacity. Furthermore, when a large amount of data is transferred, it is several KB (kilobytes) to several tens of KB.

【0004】本発明は、このようなデータを構成する
(有意)ビット数がデータ転送インタフェースのビット
数よりも多い時の処理に関するものである。
The present invention relates to processing when the number of (significant) bits forming such data is larger than the number of bits of the data transfer interface.

【0005】[0005]

【従来の技術】以下に説明する従来の技術は、複数の処
理装置から共通にアクセスされる装置が共有メモリの場
合である。
2. Description of the Related Art A conventional technique described below is a case where a device commonly accessed by a plurality of processing devices is a shared memory.

【0006】従来技術においては、連続アクセス回数K
は、各処理装置ともK=1であり、データの構成ビット
数pが複数のデータ転送インタフェースの内最少のビッ
ト数に等しいか又は少ない場合である。
In the prior art, the number of consecutive accesses K
Is a case where K = 1 in each processing device and the number p of bits constituting the data is equal to or less than the minimum number of bits of the plurality of data transfer interfaces.

【0007】即ち、或る処理装置と制御部とのデータ転
送インタフェースのビット数をmとし、他の処理装置と
当該制御部とのデータ転送インタフェースのビット数を
nとすると、p≦MIN(m,n・・・)である。
That is, if the number of bits of the data transfer interface between a certain processing device and the control unit is m and the number of bits of the data transfer interface between another processing device and the control unit is n, then p≤MIN (m , N ...).

【0008】図8は、従来のメモリアクセス装置適用例
であり、プリンタコントローラに適用した場合の構成図
である。そのプリンタコントローラ8aの主な構成要素
は、受信回路15,第一の処理装置5,共有メモリアク
セス制御部1a,共有メモリ2a,第二の処理装置6,
ビットマップメモリ16,CGメモリ17,描画回路1
8である。
FIG. 8 is an example of application of a conventional memory access device, and is a configuration diagram when applied to a printer controller. The main components of the printer controller 8a are the receiving circuit 15, the first processing device 5, the shared memory access control unit 1a, the shared memory 2a, the second processing device 6, and the like.
Bit map memory 16, CG memory 17, drawing circuit 1
8

【0009】第一のCPU5と制御部1aとの間のデー
タ転送インタフェースのビット数は16ビットのバスA
3であり、第二のCPU6と制御部1bとの間のデータ
転送インタフェースのビット数は32ビットのバスB4
のマルチプロセッサ構成となっている。
The number of bits of the data transfer interface between the first CPU 5 and the control unit 1a is 16-bit bus A.
3, the number of bits of the data transfer interface between the second CPU 6 and the control unit 1b is 32 bits on the bus B4.
It has a multi-processor configuration.

【0010】CPU5は16ビット単位で印字データを
共有メモリ2aに格納し、CPU6は32ビット単位で
当該印字データを当該共有メモリ2aから読み出す。7
はパソコンその他のホストであり、8aは上記プリンタ
コントローラであり、19はプリンタである。ホスト7
とプリンタコントローラ8aとは、本発明とは直接関係
無いが、1ビットのシリアル伝送(RS232C)、8
ビットのセントロインタフェース、或いは16ビットの
システムバス等のインタフェースで接続されている。
The CPU 5 stores print data in the shared memory 2a in 16-bit units, and the CPU 6 reads the print data in 32-bit units from the shared memory 2a. 7
Is a personal computer or other host, 8a is the printer controller, and 19 is a printer. Host 7
The printer controller 8a and the printer controller 8a are not directly related to the present invention, but 1-bit serial transmission (RS232C), 8
It is connected by an interface such as a bit centro interface or a 16-bit system bus.

【0011】共有メモリ2aはCPU5とCPU6との
両方からアクセス可能な共有メモリである。その容量は
例えば64KB(キロバイト)であり、特定領域21a
とデータ領域22aとから構成され、アドレスはバイト
単位で付けられており、そのアドレッシング(番地付
け)は16ビット(64KB対応)あれば可能である。
The shared memory 2a is a shared memory that can be accessed by both the CPU 5 and the CPU 6. The capacity is, for example, 64 KB (kilobytes), and the specific area 21a
The data area 22a and the data area 22a, the address is attached in byte units, and the addressing (addressing) is possible with 16 bits (corresponding to 64 KB).

【0012】特定領域21aの容量は32B(バイト)
であり、アドレスは0〜31とする。16進で表示する
と「0H 」〜「1FH 」となる。(以下16進を表示す
る場合には、「0H 」,「1FH 」等のように表現す
る。)また、データ領域22aのアドレスは32〜65
535とする。16進で表示すると「20H 」〜「FF
FFH 」となる。(容量は64KB─32Bである。)
ビットマップメモリ16は、文字や図形データをドッ
ト展開した結果が格納されている。
The capacity of the specific area 21a is 32B (bytes)
And the addresses are 0 to 31. When displayed in hexadecimal becomes "0 H" ~ "1F H". (When displaying the following hexadecimal "0 H", expressed as such "1F H".) The address of the data area 22a is 32 to 65
535. When displayed in hexadecimal, "20 H " to "FF
FF H ”. (The capacity is 64KB-32B.)
The bitmap memory 16 stores the result of dot development of character and graphic data.

【0013】CGメモリ17は、文字をドット展開する
ためのフォントデータが格納されている。これら各構成
要素間の接続は、下記のようになっている。
The CG memory 17 stores font data for developing characters into dots. The connection between each of these components is as follows.

【0014】(1).データ転送バスA3は16ビット
──即ち、m=16──であり、このバスA3に接続さ
れる回路は、メモリアクセス制御部1b,CPU5,受
信回路15である。
(1). The data transfer bus A3 has 16 bits, that is, m = 16, and the circuits connected to this bus A3 are the memory access control unit 1b, the CPU 5, and the receiving circuit 15.

【0015】(2).データ転送バスB4は32ビット
──即ち、n=32──であり、このバスB4に接続さ
れる回路は、メモリアクセス制御部1b,CPU6,ビ
ットマップメモリ16,CGメモリ17,描画回路18
である。
(2). The data transfer bus B4 has 32 bits, that is, n = 32, and the circuits connected to this bus B4 are the memory access control unit 1b, the CPU 6, the bit map memory 16, the CG memory 17, and the drawing circuit 18.
Is.

【0016】(3).共有メモリアクセス制御部1aと
CPU5とは複数本の制御信号線30を介して接続され
ている。その複数の制御信号のうちの一つを「DAC
K」信号とする。この「DACK」信号はメモリアクセ
ス制御部1bがCPU5に対してバスA3を用いたデー
タ転送の完了、つまり、バスビット幅16ビットのデー
タ転送の完了を通知するものである。この完了通知によ
り、両方の処理装置からの共有メモリ2aへの割り込み
アクセスが可能となり、メモリアクセス制御部1aはよ
り早くアクセスした処理装置に対してデータ転送パスを
接続状態とし、データ転送を開始する。
(3). The shared memory access controller 1a and the CPU 5 are connected via a plurality of control signal lines 30. One of the plurality of control signals is referred to as “DAC
K "signal. The "DACK" signal is used by the memory access control unit 1b to notify the CPU 5 of the completion of data transfer using the bus A3, that is, the completion of data transfer with a bus bit width of 16 bits. By this completion notification, both processors can perform interrupt access to the shared memory 2a, and the memory access control unit 1a connects the data transfer path to the processor that accessed earlier and starts data transfer. .

【0017】(4).メモリアクセス制御部1aとCP
U6とは複数本の制御信号線40を介して接続されてい
る。その複数の制御信号のうちの一つを「READY」
信号とする。この「READY」信号は上記(3)「D
ACK」信号と同様の機能を有し、共有メモリアクセス
制御部1aがCPU6に対して処理の完了、つまり、バ
スビット幅32ビットのデータ転送完了を通知するもの
である。この完了通知により、両方の装置からの共有メ
モリへの割り込みアクセスが可能となり、メモリアクセ
ス制御部1aはより早くアクセスした処理装置に対して
データ転送パスを接続状態とし、データ転送を開始す
る。
(4). Memory access control unit 1a and CP
It is connected to U6 via a plurality of control signal lines 40. One of the control signals is "READY"
Signal. This "READY" signal is the same as in (3) "D
The shared memory access control unit 1a has the same function as the "ACK" signal, and notifies the CPU 6 of the completion of the processing, that is, the completion of the data transfer of the bus bit width of 32 bits. By this completion notification, the interrupt access to the shared memory from both devices becomes possible, and the memory access control unit 1a establishes the data transfer path to the processing device that has accessed earlier and starts the data transfer.

【0018】(5).共有メモリアクセス制御部1aと
共有メモリ2aとは32ビットの信号線60で接続され
ている。CPU5と共有メモリアクセス制御部1aとは
16ビットのバスA3で接続されていることから、CP
U5が共有メモリ2aをアクセスする時には、32ビッ
トの共有メモリ2aに対してパーシャルリード/ライト
(部分的格納/読出)となる。例えば、CPU5は共有
メモリ2aのアドレス「0,1,2,3」(即ち、32
ビット)に対して、アドレス「0,1」(16ビット)
若しくはアドレス「2,3」(16ビット)にデータを
部分的格納/読出を行う。
(5). The shared memory access control unit 1a and the shared memory 2a are connected by a 32-bit signal line 60. Since the CPU 5 and the shared memory access control unit 1a are connected by the 16-bit bus A3, the CP
When U5 accesses the shared memory 2a, partial read / write (partial storage / read) is performed on the 32-bit shared memory 2a. For example, the CPU 5 uses the address “0, 1, 2, 3” (that is, 32) of the shared memory 2a.
Bit), address "0, 1" (16 bits)
Alternatively, data is partially stored / read out at the address "2, 3" (16 bits).

【0019】(6).CPU5と共有メモリアクセス制
御部1aとは24ビットのアドレスバス31で接続され
ており、このアドレスバス31を用いて、アクセスのた
めのアドレス情報が送付される。
(6). The CPU 5 and the shared memory access controller 1a are connected by a 24-bit address bus 31, and address information for access is sent using this address bus 31.

【0020】(7).CPU6と共有メモリアクセス制
御部1aとは、バスB4を用いて、アクセスのためのア
ドレス情報が送付される。このことは、バスB4を用い
てアドレス情報とデータ情報との両方のデータが授受さ
れることを意味する。アドレス情報とデータ情報との区
別は複数の制御信号線40の内の一つによって行われ
る。
(7). Address information for access is sent to the CPU 6 and the shared memory access control unit 1a using the bus B4. This means that data of both address information and data information is exchanged using the bus B4. The address information and the data information are distinguished by one of the plurality of control signal lines 40.

【0021】(8).CPU5とCPU6とは制御信号
線50により直接接続されている。この信号線により制
御信号が授受される。電源投入直後にCPU5がメモリ
2aの特定領域21aの或るアドレス──例えば、アド
レス「0」──を初期化する(「0」クリア)間、CP
U5はCPU6に対して制御信号線50を介して制御信
号を出力し、CPU6の動作を停止状態にする。その初
期化処理完了後、CPU5はCPU6に対してその制御
信号を解除し、CPU6は動作を開始する。これは、最
初に有効なデータをCPU5が共有メモリ2aに格納し
た後、その有効なデータをCPU6が共有メモリ2aか
ら読み出して以後の処理を継続可能とするためである。
(8). The CPU 5 and the CPU 6 are directly connected by the control signal line 50. Control signals are transmitted and received through this signal line. Immediately after the power is turned on, while the CPU 5 initializes a certain address of the specific area 21a of the memory 2a--for example, the address "0"-(clears "0"), the CP
The U5 outputs a control signal to the CPU 6 via the control signal line 50 to bring the CPU 6 into an inoperative state. After the initialization process is completed, the CPU 5 releases the control signal to the CPU 6, and the CPU 6 starts its operation. This is because the CPU 5 first stores valid data in the shared memory 2a, and then the CPU 6 reads the valid data from the shared memory 2a so that the subsequent processing can be continued.

【0022】もし、CPU6がCPU5より先に共有メ
モリ2aのアドレス「0」をアクセスし、そのアドレス
「0」に或る値(「0」以外の値)が有った場合には、
CPU6の動作は間違った文字を印刷する可能性があ
る。
If the CPU 6 accesses the address "0" of the shared memory 2a before the CPU 5 and the address "0" has a certain value (a value other than "0"),
The operation of the CPU 6 may print wrong characters.

【0023】(9).前記(3),(4)で述べたよう
に、メモリアクセス制御部1aは、CPU5或いはCP
U6から共有メモリ2aにアクセスがあった場合には、
排他制御を行う。より早くアクセスのあったCPUのデ
ータ転送パスを接続状態にし、他方のデータ転送パスを
切断状態にする。
(9). As described in (3) and (4) above, the memory access control unit 1a includes the CPU 5 or the CP.
When the shared memory 2a is accessed from U6,
Perform exclusive control. The data transfer path of the CPU that has accessed earlier is brought into the connected state, and the other data transfer path is brought into the disconnected state.

【0024】即ち、一方のCPUから共有メモリ2aに
アクセスがあり、当該メモリアクセス制御部1aは、そ
の後他方のCPUから当該共有メモリ2aにアクセスが
あった場合には、当該一方のCPUのメモリアクセスが
完了するまで、当該他方のCPUのデータ転送パスを切
断状態にする。
That is, if the shared memory 2a is accessed from one CPU and the shared memory 2a is subsequently accessed from the other CPU, the memory access controller 1a accesses the shared memory 2a. Until the above is completed, the data transfer path of the other CPU is cut off.

【0025】(10).各バス3,4には前記(1),
(2)で述べたように複数の回路や装置が接続されてい
る。これら複数の回路や装置にはアドレス(機番)が割
当られており、これら複数の回路や装置間のデータ授受
はそのアドレスを相互に指定することにより可能とな
る。
(10). For each bus 3 and 4 (1),
As described in (2), a plurality of circuits and devices are connected. Addresses (machine numbers) are assigned to the plurality of circuits and devices, and data can be exchanged between the plurality of circuits and devices by mutually specifying the addresses.

【0026】前記(6)で述べたようにCPU5が共有
メモリ2aをアクセスするときのアドレス情報は24ビ
ットのアドレスバス31を用いて送付され、この24ビ
ットのうち最上位の4ビットを用いて表示される。
As described in (6) above, the address information when the CPU 5 accesses the shared memory 2a is sent using the 24-bit address bus 31, and the most significant 4 bits of these 24 bits are used. Is displayed.

【0027】例えば、「AXXXXXH 」のように24
ビットの最上位の4ビットが「AH」により表示する。
最上位4ビットが「AH 」であることにより、メモリア
クセス制御部1aは共有メモリ2aがアクセスされてい
ると判断する。
For example, 24 as in "AXXXXXX H "
The most significant 4 bits of the bit are designated by "A H ".
Since the most significant 4 bits are “A H ”, the memory access control unit 1a determines that the shared memory 2a is being accessed.

【0028】CPU5が特定領域21aの32バイトを
アクセスするときのアドレスは「A00000H 」〜
「A0001FH 」であり、データ領域のアドレスは
「A00020H 」〜「A0FFFFH 」となる。
[0028] The address of when CPU5 to access the 32 bytes of a specific region 21a "A00000 H" -
Is a "A0001F H", the address of the data area is "A00020 H" - "A0FFFF H".

【0029】同様に、CPU6がメモリ2aをアクセス
した時のアドレス情報は32ビットのバスB4を用いて
送付されるが、CPU6が特定領域21aの32バイト
をアクセスするときのアドレスは「C000000
H 」〜「C000001FH 」であり、データ領域の
アドレスは「C0000020H 」〜「C000FFF
H 」となる。(最上位の4ビットを「CH 」としたの
は、例として決めた(設計仕様)のであって、「AH
と決めてもよい。)このようにすることにより、メモリ
アクセス制御部1bは各アドレス情報の最上位4ビット
をデコードすることにより、共有メモリ2aがアクセス
されていることが分かる。
Similarly, the CPU 6 accesses the memory 2a.
Address information at the time of using the 32-bit bus B4
It is sent, but CPU6 is 32 bytes of specific area 21a
The address to access is "C000000
0H~ "C000001FHAnd the data area
The address is "C00000020H~ "C000FFF
F HIt will be. (The most significant 4 bits are "CH"
Was decided as an example (design specification), and "AH"
You may decide. ) By doing this, the memory
The access control unit 1b uses the most significant 4 bits of each address information.
Shared memory 2a is accessed by decoding
You can see that it is done.

【0030】図9は、従来の特定領域のデータ例であ
り、共有メモリ2aのこの特定領域21aには各バスに
接続されているCPU5,CPU6の間の相互コミニュ
ケーションのための情報が格納される。この領域のアド
レス「0,1」,「4,5」の各2バイト(16ビッ
ト)には、各CPUが共有メモリ2aのデータ領域22
aをアクセスする際のアクセス開始アドレスが、アドレ
ス「2,3」,「6,7」の各2バイト(16ビット)
には、アクセス終了アドレスが格納される。
FIG. 9 shows an example of data in a conventional specific area. In this specific area 21a of the shared memory 2a, information for mutual communication between the CPUs 5 and 6 connected to each bus is stored. . In each 2 bytes (16 bits) of addresses "0, 1" and "4,5" of this area, each CPU has a data area 22 of the shared memory 2a.
The access start address when accessing a is 2 bytes (16 bits) for each of the addresses "2, 3" and "6, 7"
Stores the access end address.

【0031】このプリンタコントローラ8aの場合に
は、CPU5が印字データを1文字づつ(16ビット単
位)データ領域に格納する度に、CPU6はそのデータ
領域の印字データを2文字づつ(32ビット単位)読出
し可能である。
In the case of the printer controller 8a, every time the CPU 5 stores the print data in the data area character by character (16-bit unit), the CPU 6 writes the print data in the data area by 2 characters (32-bit unit). It is readable.

【0032】CPU6の印字データ読出しアドレスはC
PU5が印字データを格納した領域内である必要があ
る。この必要条件は、アドレスの大小関係を次のように
チェックすれば確認可能となる。
The print data read address of the CPU 6 is C
It is necessary for the PU 5 to be within the area where the print data is stored. This necessary condition can be confirmed by checking the size relationship of the addresses as follows.

【0033】CPU5の格納開始アドレス≦CPU6の
読出開始アドレス,CPU6の読出終了アドレス≦CP
U5の格納終了アドレスこの条件が満足されない場合に
は、間違った文字が印刷される可能性がある。
Storage start address of CPU5≤read start address of CPU6, read end address of CPU6≤CP
Storage end address of U5 If this condition is not met, incorrect characters may be printed.

【0034】図10は、従来のデータ領域のデータ例で
あり、メモリ2aのデータ領域22aに2バイト単位に
文字のコードデータが格納されている状態を示す。図
9,図10のようなメモリ構成であって、CPU5とC
PU6との印字データの授受の概要は次のようになる。
FIG. 10 shows an example of data in the conventional data area, and shows a state in which character code data is stored in units of 2 bytes in the data area 22a of the memory 2a. A memory configuration as shown in FIG. 9 and FIG.
The outline of the exchange of print data with the PU 6 is as follows.

【0035】.先ず、前記(8)で述べたように、電
源投入後CPU5は特定領域21aの「0」番地を初期
化(「0」クリア)する。これにより、CPU6から印
字データの読み取り開始のための格納開始アドレスの読
出があっても、「0」が格納されていることから、CP
U6はまだ印字データが格納されていないことが分か
る。(格納開始アドレスは必ず「32」(「20H 」)
より大である。) .次に、CPU6も特定領域21aの「4,5」番地
を初期化(「0」クリア)する。これにより、CPU5
は全データ領域に文字データを格納後、2度目に文字デ
ータを格納する前に、この「4,5」番地の内容を確認
することにより、読出が終了したことを確認できる。読
出が完了していない場合には、文字データの格納を停止
する。
.. First, as described in (8) above, after the power is turned on, the CPU 5 initializes (clears "0") the address "0" of the specific area 21a. As a result, even if the CPU 6 reads the storage start address for starting the print data reading, since "0" is stored, the CP
It can be seen that print data is not yet stored in U6. (The storage start address must be "32"(" 20H ")
Is greater. ). Next, the CPU 6 also initializes (clears "0") the addresses "4,5" of the specific area 21a. As a result, the CPU5
After storing the character data in the entire data area and before storing the character data for the second time, it is possible to confirm that the reading is completed by checking the contents of the addresses "4,5". If the reading is not completed, the storage of the character data is stopped.

【0036】以上の,により、CPU5とCPU6
とのデータ授受が矛盾なく可能となる。 .CPU5はデータ領域22aに1文字(16ビッ
ト)づつ格納する。この時、前記(3)で述べたように
1文字(16ビット)格納する毎に「DACK」信号が
出力され、CPU6からのアクセスが可能となる。
Due to the above, the CPU 5 and the CPU 6
Data can be exchanged with and without conflict. . The CPU 5 stores each character (16 bits) in the data area 22a. At this time, as described in (3) above, a "DACK" signal is output every time one character (16 bits) is stored, and the CPU 6 can access it.

【0037】しかし、上記で述べたように、特定領域
21aの「0,1」番地が未だ「0」であることから、
CPU6はまだデータが格納完了されていないことが分
かる。
However, as described above, since the address "0,1" of the specific area 21a is still "0",
The CPU 6 knows that the data has not been stored yet.

【0038】.或る個数の文字を格納した時点で、C
PU5は特定領域21aの「2,3」番地に格納終了ア
ドレスを格納する。「0,1」番地は未だ「0」のまま
である。
.. When a certain number of characters are stored, C
The PU 5 stores the storage end address in the addresses "2, 3" of the specific area 21a. The address "0, 1" is still "0".

【0039】.最後に、CPU5は特定領域21aの
「0,1」番地に格納開始アドレスを格納する。これに
より、CPU6のアクセスが可能となる。 以上のような構成のプリンタコントローラ8aの動作を
タイムチャートを用いて、更に詳細に説明する。
.. Finally, the CPU 5 stores the storage start address in the address "0, 1" of the specific area 21a. As a result, the CPU 6 can be accessed. The operation of the printer controller 8a having the above configuration will be described in more detail with reference to a time chart.

【0040】図6は、従来技術のタイムチャート(その
1)であり、上記を示したものである。先ず、ホスト
7から印字データが送付されると、受信回路15はその
データを整列し(1ビットで受け取った場合には、16
ビットに組み立てる。)、CPU5に送付する。
FIG. 6 is a time chart (part 1) of the prior art, showing the above. First, when print data is sent from the host 7, the receiving circuit 15 aligns the data (16 bits if received in 1 bit).
Assemble into bits. ), And sends it to the CPU 5.

【0041】CPU5は、時刻「t1」で具体的な一つ
の文字、例えば「あ」のコードデータをバスA3を経由
して制御部1aに送付する。制御部1aは、その文字
「あ」のコードデータの格納を完了すると、時刻「t
2」で前記「DACK」信号を「Low」にし、時刻
「t3」で「High」にする。この「DACK」信号
の変化により、CPU5は時刻「t3」で1文字分のデ
ータ転送の処理より開放されて、次の文字の転送処理や
他の処理を行うことが可能となる。
The CPU 5 sends the code data of one specific character, for example, "A", to the control unit 1a via the bus A3 at time "t1". When the control unit 1a completes the storage of the code data of the character "a", the time "t"
The "DACK" signal is set to "Low" at "2" and set to "High" at time "t3". Due to this change in the "DACK" signal, the CPU 5 is released from the data transfer process for one character at time "t3", and can perform the transfer process for the next character and other processes.

【0042】CPU6が時刻「t3」以降、文字データ
を読み出す場合には、先ず特定領域21aのアドレスを
「0」を指定して、「データ格納開始アドレス」を読み
出し、その後「データ格納終了アドレス」を読出す。こ
の場合、読出アドレス「0」の情報はバスB4を経由し
て制御部11aに送付される。
When the CPU 6 reads the character data after the time "t3", first the address of the specific area 21a is designated "0", the "data storage start address" is read, and then the "data storage end address". Read out. In this case, the information of the read address "0" is sent to the control unit 11a via the bus B4.

【0043】時刻「t4」で特定領域21aの「0,
1」番地を指定して上記「データ格納開始アドレス」を
読出す。この場合バス幅が32ビットであることから、
32ビットのデータがCPU6に転送される。
At time "t4", "0," in the specific area 21a
The "1" address is designated and the "data storage start address" is read. In this case, since the bus width is 32 bits,
32-bit data is transferred to the CPU 6.

【0044】制御部1aは、32ビットのデータをCP
U6へ転送完了すると、時刻「t5」で前記「READ
Y」信号を「Low」にし、時刻「t6」で「Hig
h」にする。この「READY」信号の変化により、C
PU6は時刻「t6」でこれらデータ転送の処理より開
放されて、次の処理を行うことが可能となる。
The control unit 1a sends the 32-bit data to the CP
When the transfer to U6 is completed, at the time “t5”, the “READ
The "Y" signal is set to "Low", and "High" is set at time "t6".
h ”. By the change of this "READY" signal, C
The PU 6 is released from the data transfer processing at time “t6” and can perform the next processing.

【0045】CPU6は、その後読み取った特定領域2
1aの「0,1」番地の内容を調べ、「データ格納開始
アドレス」が「0」であることが分かり、未だ文字デー
タが格納されていないと判断する。
The CPU 6 uses the specific area 2 read thereafter.
The contents of the address "0, 1" of 1a are checked, it is found that the "data storage start address" is "0", and it is determined that character data is not yet stored.

【0046】尚、CPU6が時刻「t1」と時刻「t
2」との間でメモリ2aをアクセスしても、CPU5が
先にアクセスしていることから待ち状態になる。この場
合には、時刻「t3」でメモリ2aのアクセスが可能と
なり、データ転送パスが接続状態となり、データの転送
が開始される。
The CPU 6 determines that the time "t1" and the time "t".
Even if the memory 2a is accessed with "2", the CPU 5 is in the waiting state because the CPU 5 is accessing first. In this case, the memory 2a can be accessed at the time "t3", the data transfer path is brought into the connected state, and the data transfer is started.

【0047】図7は、従来技術のタイムチャート(その
2)であり、図6の場合よりも若干複雑になっている。
CPU5は、時刻「t11」でメモリ2aをアクセス開
始する。その後、CPU6は、時刻「t12」でメモリ
2aをアクセス開始するが、既にCPU5がメモリ2a
をアクセスしているため、制御部1bによりデータ転送
パスが切断状態となっており、共有メモリのアクセスは
抑止され、待ち状態となる。(前述(9)参照) 時刻「t14」でCPU5のメモリ2aのアクセス(デ
ータ転送)は完了し、CPU6はデータ転送パスが接続
され、待ち状態からデータ転送状態となる。
FIG. 7 is a time chart of the prior art (No. 2), which is slightly more complicated than that of FIG.
The CPU 5 starts accessing the memory 2a at time "t11". After that, the CPU 6 starts accessing the memory 2a at time "t12", but the CPU 5 has already started accessing the memory 2a.
, The data transfer path is disconnected by the control unit 1b, access to the shared memory is suppressed, and a standby state is set. (See (9) above) At time “t14”, the access (data transfer) of the memory 2a of the CPU 5 is completed, the CPU 6 is connected to the data transfer path, and the CPU 6 shifts from the wait state to the data transfer state.

【0048】CPU6がデータ転送状態となった後、時
刻「t15」でCPU5がメモリ2aをアクセス開始し
た場合には、今度はCPU5のメモリアクセスは抑止さ
れ、待ち状態となる。
When the CPU 5 starts to access the memory 2a at time "t15" after the CPU 6 has entered the data transfer state, the memory access of the CPU 5 is suppressed this time, and the CPU 5 enters the waiting state.

【0049】時刻「t17」でCPU6への32ビット
のデータ転送が完了すると、CPU5へのデータ転送が
開始される。以上説明したように、従来技術において
は、アドレス情報も文字情報も意味のある一かたまりの
データとしては16ビットであり、最低限16ビット単
位でアクセスすれば、処理は可能である。
When the 32-bit data transfer to the CPU 6 is completed at time "t17", the data transfer to the CPU 5 is started. As described above, in the related art, both the address information and the character information are 16 bits as a meaningful chunk of data, and the processing can be performed if at least 16 bits are accessed.

【0050】これを実現するために、一方のCPUが特
定領域21a或いはデータ領域22aの如何を問わず、
共有メモリ2aをアクセスしている場合には、他方のC
PUのメモリ2aのアクセスは抑止され、待ち状態とな
り(データ転送パスが切断状態)、処理完了信号「DA
CK」,「READY」の変化により他方のCPUの当
該共有メモリ2aのアクセスを可能としている。
In order to realize this, one CPU irrespective of whether it is the specific area 21a or the data area 22a,
When accessing the shared memory 2a, the other C
The access to the memory 2a of the PU is suppressed and the PU memory 2a enters the waiting state (the data transfer path is in the disconnected state), and the processing completion signal
The change of CK "and" READY "enables the other CPU to access the shared memory 2a.

【0051】[0051]

【発明が解決しようとする課題】前述したように、デー
タの構成(有意)ビット数pがデータ転送インタフェー
スのビット数m若しくはnよりも大きな場合、データの
授受が正確に行われないと言う問題が生ずる。(即ち、
MIN(m,n・・・)<p) 例えば、処理速度の高速化を図るために、メモリ2aの
容量を64KB以上に増大させた場合、そのアドレッシ
ング(番地付け)は16ビットでは不足することにな
る。メモリ2aの容量を128KBとすると、そのアド
レスを表示するビット数は少なくとも「17」となる。
つまり、「1+16」ビット必要となる。
As described above, when the data configuration (significant) number of bits p is larger than the number of bits m or n of the data transfer interface, the problem that data is not transmitted and received accurately. Occurs. (That is,
MIN (m, n ...) <p) For example, when the capacity of the memory 2a is increased to 64 KB or more in order to increase the processing speed, the addressing (addressing) is insufficient with 16 bits. become. When the capacity of the memory 2a is 128 KB, the number of bits for displaying the address is at least "17".
That is, "1 + 16" bits are required.

【0052】このような場合、アドレスを表示するビッ
ト数として「32」ビットを考えると、もしCPU5が
その32ビットのうちの上位或いは下位2バイト(16
ビット)を格納開始アドレスとして特定領域21aに格
納した時点で、CPU6がその格納開始アドレス2バイ
ト(16ビット)を含む4バイト(32ビット)をアク
セスした場合には、不正確なアドレス情報がCPU6に
取り込まれるという問題がある。
In this case, if "32" bits are considered as the number of bits for displaying the address, if the CPU 5 has the upper or lower 2 bytes (16 bytes) of the 32 bits,
If the CPU 6 accesses 4 bytes (32 bits) including 2 bytes (16 bits) of the storage start address at the time when the bit 6) is stored in the specific area 21a as the storage start address, incorrect address information is stored in the CPU 6 There is a problem that is taken into.

【0053】即ち、17ビットのうち「1」ビット若し
くは「16」ビットのみが取り込まれて不正確なアドレ
ス情報が転送されてしまう。本発明はこのような点にか
んがみて、CPU5が2バイト(16ビット)のデータ
を連続して2回共有メモリ2aに格納するまで、CPU
6が共有メモリ2aをアクセスすることを抑止する手段
を提供することを目的とする。
That is, of the 17 bits, only "1" or "16" bits are fetched and incorrect address information is transferred. In view of such a point, the present invention provides the CPU 5 until the CPU 5 continuously stores 2 bytes (16 bits) of data in the shared memory 2a twice.
It is an object of the present invention to provide a means for preventing 6 from accessing the shared memory 2a.

【0054】[0054]

【課題を解決するための手段】上記の課題は下記の如く
に構成された共有アクセス制御装置によって解決され
る。
The above problems can be solved by a shared access control device configured as follows.

【0055】図1は、本発明の原理図である。 (A).複数の処理装置5,6と、当該複数の処理装置
から共通にアクセスされる共有装置2と、当該複数の処
理装置5,6の当該共有装置2へのアクセスを制御する
制御部1とを有し、当該制御部1と当該各処理装置5,
6との間には各々データ転送インタフェース3,4が存
在し、当該各データ転送インタフェース3,4のうちの
或る一つのデータ転送インタフェース3のビット数をm
とし、当該mは各データ転送インタフェース3,4毎に
異なり得るものとし、当該共有装置2を介して当該複数
の処理装置間で授受されるデータの構成ビット数をpと
する共有アクセス制御装置において、当該制御部1にカ
ウント部12とウェイト部13とを設け、当該カウント
部12は、当該複数の処理装置のうちの或る一つの処理
装置a5が当該共有装置2をアクセスする際に連続する
アクセス回数Kを計数し、当該ウェイト部13は、当該
或る処理装置a5が当該共有装置2をアクセスしている
時、Kは正の整数であるとして前記計数値がK=p/m
(Kは正の整数)に達するまで、当該複数の処理装置の
うち他の処理装置b6の当該共有装置2へのアクセスを
排他制御するように構成する。
FIG. 1 shows the principle of the present invention. (A). It includes a plurality of processing devices 5, 6, a shared device 2 commonly accessed by the plurality of processing devices, and a control unit 1 for controlling access to the shared device 2 by the plurality of processing devices 5, 6. Then, the control unit 1 and the processing devices 5,
6, there are data transfer interfaces 3 and 4, respectively, and the number of bits of one of the data transfer interfaces 3 and 4 is m.
In the shared access control device, the m may be different for each of the data transfer interfaces 3 and 4, and the number of bits constituting the data transmitted and received between the plurality of processing devices via the shared device 2 is p. The control unit 1 is provided with a count unit 12 and a wait unit 13, and the count unit 12 continues when one processing device a5 of the plurality of processing devices accesses the shared device 2. The number of times of access K is counted, and when the certain processing device a5 is accessing the shared device 2, the wait unit 13 determines that K is a positive integer and the count value is K = p / m.
Until (K is a positive integer), the access to the shared device 2 of the other processing device b6 among the plurality of processing devices is exclusively controlled.

【0056】(B).前記(A)において、「商」は0
又は正の整数であるとしてp/m=「商」+「剰余」を
求める際に「剰余」が0でないときには、K=当該
「商」+1に達するまで、当該複数の処理装置のうち他
の処理装置b6の当該共有装置2へのアクセスを排他制
御するように構成する。
(B). In (A) above, the “quote” is 0
Alternatively, if p / m = “quotient” + “remainder” is not 0 when the p / m = “quotient” + “surplus” is determined to be a positive integer, then K = the “quotient” +1 is reached and other The processing device b6 is configured to exclusively control access to the shared device 2.

【0057】(C).前記(A)において、前記p/m
が2≦p/mであるような各処理装置(5,6)に対応
してカウント部12を複数個有するように構成する。 (D).前記(A),又は(B),又は(C)におい
て、「剰余」が0の時にはカウント部12の初期値を当
該「商」とし、「剰余」が0でない時にはカウント部1
2の初期値を当該「商」+1とし、当該或る処理装置a
5が当該共有装置2をアクセスする度にカウント部12
を「1」づつ減算し、当該カウント部12が0に達する
まで、当該複数の処理装置のうち他の処理装置b6の当
該共有装置2へのアクセスを排他制御するように構成す
る。
(C). In the above (A), the p / m
Is provided with a plurality of counting units 12 corresponding to the respective processing devices (5, 6) such that 2 ≦ p / m. (D). In the above (A), (B), or (C), when the "remainder" is 0, the initial value of the counting unit 12 is the "quotient", and when the "remainder" is not 0, the counting unit 1
The initial value of 2 is set to the “quotient” +1, and the certain processing device a
Each time 5 accesses the shared device 2, the counting unit 12
Is decremented by "1", and the access to the shared device 2 of the other processing device b6 of the plurality of processing devices is exclusively controlled until the count unit 12 reaches 0.

【0058】[0058]

【作用】即ち、上記のように構成することにより、ビッ
ト数がpであるデータが存在した場合に、第一の処理装
置がmビットのデータをM(M=1〜p/m(Mは正の
整数))回連続して共有装置2をアクセスし、pビット
のひとかたまりのデータを生成した後、第二の処理装置
は当該共有装置2をアクセス可能となる。
In other words, with the above configuration, when there is data having the number of bits p, the first processing device converts m-bit data to M (M = 1 to p / m (M is After accessing the shared device 2 consecutively for a positive integer)) times to generate a block of p-bit data, the second processing device can access the shared device 2.

【0059】同様に、第二の処理装置のデータ転送イン
タフェースのビット数nがpより小さい時には、第二の
処理装置がnビットのデータをN(N=1〜p/n(N
は正の整数))回連続して共有装置2をアクセスした
後、他の処理装置は当該共有装置2をアクセス可能とな
る。
Similarly, when the number of bits n of the data transfer interface of the second processing device is smaller than p, the second processing device converts n-bit data to N (N = 1 to p / n (N
Is a positive integer)) consecutively accessing the shared device 2, and then another processing device can access the shared device 2.

【0060】もし、p/mやp/nが割り切れない場合
には、連続してアクセスする回数KはK=1+p/m又
はK=1+p/nとする。また、m<nとしp=nの時
には、Kはデータ転送インタフェースのビット数の比K
=n/mとなる。
If p / m and p / n are not divisible, the number K of consecutive accesses is K = 1 + p / m or K = 1 + p / n. When m <n and p = n, K is the ratio K of the number of bits of the data transfer interface.
= N / m.

【0061】ウェイト部13と「DACK」信号や「R
EADY」信号との役割について述べる。前述したよう
に、或る特定処理装置からの一回のアクセスが完了(デ
ータ転送インタフェースのビット数の転送完了)する度
に「DACK」信号や「READY」信号が送付され
る。
The wait unit 13 and the "DACK" signal and "R"
The role of the "EADY" signal will be described. As described above, the "DACK" signal or the "READY" signal is sent every time one access from a certain specific processing device is completed (transfer of the number of bits of the data transfer interface is completed).

【0062】従来技術においては、このデータ転送完了
信号により、当該或る特定装置も含めて全装置からの共
有装置へのアクセスが可能となり、アクセスがあればア
クセスをした処理装置と当該共有装置との間のデータ転
送パスが接続状態となり、データ転送が開始されるので
ある。
In the prior art, this data transfer completion signal makes it possible for all devices including the certain specific device to access the shared device. If there is an access, the accessing processing device and the shared device can be accessed. The data transfer path between them becomes the connected state, and the data transfer is started.

【0063】本発明においては、当該共有装置をアクセ
スをした或る特定処理装置への一回のデータ転送が完了
する度に、従来と同様に「DACK」信号や「READ
Y」信号は送付されるが、制御部はウェイト部の信号に
より少なくともカウンタ部が所定の値に達するまで、他
の処理装置と当該共有装置との間のデータ転送パスの切
断状態を保持する。
In the present invention, every time one data transfer is completed to a certain specific processing apparatus that has accessed the shared device, the "DACK" signal and the "READ" signal are transferred as in the conventional case.
Although the "Y" signal is sent, the control unit holds the disconnection state of the data transfer path between the other processing device and the shared device until at least the counter unit reaches a predetermined value by the signal of the wait unit.

【0064】また、制御部はウェイト部の信号により少
なくともカウンタ部が所定の値に達するまで、当該或る
特定処理装置と当該共有装置との間のデータ転送パスの
接続状態を保持する。
Further, the control section holds the connection state of the data transfer path between the certain specific processing apparatus and the shared apparatus until at least the counter section reaches a predetermined value by the signal of the wait section.

【0065】カウンタ部が所定の値に達した後は、制御
部はより早く当該共有装置をアクセスをした処理装置と
の間のデータ転送パスを接続状態とし、他の処理装置と
当該共有装置との間のデータ転送パスを切断状態とす
る。
After the counter section reaches a predetermined value, the control section connects the data transfer path with the processing apparatus that has accessed the shared device earlier to connect the other processing apparatus and the shared apparatus. The data transfer path between them is disconnected.

【0066】このようにすることにより、共有装置を介
して複数のプロセッサ間でデータを授受する場合に、そ
のデータの内容を保証出来ることになる。
By doing so, when data is transferred between a plurality of processors via the shared device, the content of the data can be guaranteed.

【0067】[0067]

【実施例】以下に説明する実施例は、連続アクセス回数
の計数値KがK=2の場合であり、pが32ビット、m
が16ビットの第一の処理装置が共有メモリを2回連続
アクセスした後に、nが32ビットの第二の処理装置が
共有メモリをアクセス可能とする場合である。
The embodiment described below is for the case where the count value K of the number of consecutive accesses is K = 2, p is 32 bits, and m is
Is a case where the first processing device of 16 bits makes continuous access to the shared memory twice, and then the second processing device of n of 32 bits makes the shared memory accessible.

【0068】なお、本発明が適用されるのは各処理装置
が共有メモリの特定領域をアクセスする場合であって、
データ領域をアクセスする場合には従来技術が適用され
る。図2は、本発明の実施例構成図であり、従来技術の
項で説明した図8のプリンタコントローラに本発明を適
用したものである。従来技術と同様に、第一のCPU5
と制御部1aとのインタフェースのビット数は16ビッ
トのバス3であり、第二のCPU6と制御部1aとのイ
ンタフェースのビット数は32ビットのバス4のマルチ
プロセッサ構成となっている。
The present invention is applied when each processing device accesses a specific area of the shared memory.
Conventional techniques are applied when accessing the data area. FIG. 2 is a block diagram of an embodiment of the present invention, in which the present invention is applied to the printer controller of FIG. 8 described in the section of the prior art. Similar to the prior art, the first CPU 5
The number of bits of the interface between the control unit 1a and the control unit 1a is 16 bits, and the number of bits of the interface between the second CPU 6 and the control unit 1a is 32 bits.

【0069】また、共有メモリ2は多ポートメモリで構
成しても本発明の実施は勿論可能である。図2におい
て、8はプリンタコントローラ、1は共有メモリアクセ
ス制御部、2は共有メモリである。その他の構成要素は
図8と同一であるから省略する。
Further, even if the shared memory 2 is composed of a multi-port memory, the present invention can of course be implemented. In FIG. 2, 8 is a printer controller, 1 is a shared memory access control unit, and 2 is a shared memory. The other components are the same as those in FIG.

【0070】共有メモリアクセス制御部1に、カウント
部12とウエイト部13とが設けられている。共有メモ
リ2は容量が128KBで、特定領域21と、データ領
域22とから構成されている。従って、共有メモリ2の
アドレッシングには少なくとも17ビット必要となる。
ここでは、このアドレス情報として32ビットを考え
る。
The shared memory access control unit 1 is provided with a count unit 12 and a wait unit 13. The shared memory 2 has a capacity of 128 KB and includes a specific area 21 and a data area 22. Therefore, at least 17 bits are required for addressing the shared memory 2.
Here, 32 bits are considered as this address information.

【0071】特定領域21の容量は32B(バイト)で
あり、アドレスは0〜31とする。また、データ領域2
2のアドレスは32〜131071とする。(容量は1
28KB─32Bである。)図3は、本発明における特
定領域のデータ例であり、各CPUのアクセス開始・終
了アドレスが格納されている状況を示している。上記に
述べたようにアドレッシングには17ビット必要である
ことから、各アクセス開始・終了アドレスを格納する容
量として、4バイト(32ビット)を割り当てている。
The capacity of the specific area 21 is 32 B (bytes), and the addresses are 0 to 31. Also, data area 2
Address 2 is 32 to 131071. (Capacity is 1
28KB-32B. FIG. 3 is an example of data of a specific area in the present invention, and shows a situation in which the access start / end addresses of each CPU are stored. Since 17 bits are required for addressing as described above, 4 bytes (32 bits) are allocated as the capacity for storing each access start / end address.

【0072】図4は、本発明におけるデータ領域のデー
タ例であり、一文字当たりのデータは16ビットである
から、各文字に2バイト(16ビット)を割り当ててい
る状況を示している。この図は従来技術と同様である。
FIG. 4 shows an example of data in the data area according to the present invention. Since each character has 16 bits of data, 2 bytes (16 bits) are assigned to each character. This figure is similar to the prior art.

【0073】図5は、本発明のタイムチャートであり、
本発明が適用された場合の各回路・装置の動作を示して
いる。これら図2,3,4,5を用いて以下に本発明を
説明する。
FIG. 5 is a time chart of the present invention.
The operation of each circuit / device when the present invention is applied is shown. The present invention will be described below with reference to FIGS.

【0074】前述したようにCPU5の共有メモリ2の
アクセスアドレス情報は24ビットのアドレスバス31
を用いて送付されるが、特定領域21の32バイトをア
クセスするときのアドレス情報は「A00000H 」〜
「A0001FH 」である。当然データ領域のアドレス
情報は「A00020H 」〜「A1FFFFH 」であ
る。
As described above, the access address information of the shared memory 2 of the CPU 5 is the 24-bit address bus 31.
The address information when accessing 32 bytes of the specific area 21 is "A00000 H " ~
It is "A0001F H ". Address information of the course data area is "A00020 H" - "A1FFFF H".

【0075】CPU6の共有メモリ2のアクセスアドレ
ス情報は32ビットのバスB4を用いて送付されるが、
CPU6が特定領域21の32ビットをアクセスすると
きのアドレス情報は「C0000000H 」〜「C00
0001FH 」であり、当然データ領域のアドレス情報
は「C0000020H 」〜「C001FFFFH 」で
ある。
The access address information of the shared memory 2 of the CPU 6 is sent using the 32-bit bus B4.
Address information when CPU6 accesses a 32 bit particular region 21 "C0000000 H" - "C00
0001F H ”, and naturally the address information of the data area is“ C0000020 H ”to“ C001FFFF H ”.

【0076】このようにすることにより、制御部1が各
アドレス情報の最上位4ビットをデコードすることによ
り、そのデコード結果が「AH 」や「CH 」であれば、
メモリ2がアクセスされていることが分かり、中間の6
〜17ビットが「0」であれば特定領域21がアクセス
されていることが分かり、中間の6〜17ビットが
「0」でなければデータ領域22がアクセスされている
ことが判明する。
By doing so, the control unit 1 decodes the most significant 4 bits of each address information, and if the decoding result is "A H " or "C H ",
It can be seen that the memory 2 is being accessed, and the middle 6
If ~ 17 bits are "0", it is known that the specific area 21 is being accessed, and if the middle 6 to 17 bits are not "0", it is clear that the data area 22 is being accessed.

【0077】また、当然のことではあるが、最上位4ビ
ットが「AH 」や「CH 」でなければ各バスに接続され
ている他の回路や装置がアクセスされていることにな
る。図5において、CPU5が時刻「t21」で、アド
レス「A00000H 」を指定して、データ「0000
H 」を転送したとする。共有メモリアクセス制御部1で
はアドレスデータの最上位4ビットが「AH 」であるこ
とから、カウンタ部12のカウンタをリセットする。
As a matter of course, if the most significant 4 bits are not "A H " or "C H ", it means that another circuit or device connected to each bus is being accessed. In FIG. 5, the CPU 5 designates the address “A00000 H ” at time “t21” and sets the data “0000”.
Suppose you have transferred " H ". In the shared memory access control unit 1, since the most significant 4 bits of the address data are "A H ", the counter of the counter unit 12 is reset.

【0078】制御部1は、共有メモリ2とCPU5との
間のデータ転送パスを接続状態にし、共有メモリ2とC
PU6との間のデータ転送パスを切断状態にする。その
後、CPU6が時刻「t22」で特定領域21をアクセ
スしても、上記ウエイト部13によりデータ転送パスは
切断状態に保持されたままであるから、データ転送は抑
止される。
The control unit 1 sets the data transfer path between the shared memory 2 and the CPU 5 to the connected state, and the shared memory 2 and the C
The data transfer path with the PU 6 is disconnected. After that, even if the CPU 6 accesses the specific area 21 at time “t22”, the data transfer path is still held in the disconnected state by the wait unit 13, so that the data transfer is suppressed.

【0079】「DACK」信号が「High」─「Lo
w」─「High」と変化することにより、カウンタ部
のカウンタは時刻「t24」でカウントアップし、値は
「1」となる。
When the "DACK" signal is "High"-"Lo"
By changing from “w” to “High”, the counter of the counter unit counts up at time “t24”, and the value becomes “1”.

【0080】続いて、CPU5が時刻「t25」で、ア
ドレス「A00002H 」を指定して、データ「002
H 」を転送する。「DACK」信号が「High」─
「Low」─「High」と変化することにより、カウ
ンタ部のカウンタは時刻「t27」でカウントアップ
し、値は「2」となる。
Subsequently, the CPU 5 designates the address "A00002 H " at the time "t25" and sets the data "002".
0 H ”is transmitted. "DACK" signal is "High"-
By changing from “Low” to “High”, the counter of the counter unit counts up at time “t27”, and the value becomes “2”.

【0081】カウンタの値が「2」となったことによ
り、ウエイト部13は時刻「t27」でウエイト信号を
「High」─「Low」とし、CPU6がメモリ2を
アクセスすることを可能とする。
Since the value of the counter becomes "2", the wait unit 13 sets the wait signal to "High"-"Low" at the time "t27", and the CPU 6 can access the memory 2.

【0082】つまり、時刻「t22」で既にCPU6か
ら制御部1にバスB4を用いてアドレス情報が転送され
ており、当該アドレス情報はデコードされているから、
制御部1はCPU6と共有メモリ2との間のデータ転送
パスを時刻「t27」で接続状態にし、データ転送を開
始する。
That is, at time "t22", the address information has already been transferred from the CPU 6 to the control unit 1 using the bus B4, and the address information has been decoded.
The control unit 1 sets the data transfer path between the CPU 6 and the shared memory 2 to the connection state at time “t27”, and starts the data transfer.

【0083】メモリ2からCPU6へのデータ転送が完
了すると「READY」信号が「High」─「Lo
w」─「High」と変化する。但し、CPU6が時刻
「t22」でデータ領域22をアクセスした場合には、
「DACK」信号が変化する時刻「t24」までは、C
PU6は待ち状態となるが、時刻「t24」以降はデー
タ領域22のアクセスは可能となる。データ領域をアク
セスする場合には、一かたまりの(意味のある)データ
が16ビット単位であることから、前記従来技術で説明
したようにウエイト部13とは無関係に、制御部1はC
PU5又はCPU6とデータ領域22との間のデータ転
送パスを接続状態にし、アクセスを可能にする。
When the data transfer from the memory 2 to the CPU 6 is completed, the "READY" signal changes from "High" to "Lo".
w ”-“ High ”. However, when the CPU 6 accesses the data area 22 at time “t22”,
Until the time "t24" when the "DACK" signal changes, C
Although the PU 6 is in the waiting state, the data area 22 can be accessed after the time “t24”. When a data area is accessed, since a group of (meaningful) data is in units of 16 bits, the control unit 1 can control the C unit irrespective of the wait unit 13 as described in the prior art.
The data transfer path between the PU 5 or CPU 6 and the data area 22 is set in the connected state to enable access.

【0084】つまり、CPU5が特定領域21をアクセ
スした時のみ、ウエイト信号は有効となる。前述したよ
うに、特定領域21のアクセスかどうかは、アクセスア
ドレス情報の中間の6〜17ビットをデコードすれば容
易に判明する。
In other words, the wait signal is valid only when the CPU 5 accesses the specific area 21. As described above, whether or not the specific area 21 is accessed can be easily determined by decoding the middle 6 to 17 bits of the access address information.

【0085】以上は、mが16ビットのCPUとnが3
2ビットのCPUとがら構成されるマルチプロセッサ構
成のシステムにおいて、データの構成ビット数pが32
ビットの時の処理に関する説明であるが、さらに第三の
処理装置として接続インタフェースが64ビットのCP
Uが制御部1aに接続されても状況は同じである。
In the above, m is a 16-bit CPU and n is 3
In a multiprocessor system composed of a 2-bit CPU, the number p of data bits is 32.
As for the processing in the case of a bit, a CP having a 64-bit connection interface is further provided as a third processing device.
The situation is the same even if U is connected to the control unit 1a.

【0086】この場合には、pが64ビットの時には、
mが16ビットのCPUが4回連続して共有メモリをア
クセス完了するまで他のCPUの当該共有メモリのアク
セスは抑止されることになる。当然のことながら、イン
タフェースが32ビットのCPUが2回連続して共有メ
モリのアクセスを完了するまで他のCPUの当該共有メ
モリのアクセスは抑止されることになる。
In this case, when p is 64 bits,
Until the CPU whose m is 16 bits completes the access to the shared memory four times in succession, the access to the shared memory by other CPUs is suppressed. As a matter of course, until the CPU having an interface of 32 bits completes the access to the shared memory twice in succession, the access to the shared memory of the other CPU is suppressed.

【0087】pが32ビットの時には、インタフェース
が16ビットのCPUが2回連続して共有メモリのアク
セスが完了するまで他のCPUの当該メモリのアクセス
は抑止されることになる。
When p is 32 bits, access to the shared memory by other CPUs is inhibited until the CPU having the 16-bit interface completes the access to the shared memory twice in succession.

【0088】又、各処理装置に対応してカウント部とウ
ェイト部とを設け、制御部は各処理装置から連続アクセ
ス回数Kを、或いはデータの有意ビット数pを初期値と
して受け取り、それ以後のアクセスの抑止の制御にこの
値を使用するような装置とすることも可能である。
Further, a count unit and a wait unit are provided corresponding to each processing device, and the control unit receives the number of consecutive accesses K or the significant bit number p of data as an initial value from each processing device, and thereafter. It is possible to use a device that uses this value to control access inhibition.

【0089】上記説明においては、pの値は予め約束事
(仕様)としたが、データ転送に先立ってパラメータと
して各処理装置から制御部に送付してもよい。以上、デ
ータの構成ビット数pが数バイトのケースについて説明
したが、このpは数十〜数十KBであっても、カウンタ
部12の計数値Kが大きくなるだけであり、本発明の一
般性は失われない。
In the above description, the value of p is a convention (specification) in advance, but it may be sent as a parameter from each processing device to the control unit prior to data transfer. The case where the number p of bits constituting the data is several bytes has been described above. However, even if the number p is several tens to several tens of KB, the count value K of the counter unit 12 only increases, and the general case of the present invention. The sex is not lost.

【0090】[0090]

【発明の効果】以上の説明から明らかなように本発明に
よれば、共有装置をアクセス制御する制御部にカウント
部とウェイト部とを設けることにより、その共有装置に
接続されている複数の処理装置のうちの一つの処理装置
からその共有装置に有意のビット数のデータアクセスが
完了するまで、他の処理装置からその共有装置へのアク
セスを抑止することにより、効率よく、又、矛盾無く共
有装置を経由してデータ処理が行えるという効果があ
る。
As is apparent from the above description, according to the present invention, a control unit for controlling access to a shared device is provided with a count unit and a wait unit, so that a plurality of processes connected to the shared device can be processed. Efficient and consistent sharing by inhibiting access to the shared device from other processing devices until data access with a significant number of bits from one of the processing devices to the shared device is completed. There is an effect that data processing can be performed via the device.

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

【図1】 本発明の原理図FIG. 1 is a principle diagram of the present invention.

【図2】 本発明の実施例の構成図FIG. 2 is a configuration diagram of an embodiment of the present invention.

【図3】 本発明における特定領域のデータ例FIG. 3 is a data example of a specific area in the present invention.

【図4】 本発明におけるデータ領域のデータ例FIG. 4 is an example of data in a data area according to the present invention.

【図5】 本発明のタイムチャートFIG. 5 is a time chart of the invention.

【図6】 従来技術のタイムチャート(その1)FIG. 6 is a time chart of the related art (No. 1)

【図7】 従来技術のタイムチャート(その2)FIG. 7 is a time chart of the related art (No. 2)

【図8】 従来のメモリアクセス装置適用例FIG. 8 is an example of application of a conventional memory access device.

【図9】 従来の特定領域のデータ例FIG. 9: Example of data of a conventional specific area

【図10】 従来のデータ領域のデータ例FIG. 10: Data example of conventional data area

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

1,1a, 共有メモリアクセス制御部 2,2a 共有メモリ 3 データ転送バスA 4
データ転送バスB 5 第一の処理装置 6
第二の処理装置 7 ホスト 8,8a プリンタコントローラ 12 カウント部 13
ウェイト部 15 受信回路 16
ビットマップメモリ 17 CGメモリ 18
描画回路 19 プリンタ 30,4
0,50 制御信号線 60 信号線 31
アドレスバス 21,21a 特定領域 22,22
a データ領域
1, 1a, shared memory access control unit 2, 2a shared memory 3 data transfer bus A 4
Data transfer bus B 5 First processing unit 6
Second processing device 7 Host 8, 8a Printer controller 12 Counting unit 13
Weight unit 15 Receiver circuit 16
Bitmap memory 17 CG memory 18
Drawing circuit 19 Printer 30, 4
0,50 Control signal line 60 Signal line 31
Address bus 21,21a Specific area 22,22
a Data area

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 複数の処理装置(5,6)と、 当該複数の処理装置から共通にアクセスされる共有装置
(2)と、 当該複数の処理装置(5,6)の当該共有装置(2)へ
のアクセスを制御する制御部(1)とを有し、 当該制御部(1)と当該各処理装置(5,6)との間に
は各々データ転送インタフェース(3,4)が存在し、 当該各データ転送インタフェースのうちの或る一つのデ
ータ転送インタフェース(3)のビット数をmとし、 当該mの値は各データ転送インタフェース(3,4)毎
に異なり得るものとし、 当該共有装置(2)を介して当該複数の処理装置(5,
6)間で授受されるデータの構成ビット数をpとする共
有アクセス制御装置において、 当該制御部(1)にカウント部(12)とウェイト部
(13)とを設け、 当該カウント部(12)は、当該複数の処理装置のうち
の或る一つの処理装置a(5)が当該共有装置(2)を
アクセスする際に連続するアクセス回数Kを計数し、 当該ウェイト部(13)は、当該或る処理装置a(5)
が当該共有装置(2)をアクセスしている時、Kは正の
整数であるとして前記計数値がK=p/mに達するま
で、 当該複数の処理装置のうち他の処理装置b(6)の当該
共有装置(2)へのアクセスを排他制御することを特徴
とする共有アクセス制御装置。
1. A plurality of processing devices (5, 6), a shared device (2) commonly accessed by the plurality of processing devices, and a shared device (2) of the plurality of processing devices (5, 6). ), And a data transfer interface (3, 4) exists between the control unit (1) and each processing device (5, 6). , The number of bits of one of the data transfer interfaces (3) is m, and the value of the m may be different for each data transfer interface (3, 4). Through (2), the plurality of processing devices (5,
6) In a shared access control device in which the number of constituent bits of data transmitted and received between p and p is p, the control unit (1) is provided with a count unit (12) and a wait unit (13), and the count unit (12) is provided. Counts the number of consecutive accesses K when one processing device a (5) of the plurality of processing devices accesses the shared device (2), and the wait unit (13) Certain processing device a (5)
Is accessing the shared device (2), it is assumed that K is a positive integer and the other processing device b (6) among the plurality of processing devices until the count value reaches K = p / m. A shared access control device, which exclusively controls access to the shared device (2).
【請求項2】 前記請求項1において、「商」は0又は
正の整数であるとしてp/m=「商」+「剰余」を求め
る際に「剰余」が0でないときには、K=当該「商」+
1に達するまで、 当該複数の処理装置のうち他の処理装置b(6)の当該
共有装置(2)へのアクセスを排他制御することを特徴
とする共有アクセス制御装置。
2. In claim 1, when “quotient” is 0 or a positive integer, p / m = “quotient” + “remainder” is not K when the “remainder” is not 0. Quotient "+
A shared access control device, which exclusively controls access to the shared device (2) of another processing device b (6) among the plurality of processing devices until reaching 1.
【請求項3】 前記請求項1において、前記p/mが2
≦p/mであるような各処理装置(5,6)に対応して
カウント部12を複数個有することを特徴とする共有ア
クセス制御装置。
3. The p / m according to claim 1, wherein the p / m is 2
A shared access control device having a plurality of counting units 12 corresponding to the respective processing devices (5, 6) such that ≦ p / m.
【請求項4】 前記請求項1,又は前記請求項2,又は
前記請求項3において、「剰余」が0の時にはカウント
部(12)の初期値を当該「商」とし、「剰余」が0で
ない時にはカウント部(12)の初期値を当該「商」+
1とし、 当該或る処理装置a(5)が当該共有装置(2)をアク
セスする度にカウント部(12)を「1」づつ減算し、
当該カウント部(12)が0に達するまで、 当該複数の処理装置のうち他の処理装置b(6)の当該
共有装置(2)へのアクセスを排他制御することを特徴
とする共有アクセス制御装置。
4. In the claim 1, the claim 2, or the claim 3, when the “remainder” is 0, the initial value of the counting unit (12) is set to the “quotient”, and the “remainder” is 0. If not, the initial value of the count section (12) is set to the “quotient” +
1, and each time the processing device a (5) accesses the sharing device (2), the count unit (12) is decremented by "1",
A shared access control device, which exclusively controls access to the shared device (2) of another processing device b (6) among the plurality of processing devices until the count unit (12) reaches 0. .
JP22271593A 1993-09-08 1993-09-08 Shared access control device Pending JPH0778103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22271593A JPH0778103A (en) 1993-09-08 1993-09-08 Shared access control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22271593A JPH0778103A (en) 1993-09-08 1993-09-08 Shared access control device

Publications (1)

Publication Number Publication Date
JPH0778103A true JPH0778103A (en) 1995-03-20

Family

ID=16786776

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22271593A Pending JPH0778103A (en) 1993-09-08 1993-09-08 Shared access control device

Country Status (1)

Country Link
JP (1) JPH0778103A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020065712A (en) * 2001-02-07 2002-08-14 삼성전자 주식회사 Device access method and apparatus
US6684278B1 (en) 1999-07-16 2004-01-27 Mitsubishi Denki Kabushiki Kaisha Microcomputer and memory access control method
JP2008117002A (en) * 2006-10-31 2008-05-22 Matsushita Electric Works Ltd Shared memory interface
JP2008292542A (en) * 2007-05-22 2008-12-04 Nec Electronics Corp Image processor and image processing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6684278B1 (en) 1999-07-16 2004-01-27 Mitsubishi Denki Kabushiki Kaisha Microcomputer and memory access control method
KR20020065712A (en) * 2001-02-07 2002-08-14 삼성전자 주식회사 Device access method and apparatus
JP2008117002A (en) * 2006-10-31 2008-05-22 Matsushita Electric Works Ltd Shared memory interface
JP2008292542A (en) * 2007-05-22 2008-12-04 Nec Electronics Corp Image processor and image processing method

Similar Documents

Publication Publication Date Title
US6078977A (en) Hierarchical bus structure access system
US7916750B2 (en) Transaction layer packet compression
JPH02541A (en) Device for assembling image data word
JPH1091572A (en) Data transfer method and data transfer device using the method
EP0464848B1 (en) Structure for enabling direct memory-to-memory transfer
JPH0792782B2 (en) Processing execution system
US5872940A (en) Programmable read/write access signal and method therefor
US6725292B2 (en) Direct memory access controller for circular buffers
JPH0778103A (en) Shared access control device
EP0797148A1 (en) Multi-mode cache structure
US6148350A (en) System for allocating an integer unit of memory greater than a requested size and filling the extra space due to difference in sizes with extraneous data
US8219736B2 (en) Method and apparatus for a data bridge in a computer system
JPS6341163A (en) Printing apparatus
JP2003309564A (en) Microcomputer system and transceiver used therefor
US6025855A (en) Store double word and status word write graphics primitives
US20020143967A1 (en) Bit-granular writes of control registers
JP3216965B2 (en) Data receiving apparatus, method, and system
JPS60178570A (en) Data receiver
JP2002215562A (en) Unit and method for dma control
US6430647B1 (en) Data processing system for use in conjunction with a font card or the like
CN116610601A (en) Data transmission device, control method and device thereof, and medium
JPH04359350A (en) Register control device for workstation integrating means
JP2574821B2 (en) Direct memory access controller
JPS59123913A (en) Dma access system
JPH04308954A (en) Dmac compatible processor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20020723