JP2022033968A - Processing speed matching circuit and microprocessor - Google Patents

Processing speed matching circuit and microprocessor Download PDF

Info

Publication number
JP2022033968A
JP2022033968A JP2021202559A JP2021202559A JP2022033968A JP 2022033968 A JP2022033968 A JP 2022033968A JP 2021202559 A JP2021202559 A JP 2021202559A JP 2021202559 A JP2021202559 A JP 2021202559A JP 2022033968 A JP2022033968 A JP 2022033968A
Authority
JP
Japan
Prior art keywords
microprocessor
program
instruction code
instruction
processing
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.)
Granted
Application number
JP2021202559A
Other languages
Japanese (ja)
Other versions
JP7276755B2 (en
Inventor
博 山崎
Hiroshi Yamazaki
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.)
Lapis Semiconductor Co Ltd
Original Assignee
Lapis Semiconductor Co 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
Priority claimed from JP2017137436A external-priority patent/JP2019020931A/en
Application filed by Lapis Semiconductor Co Ltd filed Critical Lapis Semiconductor Co Ltd
Priority to JP2021202559A priority Critical patent/JP7276755B2/en
Publication of JP2022033968A publication Critical patent/JP2022033968A/en
Application granted granted Critical
Publication of JP7276755B2 publication Critical patent/JP7276755B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a processing speed matching circuit and a microprocessor in which occurrence of malfunction of a program is suppressed even when the program including an instruction code of which processing speed is not consistent with processing speed of an arithmetic processing part is used.
SOLUTION: The present invention comprises a detection part 12 acquiring an instruction code<1>included in a program from a storage device 30 storing the program for operating an arithmetic processing part 20, and detecting a specific instruction code to be predicted that mismatch occurs between the time required for processing the instruction code<1>and the processing speed of the arithmetic processing part 20, and a waiting part 16 making execution start of the specific instruction code wait only for the time corresponding to the mismatch if the specific instruction code is detected in the detection part 12.
SELECTED DRAWING: Figure 1
COPYRIGHT: (C)2022,JPO&INPIT

Description

本発明は、処理速度整合回路およびマイクロプロセッサ、特に特定の命令の処理速度が変更された場合でもプログラムの互換性が維持される処理速度整合回路、および該処理速度整合回路を備えたマイクロプロセッサに関する。 The present invention relates to a processing speed matching circuit and a microprocessor, particularly a processing speed matching circuit that maintains program compatibility even when the processing speed of a specific instruction is changed, and a microprocessor provided with the processing speed matching circuit. ..

従来、プログラムの互換性を問題とした文献として特許文献1が知られている。特許文献1では、実行タイミングが異なる2つのCPU(Central Processing Unit)のソフトウェア互換性を問題としている。特許文献1に開示された論理回路シミュレータでは、2つの異なるシミュレーションの実行結果から、命令実行の区切りのタイミングを検出し、その時点におけるフリップフロップ等の記憶素子の状態値を比較することにより、2つのCPUがソフトウェア互換性を有することを確認している。 Conventionally, Patent Document 1 is known as a document having a problem of program compatibility. Patent Document 1 has a problem of software compatibility between two CPUs (Central Processing Units) having different execution timings. In the logic circuit simulator disclosed in Patent Document 1, the timing of instruction execution delimiter is detected from the execution results of two different simulations, and the state values of storage elements such as flip-flops at that time are compared. We have confirmed that one CPU has software compatibility.

ここで、図3を参照してマイクロプロセッサにおける処理について説明する。図3は、比較例に係るマイクロプロセッサ50の構成を示すブロック図であり、外部に接続される記憶装置60も一緒に図示している。図3に示すように、マイクロプロセッサ50は、命令デコーダ52、ウエイト回路54、演算処理装置(ALU:Arithmetic Logic Unit)56を含んで構成されている。 Here, the processing in the microprocessor will be described with reference to FIG. FIG. 3 is a block diagram showing the configuration of the microprocessor 50 according to the comparative example, and also illustrates the storage device 60 connected to the outside. As shown in FIG. 3, the microprocessor 50 includes an instruction decoder 52, a weight circuit 54, and an arithmetic processing unit (ALU) 56.

マイクロプロセッサ50による処理は、次のように行われる。すなわち、プログラムが記憶された記憶装置60のアドレス(図3に<5>で示す信号、以下<数字>の表記は図中の信号を示す)を指定して命令デコーダ52が命令コード<1>を呼び出し、命令デコーダ52が解読する。解読された命令コード<1>は命令<2>として演算処理装置56に送られ、演算処理装置56によって実行されるとともに、実行結果が所定の記憶装置に書き込まれる。 The processing by the microprocessor 50 is performed as follows. That is, the instruction decoder 52 specifies the address of the storage device 60 in which the program is stored (the signal indicated by <5> in FIG. 3, and the notation of <number> below indicates the signal in the figure), and the instruction decoder 52 indicates the instruction code <1>. Is called, and the instruction decoder 52 decodes it. The decoded instruction code <1> is sent to the arithmetic processing unit 56 as an instruction <2>, executed by the arithmetic processing unit 56, and the execution result is written in a predetermined storage device.

マイクロプロセッサ50が記憶装置60にアクセスする場合において、記憶装置60からのデータ出力がマイクロプロセッサ50の処理時間より遅い場合は、マイクロプロセッサ50を待機させるために、記憶装置60からウエイト信号<3>がウエイト回路54に送られる。ウエイト信号<3>を受け取ったウエイト回路54は、所定の時間だけ処理の実行を待たせる(待機させる)ために命令デコーダ52にウエイトコントロール信号<4>を送る。 When the microprocessor 50 accesses the storage device 60, if the data output from the storage device 60 is slower than the processing time of the microprocessor 50, the weight signal <3> from the storage device 60 in order to make the microprocessor 50 stand by. Is sent to the weight circuit 54. The weight circuit 54 that has received the weight signal <3> sends a weight control signal <4> to the instruction decoder 52 in order to make the execution of the process wait (stand by) for a predetermined time.

特開平10-187790号公報Japanese Unexamined Patent Publication No. 10-187790

ところで、半導体装置一般に共通のことではあるが、特にマイクロプロセッサの技術分野では、処理能力の向上等を目的とした新たな機種の開発が日々行われている。例えば、当初8ビットに対応する機種として開発されたマイクロプロセッサが、バージョンアップして処理能力の向上した16ビットに対応する機種とされることがある。その場合、8ビットに対応するマイクロプロセッサ用に開発したプログラムが極力使用可能なように(プログラムの継承が可能なように)命令互換とされる場合も多い。それと同時に、処理能力を向上させた16ビット対応のマイクロプロセッサを搭載したマイクロコンピュータ(以下、「16ビットマイコン」)が、8ビット対応のマイクロプロセッサを搭載したマイクロコンピュータ(以下、「8ビットマイコン」)の上位機種として開発される。 By the way, although it is common to semiconductor devices in general, especially in the technical field of microprocessors, new models are being developed every day for the purpose of improving processing capacity and the like. For example, a microprocessor originally developed as a model corresponding to 8 bits may be made a model corresponding to 16 bits having an upgraded version and improved processing capacity. In that case, the program developed for the microprocessor corresponding to 8 bits is often made instruction compatible so that it can be used as much as possible (so that the program can be inherited). At the same time, a microcomputer equipped with a 16-bit compatible microprocessor with improved processing capacity (hereinafter, "16-bit microcomputer") is replaced by a microcomputer equipped with an 8-bit compatible microprocessor (hereinafter, "8-bit microcomputer"). ) Will be developed as a high-end model.

しかしながら、16ビットマイコンが開発される以前に8ビットマイコンを採用したユーザによって、処理能力が向上した16ビットマイコンに置き換えられた場合、プログラムの継承に問題が起きることがある。例えば、ユーザにより8ビットマイコンで開発されたプログラムにおいて、あるプログラムルーチンが8ビット対応のマイクロプロセッサの命令処理時間を見込んで組まれ、該命令処理時間の経過後にさらに次のプログラムルーチンに移行するようなルーチンが組まれていた場合である。つまり、処理能力が向上したことに起因し、あるプログラムルーチンから次のプログラムルーチンへの移行時間が短くなることによって、誤動作が発生するという問題である。 However, if a user who adopted an 8-bit microcomputer before the development of a 16-bit microcomputer replaces it with a 16-bit microcomputer with improved processing capacity, a problem may occur in inheritance of the program. For example, in a program developed by a user with an 8-bit microcomputer, a certain program routine is assembled in anticipation of the instruction processing time of an 8-bit compatible microprocessor, and after the instruction processing time elapses, the program routine is further transferred to the next program routine. Routine was set up. That is, there is a problem that a malfunction occurs because the transition time from one program routine to the next program routine is shortened due to the improvement in processing capacity.

上記問題が発生すると、8ビットマイコンと16ビットマイコンとがたとえ命令互換であっても、8ビットマイコンで開発したプログラムを16ビットマイコンで使用する場合に、当該プログラムを変更せずそのまま使用することができないので、既存のプログラムを修正する必要が生ずる。その結果、マイコンの置き換えに時間を要することになる。 When the above problem occurs, even if the 8-bit microcomputer and the 16-bit microcomputer are instruction-compatible, when the program developed by the 8-bit microcomputer is used by the 16-bit microcomputer, the program should be used as it is without being changed. Therefore, it becomes necessary to modify the existing program. As a result, it takes time to replace the microcomputer.

この点、特許文献1は、命令の処理時間そのものを問題とした文献ではない。 In this respect, Patent Document 1 is not a document in which the processing time of an instruction itself is a problem.

本発明は、上述した課題を解決するためになされたものであり、演算処理部の処理速度に対して処理速度が整合しない命令コードを含むプログラムを用いた場合でも、プログラムの誤動作の発生が抑制された処理速度整合回路およびマイクロプロセッサを提供することを目的とする。 The present invention has been made to solve the above-mentioned problems, and even when a program including an instruction code whose processing speed does not match the processing speed of the arithmetic processing unit is used, the occurrence of program malfunction is suppressed. It is an object of the present invention to provide a processed speed matching circuit and a microprocessor.

本発明に係る処理速度整合回路は、演算処理部を動作させるためのプログラムが記憶された記憶装置から前記プログラムに含まれる命令コードを取得し、前記命令コードの処理に要する時間と前記演算処理部の処理速度との間に不整合が発生すると予測される特定命令コードを検知する検知部と、前記検知部で前記特定命令コードが検知された場合に、前記不整合に対応する時間分だけ前記特定命令コードの実行開始を待機させる待機部と、を含むものである。 The processing speed matching circuit according to the present invention acquires an instruction code included in the program from a storage device in which a program for operating the arithmetic processing unit is stored, and the time required for processing the instruction code and the arithmetic processing unit. A detection unit that detects a specific instruction code that is predicted to cause an inconsistency with the processing speed of the above, and a detection unit that detects the specific instruction code, for the time corresponding to the inconsistency. It includes a standby unit that waits for the start of execution of a specific instruction code.

本発明に係るマイクロプロセッサは、プログラムに基づいて処理を実行する演算処理部と、上記の処理速度整合回路と、を含むものである。 The microprocessor according to the present invention includes an arithmetic processing unit that executes processing based on a program, and the above-mentioned processing speed matching circuit.

本発明によれば、演算処理部の処理速度に対して処理速度が整合しない命令コードを含むプログラムを用いた場合でも、プログラムの誤動作の発生が抑制された処理速度整合回路およびマイクロプロセッサを提供することができるという効果を奏する。 According to the present invention, there is provided a processing speed matching circuit and a microprocessor in which the occurrence of program malfunction is suppressed even when a program including an instruction code whose processing speed does not match the processing speed of the arithmetic processing unit is used. It has the effect of being able to do it.

第1の実施の形態に係るマイクロプロセッサの構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the microprocessor which concerns on 1st Embodiment. 第2の実施の形態に係るマイクロプロセッサの構成の一例を示すブロック図である。It is a block diagram which shows an example of the structure of the microprocessor which concerns on 2nd Embodiment. 比較例に係るマイクロプロセッサの構成を示すブロック図である。It is a block diagram which shows the structure of the microprocessor which concerns on a comparative example.

以下、図面を参照し、本発明を実施するための形態について詳細に説明する。以下の説明においては、外部記憶装置から命令を読み出し実行するマイクロプロセッサの回路構成を例示して説明する。 Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the drawings. In the following description, a circuit configuration of a microprocessor that reads and executes instructions from an external storage device will be illustrated and described.

[第1の実施の形態]
図1を参照して、本実施の形態に係るマイクロプロセッサ10の構成について説明する。図1には、マイクロプロセッサ10に付随し、マイクロプロセッサ10で用いるプログラム等が記憶された記憶装置30も併せて示している。記憶装置30の種類に特に制限はないが、本実施の形態では不揮発性メモリとされている。図1に示すように、マイクロプロセッサ10は、特定命令検知回路(処理能力)12、命令デコーダ14、ウエイト回路16、演算処理装置(ALU)20、OR回路18を含んで構成されている。マイクロプロセッサ10の種類に特に制限はないが、本実施の形態では、16ビット対応のマイクロプロセッサとされている。なお、ここでいう「16ビット対応」とは、演算処理装置20のビット幅が16ビットであることをさす。なお、図1に示す特定命令検知回路(処理能力)12、およびウエイト回路16が、本発明に係る「処理速度整合回路」を構成している。
[First Embodiment]
The configuration of the microprocessor 10 according to the present embodiment will be described with reference to FIG. 1. FIG. 1 also shows a storage device 30 attached to the microprocessor 10 and in which a program or the like used in the microprocessor 10 is stored. The type of the storage device 30 is not particularly limited, but in the present embodiment, it is a non-volatile memory. As shown in FIG. 1, the microprocessor 10 includes a specific instruction detection circuit (processing capacity) 12, an instruction decoder 14, a weight circuit 16, an arithmetic processing unit (ALU) 20, and an OR circuit 18. The type of the microprocessor 10 is not particularly limited, but in the present embodiment, it is a microprocessor compatible with 16 bits. The term "16-bit compatible" as used herein means that the bit width of the arithmetic processing unit 20 is 16 bits. The specific command detection circuit (processing capacity) 12 and the weight circuit 16 shown in FIG. 1 constitute a "processing speed matching circuit" according to the present invention.

演算処理装置20は、入力された命令に基づいて処理を実行するとともに、実行結果を出力する装置である。 The arithmetic processing unit 20 is a device that executes processing based on an input instruction and outputs an execution result.

命令デコーダ14は、記憶装置30に記憶されたプログラムの命令コード<1>を、記憶装置30のアドレス<8>を指定して呼び出し、解読する。解読された命令<7>は当該命令<7>を実行する演算処理装置20に送られ、当該演算処理装置20によって実行され、図示しない記憶装置等に実行結果が書き込まれる。また、解読された命令<2>は同時に特定命令検知回路(処理能力)12にも送られる。 The instruction decoder 14 calls and decodes the instruction code <1> of the program stored in the storage device 30 by designating the address <8> of the storage device 30. The decoded instruction <7> is sent to the arithmetic processing unit 20 that executes the instruction <7>, is executed by the arithmetic processing unit 20, and the execution result is written in a storage device (not shown) or the like. Further, the decoded instruction <2> is also sent to the specific instruction detection circuit (processing capacity) 12 at the same time.

ウエイト回路16は、マイクロプロセッサ10が記憶装置30のような外部装置にアクセスする場合において、外部装置からのデータ出力がマイクロプロセッサ10の処理時間より遅いときに、マイクロプロセッサ10による処理を待機させるための回路である。マイクロプロセッサ10による処理の待機は、記憶装置30から送られるウエイト信号<4>に基づいて実行される。ウエイト回路16は、処理を待機させる場合にはウエイトコントロール信号<6>を命令デコーダ14に送る。 The weight circuit 16 waits for processing by the microprocessor 10 when the data output from the external device is slower than the processing time of the microprocessor 10 when the microprocessor 10 accesses an external device such as the storage device 30. It is a circuit of. The standby for processing by the microprocessor 10 is executed based on the weight signal <4> sent from the storage device 30. The weight circuit 16 sends a weight control signal <6> to the instruction decoder 14 when the process is made to stand by.

特定命令検知回路(処理能力)12は、命令デコーダ14でデコードされた命令<2>の中から、予め定められた命令を検知し、検知したことの情報を含む検知信号<3>をウエイト回路16に送る。この際、該検知信号<3>はOR回路18によって上記ウエイト信号<4>との論理和が取られ、その結果がウエイト入力信号<5>としてウエイト回路16に入力される。特定命令検知回路(処理能力)12には、特定命令検知回路(処理能力)12を動作させるか、させないか(動作、非動作)を選択するイネーブル信号<9>が外部端子32を介して入力されている。従って、必要な場合には該イネーブル信号<9>によって特定命令検知回路(処理能力)12の動作を停止させることが可能となっている。 The specific instruction detection circuit (processing capacity) 12 detects a predetermined instruction from the instructions <2> decoded by the instruction decoder 14, and waits for a detection signal <3> including the detected information. Send to 16. At this time, the detection signal <3> is ORed with the weight signal <4> by the OR circuit 18, and the result is input to the weight circuit 16 as the weight input signal <5>. An enable signal <9> for selecting whether to operate or not operate the specific command detection circuit (processing capacity) 12 (operation or non-operation) is input to the specific command detection circuit (processing capacity) 12 via the external terminal 32. Has been done. Therefore, if necessary, the operation of the specific command detection circuit (processing capacity) 12 can be stopped by the enable signal <9>.

ここで、特定命令検知回路(処理能力)12で検知される特定命令について説明する。
本実施の形態に係る特定命令とは、何らかの原因によって演算処理装置20の処理速度と処理速度が整合していない命令をいう。演算処理装置20との処理速度が整合しない原因については特に制限はないが、本実施の形態ではマイクロプロセッサ10が制御する対象(制御対象)の応答速度が遅く、通常のマイクロプロセッサ10の処理において誤動作が発生する可能性のある命令をいう。制御対象の応答速度が遅くなる原因としてはさまざま考えられるが、本実施の形態ではマイクロプロセッサ10が旧仕様のマイクロプロセッサ(例えば、8ビット対応のマイクロプロセッサ)からバージョンアップされ処理能力が向上されたために、相対的な応答速度が遅くなった命令をいう。つまり、特定命令は旧仕様のマイクロプロセッサと本来互換性のある命令であるが、マイクロプロセッサ10の処理速度向上により、所定の動作条件において互換ではなくなった命令をいう。
Here, the specific instruction detected by the specific instruction detection circuit (processing capacity) 12 will be described.
The specific instruction according to the present embodiment means an instruction in which the processing speed and the processing speed of the arithmetic processing unit 20 do not match for some reason. There is no particular limitation on the cause of the inconsistency in the processing speed with the arithmetic processing unit 20, but in the present embodiment, the response speed of the target (controlled target) controlled by the microprocessor 10 is slow, and in the processing of the normal microprocessor 10. An instruction that may cause a malfunction. There are various possible causes for the slow response speed of the controlled object, but in this embodiment, the microprocessor 10 has been upgraded from the microprocessor of the old specification (for example, an 8-bit compatible microprocessor) to improve the processing capacity. In addition, it means an instruction whose relative response speed has become slower. That is, the specific instruction is an instruction that is originally compatible with the microprocessor of the old specification, but is an instruction that is no longer compatible under predetermined operating conditions due to the improvement in the processing speed of the microprocessor 10.

上記のような応答速度における不整合発生の具体例は、上述したように、8ビットマイコンでユーザが開発したプログラムを上位機種である16ビットマイコンで動作させる場合において、あるプログラムルーチンが8ビット対応のマイクロプロセッサの命令処理時間(以下、「特定命令処理時間」)を見込んで組まれ、さらに次のプログラムルーチンに移行するようなプログラムであった場合である。この場合は、16ビットマイコンの処理速度が速くなったことに起因して特定命令処理時間も短くなることが想定さる。 As a specific example of the occurrence of inconsistency in the response speed as described above, as described above, when a program developed by a user with an 8-bit microcomputer is operated by a 16-bit microcomputer which is a higher-end model, a certain program routine supports 8-bit. This is a case where the program is constructed in anticipation of the instruction processing time (hereinafter, "specific instruction processing time") of the microprocessor of the above, and further shifts to the next program routine. In this case, it is assumed that the specific instruction processing time is shortened due to the faster processing speed of the 16-bit microcomputer.

すると、この特定命令処理時間が経過しないうちに次のプログラムルーチンに移行する場合が想定され、この場合にはプログラムの処理において誤動作が発生する恐れがある。
このような特定命令処理時間を含む命令として、例えばデータの転送命令が挙げられる。転送命令の場合、マイクロプロセッサが8ビット対応から16ビット対応にバージョンアップしたことにより処理速度が速くなる(例えば、2倍になる)と、転送が完了しないうちに次のプログラムルーチンに移行してしまうことも想定される。
Then, it is assumed that the program moves to the next program routine before the specific instruction processing time elapses. In this case, a malfunction may occur in the program processing.
Examples of the instruction including such a specific instruction processing time include a data transfer instruction. In the case of a transfer instruction, if the processing speed becomes faster (for example, doubled) due to the upgrade of the microprocessor from 8-bit support to 16-bit support, the program shifts to the next program routine before the transfer is completed. It is also expected that it will end up.

そこで、本実施の形態では、マイクロプロセッサ10において、マイクロプロセッサ10のバージョンアップ前のマイクロプロセッサ(以下、「旧マイクロプロセッサ」)に対して処理能力の高くなった命令(特定命令)による処理を意図的に遅くし、特定命令に対する当該マイクロプロセッサ10の処理速度と旧マイクロプロセッサの処理速度との整合を図っている。このことにより、本来互換性のある命令の命令実行タイミングも同等となるため、旧マイクロプロセッサ用に開発されたプログラムの変更を行うことなく旧マイクロプロセッサからマイクロプロセッサ10への置き換えが可能となる。また、マイクロプロセッサ10は、特定命令検知回路(処理能力)12に入力されるイネーブル信号<9>の入力部を備えているので、マイクロプロセッサ10のプログラムにおいて特定命令が用いられていないことが予めわかっている場合には特定命令検知回路(処理能力)12の動作を停止させ、本来のマイクロプロセッサ10の処理能力を発揮させることができる。 Therefore, in the present embodiment, in the microprocessor 10, it is intended to process by an instruction (specific instruction) having a higher processing capacity than the microprocessor (hereinafter, "old microprocessor") before the version upgrade of the microprocessor 10. The processing speed of the microprocessor 10 for a specific instruction is matched with the processing speed of the old microprocessor. As a result, the instruction execution timings of the originally compatible instructions are also the same, so that the old microprocessor can be replaced with the microprocessor 10 without changing the program developed for the old microprocessor. Further, since the microprocessor 10 includes an input unit of the enable signal <9> input to the specific instruction detection circuit (processing capacity) 12, it is necessary in advance that the specific instruction is not used in the program of the microprocessor 10. If it is known, the operation of the specific instruction detection circuit (processing capacity) 12 can be stopped, and the original processing capacity of the microprocessor 10 can be exerted.

図1を参照して、マイクロプロセッサ10の動作についてより具体的に説明する。以下では、イネーブル信号<9>がアクティブとされ、特定命令検知回路(処理能力)12が動作状態にあるものとする。特定命令検知回路(処理能力)12は、命令デコーダ14から命令<2>を受け取ると、受け取った命令<2>が特定命令に該当するか否か判定する。本実施の形態では、特定命令に該当する命令が予めわかっており、例えば図示しない記憶部に記憶されている。特定命令検知回路(処理能力)12は、受け取った命令<2>を記憶部に記憶されている特定命令と照合し、特定命令に該当すると判定した場合には検知信号<3>を発出する。 The operation of the microprocessor 10 will be described more specifically with reference to FIG. In the following, it is assumed that the enable signal <9> is activated and the specific command detection circuit (processing capacity) 12 is in the operating state. When the specific instruction detection circuit (processing capacity) 12 receives the instruction <2> from the instruction decoder 14, it determines whether or not the received instruction <2> corresponds to the specific instruction. In the present embodiment, the instruction corresponding to the specific instruction is known in advance, and is stored in, for example, a storage unit (not shown). The specific instruction detection circuit (processing capacity) 12 collates the received instruction <2> with the specific instruction stored in the storage unit, and issues a detection signal <3> when it is determined that the specific instruction corresponds to the specific instruction.

検知信号<3>はウエイト回路16にウエイト入力として入力され、ウエイト入力を受け取ったウエイト回路16は、ウエイトコントロール信号<6>を命令デコーダ14に送り、所定の時間だけ特定命令の処理を待機させる。具体的には、旧マイクロプロセッサの処理時間と、処理能力が向上したマイクロプロセッサ10の処理時間(特定命令処理時間)との差分の時間(以下、「待機時間」)に相当する時間だけ検知信号<3>をアクティブにする。待機時間は、マイクロプロセッサ10で用いられるクロックの数でカウントしてもよい。すなわち、クロック数で待機時間を規定してもよい。 The detection signal <3> is input to the weight circuit 16 as a weight input, and the weight circuit 16 that receives the weight input sends the weight control signal <6> to the instruction decoder 14 to wait for the processing of the specific instruction for a predetermined time. .. Specifically, the detection signal is only the time corresponding to the difference time (hereinafter, "standby time") between the processing time of the old microprocessor and the processing time (specific instruction processing time) of the microprocessor 10 with improved processing capacity. Activate <3>. The standby time may be counted by the number of clocks used in the microprocessor 10. That is, the standby time may be specified by the number of clocks.

検知信号<3>は、OR回路18でウエイト信号<4>と論理和がとられウエイト入力信号<5>としてウエイト回路16に入力される。ウエイト入力信号<5>が入力されたウエイト回路16は所定の時間だけ特定命令の実行を待機させるウエイトコントロール信号<6>を命令デコーダ14に送る。従って、ウエイト信号<4>の状態にかかわらず少なくとも待機時間の間、特定命令の実行が待機される。 The detection signal <3> is ORed with the weight signal <4> in the OR circuit 18 and is input to the weight circuit 16 as a weight input signal <5>. The weight circuit 16 to which the weight input signal <5> is input sends a weight control signal <6> that makes the execution of the specific instruction wait for a predetermined time to the instruction decoder 14. Therefore, regardless of the state of the weight signal <4>, the execution of the specific instruction is waited for at least the waiting time.

以上詳述したように、本実施の形態に係るマイクロプロセッサ10によれば、特定命令の実行を所定の待機時間だけ待機させているので、命令実行のタイミングも含めて旧マイクロプロセッサと命令互換とすることが可能となる。その結果、旧マイクロプロセッサからマイクロプロセッサへ10への置き換えが、旧マイクロプロセッサのプログラムを変更することなくそのまま用いて行うことが可能となる。また、本実施の形態では既存のウエイト回路16を用いているので、回路規模削減の効果もある。 As described in detail above, according to the microprocessor 10 according to the present embodiment, since the execution of a specific instruction is made to wait for a predetermined waiting time, the instruction compatibility with the old microprocessor including the timing of instruction execution is achieved. It becomes possible to do. As a result, the replacement of the old microprocessor with 10 can be performed by using the program of the old microprocessor as it is without changing the program. Further, since the existing weight circuit 16 is used in this embodiment, there is also an effect of reducing the circuit scale.

[第2の実施の形態]
図2を参照して、本実施の形態に係るマイクロプロセッサ10Aについて説明する。本実施の形態は、上記実施の形態に係る特定命令検知回路(処理能力)12を変更したものである。従って、マイクロプロセッサ10と同様の構成には同じ符号を付して詳細な説明を省略する。なお、図2に示す特定命令検知回路(実行タイミングマージン)12A、およびウエイト回路16が、本発明に係る「処理速度整合回路」を構成している。
[Second Embodiment]
The microprocessor 10A according to the present embodiment will be described with reference to FIG. This embodiment is a modification of the specific command detection circuit (processing capacity) 12 according to the above embodiment. Therefore, the same components as those of the microprocessor 10 are designated by the same reference numerals, and detailed description thereof will be omitted. The specific command detection circuit (execution timing margin) 12A and the weight circuit 16 shown in FIG. 2 constitute the "processing speed matching circuit" according to the present invention.

図2に示すように、マイクロプロセッサ10Aは、マイクロプロセッサ10の特定命令検知回路(処理能力)12が特定命令検知回路(実行タイミングマージン)12Aに置き換えられている。特定命令検知回路(実行タイミングマージン)12Aは、マイクロプロセッサ10に係る命令のうち、タイミングマージンのない命令(特定命令)を検知する回路である。タイミングマージンのない命令とは、何らかの原因によって実行タイミングがクリティカルになっている命令である。例えば、遅延時間の大きい遅延回路、あるいは演算処理装置を通過するように構成されているために遅延時間が大きくなり、実行タイミングのずれに対する許容度が低くなっている命令である。 As shown in FIG. 2, in the microprocessor 10A, the specific instruction detection circuit (processing capacity) 12 of the microprocessor 10 is replaced with the specific instruction detection circuit (execution timing margin) 12A. The specific instruction detection circuit (execution timing margin) 12A is a circuit that detects an instruction (specific instruction) having no timing margin among the instructions related to the microprocessor 10. An instruction without a timing margin is an instruction whose execution timing is critical for some reason. For example, it is an instruction that has a large delay time because it is configured to pass through a delay circuit having a large delay time or an arithmetic processing unit, and has a low tolerance for a deviation in execution timing.

マイクロプロセッサで実行されるプログラムに上記のようなタイミングマージンのない特定命令が存在すると、該特定命令のタイミングがボトルネックとなり、マイクロプロセッサの動作の基準となるクロックの周波数を上げることができない場合がある。そこで、本実施の形態に係るマイクロプロセッサ10Aでは、このような特定命令の実行において所定の時間待機させるようにした。 If a specific instruction without a timing margin as described above exists in a program executed by a microprocessor, the timing of the specific instruction becomes a bottleneck, and it may not be possible to increase the frequency of the clock that is the reference for the operation of the microprocessor. be. Therefore, in the microprocessor 10A according to the present embodiment, the microprocessor 10A is made to wait for a predetermined time in the execution of such a specific instruction.

イネーブル信号<9>がアクティブとされ、特定命令検知回路(実行タイミングマージン)12Aが動作状態にある場合、本実施の形態に係る特定命令検知回路(実行タイミングマージン)12Aは、上記のタイミングマージンのない命令を特定命令として検知する。本実施の形態に係る特定命令も予めリストアップされ、図示しない記憶部に記憶されている。特定命令検知回路(実行タイミングマージン)12Aは命令デコーダ14から受け取った命令<2>と予め定められた特定命令とを対比し、特定命令を検知すると、予め定められたクロック数分の時間だけ検知信号<3>を発出する。以降、上記実施の形態で説明した手順に基づいて、予め定められたクロック数分の時間だけ特定命令の実行が待機される。 When the enable signal <9> is activated and the specific instruction detection circuit (execution timing margin) 12A is in the operating state, the specific instruction detection circuit (execution timing margin) 12A according to the present embodiment has the above timing margin. Detects non-existent instructions as specific instructions. Specific instructions according to this embodiment are also listed in advance and stored in a storage unit (not shown). The specific instruction detection circuit (execution timing margin) 12A compares the instruction <2> received from the instruction decoder 14 with a predetermined specific instruction, and when the specific instruction is detected, it detects only the time for the predetermined number of clocks. It emits a signal <3>. After that, based on the procedure described in the above embodiment, the execution of the specific instruction is waited for a predetermined number of clocks.

以上のように、本実施の形態に係るマイクロプロセッサ10Aによれば、タイミングマージンのない命令を検知した場合、ウエイト回路16により予め定められた時間だけ該命令の実行を待機させるので、動作クロックの周波数を高くした場合のボトルネックが解消され、動作クロック周波数の上限を高く設定することできる。また、マイクロプロセッサ10Aは、特定命令検知回路(実行タイミングマージン)12Aに入力されるイネーブル信号<9>の入力部を備えているので、マイクロプロセッサ10Aのプログラムにおいて特定命令が用いられていないことが予めわかっている場合には特定命令検知回路(実行タイミングマージン)12Aの動作を停止させ、本来のマイクロプロセッサ10Aの処理能力を発揮させることができる。 As described above, according to the microprocessor 10A according to the present embodiment, when an instruction having no timing margin is detected, the weight circuit 16 waits for the execution of the instruction for a predetermined time. The bottleneck when the frequency is increased is eliminated, and the upper limit of the operating clock frequency can be set high. Further, since the microprocessor 10A includes an input unit of the enable signal <9> input to the specific instruction detection circuit (execution timing margin) 12A, the specific instruction is not used in the program of the microprocessor 10A. If it is known in advance, the operation of the specific instruction detection circuit (execution timing margin) 12A can be stopped, and the original processing capacity of the microprocessor 10A can be exhibited.

10 マイクロプロセッサ
12 特定命令検知回路(処理能力)
12A 特定命令検知回路(実行タイミングマージン)
14 命令デコーダ
16 ウエイト回路
18 OR回路
20 演算処理装置
30 記憶装置
32 外部端子
50 マイクロプロセッサ
52 命令デコーダ
54 ウエイト回路
56 演算処理装置
60 記憶装置
10 Microprocessor 12 Specific instruction detection circuit (processing capacity)
12A Specific instruction detection circuit (execution timing margin)
14 instruction decoder 16 weight circuit 18 OR circuit 20 arithmetic processing unit 30 storage device 32 external terminal 50 microprocessor 52 instruction decoder 54 weight circuit 56 arithmetic processing unit 60 storage device

Claims (7)

演算処理部を動作させるためのプログラムが記憶された記憶装置から前記プログラムに含まれる命令コードに基づいて、前記命令コードの処理に要する時間と前記演算処理部の処理速度との間に不整合が発生すると予測される特定命令コードを検知する検知部と、
前記記憶装置からの待機信号または前記検知部が前記特定命令コードを検知した場合に前記検知部により発出される検知信号が入力され、前記検知信号と前記待機信号の論理和を演算するとともに、演算結果を出力する論理和回路と、
前記論理和回路から出力された信号に基づいて、前記不整合に対応する時間分だけ前記特定命令コードの実行開始を待機させる待機部と、
を含む処理速度整合回路。
There is an inconsistency between the time required to process the instruction code and the processing speed of the arithmetic processing unit based on the instruction code included in the program from the storage device in which the program for operating the arithmetic processing unit is stored. A detector that detects a specific instruction code that is expected to occur,
A standby signal from the storage device or a detection signal issued by the detection unit when the detection unit detects the specific command code is input, and the logical sum of the detection signal and the standby signal is calculated and calculated. The OR circuit that outputs the result and
A standby unit that waits for the start of execution of the specific instruction code for a time corresponding to the inconsistency based on the signal output from the OR circuit.
Processing speed matching circuit including.
前記命令コードを解読して前記検知部に解読された命令を送出する解読部をさらに含み、
前記待機部は、前記不整合に対応する時間分だけ前記特定命令コードの実行開始を待機させるための信号を前記解読部に送る
請求項1に記載の処理速度整合回路。
Further including a decoding unit that decodes the instruction code and sends the decoded instruction to the detection unit.
The processing speed matching circuit according to claim 1, wherein the standby unit sends a signal for waiting for the start of execution of the specific instruction code to the decoding unit for a time corresponding to the inconsistency.
前記不整合が、前記演算処理部の動作速度の向上、および前記プログラムが前記動作速度の向上前のプログラムと同じプログラムであることによって発生したものであり、
前記不整合に対応する時間が、前記特定命令コードの前記演算処理部の動作速度の向上前後における処理速度の差分である
請求項1又は請求項2に記載の処理速度整合回路。
The inconsistency is caused by the improvement of the operating speed of the arithmetic processing unit and the fact that the program is the same program as the program before the improvement of the operating speed.
The processing speed matching circuit according to claim 1 or 2, wherein the time corresponding to the inconsistency is the difference in processing speed before and after the improvement of the operating speed of the arithmetic processing unit of the specific instruction code.
前記不整合が、前記特定命令コードのタイミングマージンが小さいことによって発生したものであり、
前記不整合に対応する時間が、前記特定命令コードごとに予め定められた時間である
請求項1又は請求項2に記載の処理速度整合回路。
The inconsistency is caused by a small timing margin of the specific instruction code.
The processing speed matching circuit according to claim 1 or 2, wherein the time corresponding to the inconsistency is a predetermined time for each specific instruction code.
前記検知部は、外部からの切り替え信号によって動作、非動作が切り替え可能となっている
請求項1から請求項4のいずれか1項に記載の処理速度整合回路。
The processing speed matching circuit according to any one of claims 1 to 4, wherein the detection unit can be switched between operation and non-operation by a switching signal from the outside.
プログラムに基づいて処理を実行する演算処理部と、
請求項1から請求項5のいずれか1項に記載の処理速度整合回路と、
を含むマイクロプロセッサ。
An arithmetic processing unit that executes processing based on a program,
The processing speed matching circuit according to any one of claims 1 to 5.
Microprocessor including.
処理の時間的な基準となるクロック源をさらに含み、
前記不整合に対応する時間が前記クロック源のクロック数で規定される
請求項6に記載のマイクロプロセッサ。
It also includes a clock source that serves as a time reference for processing.
The microprocessor according to claim 6, wherein the time corresponding to the inconsistency is defined by the number of clocks of the clock source.
JP2021202559A 2017-07-13 2021-12-14 Processing speed matching circuit and microprocessor Active JP7276755B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021202559A JP7276755B2 (en) 2017-07-13 2021-12-14 Processing speed matching circuit and microprocessor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017137436A JP2019020931A (en) 2017-07-13 2017-07-13 Processing speed matching circuit and microprocessor
JP2021202559A JP7276755B2 (en) 2017-07-13 2021-12-14 Processing speed matching circuit and microprocessor

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2017137436A Division JP2019020931A (en) 2017-07-13 2017-07-13 Processing speed matching circuit and microprocessor

Publications (2)

Publication Number Publication Date
JP2022033968A true JP2022033968A (en) 2022-03-02
JP7276755B2 JP7276755B2 (en) 2023-05-18

Family

ID=87853073

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021202559A Active JP7276755B2 (en) 2017-07-13 2021-12-14 Processing speed matching circuit and microprocessor

Country Status (1)

Country Link
JP (1) JP7276755B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62174832A (en) * 1985-12-25 1987-07-31 Nec Corp Information processor
JP2000311061A (en) * 1999-04-28 2000-11-07 Sony Corp Disk drive interface device
JP2008071084A (en) * 2006-09-13 2008-03-27 Ricoh Co Ltd Microprocessor and image forming apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62174832A (en) * 1985-12-25 1987-07-31 Nec Corp Information processor
JP2000311061A (en) * 1999-04-28 2000-11-07 Sony Corp Disk drive interface device
JP2008071084A (en) * 2006-09-13 2008-03-27 Ricoh Co Ltd Microprocessor and image forming apparatus

Also Published As

Publication number Publication date
JP7276755B2 (en) 2023-05-18

Similar Documents

Publication Publication Date Title
US7802252B2 (en) Method and apparatus for selecting the architecture level to which a processor appears to conform
JPWO2009157178A1 (en) Virtual machine control device, virtual machine control program, and virtual machine control circuit
JP5451579B2 (en) Adaptive optimized compare / exchange operations
US11734079B2 (en) Methods of hardware and software-coordinated opt-in to advanced features on hetero ISA platforms
JP3202497B2 (en) Information processing device
JPH1083305A (en) Data processing system with self-matching stack pointer and its method
JP2005316599A (en) Interrupt controller
JP3866749B2 (en) Microprocessor
KR101793282B1 (en) Micro computer
JP5289688B2 (en) Processor system and operating system program processing method for operating processor system
JP2022033968A (en) Processing speed matching circuit and microprocessor
JPWO2009098737A1 (en) External device access apparatus, control method thereof, and system LSI
JP5233078B2 (en) Processor and processing method thereof
JP2019020931A (en) Processing speed matching circuit and microprocessor
CN106922189B (en) Equipment agent device and control method thereof
US10540222B2 (en) Data access device and access error notification method
JP2008140124A (en) Data processor
JP2005275703A (en) Processor, and context switching method
JP2006127407A (en) Semiconductor integrated circuit
JP2004062309A (en) Method of processing illegal instruction and processor
US20210326132A1 (en) Methods and processors for performing resource deduction for execution of smart contract
US20210109850A1 (en) Processing system and execute in place control method
EP4193250A1 (en) Processing apparatus
JP2004199630A (en) Data processor
JP2011150636A (en) Microprocessor and control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230106

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230404

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230424

R150 Certificate of patent or registration of utility model

Ref document number: 7276755

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150