JP3476104B2 - Digital control device - Google Patents

Digital control device

Info

Publication number
JP3476104B2
JP3476104B2 JP05453595A JP5453595A JP3476104B2 JP 3476104 B2 JP3476104 B2 JP 3476104B2 JP 05453595 A JP05453595 A JP 05453595A JP 5453595 A JP5453595 A JP 5453595A JP 3476104 B2 JP3476104 B2 JP 3476104B2
Authority
JP
Japan
Prior art keywords
address
instruction
address value
memory
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP05453595A
Other languages
Japanese (ja)
Other versions
JPH08249177A (en
Inventor
康裕 西村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP05453595A priority Critical patent/JP3476104B2/en
Publication of JPH08249177A publication Critical patent/JPH08249177A/en
Application granted granted Critical
Publication of JP3476104B2 publication Critical patent/JP3476104B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Programmable Controllers (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、演算部がメモリから処
理プログラムを構成する命令を逐次読み出していき、当
該処理プログラムを処理するデジタル制御装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital control device in which an arithmetic unit sequentially reads out instructions forming a processing program from a memory and processes the processing program.

【0002】[0002]

【従来の技術】従来の汎用MPU(マイクロプロセッサ
ユニット)には、キャッシュメモリを備えるものがあ
る。このキャッシュメモリを備えた汎用MPUは、例え
ば、処理プログラムの中で条件分岐などにより局所的に
繰り返される部分を、前もってメモリからキャッシュメ
モリに格納しておき、この格納した処理プログラムの命
令を逐次読み込んでこれを処理することで、MPU外部
にあるメモリからの命令を読み込むときのメモリアクセ
スの遅れを解消して処理速度を高めている。
2. Description of the Related Art Some conventional general-purpose MPUs (microprocessor units) include a cache memory. A general-purpose MPU equipped with this cache memory stores, for example, a portion of a processing program that is locally repeated due to conditional branching or the like in advance from the memory in the cache memory and sequentially reads the instructions of the stored processing program. By processing this, the delay in memory access when reading an instruction from the memory outside the MPU is eliminated and the processing speed is increased.

【0003】そして、この従来の汎用MPUは、キャッ
シュメモリに格納されていない処理プログラムのエント
リ要求を受けた場合に、外部のメモリに対して処理命令
のアクセスを開始し、この処理プログラムをキャッシュ
内部に取り込むようにしている。
When the conventional general-purpose MPU receives an entry request for a processing program that is not stored in the cache memory, it starts to access a processing instruction to an external memory, and the processing program is internally stored in the cache. I'm trying to get it into.

【0004】[0004]

【発明が解決しようとする課題】このような従来のキャ
ッシュメモリを備える汎用MPUでは、処理プログラム
の中で条件分岐などにより局所的に繰り返される部分
を、前もってメモリからキャッシュメモリに格納してお
くので、確かに処理プログラムの処理速度が高まるが、
それでもなお、キャッシュメモリに格納されていない処
理プログラムのエントリ要求を受けた場合には、外部の
メモリに対してアクセスを開始し、当該処理プログラム
をキャッシュ内部に取り込む必要があり、アクセス時間
待ちが必ず発生するという問題点があった。
In a general-purpose MPU having such a conventional cache memory, a portion that is locally repeated in a processing program due to conditional branching or the like is stored in advance from the memory in the cache memory. Although the processing speed of the processing program is certainly increased,
Nevertheless, when an entry request for a processing program that is not stored in the cache memory is received, it is necessary to start accessing the external memory and load the processing program into the cache. There was a problem that it occurred.

【0005】特に、プログラムコントローラ(以下、P
LCという)に用いられているラダープログラムは、汎
用MPUが一般的に使用する処理プログラムと異なり、
条件分岐などがほとんどなく、プログラムの先頭から最
後までを順番に実行していくという特徴を持っている。
従って、PLCを構成するキャッシュメモリを備えるM
PUでは、プログラムの全領域がキャッシュに入らない
限り有効に働かないという問題点があった。
In particular, a program controller (hereinafter, P
The ladder program used for the LC) is different from the processing program generally used by the general-purpose MPU,
There is almost no conditional branching, and the feature is that the program is executed sequentially from the beginning to the end.
Therefore, the M including the cache memory that constitutes the PLC
The PU has a problem that it does not work effectively unless the entire area of the program is cached.

【0006】そこで、本発明は、上述の問題点に鑑み、
常に必要とされる数命令を内部に取り込むことにより、
処理プログラムをキャッシュ内部に取り込む際の、アク
セス時間待ちを無くし、高速処理を行うデジタル装置を
提供することを目的とする。
Therefore, the present invention has been made in view of the above problems.
By incorporating several instructions that are always needed,
An object of the present invention is to provide a digital device which eliminates waiting for access time when fetching a processing program into the cache and performs high-speed processing.

【0007】[0007]

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、演算部がメモリ上の処理プ
ログラムを構成する命令を逐次読み出していき、当該処
理プログラムを処理するデジタル制御装置において、
ータ格納手段と、アドレス比較手段と、アドレス生成手
段を具備し、上記データ格納手段は、上記演算部が処理
する命令を予め格納する命令格納エリアを複数有すると
ともに、この複数の命令格納エリアごとに、上記命令の
メモリ上でのアドレス値を格納するアドレス格納エリア
と、上記演算部によりすでに読み出された命令であるか
否かを示すフラグを格納するフラグ格納エリアとを備
え、上記フラグ格納エリアのフラグをチェックした結
果、上記演算部に読み出されたことを示すフラグが少な
くとも1つ以上ある場合は、そのフラグに対応する命令
格納エリアが空き領域として存在する旨の情報が上記ア
ドレス生成部に出力され、上記アドレス比較手段は、上
記演算部が処理する命令を受けると、その命令のアドレ
ス値と上記データ格納部に格納されている命令のアドレ
ス値とを比較し、上記アドレス生成手段は、上記アドレ
ス比較手段での比較の結果、上記両アドレス値が一致し
ない場合には、上記演算部が示すアドレス値をそのまま
上記メモリに対してアクセスするアドレス値とする一
方、上記両アドレス値が一致する場合には、上記データ
格納手段から上記命令格納エリアの空き領域が存在する
旨の情報が有る間、その空き領域の命令格納エリアに命
令を格納するために、上記メモリにアクセスするアドレ
ス値を生成することを特徴とする。
In order to achieve the above-mentioned object, the invention according to claim 1 is such that the arithmetic unit sequentially reads out the instructions constituting the processing program on the memory and processes the processing program. in the control device, de
Data storage means, address comparison means, and address generation means
And the data storage means is processed by the arithmetic unit.
If there are a plurality of instruction storage areas in which the instructions to be stored are stored in advance,
Both of the above instructions are stored in each of these multiple instruction storage areas.
Address storage area that stores the address value in memory
And whether the instruction has already been read by the arithmetic unit
Provided with a flag storage area that stores a flag indicating whether or not
If the flag in the above flag storage area is checked,
As a result, there are few flags that indicate that the data has been read by the calculation unit.
If there is at least one, the instruction corresponding to that flag
Information that the storage area exists as an empty area is displayed above.
It is output to the dress generation unit, and the address comparison means
When the arithmetic unit receives an instruction to process, the address of that instruction is received.
Address value and the address of the instruction stored in the above data storage
The address generation means compares the address value with the address value.
As a result of comparison by the address comparison means, the above two address values match.
If there is not, the address value shown by the above calculation unit is unchanged.
Address value to access the above memory
On the other hand, if the above two address values match, the above data
There is a free area in the above instruction storage area from the storage means.
While there is information to that effect, the instruction storage area in that empty area is saved.
Address to access the above memory to store instructions
Is generated .

【0009】[0009]

【0010】 請求項2に記載の発明は、請求項1に
載の発明において、上記アドレス生成手段は、上記メモ
リをアクセスすべきアドレス値を格納するアドレス値格
納手段と、上記演算部が示すアドレス値と上記データ格
納手段が読み出す命令のアドレス値とが一致しない旨の
情報を上記アドレス比較手段より受けた場合には、上記
演算部が示すアドレス値を上記アドレス値格納手段に格
納し、一致する場合には上記データ格納手段からの空き
領域が存在する旨の情報が有る間、上記アドレス値格納
手段に格納されているアドレス値に1を加算した値を、
再び上記アドレス値格納手段に格納させるアドレス加算
/格納手段とを有することを特徴とする。
According to a second aspect of the present invention, in the first aspect of the present invention, the address generation means includes address value storage means for storing an address value for accessing the memory, When the address comparison unit receives information indicating that the address value indicated by the arithmetic unit does not match the address value of the instruction read by the data storage unit, the address value indicated by the arithmetic unit is stored in the address value storage unit. If there is information indicating that there is a free area from the data storage means when the values are stored and coincides, a value obtained by adding 1 to the address value stored in the address value storage means is obtained,
An address addition / storing means for storing again in the address value storing means is provided.

【0011】 請求項3に記載の発明は、請求項1また
は2に記載の発明がプログラマブルコントローラに使用
されることを特徴とする。
The invention according to claim 3 is the same as claim 1 or
Is used in a programmable controller.

【0012】[0012]

【作用】上述のような本発明によれば、演算部が示すア
ドレス値とデータ格納手段が格納する命令のアドレス値
とが一致しない旨の情報をアドレス比較手段から受けた
場合には、アドレス生成手段により、演算部が示すアド
レス値をそのままメモリに対してアクセスする一方、一
致する旨の情報を受けた場合には、データ格納手段から
の空き領域が存在する旨の情報が有り続けるまで、演算
部が処理する命令のアドレス値を生成し、これをメモリ
にアクセスする。そして、メモリから読み出された命令
がデータ格納手段の空き領域に格納される。
According to the present invention as described above, when the address comparing unit receives information indicating that the address value indicated by the arithmetic unit does not match the address value of the instruction stored in the data storing unit, the address generating unit generates the address. While the address value indicated by the arithmetic unit is directly accessed to the memory by the means, when the information indicating the coincidence is received, the arithmetic operation is continued until the information indicating that the empty area exists from the data storage means is continued. The unit generates an address value of an instruction to be processed, and accesses it to a memory. Then, the instruction read from the memory is stored in the empty area of the data storage means.

【0013】[0013]

【実施例】以下、本発明の実施例を図面を参照して説明
する。
Embodiments of the present invention will be described below with reference to the drawings.

【0014】図1は本発明に係るデジタル制御装置を示
す一実施例の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an embodiment showing a digital controller according to the present invention.

【0015】この実施例のデジタル制御装置は、メモリ
1,演算部2,データ格納部3,アドレス比較部4,ア
ドレス生成部5およびメモリタイミング制御部6から構
成されている。
The digital control device of this embodiment comprises a memory 1, a calculation unit 2, a data storage unit 3, an address comparison unit 4, an address generation unit 5 and a memory timing control unit 6.

【0016】メモリ1は、RAM(Randam Access Memo
ry) ,ROM(Read Only Memory)等の記憶手段であっ
て、演算部2が処理する処理プログラムを格納してい
る。
The memory 1 is a RAM (Randam Access Memo).
ry), a ROM (Read Only Memory), and the like, and stores a processing program processed by the arithmetic unit 2.

【0017】演算部2は、メモリ1に格納されている次
に実行すべき命令のアドレス値を示すプログラムカウン
タ(図示せず)を内蔵しており、このプログラムカウン
タ値を後述するアドレス比較部4を介して後述するデー
タ格納部3に出力し、このデータ格納部3から当該命令
を読み出してこれを処理するように構成されている。
The arithmetic unit 2 has a built-in program counter (not shown) indicating the address value of the next instruction to be executed stored in the memory 1, and the program counter value is used for the address comparison unit 4 which will be described later. It is configured to be output to a data storage unit 3 to be described later via the, to read the instruction from the data storage unit 3 and process the instruction.

【0018】データ格納部3は、演算部2が処理しよう
とする命令を、アドレス比較部4に出力する前に、予め
格納するものであって、図2に示すように、格納バッフ
ァ31と、データ読込み制御回路32とから構成されて
いる。
The data storage unit 3 stores the instruction to be processed by the arithmetic unit 2 in advance before outputting it to the address comparison unit 4, and as shown in FIG. And a data read control circuit 32.

【0019】この格納バッファ31は、すでに演算部2
に対してデータが読み込まれた否かを示す読込み判定フ
ラグを有する読込み判定フラグ格納エリア31aと、メ
モリ1に格納されていたアドレス値を格納するアドレス
格納エリア31bと、命令を格納する命令格納エリア3
1cとを有している。
This storage buffer 31 has already been operated by the arithmetic unit 2.
Read determination flag storage area 31a having a read determination flag indicating whether or not data has been read, an address storage area 31b for storing the address value stored in the memory 1, and an instruction storage area for storing an instruction. Three
1c and.

【0020】因みに、演算部2に対して命令が読み込ま
れた箇所の読込み判定フラグ格納エリア31aには1が
セットされ、一方、まだ命令が読込まれていない箇所の
ものは、0のままである。
Incidentally, 1 is set in the read determination flag storage area 31a at the location where the instruction is read to the arithmetic unit 2, while 0 remains at the location where the instruction is not yet read. .

【0021】なお、格納バッファ31は、アクセス方式
がリング形式で成り立っている。すなわち、格納バッフ
ァ31は、格納されているデータのアクセス対象がアド
レス順(格納バッファ31が有するアドレス)に繋がっ
ていて、最後のアドレスがアクセスされた後には、再び
最初のアドレス(0番地)がアクセスされるようになっ
ている。
The access method of the storage buffer 31 is a ring format. That is, in the storage buffer 31, the access targets of the stored data are connected in the order of addresses (addresses that the storage buffer 31 has), and after the last address is accessed, the first address (address 0) is returned again. It is supposed to be accessed.

【0022】上記データ読込み制御回路32は、格納バ
ッファ31の読込み判定フラグ格納エリア31aを監視
しており、すでに演算部2に読み込まれた命令であるこ
とを示す読込み判定フラグ(1)を検知すると、新たな
命令を受け入れる空き領域が存在することを示す旨の情
報をアドレス生成部5に出力するようになっている。
The data read control circuit 32 monitors the read determination flag storage area 31a of the storage buffer 31 and detects the read determination flag (1) indicating that the instruction has already been read by the arithmetic unit 2. Information indicating that there is a free area for receiving a new command is output to the address generator 5.

【0023】 こうすることで、データ読込み制御回路
32は、メモリ1から読み出された命令と、メモリタイ
ミング制御部6からこの読み出された命令のアドレス値
とを、それそれ上記空き領域に該当する命令格納エリア
31cとアドレス格納エリア31bとに格納させること
ができる。この際、データ読込み制御回路32は、読込
み判定フラグ格納エリア31aに未だ演算部2から読み
出されていない旨の読込み判定フラグ(0)をセットす
るようになっている。
By doing so, the data read control circuit 32 assigns the instruction read from the memory 1 and the address value of the instruction read from the memory timing control unit 6 to the empty area. It can be stored in the instruction storage area 31c and the address storage area 31b. At this time, the data read control circuit 32 sets a read determination flag (0) indicating that it has not been read from the arithmetic unit 2 in the read determination flag storage area 31a.

【0024】また、データ読込み制御回路32は、後述
するアドレス比較部4から次命令要求信号を受けると、
演算部2が読込んだ命令における読込み判定フラグ格納
エリア31aに、新たな命令を受け入れる空き領域が存
在することを示すフラグ(1)をセットするようになっ
ている。こうすることで、格納バッファ31に演算部2
が読み込む命令を常時確保するようにしている。
Further, when the data read control circuit 32 receives the next instruction request signal from the address comparison section 4 which will be described later,
A flag (1) indicating that there is an empty area for receiving a new instruction is set in the read determination flag storage area 31a in the instruction read by the arithmetic unit 2. By doing this, the storage buffer 31 stores in the arithmetic unit 2
I always try to secure instructions to read.

【0025】さらに、データ読込み制御回路32は、後
述するアドレス比較部4から演算部2からの要求が連続
したものでない旨の情報(すなわち、格納バッファ31
の全てに命令を新たに格納させる情報)を受けると、読
込み判定フラグ格納エリア31aの全てに、新たな命令
を受け入れる空き領域が存在することを示すフラグ
(1)をセットするようになっている。こうすること
で、格納バッファ31の全てに命令を新たに格納させる
ことができる。これは、割込み処理やPLCが行うサイ
クリック処理のように、アドレスがジャンプした場合に
対応させている。
Further, the data read control circuit 32 has information (that is, the storage buffer 31) indicating that the requests from the address comparison unit 4 to be described later from the operation unit 2 are not continuous.
(Information for newly storing instructions in all of the above), a flag (1) indicating that there is an empty area for receiving new instructions is set in all of the read determination flag storage areas 31a. . By doing so, an instruction can be newly stored in all the storage buffers 31. This corresponds to the case where the address jumps, such as interrupt processing or cyclic processing performed by PLC.

【0026】アドレス比較部4は、演算部2により要求
されたアドレス値と、データ格納部3の格納バッファ3
1に格納されているデータの先頭アドレス値とを比較
し、一致しているか否かの情報をデータ格納部3および
アドレス生成部5に出力するように構成されている。
The address comparison unit 4 has the address value requested by the calculation unit 2 and the storage buffer 3 of the data storage unit 3.
1 is compared with the head address value of the data stored in 1, and information indicating whether or not they match is output to the data storage unit 3 and the address generation unit 5.

【0027】ここで、格納バッファ31に格納されてい
るデータの先頭アドレス値とは、読込み判定フラグエリ
ア31aに0が格納されている最も小さいアドレス値を
有するアドレス値をいう。
Here, the head address value of the data stored in the storage buffer 31 is the address value having the smallest address value in which 0 is stored in the read determination flag area 31a.

【0028】アドレス生成部5は、演算部2からの要求
されたアドレスとデータ格納部3の空き領域の情報か
ら、この空き領域にデータを格納するためにメモリ1に
対してメモリタイミング制御部6を介してアドレスを指
定するようになっているものであって、図3に示すよう
に、制御回路51,マルチプレクサ52,アドレスレジ
タ53および加算器54で構成されている。
The address generation unit 5 uses the address requested by the arithmetic unit 2 and the information of the free space of the data storage unit 3 to the memory 1 to store the data in this free space. The address is designated through the control circuit 51, and is composed of a control circuit 51, a multiplexer 52, an address register 53 and an adder 54, as shown in FIG.

【0029】制御回路51は、アドレス比較部4から演
算部2が指示するアドレスとデータ格納部3のアドレス
を比較した結果、一致していない旨の情報を受けると、
マルチプレクサ52に対して、演算部2が処理する命令
のアドレス値をアドレスレジタ53に設定させる指示を
出すようになっている。また、制御回路51は、データ
格納部3のバッファ31に空き領域があるか否かの情報
を受けており、その旨をマルチプレクサ52に出力する
ようになっている。
When the control circuit 51 receives from the address comparison unit 4 the information indicating that the addresses indicated by the arithmetic unit 2 and the addresses in the data storage unit 3 do not match,
The multiplexer 52 is instructed to set the address value of the instruction processed by the arithmetic unit 2 in the address register 53. Further, the control circuit 51 receives information on whether or not there is a free area in the buffer 31 of the data storage unit 3, and outputs that fact to the multiplexer 52.

【0030】マルチプレクサ52は、メモリ1にアクセ
スすべきアドレスを形成し、これをアドレスレジタ53
に出力するようになっており、アドレスレジタ53は、
メモリ1をアクセスすべきアドレス値をセットするよう
になっている。
The multiplexer 52 forms an address to access the memory 1, and the address register 53
Is output to the address register 53.
An address value for accessing the memory 1 is set.

【0031】加算器54は、アドレスレジタに格納され
ているアドレス値に1を加算した値を、データ格納部3
に空き領域が無いとの情報が制御回路51に入るまで、
マルチプレクサ52に出力するようになっている。
The adder 54 adds the value 1 added to the address value stored in the address register to the data storage unit 3
Until the information that there is no free area in the control circuit 51,
It outputs to the multiplexer 52.

【0032】メモリタイミング制御部6は、アドレス生
成部5で生成されたアドレスをタイミングを図ってメモ
リ1にアクセスするように構成されている。
The memory timing control unit 6 is configured to access the memory 1 with timing of the address generated by the address generation unit 5.

【0033】次に、デジタル制御装置の動作を説明す
る。
Next, the operation of the digital controller will be described.

【0034】始めに、処理開始に際し、本願のデジタル
制御装置に対してリセットをかけると、演算部2は、内
蔵するプログラムカウンタを、メモリ1に格納されてい
る処理プログラムの先頭アドレスにセットし、このプロ
グラムカウンタ値をアドレス比較部4に出力し、プログ
ラムカウンタに1を加算する。
First, at the start of processing, when the digital control device of the present application is reset, the arithmetic unit 2 sets the built-in program counter to the start address of the processing program stored in the memory 1, This program counter value is output to the address comparison unit 4, and 1 is added to the program counter.

【0035】アドレス比較部4は、プログラムカウンタ
値と、データ格納部3の格納バッファ31に格納されて
いる命令の先頭アドレス値とを比較し、一致している場
合と、一致していない場合とで次のような動作を行う。
The address comparison unit 4 compares the program counter value with the start address value of the instruction stored in the storage buffer 31 of the data storage unit 3 and determines whether they match or not. The following operations are performed with.

【0036】(1)一致している場合 プログラムカウンタ値と、データ格納部3の格納バッフ
ァ31に格納されている命令の先頭アドレス値とが一致
している場合には、この旨の情報をデータ格納部3に出
力する。
(1) In case of coincidence When the program counter value and the start address value of the instruction stored in the storage buffer 31 of the data storage unit 3 coincide with each other, information to this effect is stored in the data. Output to the storage unit 3.

【0037】すると、演算部2は、データ格納部3から
その命令を読み出して処理し、再び上述と同様な処理を
行う。
Then, the arithmetic unit 2 reads the instruction from the data storage unit 3 and processes it, and again performs the same processing as described above.

【0038】 一方、データ格納部3は、格納バッファ
31に空き領域が存在する場合には、演算部2が命令を
読み出し中であっても、アドレス生成部5に空き領域が
存在する旨の情報を出力する。
On the other hand, in the data storage unit 3, when the storage buffer 31 has a free area, information indicating that there is a free area in the address generation unit 5 even when the arithmetic unit 2 is reading an instruction. Is output.

【0039】 アドレス生成部5は、データ格納エリア
3からの空き領域がある旨の情報を内蔵する制御回路5
1で受けると、制御回路51がデータ格納部3に空き領
域がある旨の情報をマルチプレクサ52に出力する。マ
ルチプレクサ52は、メモリ1にアクセスすべきアドレ
ス値を形成し、これをアドレスレジスタ53に出力す
る。
The address generation unit 5 has a control circuit 5 which contains information indicating that there is a free area from the data storage area 3.
When it is received at 1, the control circuit 51 outputs information indicating that there is a free area in the data storage unit 3 to the multiplexer 52. The multiplexer 52 forms an address value to access the memory 1, and outputs this to the address register 53.

【0040】ここで、マルチプレクサ52から出力され
るアドレス値は、アドレスレジスタ53において従前格
納されていたアドレス値に加算器54で1を加算された
値のアドレス値である。
Here, the address value output from the multiplexer 52 is the address value obtained by adding 1 to the address value previously stored in the address register 53 by the adder 54.

【0041】アドレスレジスタ53に格納されたアドレ
ス値は、メモリタイミング制御部6に出力される。メモ
リタイミング制御部6は、アドレス生成部5で生成され
たアドレス値をタイミングを図ってメモリ1にアクセス
するとともに、データ格納部3に出力する。
The address value stored in the address register 53 is output to the memory timing control unit 6. The memory timing control unit 6 outputs the address value generated by the address generation unit 5 to the data storage unit 3 while timingally accessing the memory 1.

【0042】データ格納部3は、メモリ1から読み出さ
れた命令と、メモリタイミング制御部6からのアドレス
値とを、格納バッファ31の空き領域の命令格納エリア
31cとアドレス格納エリア31bとに格納し、これに
対応する読み出し判定フラグエリア31aフラグを
(0)にセットする。
The data storage unit 3 stores the instruction read from the memory 1 and the address value from the memory timing control unit 6 in the instruction storage area 31c and the address storage area 31b in the empty area of the storage buffer 31. Then, the read determination flag area 31a flag corresponding to this is set to (0).

【0043】以上と同様な処理動作を、データ格納部3
からアドレス生成部4に対し、格納バッファ31に空き
領域が存在するとの情報を出力している間、データ格納
部3に演算部2が処理する命令を格納させる。
The same processing operation as above is performed by the data storage unit 3.
While outputting the information that the storage buffer 31 has a vacant area from the address generation unit 4, the data storage unit 3 stores the instruction to be processed by the arithmetic unit 2.

【0044】(2)一致していない場合 プログラムカウンタ値と、データ格納部3の格納バッフ
ァ31に格納されている命令の先頭アドレス値とが一致
していない場合、例えば、割込み処理やPLCが行うサ
イクリック処理のように、アドレスがジャンプした場合
には、アドレス比較部4は、プログラムカウンタ値と、
データ格納部3の格納バッファ31に格納されている命
令の先頭アドレス値とが連続していない旨の情報(すな
わち、格納バッファ31の全てに命令を新たに格納させ
る情報)を、データ格納部3およびアドレス生成部5に
出力する。
(2) When they do not match When the program counter value and the start address value of the instruction stored in the storage buffer 31 of the data storage unit 3 do not match, for example, interrupt processing or PLC is performed. When the address jumps as in the cyclic processing, the address comparison unit 4 compares the program counter value with
Information indicating that the start address value of the instruction stored in the storage buffer 31 of the data storage unit 3 is not continuous (that is, information for newly storing the instruction in all of the storage buffer 31) is stored in the data storage unit 3 And output to the address generator 5.

【0045】すると、データ格納部3のデータ読込み制
御回路32は、読込み判定フラグ格納エリア31aの全
てに、新たな命令を受け入れる空き領域が存在すること
を示すフラグ(1)をセットし、上述と同様にしてデー
タ格納部3に命令を格納するようにする。
Then, the data read control circuit 32 of the data storage unit 3 sets a flag (1) indicating that there is an empty area for receiving a new instruction in all the read determination flag storage areas 31a, and Similarly, the instructions are stored in the data storage unit 3.

【0046】上述したデジタル制御装置は、プログラマ
ブルコントローラに適用すると好適である。
The digital control device described above is preferably applied to a programmable controller.

【0047】[0047]

【発明の効果】以上、説明したように、本発明では、演
算部が示すアドレス値とデータ格納手段が格納する命令
のアドレス値とが一致しない旨の情報をアドレス比較手
段から受けた場合には、アドレス生成手段により、演算
部が示すアドレス値をそのままメモリに対してアクセス
する一方、一致する旨の情報を受けた場合には、データ
格納手段からの空き領域が存在する旨の情報が有り続け
るまで、演算部が処理する命令のアドレス値を生成し、
これをメモリにアクセスする。そして、メモリから読み
出された命令がデータ格納手段の空き領域に格納される
ため、外部のアクセス速度が遅いメモリに直接アクセス
する必要がない。
As described above, according to the present invention, when the information indicating that the address value indicated by the arithmetic unit does not match the address value of the instruction stored in the data storage unit is received from the address comparison unit, While the address generating unit accesses the memory as it is, the address value indicated by the arithmetic unit, when the information indicating the coincidence is received, the information indicating that there is an empty area from the data storing unit continues to exist. Up to the address value of the instruction processed by the arithmetic unit,
This is accessed in memory. Then, since the instruction read from the memory is stored in the empty area of the data storage means, it is not necessary to directly access the memory having a slow external access speed.

【0048】従って、実際には外部のアクセス速度が遅
いメモリから処理プログラムを読み出してはいるもの
の、実質的に高速なメモリと同等な性能を得ることがで
きるとともに、演算部が処理プログラムをキャッシュ内
部に取り込む際の、アクセス時間待ちを無くすことがで
きる。
Therefore, although the processing program is actually read from a memory having a slow external access speed, substantially the same performance as a high-speed memory can be obtained, and the arithmetic unit caches the processing program inside the cache. It is possible to eliminate waiting for access time when importing to.

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

【図1】本発明に係るデジタル制御装置の一実施例の構
成を示すブロック図。
FIG. 1 is a block diagram showing the configuration of an embodiment of a digital control device according to the present invention.

【図2】図1中のデータ格納部の構成を示すブロック図FIG. 2 is a block diagram showing the configuration of a data storage unit in FIG.

【図3】図1中のアドレス生成部の構成を示すブロック
図。
FIG. 3 is a block diagram showing a configuration of an address generation unit in FIG.

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

1 メモリ 2 演算部 3 データ格納部 4 アドレス比較部 5 アドレス生成部 6 メモリタイミング制御部 31 格納バッファ 32 データ読込み制御回路 51 制御回路 52 マルチプレクサ 53 アドレスレジタ 54 加算器 1 memory 2 operation part 3 data storage 4 Address comparison unit 5 Address generator 6 Memory timing controller 31 storage buffer 32 data read control circuit 51 control circuit 52 multiplexer 53 Address Register 54 adder

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 9/38 G05B 19/02 - 19/05 ─────────────────────────────────────────────────── ─── Continuation of the front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 9/38 G05B 19/02-19/05

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 演算部がメモリ上の処理プログラムを構
成する命令を逐次読み出していき、当該処理プログラム
を処理するデジタル制御装置において、データ格納手段と、アドレス比較手段と、アドレス生成
手段を具備し、 上記データ格納手段は、 上記演算部が処理する命令を予め格納する命令格納エリ
アを複数有するとともに、この複数の命令格納エリアご
とに、上記命令のメモリ上でのアドレス値を格納するア
ドレス格納エリアと、上記演算部によりすでに読み出さ
れた命令であるか否かを示すフラグを格納するフラグ格
納エリアとを備え、 上記フラグ格納エリアのフラグをチェックした結果、上
記演算部に読み出されたことを示すフラグが少なくとも
1つ以上ある場合は、そのフラグに対応する命令格納エ
リアが空き領域として存在する旨の情報が上記アドレス
生成部に出力され、 上記アドレス比較手段は、 上記演算部が処理する命令を受けると、その命令のアド
レス値と上記データ格納部に格納されている命令のアド
レス値とを比較し、 上記アドレス生成手段は、 上記アドレス比較手段での比較の結果、上記両アドレス
値が一致しない場合には、上記演算部が示すアドレス値
をそのまま上記メモリに対してアクセスするアドレス値
とする一方、上記両アドレス値が一致する場合には、上
記データ格納手段から上記命令格納エリアの空き領域が
存在する旨の情報が有る間、その空き領域の命令格納エ
リアに命令を格納するために、上記メモリにアクセスす
るアドレス値を生成すること を特徴とするデジタル制御装置。
1. A digital control device in which an arithmetic unit sequentially reads out instructions constituting a processing program on a memory and processes the processing program, in a digital storage device, a data storage means, an address comparison means, and an address generation.
Means for storing the instruction to be processed by the arithmetic unit in advance.
In addition to having multiple
And stores the address value of the above instruction on the memory.
It has already been read by the dress storage area and the above-mentioned calculation unit.
Flag case that stores a flag that indicates whether the instruction is
The storage area is provided, and as a result of checking the flag in the above flag storage area,
At least the flag indicating that it has been read by the arithmetic unit
If there is more than one, the instruction storage error corresponding to that flag
Information that the rear exists as a free area is the above address
When the address comparing means receives the instruction output by the generating section and processed by the calculating section , the address comparing section adds the instruction.
Response value and the instruction stored in the above data storage
The address generating means compares the address value with the address
If the values do not match, the address value indicated by the above calculation unit
Is the address value to access the above memory as it is
On the other hand, if the above two address values match,
From the data storage means
While there is information that it exists, the instruction storage
Access the above memory to store instructions in the rear
A digital control device characterized by generating an address value according to the above .
【請求項2】 上記アドレス生成手段は、上記メモリを
アクセスすべきアドレス値を格納するアドレス値格納手
段と、 上記演算部が示すアドレス値と上記データ格納手段が読
み出す命令のアドレス値とが一致しない旨の情報を上記
アドレス比較手段より受けた場合には、上記演算部が示
すアドレス値を上記アドレス値格納手段に格納し、一致
する場合には上記データ格納手段からの空き領域が存在
する旨の情報が有る間、上記アドレス値格納手段に格納
されているアドレス値に1を加算した値を、再び上記ア
ドレス値格納手段に格納させるアドレス加算/格納手段
とを有することを特徴とする請求項1に記載のデジタル
制御装置。
2. The address generating means does not match the address value storing means for storing the address value for accessing the memory, and the address value indicated by the arithmetic unit and the address value of the instruction read by the data storing means. When the information to the effect is received from the address comparison means, the address value indicated by the arithmetic unit is stored in the address value storage means, and if they match, it means that there is an empty area from the data storage means. while the information is present, according to claim 1, characterized in that it comprises an address adder / storage means a value obtained by adding 1 to the address value stored in the address value storing means, thereby again stored in the address value storage unit digital control unit according to.
【請求項3】 上記請求項1または2に記載の発明は、
プログラマブルコントローラに使用されることを特徴と
するデジタル制御装置。
3. The invention according to claim 1 or 2 ,
A digital controller characterized by being used in a programmable controller.
JP05453595A 1995-03-14 1995-03-14 Digital control device Expired - Fee Related JP3476104B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05453595A JP3476104B2 (en) 1995-03-14 1995-03-14 Digital control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05453595A JP3476104B2 (en) 1995-03-14 1995-03-14 Digital control device

Publications (2)

Publication Number Publication Date
JPH08249177A JPH08249177A (en) 1996-09-27
JP3476104B2 true JP3476104B2 (en) 2003-12-10

Family

ID=12973367

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05453595A Expired - Fee Related JP3476104B2 (en) 1995-03-14 1995-03-14 Digital control device

Country Status (1)

Country Link
JP (1) JP3476104B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002099312A (en) 2000-09-22 2002-04-05 Mitsubishi Electric Corp Programmable controller and control program development supporting device
JP5768627B2 (en) * 2011-09-27 2015-08-26 富士電機株式会社 Programmable controller, program creation support apparatus, digital control program, and program creation support program
JP5863855B2 (en) 2014-02-26 2016-02-17 ファナック株式会社 Programmable controller having instruction cache for processing branch instructions at high speed

Also Published As

Publication number Publication date
JPH08249177A (en) 1996-09-27

Similar Documents

Publication Publication Date Title
US7996821B2 (en) Data processor
US4967375A (en) Fast architecture for graphics processor
US5696989A (en) Microcomputer equipped with DMA controller allowed to continue to perform data transfer operations even after completion of a current data transfer operation
JP3180362B2 (en) Information processing device
JPH0666056B2 (en) Information processing system
CA2283044A1 (en) An apparatus for software initiated prefetch and method therefor
JP3137117B2 (en) High-speed processing computer
JP2001290706A (en) Prefetch for tlb cache
JP3476104B2 (en) Digital control device
JP3039391B2 (en) Memory system
JPS601655B2 (en) Data prefetch method
JPH1063574A (en) Processor with cache memory
JP3068451B2 (en) Electronic computer
JP2851777B2 (en) Bus control method and information processing device
JPH05289847A (en) Ring buffer control device
JP3216965B2 (en) Data receiving apparatus, method, and system
JP2534321B2 (en) Data transfer control method and apparatus
US5524221A (en) Next instruction pointer calculation system for a microcomputer
JP3176319B2 (en) Data processing device
JP3476314B2 (en) Microprocessor
JP3168845B2 (en) Digital signal processor
JPH05324316A (en) Microprocessor
JP3219422B2 (en) Cache memory control method
JP3366235B2 (en) Data read control device
JP2885168B2 (en) Data reply method in multiprocessor system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030829

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

Free format text: PAYMENT UNTIL: 20080926

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20080926

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090926

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090926

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100926

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100926

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110926

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110926

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120926

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130926

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees