JP7276755B2 - Processing speed matching circuit and microprocessor - Google Patents

Processing speed matching circuit and microprocessor Download PDF

Info

Publication number
JP7276755B2
JP7276755B2 JP2021202559A JP2021202559A JP7276755B2 JP 7276755 B2 JP7276755 B2 JP 7276755B2 JP 2021202559 A JP2021202559 A JP 2021202559A JP 2021202559 A JP2021202559 A JP 2021202559A JP 7276755 B2 JP7276755 B2 JP 7276755B2
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.)
Active
Application number
JP2021202559A
Other languages
Japanese (ja)
Other versions
JP2022033968A (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.)
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

Description

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

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

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

マイクロプロセッサ50による処理は、次のように行われる。すなわち、プログラムが記憶された記憶装置60のアドレス(図3に<5>で示す信号、以下<数字>の表記は図中の信号を示す)を指定して命令デコーダ52が命令コード<1>を呼び出し、命令デコーダ52が解読する。解読された命令コード<1>は命令<2>として演算処理装置56に送られ、演算処理装置56によって実行されるとともに、実行結果が所定の記憶装置に書き込まれる。 Processing by microprocessor 50 is as follows. That is, the instruction decoder 52 outputs the instruction code <1> by designating the address of the storage device 60 where the program is stored (the signal indicated by <5> in FIG. 3, hereinafter <number> notation indicates the signal in the drawing). is called and decoded by the instruction decoder 52 . The decoded instruction code <1> is sent to the arithmetic processing unit 56 as the instruction <2>, is 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 wait signal <3> is sent from the storage device 60 to make the microprocessor 50 wait. is sent to the wait circuit 54 . The wait circuit 54, which has received the wait signal <3>, sends a wait control signal <4> to the instruction decoder 52 in order to wait the execution of the process for a predetermined time.

特開平10-187790号公報JP-A-10-187790

ところで、半導体装置一般に共通のことではあるが、特にマイクロプロセッサの技術分野では、処理能力の向上等を目的とした新たな機種の開発が日々行われている。例えば、当初8ビットに対応する機種として開発されたマイクロプロセッサが、バージョンアップして処理能力の向上した16ビットに対応する機種とされることがある。その場合、8ビットに対応するマイクロプロセッサ用に開発したプログラムが極力使用可能なように(プログラムの継承が可能なように)命令互換とされる場合も多い。それと同時に、処理能力を向上させた16ビット対応のマイクロプロセッサを搭載したマイクロコンピュータ(以下、「16ビットマイコン」)が、8ビット対応のマイクロプロセッサを搭載したマイクロコンピュータ(以下、「8ビットマイコン」)の上位機種として開発される。 By the way, as is common to semiconductor devices in general, in the technical field of microprocessors in particular, new models are being developed on a daily basis for the purpose of improving processing capabilities. For example, a microprocessor originally developed as an 8-bit model may be upgraded to a 16-bit model with improved processing capability. In that case, instruction compatibility is often provided so that a program developed for an 8-bit microprocessor can be used as much as possible (so that programs can be inherited). At the same time, a microcomputer equipped with a 16-bit compatible microprocessor with improved processing capacity (hereinafter referred to as "16-bit microcomputer") was replaced with a microcomputer equipped with an 8-bit compatible microprocessor (hereinafter referred to as "8-bit microcomputer"). ) was 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 capability, problems may arise in program inheritance. For example, in a program developed by a user with an 8-bit microcomputer, a certain program routine is constructed in anticipation of the instruction processing time of an 8-bit compatible microprocessor, and after the instruction processing time has elapsed, the next program routine is entered. This is the case when a routine that is In other words, the problem is that malfunctions occur due to shortening of the transition time from one program routine to the next due to the improved processing capability.

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

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

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

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

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

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

第1の実施の形態に係るマイクロプロセッサの構成の一例を示すブロック図である。1 is a block diagram showing an example of a configuration of a microprocessor according to a first embodiment; FIG. 第2の実施の形態に係るマイクロプロセッサの構成の一例を示すブロック図である。FIG. 11 is a block diagram showing an example of a configuration of a microprocessor according to a second embodiment; FIG. 比較例に係るマイクロプロセッサの構成を示すブロック図である。3 is a block diagram showing the configuration of a microprocessor according to a comparative example; FIG.

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

[第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 microprocessor 10 according to the present embodiment will be described with reference to FIG. FIG. 1 also shows a storage device 30 attached to the microprocessor 10 and storing programs and the like used by the microprocessor 10 . Although the type of storage device 30 is not particularly limited, it is a non-volatile memory in this embodiment. As shown in FIG. 1, the microprocessor 10 includes a specific instruction detection circuit (processing capability) 12, an instruction decoder 14, a wait circuit 16, an arithmetic processing unit (ALU) 20, and an OR circuit 18. Although the type of microprocessor 10 is not particularly limited, it is a 16-bit microprocessor in this embodiment. Here, "16-bit compatible" means that the bit width of the arithmetic processing unit 20 is 16 bits. The specific command detection circuit (processing capability) 12 and the wait 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 input commands and outputs execution results.

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

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

特定命令検知回路(処理能力)12は、命令デコーダ14でデコードされた命令<2>の中から、予め定められた命令を検知し、検知したことの情報を含む検知信号<3>をウエイト回路16に送る。この際、該検知信号<3>はOR回路18によって上記ウエイト信号<4>との論理和が取られ、その結果がウエイト入力信号<5>としてウエイト回路16に入力される。特定命令検知回路(処理能力)12には、特定命令検知回路(処理能力)12を動作させるか、させないか(動作、非動作)を選択するイネーブル信号<9>が外部端子32を介して入力されている。従って、必要な場合には該イネーブル信号<9>によって特定命令検知回路(処理能力)12の動作を停止させることが可能となっている。 A specific instruction detection circuit (processing capability) 12 detects a predetermined instruction from among the instructions <2> decoded by the instruction decoder 14, and waits for a detection signal <3> containing information indicating the detection. Send to 16. At this time, the detection signal <3> is logically summed 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 the specific command detection circuit (processing capability) 12 is operated or not (operating or non-operating) is input to the specific command detecting circuit (processing capability) 12 via an external terminal 32. It is Therefore, it is possible to stop the operation of the specific command detection circuit (processing capability) 12 by the enable signal <9> when necessary.

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

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

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

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

図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 active and the specific command detection circuit (processing capability) 12 is in an operating state. When the specific instruction detection circuit (processing capability) 12 receives the instruction <2> from the instruction decoder 14, it determines whether the received instruction <2> corresponds to the specific instruction. In the present embodiment, instructions corresponding to specific instructions are known in advance, and are stored, for example, in a storage unit (not shown). A specific command detection circuit (processing capability) 12 collates the received command <2> with specific commands stored in the storage unit, and if it determines that it corresponds to the specific command, issues a detection signal <3>.

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

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

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

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

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

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

イネーブル信号<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 an operating state, the specific instruction detection circuit (execution timing margin) 12A according to the present embodiment operates to Detects an instruction that does not exist as a specific instruction. Specific commands according to the present embodiment are also listed up in advance and stored in a storage unit (not shown). A specific instruction detection circuit (execution timing margin) 12A compares the instruction <2> received from the instruction decoder 14 with a predetermined specific instruction. Issue signal <3>. After that, execution of the specific instruction is waited for a predetermined number of clocks based on the procedure described in the above embodiment.

以上のように、本実施の形態に係るマイクロプロセッサ10Aによれば、タイミングマージンのない命令を検知した場合、ウエイト回路16により予め定められた時間だけ該命令の実行を待機させるので、動作クロックの周波数を高くした場合のボトルネックが解消され、動作クロック周波数の上限を高く設定することできる。また、マイクロプロセッサ10Aは、特定命令検知回路(実行タイミングマージン)12Aに入力されるイネーブル信号<9>の入力部を備えているので、マイクロプロセッサ10Aのプログラムにおいて特定命令が用いられていないことが予めわかっている場合には特定命令検知回路(実行タイミングマージン)12Aの動作を停止させ、本来のマイクロプロセッサ10Aの処理能力を発揮させることができる。 As described above, according to the microprocessor 10A according to the present embodiment, when an instruction without a timing margin is detected, the wait circuit 16 waits the execution of the instruction for a predetermined time. The bottleneck caused by increasing the frequency is eliminated, and the upper limit of the operating clock frequency can be set high. Further, since the microprocessor 10A has an input section for an enable signal <9> input to the specific instruction detection circuit (execution timing margin) 12A, it is possible to detect that 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 capability 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 wait circuit 18 OR circuit 20 arithmetic processing unit 30 storage device 32 external terminal 50 microprocessor 52 instruction decoder 54 wait circuit 56 arithmetic processing unit 60 storage device

Claims (5)

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

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
JP2022033968A (en) 2022-03-02

Similar Documents

Publication Publication Date Title
JP5323828B2 (en) Virtual machine control device, virtual machine control program, and virtual machine control circuit
JP5047542B2 (en) Method, computer program, and apparatus for blocking threads when dispatching a multithreaded processor (fine multithreaded dispatch lock mechanism)
US11734079B2 (en) Methods of hardware and software-coordinated opt-in to advanced features on hetero ISA platforms
KR20150130353A (en) Minimizing switchover time during operating system kernel update in a hot swappable program memory
JP3202497B2 (en) Information processing device
JP3866749B2 (en) Microprocessor
JP2005316599A (en) Interrupt controller
JP2004318502A (en) Microprocessor with power control function, and device for converting instruction
JP4897851B2 (en) Computer system and computer system control method
JP7276755B2 (en) Processing speed matching circuit and microprocessor
JP5289688B2 (en) Processor system and operating system program processing method for operating processor system
CN111831419A (en) Interrupt control method for RISC-V architecture
JP5999216B2 (en) Data processing device
US6993674B2 (en) System LSI architecture and method for controlling the clock of a data processing system through the use of instructions
JP2019020931A (en) Processing speed matching circuit and microprocessor
JP2008140124A (en) Data processor
JP4305400B2 (en) Microcomputer
JP7069870B2 (en) Information processing equipment
JP2814800B2 (en) Microcomputer
JP5012562B2 (en) Microcomputer
JP2005275703A (en) Processor, and context switching method
JP2004199630A (en) Data processor
JP5194360B2 (en) Information processing apparatus and control method thereof
KR20030025115A (en) A circuit for controlling program counter
JPS6269354A (en) Information processing system

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