JPH08305431A - Memory access system - Google Patents

Memory access system

Info

Publication number
JPH08305431A
JPH08305431A JP10501695A JP10501695A JPH08305431A JP H08305431 A JPH08305431 A JP H08305431A JP 10501695 A JP10501695 A JP 10501695A JP 10501695 A JP10501695 A JP 10501695A JP H08305431 A JPH08305431 A JP H08305431A
Authority
JP
Japan
Prior art keywords
data
read
address
read request
request
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
JP10501695A
Other languages
Japanese (ja)
Inventor
Jiro Kinoshita
木下次朗
Yoshiyuki Kubo
久保義幸
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.)
Fanuc Corp
Original Assignee
Fanuc Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fanuc Corp filed Critical Fanuc Corp
Priority to JP10501695A priority Critical patent/JPH08305431A/en
Publication of JPH08305431A publication Critical patent/JPH08305431A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To accelerate read access from a master unit to the memory of a slave unit. CONSTITUTION: A read request is inputted to a read request transmitting means 1a. The read request transmitting means 1a discriminates whether the address of that read request is continued to the address of the last read request or not. When the address is not continued, that read request is transmitted to a slave unit 2 but when the address is continued, an address match signal is outputted to a read data control means 1b. A memory access control means 2a transmits the first data of the address shown by the read request and the second data of the next address to a master unit 1. The read data control means 1b transfers the first data as read data and stores the second data in a buffer 1ba. When the read request is further outputted to the continued address in such a state and the address match signal is inputted to the read data control means 1b, the second data in the buffer 1ba are transferred.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はマスタユニットとスレー
ブユニットとが伝送線路を介して接続されたシステムの
メモリアクセス方式に関し、特にマスタユニットからス
レーブユニット内のメモリへ直接アクセスすることがで
きるシステムのメモリアクセス方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory access system for a system in which a master unit and a slave unit are connected via a transmission line, and more particularly to a system memory in which the master unit can directly access the memory in the slave unit. Regarding access method.

【0002】[0002]

【従来の技術】数値制御システムには、数値制御装置
(CNC)と、対話形でデータの入出力を行いそのデー
タを処理するマンマシンコントローラ(MMC)とが設
けられている。MMCには、キーボードやマウスによる
入力装置や、CRTや液晶ディスプレイによる表示装置
等の各種装置が設けられている。
2. Description of the Related Art A numerical control system is provided with a numerical control unit (CNC) and a man-machine controller (MMC) which interactively inputs and outputs data and processes the data. The MMC is provided with various devices such as an input device using a keyboard and a mouse and a display device using a CRT or a liquid crystal display.

【0003】そして、多くの場合はCNCとMMCとは
1つの筐体内に設けられ、パラレルバスによってお互い
が接続されていた。ところが、MMCをCNCと離れた
場所に設置できれば、MMCを作業者の作業し易い場所
に設置し作業効率をあげることができる。そのため、M
MCとCNCを長い伝送線路で接続したいという要求が
あった。しかも、長い伝送線路を介しながらも一方から
他方のメモリへ直接アクセスできることが望まれてい
た。
In many cases, the CNC and MMC are provided in one housing and are connected to each other by a parallel bus. However, if the MMC can be installed in a place apart from the CNC, the MMC can be installed in a place where an operator can easily work, thereby improving work efficiency. Therefore, M
There was a demand to connect the MC and CNC with a long transmission line. Moreover, it has been desired that one memory can be directly accessed to the other memory through a long transmission line.

【0004】そこで、従来はMMCをマスタユニット、
CNCをスレーブユニットとし、高速の伝送線路により
互いに接続することにより、MMCからCNC内のコモ
ンRAMに対する直接のアクセスを可能にしていた。こ
の場合、MMC側のCPUは、MMC内部のメモリにア
クセスするのと同様にメモリアクセス要求を出力する。
このメモリアクセス要求はシリアル通信によりCNCに
転送される。CNC側では、MMC側からのメモリアク
セス要求を受け取るとコモンRAMに対してDMA(ダ
イレクトメモリアクセス)を行う。アクセス要求がリー
ド要求であれば該当するデータをMMCに対し送信す
る。この様な例として本出願人は特願平6−86331
号を出願している。
Therefore, conventionally, the MMC is a master unit,
By using the CNC as a slave unit and connecting them to each other through a high-speed transmission line, the MMC can directly access the common RAM in the CNC. In this case, the CPU on the MMC side outputs a memory access request in the same manner as accessing the memory inside the MMC.
This memory access request is transferred to the CNC by serial communication. When the CNC side receives the memory access request from the MMC side, it performs DMA (direct memory access) to the common RAM. If the access request is a read request, the corresponding data is transmitted to the MMC. As an example of this, the present applicant has filed Japanese Patent Application No. 6-86331.
No. has been filed.

【0005】このようにして、MMCは、CNC内のC
PUの処理を介すことなく、CNC内のメモリに直接ア
クセスすることができる。
In this way, the MMC is the C in the CNC.
It is possible to directly access the memory in the CNC without going through the processing of the PU.

【0006】[0006]

【発明が解決しようとする課題】ところで、上記のよう
なメモリアクセス方式において、スレーブユニット側の
RAMへライトを行う場合には、マスタユニット側のシ
リアルバスコントローラに設けられたレジスタにライト
すべきデータを格納した時点で、マスタユニット側のラ
イトサイクルを終了させる。その結果、ライトサイクル
はローカルバスに接続されたメモリに対するアクセスと
同様に高速に行われ、マスタユニット側のCPUは直ぐ
に次の処理を行うことができる。
By the way, in the above memory access method, when writing to the RAM on the slave unit side, the data to be written to the register provided on the serial bus controller on the master unit side. The write cycle on the master unit side is ended when is stored. As a result, the write cycle is performed at the same high speed as the access to the memory connected to the local bus, and the CPU on the master unit side can immediately perform the next processing.

【0007】しかし、リードサイクルの場合には、マス
タユニット側から出力されたリード要求がスレーブユニ
ット側に到達し、スレーブユニット側から目的のデータ
が届くまでマスタユニット側のCPUは待たされる。こ
の間、マスタユニット側のCPUは他の処理を行うこと
ができない。従って、全体のデータ処理速度が遅くなっ
てしまうという問題点があった。
However, in the case of the read cycle, the CPU on the master unit side waits until the read request output from the master unit side reaches the slave unit side and the target data arrives from the slave unit side. During this time, the CPU on the master unit side cannot perform other processing. Therefore, there is a problem that the overall data processing speed becomes slow.

【0008】本発明はこのような点に鑑みてなされたも
のであり、マスタユニットからスレーブユニットのメモ
リに対するリードアクセスを高速に行うことができるメ
モリアクセス方式を提供することを目的とする。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a memory access system capable of performing a high-speed read access from a master unit to a memory of a slave unit.

【0009】[0009]

【課題を解決するための手段】本発明では上記課題を解
決するために、マスタユニットとスレーブユニットとが
伝送線路を介して接続されたシステムのメモリアクセス
方式において、前記マスタユニット内に設けられ、前記
スレーブユニット内のメモリの任意のアドレスに対する
リード要求を前記伝送線路を介して送信するリード要求
送信手段と、前記スレーブユニット内に設けられ、前記
リード要求を受け取ると、要求された前記アドレスの第
1のデータ、及び前記アドレスの次のアドレスの第2の
データを前記マスタユニットに対して送信するメモリア
クセス制御手段と、を有することを特徴とするメモリア
クセス方式が提供される。
According to the present invention, in order to solve the above problems, in a memory access system of a system in which a master unit and a slave unit are connected via a transmission line, the master unit and the slave unit are provided in the master unit. Read request transmitting means for transmitting a read request to an arbitrary address of the memory in the slave unit via the transmission line; and a read request transmission unit provided in the slave unit, which receives the read request And a memory access control means for transmitting second data at an address next to the address to the master unit.

【0010】また、マスタユニットとスレーブユニット
とが伝送線路を介して接続されたシステムのメモリアク
セス方式において、前記マスタユニット内に設けられ、
前記スレーブユニット内のメモリの任意のアドレスに対
するリード要求が前回アクセスしたデータと連続したデ
ータを要求しているかどうかを判別し、連続したデータ
を要求している場合にはアドレス合致信号を出力し、連
続でないデータを要求している場合には前記リード要求
を前記伝送線路を介して送信するリード要求送信手段
と、前記スレーブユニット内に設けられ、前記リード要
求を受け取ると、要求された前記アドレスの第1のデー
タ、及び前記アドレスの次のアドレスの第2のデータを
前記伝送線路を介して送信するメモリアクセス制御手段
と、前記マスタユニット内に設けられ、受け取った前記
第1のデータを前記リード要求を出力した装置に転送す
るとともに前記第2のデータをバッファ内に格納し、前
記アドレス合致信号が出力された際には、前記バッファ
内の前記第2のデータを前記リード要求を出力した装置
に転送するリードデータ制御手段とを有することを特徴
とするメモリアクセス方式が提供される。
Further, in a memory access system of a system in which a master unit and a slave unit are connected via a transmission line, the master unit and the slave unit are provided in the master unit,
It is determined whether or not a read request to any address of the memory in the slave unit requests continuous data with previously accessed data, and if continuous data is requested, an address match signal is output, When requesting non-continuous data, the read request transmission means for transmitting the read request via the transmission line, and the slave unit provided in the slave unit, and when the read request is received, the requested address Memory access control means for transmitting first data and second data at an address next to the address via the transmission line, and read the first data received in the master unit. Transfer the request to the device that has output the request, store the second data in a buffer, and store the address match signal. When the output is a memory access method; and a read data control means for transferring said second data in the buffer to the device which has output the read request is provided.

【0011】[0011]

【作用】マスタユニット内に設けられたリード要求送信
手段は、スレーブユニット内のメモリの任意のアドレス
に対するリード要求を伝送線路を介して送信する。スレ
ーブユニット内に設けられたメモリアクセス制御手段
は、リード要求を受け取ると、要求されたアドレスの第
1のデータ及びその次のアドレスの第2のデータをマス
タユニットに対して送信する。
The read request sending means provided in the master unit sends a read request to an arbitrary address of the memory in the slave unit via the transmission line. Upon receiving the read request, the memory access control means provided in the slave unit transmits the first data at the requested address and the second data at the next address to the master unit.

【0012】また、マスタユニット内に設けられたリー
ド要求送信手段は、スレーブユニット内のメモリの任意
のアドレスに対するリード要求が前回アクセスしたデー
タと連続したデータを要求しているかどうかを判別し、
連続したデータを要求している場合にはアドレス合致信
号を出力し、連続でないデータを要求している場合には
リード要求を伝送線路を介して送信する。スレーブユニ
ット内に設けられたメモリアクセス制御手段は、リード
要求を受け取ると、要求されたアドレスの第1のデー
タ、及びその次のアドレスの第2のデータを伝送線路を
介して送信する。マスタユニット内に設けられたリード
データ制御手段は、受け取った第1のデータをリード要
求を出力した装置に転送するとともに、第2のデータを
バッファ内に格納し、アドレス合致信号が出力された際
には、バッファ内の第2のデータをリード要求を出力し
た装置に転送する。
Further, the read request transmission means provided in the master unit determines whether or not a read request to an arbitrary address of the memory in the slave unit requests data continuous with the data accessed last time,
An address match signal is output when continuous data is requested, and a read request is transmitted through the transmission line when continuous data is requested. Upon receiving the read request, the memory access control means provided in the slave unit transmits the first data at the requested address and the second data at the next address via the transmission line. The read data control means provided in the master unit transfers the received first data to the device which has output the read request, stores the second data in the buffer, and outputs the address match signal. The second data in the buffer is transferred to the device that has output the read request.

【0013】[0013]

【実施例】以下、本発明の実施例を図面に基づいて説明
する。図1は本発明の概略構成を示すブロック図であ
る。マスタユニット1とスレーブユニット2とは、シリ
アル伝送の伝送線路3で互いに接続されている。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of the present invention. The master unit 1 and the slave unit 2 are connected to each other via a transmission line 3 for serial transmission.

【0014】マスタユニット1内において出力されたス
レーブユニット2内のメモリ2bに対するリード要求
は、リード要求送信手段1aに入力される。リード要求
送信手段1aはリード要求を受け取ると、そのリード要
求のアドレスが前回のリード要求時のアドレスと連続で
あるかどうかを判別する。連続のアドレスでなければそ
のリード要求をスレーブユニット2に対して送信し、連
続のアドレスであればリードデータ制御手段1bに対し
アドレス合致信号を出力する。
The read request for the memory 2b in the slave unit 2 output in the master unit 1 is input to the read request transmitting means 1a. When receiving the read request, the read request transmission unit 1a determines whether the address of the read request is continuous with the address of the previous read request. If it is not a continuous address, the read request is transmitted to the slave unit 2, and if it is a continuous address, an address match signal is output to the read data control means 1b.

【0015】リード要求送信手段1aから送信されたリ
ード要求は伝送線路3を介してスレーブユニット2内の
メモリアクセス制御手段2aに入力される。メモリアク
セス制御手段2aは、メモリ2b内の、リード要求が示
すアドレスの第1のデータと、その次のアドレスの第2
のデータとをマスタユニット1に対して送信する。例え
ば、「ADD#01」のアドレスに対するリード要求であれ
ば、アドレス「ADD#01」と「ADD#02」とのデータ「DATA
1 」、「DATA2 」を送信する。
The read request transmitted from the read request transmission means 1a is input to the memory access control means 2a in the slave unit 2 via the transmission line 3. The memory access control means 2a stores the first data at the address indicated by the read request and the second data at the next address in the memory 2b.
And the data of the above are transmitted to the master unit 1. For example, if the read request is for the address of "ADD # 01", the data "DATA" of the addresses "ADD # 01" and "ADD # 02"
Send "1" and "DATA2".

【0016】スレーブユニット2から転送されたデータ
はリードデータ制御手段1bに入力される。リードデー
タ制御手段1bは、第1のデータをリードデータとして
リード要求を出力した装置に転送し、第2のデータをバ
ッファ1baに格納する。例えば、「DATA1 」と「DATA
2 」とを受け取った場合には、「DATA1 」をリード要求
を出力した装置に転送し、「DATA2 」をバッファ1ba
に格納する。
The data transferred from the slave unit 2 is input to the read data control means 1b. The read data control means 1b transfers the first data as read data to the device that has output the read request, and stores the second data in the buffer 1ba. For example, "DATA1" and "DATA
When "2" is received, "DATA1" is transferred to the device that outputs the read request, and "DATA2" is transferred to buffer 1ba.
To be stored.

【0017】この状態において、さらに連続のアドレス
に対するリード要求が出力され、リードデータ制御手段
1bにアドレス合致信号が入力された場合には、バッフ
ァ1ba内の第2のデータをリード要求を出力した装置
に対し転送する。以後、このようなリード時のデータ転
送をリードバースト転送と呼ぶ。
In this state, when a read request for further consecutive addresses is output and an address match signal is input to the read data control means 1b, the device that issued the read request for the second data in the buffer 1ba. Forward to. Hereinafter, such data transfer at the time of reading will be referred to as read burst transfer.

【0018】このようにして、連続したアドレスに対す
るリード要求が出力された場合には、バッファに格納さ
れたデータを転送することができる。この結果、短時間
でリードサイクルを終了させることができる。
In this way, when read requests for consecutive addresses are output, the data stored in the buffer can be transferred. As a result, the read cycle can be completed in a short time.

【0019】図2は本発明を実施するための数値制御シ
ステムの構成を示すブロック図である。図は大別して、
MMC(マンマシンコントローラ)20とCNC(数値
制御装置)30とに分かれている。この例では、MMC
20がマスタユニットであり、CNC30がスレーブユ
ニットである。CNC30はCPU31がローカルバス
35を介して各種装置を制御しており、MMC20は、
CPU24がローカルバス29を介して各種装置を制御
している。MMC20とCNC30とは伝送線路40で
接続されており、この伝送線路40を介してデータの送
受信が行われる。なお、CNC30内のローカルバス3
5はマルチマスタバスであり、CPU31以外の装置も
バスマスタになることができる。
FIG. 2 is a block diagram showing the configuration of a numerical control system for carrying out the present invention. The figure is roughly divided,
It is divided into an MMC (Man Machine Controller) 20 and a CNC (Numerical Control Unit) 30. In this example, MMC
20 is a master unit and the CNC 30 is a slave unit. In the CNC 30, the CPU 31 controls various devices via the local bus 35, and the MMC 20
The CPU 24 controls various devices via the local bus 29. The MMC 20 and the CNC 30 are connected by a transmission line 40, and data is transmitted and received through this transmission line 40. In addition, local bus 3 in CNC30
Reference numeral 5 denotes a multi-master bus, and devices other than the CPU 31 can also be bus masters.

【0020】CNC30において、CPU31はCNC
30全体を制御する。コモンRAM32は、各種のデー
タあるいは入出力信号が格納され、CNC30とMMC
20とが共用することができる。不揮発性メモリ33に
はCMOSを用いたメモリが使用され、バッテリによっ
てバックアップされており、電源切断後も保持すべきパ
ラメータ、ピッチ誤差補正量及び工具誤差補正量等が格
納される。
In the CNC 30, the CPU 31 controls the CNC
Control 30 as a whole. The common RAM 32 stores various data or input / output signals, and is used by the CNC 30 and the MMC.
It can be shared with 20. A CMOS memory is used as the non-volatile memory 33, which is backed up by a battery and stores parameters, pitch error correction amounts, tool error correction amounts, and the like that should be retained even after the power is turned off.

【0021】軸制御回路36はCPU31から軸の移動
指令を受けて、軸の指令をサーボアンプ37に出力す
る。サーボアンプ37はこの移動指令を受けて、工作機
械10のサーボモータを駆動する。PMC(プログラマ
ブル・マシン・コントローラ)38はNCプログラムを
実行する際に、T機能信号(工具選択指令)等を受け取
る。そして、これらの信号をシーケンス・プログラムで
処理して、動作指令として信号を出力し、工作機械10
を制御する。また、工作機械10から状態信号を受け
て、シーケンス処理を行って、CPU31へ必要な入力
信号を転送する。
The axis control circuit 36 receives the axis movement command from the CPU 31, and outputs the axis command to the servo amplifier 37. The servo amplifier 37 receives the movement command and drives the servo motor of the machine tool 10. A PMC (Programmable Machine Controller) 38 receives a T function signal (tool selection command) and the like when executing an NC program. Then, these signals are processed by the sequence program, and the signals are output as the operation command, and the machine tool 10
Control. Further, it receives a status signal from the machine tool 10, performs a sequence process, and transfers a necessary input signal to the CPU 31.

【0022】さらに、ローカルバス35に接続されたシ
リアルバスコントローラ34は、MMC20とデータの
送受信を行っている。MMC20から、コモンRAM3
2へのアクセス要求があると、シリアルバスコントロー
ラ34がDMA(ダイレクト・メモリ・アクセス)を行
い、コモンRAM32のデータにアクセスする。アクセ
ス要求が、読み取り要求(リード要求)であった場合、
MMC20に対しそのデータと、その次のアドレスのデ
ータとを転送する。アクセス要求が書き込み要求(ライ
ト要求)であった場合、転送されてきたデータをコモン
RAM32に書き込む。また、シリアルバスコントロー
ラ34は、ローカルバス35のデータ転送に使用されて
いるパラレル信号をシリアル信号に変換してMMC20
に出力し、入力されたシリアル信号をパラレル信号に変
換して受信する。
Further, the serial bus controller 34 connected to the local bus 35 transmits / receives data to / from the MMC 20. From MMC20 to common RAM3
When there is a request for access to 2, the serial bus controller 34 performs DMA (Direct Memory Access) to access the data in the common RAM 32. If the access request is a read request (read request),
The data and the data of the next address are transferred to the MMC 20. When the access request is a write request (write request), the transferred data is written in the common RAM 32. The serial bus controller 34 also converts a parallel signal used for data transfer of the local bus 35 into a serial signal to convert the MMC 20 into a serial signal.
And outputs the input serial signal to a parallel signal and receives the parallel signal.

【0023】MMC20において、CPU24は対話処
理用のプログラムを実行することにより表示される対話
形入力画面において、設定可能な作業またはデータ等を
メニュー形式で、グラフィック制御回路22aを介して
表示装置22に表示する。また、こうして入力されたデ
ータから加工プログラムを作成するとともに、バックグ
ラウンドアニメーションとして、工具全体の起動軌跡な
どを表示する。RAM25には、対話用の各種データ等
が格納される。不揮発性メモリ26はCMOSを用いた
メモリが使用され、バッテリによってバックアップされ
ており、電源切断後も保持すべきアプリケーションプロ
グラムや加工プログラム等が格納される。VRAM(ビ
デオRAM)27は高速にアクセス可能なRAMであっ
て、不揮発性メモリ26にNC文として格納された加工
プログラムに基づき工作機械10の切削シミュレーショ
ンを行う際のアニメーション表示のためのグラフィック
データが格納される。グラフィック制御回路22aはV
RAM27に格納されたグラフィックデータを表示用の
信号に変換して表示装置22に出力する。
In the MMC 20, the CPU 24 executes a program for interactive processing, and in the interactive input screen displayed, settable works, data, etc. are displayed in a menu format on the display device 22 via the graphic control circuit 22a. indicate. In addition, a machining program is created from the data thus input, and the starting trajectory of the entire tool is displayed as a background animation. The RAM 25 stores various data for dialogue and the like. A memory using CMOS is used as the non-volatile memory 26, which is backed up by a battery, and stores application programs, machining programs, and the like that should be retained even after the power is turned off. The VRAM (video RAM) 27 is a RAM that can be accessed at high speed, and contains graphic data for animation display when a cutting simulation of the machine tool 10 is performed based on a machining program stored as an NC statement in the non-volatile memory 26. Is stored. The graphic control circuit 22a is V
The graphic data stored in the RAM 27 is converted into a display signal and output to the display device 22.

【0024】さらに、データの交換を行う際にはFDD
インタフェース21aを介して接続されたFDD21に
フロッピ・ディスクを挿入し、フロッピ・ディスクから
ソフトウェアをロードしたり、各種データをフロッピ・
ディスクへ書き込んだりする。
Furthermore, when exchanging data, FDD
A floppy disk is inserted into the FDD 21 connected via the interface 21a, software is loaded from the floppy disk, and various data is transferred to the floppy disk.
Write to disc.

【0025】また、グラフィック制御回路22aはCP
U24等から出力されたディジタル信号を表示用の信号
に変換して表示装置22に与える。表示装置22にはC
RTあるいは液晶表示装置が使用される。キーボード・
インタフェース23aは、キーボード23とCPU24
との間のデータ転送を制御する。キーボード23はシン
ボリックキー、数値キー等からなり、必要な図形デー
タ、NCデータをこれらのキーを使用して入力する。
Further, the graphic control circuit 22a is CP
The digital signal output from U24 or the like is converted into a display signal and given to the display device 22. C on the display device 22
An RT or liquid crystal display device is used. keyboard·
The interface 23a includes a keyboard 23 and a CPU 24.
Control data transfer to and from. The keyboard 23 is composed of symbolic keys, numerical keys, etc., and necessary graphic data and NC data are input using these keys.

【0026】シリアルバスコントローラ28は、MMC
20内の装置からCNC30内のコモンRAM32への
アクセス要求があると、パラレル信号で入力されるアク
セス要求をシリアル信号に変換し、CNC30に出力す
る。また、CNC30から入力されたシリアル信号は、
パラレル信号に変換し受信する。
The serial bus controller 28 is an MMC
When there is an access request from the device in 20 to the common RAM 32 in the CNC 30, the access request input as a parallel signal is converted into a serial signal and output to the CNC 30. Also, the serial signal input from the CNC 30 is
Convert to parallel signal and receive.

【0027】なお、MMC20側のシリアルバスコント
ローラ28とCNC30側のシリアルバスコントローラ
34との間の伝送線路40は20m〜50mの長さにす
ることができる。そして、高速のデータ転送(約25M
bps)が可能である。
The transmission line 40 between the serial bus controller 28 on the MMC 20 side and the serial bus controller 34 on the CNC 30 side can be 20 m to 50 m long. And high-speed data transfer (about 25M
bps) is possible.

【0028】以上のような数値制御システムにおけるM
MC20とCNC30との間でデータ転送にはパケット
交換方式が用いられる。パケット交換方式では、転送す
べきデータを任意の長さのブロックに分割する。この分
割されたブロックに各種制御情報を付加したものがパケ
ットである。以下に、MMC20からCNC30へのア
クセス要求において用いられるパケット交換方式につい
て説明する。
M in the above numerical control system
A packet switching method is used for data transfer between the MC 20 and the CNC 30. In the packet switching method, the data to be transferred is divided into blocks of arbitrary length. A packet is one in which various control information is added to the divided blocks. The packet switching method used in the access request from the MMC 20 to the CNC 30 will be described below.

【0029】図3はパケットのフォーマット形式の例を
示す図である。リード要求パケット51は、MMC側の
装置がCNC内のコモンRAMのデータにアクセスする
際に出力されるパケットである。リード要求パケット5
1の先頭の4ビットはコマンド51aであり、このパケ
ットがリード要求パケットであることを示す。次の23
ビットはリードを要求するアドレスである。最後の8ビ
ットはCRC(CyclicRedundancy Check)のチェックコ
ードである。
FIG. 3 is a diagram showing an example of the format of a packet. The read request packet 51 is a packet output when the device on the MMC side accesses the data in the common RAM in the CNC. Read request packet 5
The first 4 bits of 1 are the command 51a and indicate that this packet is a read request packet. Next 23
A bit is an address that requires a read. The last 8 bits are a CRC (Cyclic Redundancy Check) check code.

【0030】リードデータパケット52は、MMCから
のリード要求に応じてデータを送り返す場合にCNCが
出力するパケットである。リードデータパケット52の
先頭の4ビットはコマンド52aであり、このパケット
がリードデータパケットであることを示す。次の16ビ
ットはリード要求されたアドレスのデータ52bであ
る。最後の8ビットはCRC(Cyclic Redundancy Chec
k)のチェックコード52cである。
The read data packet 52 is a packet output by the CNC when sending back data in response to a read request from the MMC. The first 4 bits of the read data packet 52 are the command 52a, which indicates that this packet is a read data packet. The next 16 bits are the data 52b of the read-requested address. The last 8 bits are CRC (Cyclic Redundancy Chec)
This is the check code 52c of k).

【0031】なお、このリードデータパケット52のコ
マンド52aには、第1のリードデータパケットと第2
のリードデータパケットとの2種類がある。リードバー
スト転送を行わない場合には、第1のリードデータパケ
ットが転送される。一方、リードバースト転送を行う場
合には、まずリード要求により要求された第1のデータ
が第2のリードデータパケットとして転送され、次のア
ドレスの第2のデータが第1のリードデータパケットと
して転送される。
The command 52a of the read data packet 52 includes the first read data packet and the second read data packet.
Read data packet. When the read burst transfer is not performed, the first read data packet is transferred. On the other hand, when performing read burst transfer, first data requested by a read request is transferred as a second read data packet, and second data at the next address is transferred as a first read data packet. To be done.

【0032】ライトデータパケット53はMMCからC
NC内のコモンRAMへのデータの書込を行う場合に出
力されるパケットである。ライトデータパケット53の
先頭の4ビットはコマンド53aであり、このパケット
がライトデータパケットであることを示す。次の23ビ
ットはライトを要求するアドレス53bである。次の1
6ビットはライト要求によりメモリに書き込むべきデー
タ53cである。最後の8ビットはCRC(Cyclic Red
undancy Check)のチェックコード53dである。
The write data packet 53 is from MMC to C
This is a packet output when writing data to the common RAM in the NC. The first 4 bits of the write data packet 53 is a command 53a, which indicates that this packet is a write data packet. The next 23 bits are an address 53b for requesting a write. Next 1
Six bits are data 53c to be written in the memory in response to the write request. The last 8 bits are CRC (Cyclic Red)
undancy Check) check code 53d.

【0033】次に、図2に示す数値制御システムにおい
て、上記のパケットを用いて行われるリードサイクルに
ついて説明する。まず、MMC20側のCPU24から
CNC30側のコモンRAM32へリードを行う場合、
MMC20のローカルバス29に接続されたシルアルバ
スコントローラ28が、CNC30内のコモンRAM3
2に対するリードサイクルを検出する。このシルアルバ
スコントローラ28は、このリード要求をリード要求パ
ケットとしてCNC30側に転送する。
Next, a read cycle performed using the above packet in the numerical control system shown in FIG. 2 will be described. First, when reading from the CPU 24 on the MMC 20 side to the common RAM 32 on the CNC 30 side,
The serial bus controller 28 connected to the local bus 29 of the MMC 20 uses the common RAM 3 in the CNC 30.
Detect read cycle for 2. The serial bus controller 28 transfers this read request as a read request packet to the CNC 30 side.

【0034】CNC30側のシルアルバスコントローラ
34はリード要求パケットを受け取ると、コモンRAM
32上の要求されたアドレスと、そのアドレスの次のア
ドレスとに対してリードサイクルを発生させる。そし
て、リードサイクルにより読み込んだ第1のデータと第
2のデータとをそれぞれ第2のリードデータパケット、
第1のリードデータパケットとしてMMC20側に転送
する。
Upon receiving the read request packet, the serial bus controller 34 on the side of the CNC 30 receives the common RAM.
A read cycle is generated for the requested address on 32 and the address next to that address. Then, the first data and the second data read in the read cycle are respectively used as a second read data packet,
It is transferred to the MMC 20 side as a first read data packet.

【0035】MMC20側のシリアルバスコントローラ
28は、第2のリードデータパケットを受け取ると、リ
ード要求を出力した装置に第1のデータを転送するとと
もに、リードバースト転送が行われることを認識する。
そして、次に送られてくる第1のリードデータパケット
の第2のデータをリードバーストバッファ内に格納す
る。この状態で、さらに出力されたCNC30のコモン
RAM32に対するリード要求が、連続したアドレスに
対するリード要求であれば、リードバーストバッファ内
の第2のデータをリード要求を出力した装置に転送す
る。
Upon receiving the second read data packet, the serial bus controller 28 on the MMC 20 side transfers the first data to the device which has output the read request, and recognizes that the read burst transfer will be performed.
Then, the second data of the first read data packet sent next is stored in the read burst buffer. In this state, if the further output read request to the common RAM 32 of the CNC 30 is a read request for consecutive addresses, the second data in the read burst buffer is transferred to the device that has output the read request.

【0036】以下にシリアルバスコントローラ28につ
いて更に詳しく説明する。図4はMMC側のシリアルバ
スコントローラの内部構成を示すブロック図である。シ
リアルバスコントローラはローカルバス29に接続され
ている。CNCのコモンRAMに対するアクセス要求
は、ローカルバス29を介して入力される。このアクセ
ス要求は送信制御部28cに送られるとともに、アドレ
スラッチ回路28aと比較部28bとに入力される。ア
ドレスラッチ回路28aはさらに比較部28bに接続さ
れている。比較部28bの出力信号はアドレス合致信号
であり、送信制御部28cとデータ出力制御部28jに
入力される。送信制御部28cの出力信号は、パラレル
シリアル変換回路28dによりシリアル信号に変換さ
れ、ドライバ28eでドライブされ、CNCに出力され
る。
The serial bus controller 28 will be described in more detail below. FIG. 4 is a block diagram showing the internal configuration of the serial bus controller on the MMC side. The serial bus controller is connected to the local bus 29. An access request to the common RAM of the CNC is input via the local bus 29. This access request is sent to the transmission control unit 28c and also input to the address latch circuit 28a and the comparison unit 28b. The address latch circuit 28a is further connected to the comparison unit 28b. The output signal of the comparison unit 28b is an address match signal and is input to the transmission control unit 28c and the data output control unit 28j. The output signal of the transmission control unit 28c is converted into a serial signal by the parallel-serial conversion circuit 28d, driven by the driver 28e, and output to the CNC.

【0037】一方、CNCからの入力信号は、レシーバ
28fで受信され、シリアルパラレル変換回路28gで
パラレル信号に変換された後、受信データ切り換え部2
8hに入力される。受信データ切り換え部28hからの
一方の出力はローカルバス29に出力され、他方の出力
はリードバーストバッファ28iに入力される。リード
バーストバッファ28iの出力端はデータ出力制御部2
8jを介して出力される。
On the other hand, the input signal from the CNC is received by the receiver 28f, converted into a parallel signal by the serial / parallel conversion circuit 28g, and then received data switching unit 2
Input to 8h. One output from the reception data switching unit 28h is output to the local bus 29, and the other output is input to the read burst buffer 28i. The output end of the read burst buffer 28i is the data output control unit 2
It is output via 8j.

【0038】このような構成のシリアルバスコントロー
ラ28において、CNC内のコモンRAMに対するアク
セス要求がローカルバス29を介して入力されると、そ
のアクセス要求がリード要求であれば、そのデータはア
ドレスラッチ回路28aにラッチされる。比較部28b
は、リード要求により要求されているアドレスとアドレ
スラッチ回路28a内にラッチされているアドレスとの
差をとり、この差が「1」であれば連続したデータへの
リード要求であると判断しアドレス合致信号を出力す
る。
In the serial bus controller 28 having such a configuration, when an access request to the common RAM in the CNC is input via the local bus 29, if the access request is a read request, the data is the address latch circuit. 28a. Comparison unit 28b
Is the difference between the address requested by the read request and the address latched in the address latch circuit 28a. If the difference is "1", it is determined that the read request is for continuous data, and the address is read. Output a match signal.

【0039】送信制御部28cは、入力されたアクセス
要求がライト要求であれば、そのライト要求をライトデ
ータパケットととして出力する。一方、入力されたアク
セス要求がリード要求であった場合には、比較部28b
がアドレス合致信号を出力していなければリード要求を
リードデータパケットととして出力し、比較部28bが
アドレス合致信号を出力していればデータの出力を行わ
ない。送信制御部28cから送信されたパケットは、パ
ラレルシリアル変換回路28dでシリアル信号に変換さ
れた後、ドライバ28eでドライブされCNCに転送さ
れる。
If the input access request is a write request, the transmission controller 28c outputs the write request as a write data packet. On the other hand, if the input access request is a read request, the comparison unit 28b
Does not output the address match signal, it outputs the read request as a read data packet, and if the comparison unit 28b outputs the address match signal, it does not output the data. The packet transmitted from the transmission control unit 28c is converted into a serial signal by the parallel-serial conversion circuit 28d, then driven by the driver 28e and transferred to the CNC.

【0040】伝送線路を介してCNCから送られてきた
パケットはレシーバ28fを介してシリアルパラレル変
換回路28gに入力される。シリアル・パラレル変換回
路28gは、シリアル信号で転送されてきたパケットを
パラレル信号に変換する。受信データ切り換え部28h
は、パラレル信号に変換されたパケットの先頭コマンド
により、そのパケットの種類を判断する。送られてきた
1つめのパケットが第1のリードデータパケットであれ
ばそのパケットのデータをリードデータとして出力す
る。また、第2のリードデータパケットと第1のリード
データパケットが連続して転送された場合には、第2の
リードデータパケットのデータをリードデータとして出
力した後、第1のリードデータパケットのデータをリー
ドバーストバッファ28iに格納する。この状態におい
て、さらに連続したアドレスに対するリード要求が出力
されると、比較部28bからアドレス合致信号が出力さ
れる。このアドレス合致信号が入力されたデータ出力制
御部28jは、リードバーストバッファ28i内のデー
タをリード要求を出力した装置に転送する。
The packet sent from the CNC via the transmission line is input to the serial / parallel conversion circuit 28g via the receiver 28f. The serial / parallel conversion circuit 28g converts a packet transferred as a serial signal into a parallel signal. Received data switching unit 28h
Determines the type of the packet according to the head command of the packet converted into the parallel signal. If the first packet sent is the first read data packet, the data of that packet is output as read data. When the second read data packet and the first read data packet are continuously transferred, the data of the second read data packet is output as the read data and then the data of the first read data packet is output. Are stored in the read burst buffer 28i. In this state, when read requests for further consecutive addresses are output, the comparison unit 28b outputs an address match signal. The data output control unit 28j, to which the address match signal is input, transfers the data in the read burst buffer 28i to the device that has output the read request.

【0041】このようにして、CNC内のコモンRAM
の連続したアドレスに対するリード要求が出力された際
には、リードバーストバッファ28i内に格納されたデ
ータを転送することにより、リードサイクルを短時間で
終了させることができる。従って、MMCのCPUは待
ち時間が減少し、システム全体のデータ処理能力が向上
する。
In this way, the common RAM in the CNC is
When a read request for consecutive addresses is output, the read cycle can be completed in a short time by transferring the data stored in the read burst buffer 28i. Therefore, the latency of the MMC CPU is reduced and the data processing capability of the entire system is improved.

【0042】上記の例では、CNC内のコモンRAMが
CNCのローカルバスに接続されているような構成を用
いて説明したが、CNCのシリアルバスコントローラに
直接接続されたコモンRAMが設けられている場合もあ
る。この場合、MMCからのリード要求に応じて、リー
ドバースト転送を行うかどうかの切り換えを行うことが
できる。つまり、ローカルバスを介して接続されたコモ
ンRAMに対するリード要求の場合にはリードバースト
転送を行わず、要求されたアドレスのデータのみにアク
セスする。そして、シリアルバスコントローラに直接接
続されたコモンRAMに対するリード要求の場合にはリ
ードバースト転送を行う。
In the above example, the common RAM in the CNC is described as being connected to the local bus of the CNC, but a common RAM directly connected to the serial bus controller of the CNC is provided. In some cases. In this case, whether or not to perform the read burst transfer can be switched according to the read request from the MMC. That is, in the case of a read request to the common RAM connected via the local bus, read burst transfer is not performed and only the data of the requested address is accessed. Then, in the case of a read request to the common RAM directly connected to the serial bus controller, read burst transfer is performed.

【0043】このように、リードバースト転送の実施を
シリアルバスコントローラに直接接続されたコモンRA
Mに対するアクセスに限定することにより、ローカルバ
スを介して接続されたコモンRAMに対するアクセス時
に、CNCのローカルバスを必要以上に専有することが
なくなる。この結果、リードバースト転送がCNCのデ
ータ処理速度に与える悪影響を防止することができる。
As described above, the read burst transfer is performed by the common RA directly connected to the serial bus controller.
By limiting the access to M, the local bus of the CNC is not occupied more than necessary when accessing the common RAM connected via the local bus. As a result, it is possible to prevent the read burst transfer from adversely affecting the data processing speed of the CNC.

【0044】[0044]

【発明の効果】以上説明したように本発明では、スレー
ブユニット内のメモリに対しするリード要求がマスタユ
ニットから出力されると、スレーブユニットからマスタ
ユニットへ、要求されたアドレスの第1のデータ及びそ
の次のアドレスの第2のデータを転送するようにしたた
め、マスタユニットで連続したアドレスに対するリード
要求が出力されると、そのリード要求を出力した装置に
対し、予め受け取っている第2のデータを転送すること
ができ、短い時間でリードサイクルを終了させることが
できる。
As described above, according to the present invention, when a read request for the memory in the slave unit is output from the master unit, the slave unit sends to the master unit the first data of the requested address and the first data. Since the second data of the next address is transferred, when the master unit outputs read requests to consecutive addresses, the second data received in advance is sent to the device that issued the read request. It can be transferred and the read cycle can be completed in a short time.

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

【図1】本発明の概略構成を示すブロック図である。FIG. 1 is a block diagram showing a schematic configuration of the present invention.

【図2】本発明を実施するための数値制御システムの構
成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a numerical control system for carrying out the present invention.

【図3】パケットのフォーマット形式の例を示す図であ
る。
FIG. 3 is a diagram showing an example of a packet format.

【図4】MMC側のシリアルバスコントローラの内部構
成を示すブロック図である。
FIG. 4 is a block diagram showing an internal configuration of a serial bus controller on the MMC side.

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

1 マスタユニット 1a リード要求送信手段 1b リードデータ制御手段 1ba バッファ 2 スレーブユニット 2a メモリアクセス制御手段 2b メモリ 3 伝送線路 1 Master Unit 1a Read Request Transmission Means 1b Read Data Control Means 1ba Buffer 2 Slave Unit 2a Memory Access Control Means 2b Memory 3 Transmission Line

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 マスタユニットとスレーブユニットとが
伝送線路を介して接続されたシステムのメモリアクセス
方式において、 前記マスタユニット内に設けられ、前記スレーブユニッ
ト内のメモリの任意のアドレスに対するリード要求を前
記伝送線路を介して送信するリード要求送信手段と、 前記スレーブユニット内に設けられ、前記リード要求を
受け取ると、要求された前記アドレスの第1のデータ、
及び前記アドレスの次のアドレスの第2のデータを前記
マスタユニットに対して送信するメモリアクセス制御手
段と、 を有することを特徴とするメモリアクセス方式。
1. In a memory access system of a system in which a master unit and a slave unit are connected via a transmission line, a read request for an arbitrary address of a memory provided in the master unit is provided. Read request transmission means for transmitting via a transmission line; and a first data of the requested address, which is provided in the slave unit and receives the read request.
And a memory access control means for transmitting second data at an address next to the address to the master unit.
【請求項2】 マスタユニットとスレーブユニットとが
伝送線路を介して接続されたシステムのメモリアクセス
方式において、 前記マスタユニット内に設けられ、前記スレーブユニッ
ト内のメモリの任意のアドレスに対するリード要求が前
回アクセスしたデータと連続したデータを要求している
かどうかを判別し、連続したデータを要求している場合
にはアドレス合致信号を出力し、連続でないデータを要
求している場合には前記リード要求を前記伝送線路を介
して送信するリード要求送信手段と、 前記スレーブユニット内に設けられ、前記リード要求を
受け取ると、要求された前記アドレスの第1のデータ、
及び前記アドレスの次のアドレスの第2のデータを前記
伝送線路を介して送信するメモリアクセス制御手段と、 前記マスタユニット内に設けられ、受け取った前記第1
のデータを前記リード要求を出力した装置に転送すると
ともに前記第2のデータをバッファ内に格納し、前記ア
ドレス合致信号が出力された際には、前記バッファ内の
前記第2のデータを前記リード要求を出力した装置に転
送するリードデータ制御手段と、 を有することを特徴とするメモリアクセス方式。
2. In a memory access method of a system in which a master unit and a slave unit are connected via a transmission line, a read request to an arbitrary address of a memory provided in the master unit and lastly made to the slave unit It is determined whether the requested data is continuous data with the accessed data. When the continuous data is requested, an address match signal is output, and when the non-continuous data is requested, the read request is issued. Read request transmitting means for transmitting via the transmission line; and a first data of the requested address, which is provided in the slave unit and receives the read request.
And memory access control means for transmitting the second data of the address next to the address via the transmission line, and the first access means provided in the master unit and received.
Data of the above is transferred to the device which outputs the read request, the second data is stored in the buffer, and when the address match signal is output, the second data in the buffer is read. A memory access method comprising: a read data control unit that transfers the request to a device that outputs the request.
【請求項3】 前記リードデータ制御手段は、パケット
として転送された前記第1のデータと前記第2のデータ
とのヘッダを解読することにより、データの種類を判別
することを特徴とする請求項2記載のメモリアクセス方
式。
3. The read data control means determines the type of data by decoding the headers of the first data and the second data transferred as a packet. 2. The memory access method described in 2.
【請求項4】 前記マスタユニットは、マンマシンコン
トローラであることを特徴とする請求項2記載のメモリ
アクセス方式。
4. The memory access method according to claim 2, wherein the master unit is a man-machine controller.
【請求項5】 前記スレーブユニットは、数値制御装置
であることを特徴とする請求項2記載のメモリアクセス
方式。
5. The memory access method according to claim 2, wherein the slave unit is a numerical controller.
JP10501695A 1995-04-28 1995-04-28 Memory access system Pending JPH08305431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10501695A JPH08305431A (en) 1995-04-28 1995-04-28 Memory access system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10501695A JPH08305431A (en) 1995-04-28 1995-04-28 Memory access system

Publications (1)

Publication Number Publication Date
JPH08305431A true JPH08305431A (en) 1996-11-22

Family

ID=14396275

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10501695A Pending JPH08305431A (en) 1995-04-28 1995-04-28 Memory access system

Country Status (1)

Country Link
JP (1) JPH08305431A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032579A (en) * 2023-08-21 2023-11-10 上海合芯数字科技有限公司 Slave starting method, device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032579A (en) * 2023-08-21 2023-11-10 上海合芯数字科技有限公司 Slave starting method, device and storage medium

Similar Documents

Publication Publication Date Title
JP3566304B2 (en) Bus control device and bus control system
US7054982B2 (en) Fieldbus interface board
EP0844566B1 (en) Interface apparatus for adapting data width to system bus width
US6219583B1 (en) Control system
US6668205B1 (en) Control method of factory automation system, recording medium recording a program therefor and central processor of factory automation system
JPH08305431A (en) Memory access system
EP0929847B1 (en) Universal operator station module for a distributed process control system
US7443886B1 (en) Communication protocol system and method
US20040186949A1 (en) XIP system and method for serial memory
JP2546574B2 (en) Graphic information processing system
JP2735112B2 (en) Data read / write method of numerical controller
JP3399776B2 (en) Computer and method for transferring peripheral device control data in computer
JP3350004B2 (en) PS / 2 interface conversion device and PS / 2 interface conversion method
JP3265026B2 (en) I / O data exchange method
JP3227273B2 (en) Link processing method of programmable controller
SU1541623A1 (en) Device for interfacing computer with peripheral device
JP2576236B2 (en) Communication method of programmable controller
JP2877176B2 (en) SCSI device
JPH0721102A (en) Message transmitter/receiver
JPH03262064A (en) Data transfer system using system bus
JPH0546460A (en) Instruction processing system
KR20080062694A (en) Apparatus and method for memory access control
JPS58109915A (en) Data transfer controlling system of bus coupling system
JPS6378257A (en) Input-output controller
JPH03246604A (en) Input/output information transmission system for programmable controller system