JP2007287126A - Multi-microcontroller system and control method - Google Patents
Multi-microcontroller system and control method Download PDFInfo
- Publication number
- JP2007287126A JP2007287126A JP2006326773A JP2006326773A JP2007287126A JP 2007287126 A JP2007287126 A JP 2007287126A JP 2006326773 A JP2006326773 A JP 2006326773A JP 2006326773 A JP2006326773 A JP 2006326773A JP 2007287126 A JP2007287126 A JP 2007287126A
- Authority
- JP
- Japan
- Prior art keywords
- microcontroller
- program
- memory
- logic
- control method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4812—Task transfer initiation or dispatching by interrupt, e.g. masked
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
- G06F13/4234—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being a memory bus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Microcomputers (AREA)
- Programmable Controllers (AREA)
- Executing Machine-Instructions (AREA)
- Hardware Redundancy (AREA)
Abstract
【課題】自律制御能力を有するマルチマイクロコントローラーシステム、及び、制御方法を提供する。
【解決手段】本発明は、自律制御能力を有するマルチマイクロコントローラーシステム、及び、制御方法を開示し、このマルチマイクロコントローラーシステム中、任意のマイクロコントローラーコアロジックは、挿入プログラムの開始アドレスを直接もう一つの被制御マイクロコントローラーコアロジック中のプログラムカウンター内に配置し、この被制御マイクロコントローラーコアロジックが受けた中断時のプログラムアドレスは、マイクロコントローラーコアロジックのスタックポインターが指示するスタックメモリ中に一時保存され、被制御マイクロコントローラーコアロジックが挿入プログラムを実行完成後、この中断点から本来のプログラムを再開する。
【選択図】図3
A multi-microcontroller system having an autonomous control capability and a control method are provided.
The present invention discloses a multi-microcontroller system having an autonomous control capability, and a control method, in which any micro-controller core logic directly sets the start address of the insertion program. The program address at the time of interruption received by the controlled microcontroller core logic is temporarily stored in the stack memory indicated by the stack pointer of the microcontroller core logic. After the controlled microcontroller core logic completes the execution of the insertion program, the original program is resumed from this interruption point.
[Selection] Figure 3
Description
本発明は、マルチマイクロコントローラーシステム、及び、制御方法に関するものであって、特に、自律制御能力を有するマルチマイクロコントローラーシステム、及び、制御方法に関するものである。 The present invention relates to a multi-microcontroller system and a control method, and more particularly to a multi-microcontroller system having an autonomous control capability and a control method.
マイクロコントローラー/マイクロプロセッサ(MCU/MPU)は単一クリップマイクロコンピュータ(single-chip microcomputer)とも称され、他の補助回路が不要で、独立して演算を実行できる装置であり、主に、システム製品中、制御命令を発する集積回路である。マイクロコントローラーは、小型コンピュータにより提供されるのとほぼ等しい機能を提供する。近年、マイクロコントローラーは、家庭用電化製品、工業用制御装置、医療機器、運搬制御装置等、様々な分野に応用されている。異なるマイクロコンピュータの規格により、異なる分野に応用でき、且つ、制御する周辺素子も異なる。 Microcontrollers / microprocessors (MCU / MPU), also called single-chip microcomputers, are devices that do not require other auxiliary circuits and can perform operations independently. An integrated circuit that issues a control command. Microcontrollers provide approximately the same functionality as provided by a small computer. In recent years, microcontrollers have been applied to various fields such as household appliances, industrial control devices, medical equipment, and transport control devices. Different microcomputer standards can be applied to different fields, and the peripheral devices to be controlled are also different.
マイクロコントローラーの開発履歴を回顧すると、発展の主要標的は三つあり、(1)データ処理速度の加速、(2)単位関数毎のチップサイズの縮小、(3)消費電力の減少、である。これらの目的下で、処理ビット数の増加、クロック周波数の加速、演算器の改良、メモリ管理、キャッシュ技術の発展、パイプライン処理構造の提出、命令の予復号と予実行技術の応用、マルチメディア要求に応じた新しい命令集の構築、新しいチップの組立工程、及び、新しい実装技術等、幾つかの重要な発展過程が衍生した。しかし、以上の各種発展は二種の重要な技術、半導体工程技術とハードウェアアーキテクチャ設計技術によるものである。一つは、半導体技術の発展上、チップを更に多くのトランジスタに収め、素子間の距離を縮小して、機能を増加、電圧を低下、回路反応速度を加速することで、もう一つは、ハードウェアアーキテクチャ設計上、スーパーパイプライン(super-pipeline )アーキテクチャ、内部キャッシュアーキテクチャ、スーパースカラ(super-scalar)技術、推測実行、マイクロコード追跡技術である。パイプライン技術はハードウェアアーキテクチャ技術の改良に最も貢献した技術である。パイプライン技術はタスク分配を実行し、タスクを複数の部分に分けて、マルチユニットを割り当てる。マイクロコントローラーのクロック周波数が増加しなくても、マイクロコントローラーの実行速度はパイプライン技術により増加する。 Looking back on the development history of microcontrollers, there are three main targets for development: (1) acceleration of data processing speed, (2) reduction of chip size per unit function, and (3) reduction of power consumption. Under these objectives, increasing the number of processing bits, accelerating the clock frequency, improving computing units, memory management, developing cache technology, submitting pipeline processing structures, application of instruction predecoding and preexecution techniques, multimedia Several important developmental processes have emerged, such as the construction of a new instruction set on demand, a new chip assembly process, and a new packaging technology. However, the various developments described above are due to two important technologies, semiconductor process technology and hardware architecture design technology. One is the development of semiconductor technology, the chip is accommodated in more transistors, the distance between elements is reduced, the function is increased, the voltage is lowered, and the circuit reaction speed is accelerated. In terms of hardware architecture design, super-pipeline architecture, internal cache architecture, super-scalar technology, speculative execution, and microcode tracking technology. Pipeline technology is the technology that has contributed most to the improvement of hardware architecture technology. Pipeline technology performs task distribution, divides tasks into multiple parts, and assigns multiple units. Even if the clock frequency of the microcontroller does not increase, the execution speed of the microcontroller is increased by pipeline technology.
タスク分配機能を実行する公知のマルチマイクロコントローラーシステムと公知のハイパースレッド(hyper-thread)マイクロコントローラーシステムが図1(a)と図1(b)で示される。公知のマルチマイクロコントローラーシステム(図1a)は、主に、マルチマイクロコントローラー10、11、及び、12からなり、バス(図中の白抜き矢印で示される)によりコモンデータメモリ13とコモン周辺装置14に結合される。各MCUは、コアロジック102、112、及び、122が対応するプログラムメモリ101、111、及び、121を有するので、MCUは独立作業ができる。図1(b)中、公知のハイパースレッドマイクロコントローラーシステムは、主に、マルチマイクロコントローラーコアユニット15、16からなる。各マルチマイクロコントローラーコアユニット15、16は、MCUコアロジック152、162、及び、対応する専属の命令バッファ(instruction
buffer)151、161を有し、バス(図中の白抜き矢印で示される)によりデータメモリ18とプログラムメモリ17に接続される。よって、マイクロコントローラーコアユニット15、16は各自プログラムを平行実行し、命令バッファ151、161によりマイクロコントローラーコアユニット15、16がプログラムメモリ17を読み取るのを減少させ、異なるマイクロコントローラーコアユニットがプログラムメモリを読み取ることで相互干渉する確率を大幅に減少させ、プログラムは効果的に実行される。
A known multi-microcontroller system and a known hyper-thread microcontroller system for performing task distribution functions are shown in FIGS. 1 (a) and 1 (b). A known multi-microcontroller system (FIG. 1a) mainly comprises multi-microcontrollers 10, 11, and 12, and is connected to a common data memory 13 and a common peripheral device 14 by a bus (indicated by white arrows in the figure). Combined with Since each MCU has program memories 101, 111, and 121 to which the core logics 102, 112, and 122 correspond, the MCU can perform independent work. In FIG. 1 (b), the known hyperthreaded microcontroller system mainly comprises multi-microcontroller core units 15 and 16. Each multi-microcontroller core unit 15, 16 includes MCU core logic 152, 162 and a corresponding dedicated instruction buffer (instruction
buffer) 151 and 161, and is connected to the data memory 18 and the program memory 17 by a bus (indicated by white arrows in the figure). Therefore, the microcontroller core units 15 and 16 execute their own programs in parallel, and the instruction buffers 151 and 161 reduce the reading of the program memory 17 by the microcontroller core units 15 and 16, and different microcontroller core units store the program memory. Reading greatly reduces the probability of mutual interference, and the program is executed effectively.
公知のマルチマイクロコントローラーシステム、或いは、公知のハイパースレッドマイクロコントローラーシステムでも、割り込み要求(interrupt request)に対面する時、応答するプログラム実行モードは相同である。図2で示されるように、各マイクロコントローラーは独立して実行されるので、割り込み要求の時、一マイクロコントローラーが割り込み要求を検出し、応答するまで、割り込み要求のタスクは待機しなければならない。例えば、あるマイクロコントローラーコアロジック20が割り込み要求を検出し、応答する場合である。MCUコアロジック20が割り込み要求を検出した時、MCUコアロジック20はまず、プログラムカウンター24の内容をスタックメモリ26に置き、次に、ISR(Interrupt Service Routine)の開始アドレスを取得した後、割り込みタスクを実行する。上述から分かるように、公知の二つのマルチマイクロコントローラーシステムにおいて、マイクロコントローラーはもう一つを直接、効果的に制御できない。一マイクロコントローラー(図2で図示されない)は、もう一つのマイクロコントローラー(コアロジック20を有するMCU)に“通知”するだけで、フラグ(flag)を設定するか、或いは、割り込み要求を伝送することにより、実行されるプログラムの変更を告知する。その後、前のMCUは後のMCUの応答を待つ。この場合、各マイクロコントローラー間に効果的な相互制御がなく、即時実行のタスクに対しても実行時間の制御が精確になされない。この他、作業不当で一部のマイクロコントローラーに分配されて、マルチマイクロコントローラーシステムの機能が効果的に発揮されない。よって、上述のシステム操作モードは、煩雑な電子製品性能要求を満たすことが困難である。 Even in known multi-microcontroller systems or known hyper-threaded microcontroller systems, the program execution modes that respond when facing an interrupt request are homologous. As shown in FIG. 2, since each microcontroller is executed independently, at the time of an interrupt request, the interrupt request task must wait until one microcontroller detects and responds to the interrupt request. For example, a certain microcontroller core logic 20 detects an interrupt request and responds. When the MCU core logic 20 detects an interrupt request, the MCU core logic 20 first places the contents of the program counter 24 in the stack memory 26, and then acquires the start address of an ISR (Interrupt Service Routine), and then the interrupt task. Execute. As can be seen from the above, in two known multi-microcontroller systems, the microcontroller cannot effectively control the other directly. One microcontroller (not shown in FIG. 2) can set a flag or transmit an interrupt request by simply “notifying” another microcontroller (MCU with core logic 20). To notify the change of the program to be executed. Thereafter, the previous MCU waits for the response of the subsequent MCU. In this case, there is no effective mutual control between the microcontrollers, and the execution time is not accurately controlled even for an immediately executed task. In addition, the function of the multi-microcontroller system is not effectively exhibited because the work is inappropriately distributed to some microcontrollers. Therefore, it is difficult for the above-mentioned system operation mode to satisfy complicated electronic product performance requirements.
よって、本発明は上述の問題に対し、自律制御能力を有するマルチマイクロコントローラーシステム、及び、制御方法を提供し、マルチマイクロコントローラーシステムのマイクロコントローラーユニット間の相互制御の特性を利用し、挿入したいプログラムの開始アドレスを直接被制御マイクロコントローラー内に配置し、割り込み動作に必要な時間を短縮して、各マイクロコントローラーユニットは最適なパフォーマンスを達成する。 Accordingly, the present invention provides a multi-microcontroller system having an autonomous control capability and a control method for the above-described problem, and uses the mutual control characteristics between the micro-controller units of the multi-microcontroller system to insert a program. By placing the start address directly in the controlled microcontroller, the time required for interrupt operation is reduced, and each microcontroller unit achieves optimal performance.
解決しようとする課題は、自律制御能力を有するマルチマイクロコントローラーシステムを提供し、数個のマイクロコントローラーコアロジックにより、複数のプログラムを平行実行し、複数のプログラムを平行処理すると共に、ソフトウェアにより、精確、効果的に各マイクロコントローラーコアロジックの操作を制御して、マルチマイクロコントローラーシステム中の各マイクロコントローラーコアロジックの最大機能を充分に発揮させることを目的とする。 The problem to be solved is to provide a multi-microcontroller system with autonomous control capability, and by executing several programs in parallel by using several microcontroller core logics, processing multiple programs in parallel, and by software, The objective is to effectively control the operation of each microcontroller core logic to fully demonstrate the maximum functionality of each microcontroller core logic in a multi-microcontroller system.
更に、自律制御能力を有するマルチマイクロコントローラーシステム、及び、制御方法を提供し、ソフトにより実行したいプログラムは、マイクロコントローラーコアロジックの指示により、挿入したいプログラムのプログラム開示アドレスを制御されるマイクロコントローラーコアロジック内のプログラムカウンター中に伝送し、被制御マイクロコントローラーコアロジックは即時に挿入されたプログラムを実行して、マイクロコントローラー間の互換処理時間を短縮することをもう一つの目的とする。 Further, a multi-microcontroller system having an autonomous control capability and a control method are provided, and a program to be executed by software is controlled by a microcontroller core logic, and a microcontroller core logic in which a program disclosure address of a program to be inserted is controlled Another purpose is to shorten the compatibility processing time between microcontrollers by executing the program inserted immediately by the controlled microcontroller core logic.
上述の目的を達成するため、本発明は、自律制御能力を有するマルチマイクロコントローラーシステムを提供し、マルチコントローラーユニットと、マイクロコントローラーイネーブルレジスタ、及び、少なくとも一つのメモリ、からなる。マルチコントローラーユニットは、複数のマイクロコントローラー(MCU)機能ロジック、MCU機能ロジックに接続され、プログラムアドレスをMCU機能ロジックに提供する対応する複数のプログラムカウンターからなる。マイクロコントローラーイネーブルレジスタとマルチマイクロコントローラーユニットは電気的に接続し、マイクロコントローラー機能ロジックを有効(enable)、或いは、無効(disable)にする。メモリはマルチマイクロコントローラーユニットと電気的に接続し、マルチマイクロコントローラーユニットにより要求されるプログラムを提供する。各マイクロコントローラー機能ロジックは、上述の任意のプログラムカウンターの内容を変更することができる。 In order to achieve the above object, the present invention provides a multi-microcontroller system having an autonomous control capability, and includes a multi-controller unit, a microcontroller enable register, and at least one memory. The multi-controller unit is connected to a plurality of microcontroller (MCU) functional logics, MCU functional logics, and consists of corresponding program counters that provide program addresses to the MCU functional logic. The microcontroller enable register and the multi-microcontroller unit are electrically connected to enable or disable the microcontroller function logic. The memory is electrically connected to the multi-microcontroller unit and provides a program required by the multi-microcontroller unit. Each microcontroller functional logic can change the contents of any of the above program counters.
この他、本発明は、自律制御能力を有するマルチマイクロコントローラーシステムの制御方法を提供し、本システムは、少なくとも一つのコントローラーMCU機能ロジック、被制御マイクロコントローラー機能ロジック、被制御マイクロコントローラー機能ロジックと対応するプログラムカウンター、及び、メモリ、からなり、制御方法は、以下の工程からなる。被制御マイクロコントローラー機能ロジックを無効にする工程と、プログラムカウンターを凍結する工程と、メモリ内の内容をプログラムカウンター内に伝送する工程と、被制御マイクロコントローラー機能ロジックを有効にする工程と、からなる。 In addition, the present invention provides a control method for a multi-microcontroller system having autonomous control capability, and the system corresponds to at least one controller MCU function logic, controlled microcontroller function logic, and controlled microcontroller function logic. The control method includes the following steps. The process comprises the steps of disabling the controlled microcontroller functional logic, freezing the program counter, transmitting the contents of the memory into the program counter, and enabling the controlled microcontroller functional logic. .
更に、本発明は、自律制御能力を有するマルチマイクロコントローラーシステムの制御方法を提供し、本システムは、少なくとも一つのMCU機能ロジック、被制御マルチコントローラー機能ロジック、被制御マルチコントローラー機能ロジックと対応するプログラムカウンター、プログラムメモリ、スタックメモリ、及び、スタックメモリに対応するスタックポインター、からなる。制御方法は、以下の工程からなる。被制御マイクロコントローラー機能ロジックを無効にする工程と、プログラムカウンターを凍結する工程と、スタックポインターの第一索引により、メモリカウンターの内容をスタックメモリの第一位置に保存する工程と、スタックポインターの第二位置により、プログラムメモリの一アドレスをスタックメモリ内の第二位置に暫時保存する工程と、スタックポインターの第二索引により、スタックメモリ内の第二位置の内容をプログラムカウンターに保存する工程と、被制御マイクロコントローラー機能ロジックを有効にし、被制御マイクロコントローラー機能ロジックに、前述のプログラムメモリアドレス内の内容と対応するタスクを実行させる工程と、被制御マイクロコントローラー機能ロジックを無効にする工程と、スタックメモリの第一位置の内容をプログラムカウンター内に再度保存する工程と、最後に、被制御マイクロコントローラー機能ロジックに本来実行中であったプログラムを継続実行させる工程と、からなる。 Furthermore, the present invention provides a control method for a multi-microcontroller system having autonomous control capability, and the system is a program corresponding to at least one MCU function logic, controlled multi-controller function logic, and controlled multi-controller function logic. It consists of a counter, a program memory, a stack memory, and a stack pointer corresponding to the stack memory. The control method includes the following steps. Invalidating the controlled microcontroller functional logic, freezing the program counter, storing the contents of the memory counter in the first position of the stack memory by the first index of the stack pointer, Storing the address of the program memory for a while in the second position in the stack memory by two positions, storing the contents of the second position in the stack memory in the program counter by the second index of the stack pointer; Enabling the controlled microcontroller function logic, causing the controlled microcontroller function logic to execute a task corresponding to the contents in the program memory address described above, disabling the controlled microcontroller function logic, and stacking memory A step of re-save the contents of the first position into the program counter, at the end, a step of executing the program continues were running originally controlled microcontroller functional logic consists.
本発明の自律制御能力を有するマルチマイクロコントローラーシステム、及び、制御方法により、マルチマイクロコントローラーシステムのマイクロコントローラーユニット間の相互制御の特性を利用し、挿入したいプログラムの開始アドレスを直接制御されるマイクロコントローラー内に配置し、割り込み動作に必要な時間を短縮して、各マイクロコントローラーユニットは最適なパフォーマンスを達成する。 A multi-microcontroller system having an autonomous control capability and a control method according to the present invention can be used to directly control the start address of a program to be inserted by utilizing the mutual control characteristics between the micro-controller units of the multi-microcontroller system. Each microcontroller unit achieves optimal performance by placing it inside and reducing the time required for interrupt operation.
本発明のマルチマイクロコントローラーシステムの構造上、各マイクロコントローラーコアロジックはプログラムの独立処理能力を有し、各マイクロコントローラーコアロジックは、各自プログラムを処理する状態下で、指示されたプログラム開始アドレスをその他のマイクロコントローラーコアロジック内のプログラムカウンター中に伝送し、後者のマイクロコントローラーコアロジック(被制御マイクロコントローラーコアロジック)の次のタスクを制御する。これにより、被制御マイクロコントローラーコアロジックのプログラム変更の反応時間を短縮することができる。 Due to the structure of the multi-microcontroller system of the present invention, each microcontroller core logic has an independent processing capability of the program, and each microcontroller core logic receives the designated program start address in the state in which each program is processed. It transmits in the program counter in the microcontroller core logic of the latter and controls the next task of the latter microcontroller core logic (controlled microcontroller core logic). Thereby, the reaction time of the program change of the controlled microcontroller core logic can be shortened.
本発明の第一実施例を説明する。本発明の自律制御能力を有するマルチマイクロコントローラーシステム中、マイクロコントローラーコアロジックがもう一つの不特定のマイクロコントローラーコアロジックを実行したい時、システムがいかに作用するか、その方法工程を示す。図3で示されるように、まず、自律制御能力を有するマルチマイクロコントローラーシステム中、三個のマイクロコントローラーコアロジック30、31、32、マイクロコントローラーイネーブルレジスタ35、プログラムメモリ33、スタックメモリ34、を有する。各マイクロコントローラーコアロジック30、31、32中、それぞれ、マイクロコントローラー機能ロジック301、311、321、プログラムカウンター302、312、322、及び、スタックポインター303、313、323を有する。マイクロコントローラーコアロジック30、31、32は、プログラムメモリバス334により、プログラムメモリ33と接続されて、プログラムメモリ33中に保存されたシステムプログラム領域330、第一マイクロコントローラーコアロジックプログラム領域331、第二マイクロコントローラーコアロジックプログラム領域332、及び、第三マイクロコントローラーコアロジックプログラム領域333内の全ての命令とプログラムを読み出す。且つ、マイクロコントローラーコアロジック30、31、32は、スタックメモリバス344により、スタックメモリ34とも接続し、第一、第二、及び、第三マイクロコントローラーコアロジック30、31、32がプログラムを実行する時、それぞれ、各自の第一、第二、及び、第三プログラムカウンター302、312、322内の内容を、対応する第一マイクロコントローラーコアロジックスタック領域341、第二マイクロコントローラーコアロジックスタック領域342、及び、第三マイクロコントローラーコアロジックスタック領域343中に保存する。 A first embodiment of the present invention will be described. In the multi-microcontroller system having the autonomous control capability of the present invention, the method steps of how the system works when the microcontroller core logic wants to execute another unspecified microcontroller core logic are shown. As shown in FIG. 3, first, in a multi-microcontroller system having an autonomous control capability, three microcontroller core logics 30, 31, 32, a microcontroller enable register 35, a program memory 33, and a stack memory 34 are included. . Each of the microcontroller core logics 30, 31, and 32 has microcontroller function logics 301, 311, and 321, program counters 302, 312, and 322, and stack pointers 303, 313, and 323, respectively. The microcontroller core logic 30, 31, 32 is connected to the program memory 33 by the program memory bus 334, and the system program area 330 stored in the program memory 33, the first microcontroller core logic program area 331, the second All instructions and programs in the microcontroller core logic program area 332 and the third microcontroller core logic program area 333 are read. The microcontroller core logic 30, 31, 32 is also connected to the stack memory 34 via the stack memory bus 344, and the first, second, and third microcontroller core logic 30, 31, 32 execute the program. Each time, the contents in the respective first, second, and third program counters 302, 312, 322 are changed to the corresponding first microcontroller core logic stack area 341, second microcontroller core logic stack area 342, And stored in the third microcontroller core logic stack area 343.
本発明の自律制御能力を有するマルチマイクロコントローラーシステムの制御方法は以下で詳述され、図3、及び、図4を参照すると、図4は、本発明の第一実施例の制御方法のフローチャートである。まず、工程S01で、三個のマイクロコントローラーコアロジック30、31、32は各自のプログラムを実行する。つまり、第一マイクロコントローラーコアロジック30中の第一マイクロコントローラー機能ロジック301が、第一プログラムカウンター302が指定するプログラムアドレスの命令を実行中で、且つ、この命令がプログラムメモリ33中のプログラムアドレスがc101であるとする。第二マイクロコントローラーコアロジック31中の第二マイクロコントローラー機能ロジック311が、第二プログラムカウンター312が指定するプログラムアドレスの命令を実行中で、且つ、この命令がプログラムメモリ33中のプログラムアドレスがc201であるとする。第三マイクロコントローラーコアロジック32中の第三マイクロコントローラー機能ロジック321が、第三プログラムカウンター322が指定するプログラムアドレスの命令を実行中で、且つ、この命令がプログラムメモリ33中のプログラムアドレスがc301であるとする。この時、システムは、割り込み要求を生成、或いは、受信し、システムにプログラムアドレス00f0から始まる一つのプログラムを実行するよう要求し、この挿入プログラムのプログラムアドレスは、例えば、既にシステムプログラム領域330中に保存されている。この割り込み要求は、第二マイクロコントローラーコアロジック31に実行中のプログラム(第二マイクロコントローラーコアロジックプログラム領域322中のプログラム)の中止が必要で、開始アドレスが00f0の挿入プログラムの実行に変更する。第二マイクロコントローラーコアロジック31の第二マイクロコントローラー機能ロジック311が本来実行していたプログラムに戻る必要がない場合、本来実行していたプログラムはその時のプログラムアドレス(例えば、c202)中で終了し、第二プログラムカウンター312は対応するアドレスc202の状態下で凍結する。工程S02中、第一マイクロコントローラーコアロジック30は、マイクロコントローラーイネーブルレジスタ35により、第二マイクロコントローラーコアロジック31を無効にするディスエーブル信号を伝送し、同時に、第二マイクロコントローラーコアロジック31が対応する第二マイクロコントローラー機能ロジック311が無効になり、現在実行するプログラムの実行を中止して、プログラムカウンター312をプログラムアドレスc202の状態で凍結する。工程S03中、この時、第一マイクロコントローラーコアロジック30中、第一スタックポインター303の索引状態は、スタックメモリアドレスiであり、被制御の第二マイクロコントローラーコアロジック31の第二マイクロコントローラー機能ロジック311が実行する挿入プログラムは、そのプログラム開始アドレスが00f0である。第一マイクロコントローラーコアロジック30の第一マイクロコントローラー機能ロジック301は、00f0をスタックメモリ34中のスタックメモリアドレスi内に保存する。工程S04中、第一マイクロコントローラーコアロジック30の第一マイクロコントローラー機能ロジック301は、スタックメモリ34中に保存されたスタックメモリアドレスi中の内容(即ち、00f0)を第二マイクロコントローラーコアロジック31中の第二プログラムカウンター312内に転移させて、第二マイクロコントローラーコアロジック31を再度有効にした後、プログラム実行のアドレスとなる。転移の方式は、例えば、ポップ(pop)命令、popPC2などを利用する。工程S05中、第一マイクロコントローラーコアロジック30は、マイクロコントローラーイネーブルレジスタ35により、イネーブル信号を第二マイクロコントローラーコアロジック31(及び、第二マイクロコントローラー機能ロジック311)に出力し、第二マイクロコントローラーコアロジック31は、第二プログラムカウンター312中で指名されるプログラムアドレス(00f0)から開始し、挿入プログラムを実行する。工程S06中、第二マイクロコントローラーコアロジック31中の第二プログラムカウンター312は既に00f0に変更しているので、三個のマイクロコントローラーコアロジック30、31、32の状態はそれぞれ:第一マイクロコントローラーコアロジック30の第一マイクロコントローラー機能ロジック301が第一プログラムカウンター302中のプログラムアドレスを実行し、且つ、このプログラムアドレスは、プログラムメモリ33中の第一マイクロコントローラーコアロジックプログラム領域331に対応する:第二マイクロコントローラーコアロジック31の第二マイクロコントローラー機能ロジック311が第二プログラムカウンター312中のプログラムアドレスを実行し、且つ、このプログラムアドレスは、プログラムメモリ33中のシステムプログラム領域330に対応する。第三マイクロコントローラーコアロジック32の第三マイクロコントローラー機能ロジック321が第三プログラムカウンター322中のプログラムアドレスを実行し、且つ、このプログラムアドレスは、プログラムメモリ33中の第三マイクロコントローラーコアロジックプログラム領域333に対応する。 The control method of the multi-microcontroller system having the autonomous control capability of the present invention will be described in detail below. Referring to FIG. 3 and FIG. 4, FIG. 4 is a flowchart of the control method of the first embodiment of the present invention. is there. First, in step S01, the three microcontroller core logics 30, 31, and 32 execute their own programs. That is, the first microcontroller function logic 301 in the first microcontroller core logic 30 is executing an instruction at the program address specified by the first program counter 302, and the program address in the program memory 33 is It is assumed that c101. The second microcontroller function logic 311 in the second microcontroller core logic 31 is executing an instruction at the program address specified by the second program counter 312 and the program address in the program memory 33 is c201. Suppose there is. The third microcontroller function logic 321 in the third microcontroller core logic 32 is executing the instruction of the program address specified by the third program counter 322, and this instruction is c301 in the program memory 33. Suppose there is. At this time, the system generates or receives an interrupt request and requests the system to execute one program starting from the program address 00f0. The program address of the inserted program is already in the system program area 330, for example. Saved. This interrupt request needs to cancel the program being executed in the second microcontroller core logic 31 (the program in the second microcontroller core logic program area 322), and is changed to the execution of the insertion program whose start address is 00f0. If the second microcontroller function logic 311 of the second microcontroller core logic 31 does not need to return to the originally executed program, the originally executed program is terminated at the current program address (for example, c202), The second program counter 312 freezes under the state of the corresponding address c202. During step S02, the first microcontroller core logic 30 transmits a disable signal for disabling the second microcontroller core logic 31 through the microcontroller enable register 35, and the second microcontroller core logic 31 corresponds at the same time. The second microcontroller function logic 311 becomes invalid, the execution of the currently executed program is stopped, and the program counter 312 is frozen at the program address c202. During step S03, at this time, the index state of the first stack pointer 303 in the first microcontroller core logic 30 is the stack memory address i, and the second microcontroller function logic of the second microcontroller core logic 31 to be controlled. The insertion program executed by 311 has a program start address of 00f0. The first microcontroller functional logic 301 of the first microcontroller core logic 30 stores 00f0 in the stack memory address i in the stack memory 34. During step S04, the first microcontroller functional logic 301 of the first microcontroller core logic 30 stores the contents (ie, 00f0) in the stack memory address i stored in the stack memory 34 in the second microcontroller core logic 31. To the second program counter 312 and the second microcontroller core logic 31 is re-enabled, and then becomes the program execution address. As the transfer method, for example, a pop command, popPC2 or the like is used. During step S05, the first microcontroller core logic 30 outputs an enable signal to the second microcontroller core logic 31 (and the second microcontroller function logic 311) by the microcontroller enable register 35, and the second microcontroller core. The logic 31 starts from the program address (00f0) designated in the second program counter 312 and executes the insertion program. During step S06, the second program counter 312 in the second microcontroller core logic 31 has already been changed to 00f0, so the states of the three microcontroller core logics 30, 31, 32 are respectively: The first microcontroller function logic 301 of the logic 30 executes the program address in the first program counter 302, and this program address corresponds to the first microcontroller core logic program area 331 in the program memory 33: The second microcontroller function logic 311 of the two microcontroller core logic 31 executes the program address in the second program counter 312 and the program address is programmed. Corresponding to the system program area 330 in the memory 33. The third microcontroller function logic 321 of the third microcontroller core logic 32 executes the program address in the third program counter 322, and this program address is stored in the third microcontroller core logic program area 333 in the program memory 33. Corresponding to
上述の第一実施例中で本発明のマルチマイクロコントローラーシステム内を詳述し、MCUコアロジック(30)と被制御マイクロコントローラーコアロジック(31)間で相互制御の方法を実行するが、第一実施例中では、被制御マイクロコントローラーコアロジックがプログラムアドレスを変更するまでだけを説明している。しかし、この挿入プログラムは完了後、被制御マイクロコントローラーコアロジックはその他のプログラムを継続実行するか、或いは、中断したモードに戻って本来のプログラムを実行する。本発明の第二実施例は、第一実施例の延長で、更に、被制御マイクロコントローラーコアロジックが挿入プログラムを実行完成後、中断プログラムに戻り、本来のプログラムを継続実行する必要がある場合、どのように実行するか、及び、MCUコアロジックと被制御マイクロコントローラーコアロジック間の相互制御方法を説明する。 In the first embodiment described above, the inside of the multi-microcontroller system of the present invention is described in detail, and the mutual control method is executed between the MCU core logic (30) and the controlled microcontroller core logic (31). In the embodiment, only the process until the controlled microcontroller core logic changes the program address is described. However, after this insertion program is completed, the controlled microcontroller core logic continues to execute other programs, or returns to the interrupted mode and executes the original program. The second embodiment of the present invention is an extension of the first embodiment, and further, when the controlled microcontroller core logic completes the execution of the insertion program, returns to the interruption program, and the original program needs to be continuously executed. It explains how to execute and the mutual control method between MCU core logic and controlled microcontroller core logic.
図3と図5を参照し、図5は、本発明の第二実施例の制御方法のフローチャートである。自律制御能力を有するマルチマイクロコントローラーシステムの構造は上述された通りであり、ここに詳述しない。第二実施例中の自律制御能力を有するマルチマイクロコントローラーシステムの制御方法は、以下のようである。まず、工程S11中で、三個のマイクロコントローラーコアロジック30、31、32は各自のプログラムを実行する。つまり、第一マイクロコントローラーコアロジック30中の第一マイクロコントローラー機能ロジック301が、第一プログラムカウンター302が指定するプログラムアドレスの命令を実行中で、且つ、この命令がプログラムメモリ33中の第一マイクロコントローラーコアロジックプログラム領域331に位置する。第二マイクロコントローラーコアロジック31中の第二マイクロコントローラー機能ロジック311が、第二プログラムカウンター312が指定するプログラムアドレスの命令を実行中で、且つ、この命令がプログラムメモリ33中の第二マイクロコントローラーコアロジックプログラム領域332に位置する。第三マイクロコントローラーコアロジック32中の第三マイクロコントローラー機能ロジック321が、第三プログラムカウンター322が指定するプログラムアドレスの命令を実行中で、且つ、この命令がプログラムメモリ33中の第三マイクロコントローラーコアロジックプログラム領域333に位置する。この時、システムは、割り込み要求を生成、或いは、受信し、システムにプログラムアドレス00f0から始まる一つのプログラムを実行するよう要求し、この挿入プログラムのプログラムアドレスは、既にシステムプログラム領域330中に保存されている。このように、第二マイクロコントローラーコアロジック31にその実行中のプログラム(第二マイクロコントローラーコアロジックプログラム領域332中のプログラム)を終了させる必要があり、スタートアドレスは00f0の挿入プログラムを実行する。挿入プログラム実行完了後、第二マイクロコントローラーコアロジック31は、本来のプログラムの実行を回復する。工程S12中、第一マイクロコントローラーコアロジック30は、マイクロコントローラーイネーブルレジスタ35により、ディスエーブル信号を第二マイクロコントローラーコアロジック31(及び、第二マイクロコントローラー機能ロジック311)に伝送して、現在のプログラムアドレス(例えば、c202)で凍結する。工程S13中、この時、第一マイクロコントローラーコアロジック30中、第一スタックポインター303の索引状態は、スタックメモリアドレスiであり、第一マイクロコントローラーコアロジック30の第一マイクロコントローラー機能ロジック301は、第二マイクロコントローラーコアロジック31中の第二プログラムカウンター312の内容をスタックメモリアドレスi中に保存し、その方法は、例えば、プッシュ(push)命令を利用し、例えば、pushPC2である。工程S14中、第一マイクロコントローラーコアロジック30の第一スタックポインター303状態は、スタックメモリアドレスi+1で、被制御の第二マイクロコントローラーコアロジック31が実行する挿入プログラムのプログラム開始アドレスは00f0であり、故に、第一マイクロコントローラ0コアロジック30の第一マイクロコントローラー機能ロジック301は00F0をスタックメモリ34中のスタックメモリアドレスi+1内に保存する。工程S15中、第一マイクロコントローラーコアロジック30の第一マイクロコントローラー機能ロジック301は、スタックメモリ34に保存されたスタックメモリアドレスi+1中の内容(即ち、00f0)を第二マイクロコントローラーコアロジック31中の第二プログラムカウンター312内に伝送し、伝送方式は、例えば、ポップ命令で、popPC2である。工程S16中、第一マイクロコントローラーコアロジック30は、マイクロコントローラーイネーブルレジスタ35により、イネーブル信号を第二マイクロコントローラーコアロジック31(及び、第二マイクロコントローラー機能ロジック311)に伝送して、第二マイクロコントローラーコアロジック31の第二マイクロコントローラー機能ロジック311に第二プログラムカウンター312が指示するプログラム開始アドレスが00f0のシステムプログラムを実行させる。続いて、工程S17中、第二マイクロコントローラーコアロジック31がプログラム開始アドレスが00f0の挿入システムプログラムを完成するのを待ち、第一マイクロコントローラーコアロジック30にこのプログラムの実行終了を通知する。工程S18中、第一マイクロコントローラーコアロジック30は、マイクロコントローラーイネーブルレジスタ35により、ディスエーブル信号を出力して、第二マイクロコントローラーコアロジック31を一時停止し、現在実行するプログラムを停止する。工程S19で、第一マイクロコントローラーコアロジック30の第一マイクロコントローラー機能ロジック301をスタックメモリ34に保存されたアドレスiの内容(c202)を第二マイクロコントローラーコアロジック31内の第二プログラムカウンター312中まで再送(例えば、popを使用)し、この動作は、第二マイクロコントローラーコアロジック31中の第二プログラムカウンター312がプログラムメモリ33中のアドレスc202を再指定したことを示す。工程S20中、第一マイクロコントローラーコアロジック30はマイクロコントローラーイネーブルレジスタ35により、イネーブル信号を出力して、第二マイクロコントローラーコアロジック31の第二マイクロコントローラー機能ロジック311を有効にし、第二マイクロコントローラーコアロジック31を再度有効にした後、第二プログラムカウンター312中にプログラムアドレスの中断前のタスクにより、第二マイクロコンピュータコアロジックプログラム領域322のプログラムを継続実行する。最後に、工程S21中、第二マイクロコントローラーコアロジック31中の第二プログラムカウンター312は既に、プログラムメモリアドレスc202を指向しており、よって、三個のマイクロコントローラーコアロジック30、31、32の状態は、それぞれ、:第一マイクロコントローラーコアロジック30の第一マイクロコントローラー機能ロジック301が第一プログラムカウンター302中のプログラムを実行し、且つ、このプログラムアドレスは、プログラムメモリ33中の第一マイクロコントローラーコアロジックプログラム領域331に位置する:第二マイクロコントローラーコアロジック31が第二プログラムカウンター312のプログラムを実行し、且つ、このプログラムアドレスは、プログラムメモリ33中の第二マイクロコントローラーコアロジックプログラム領域332に位置する。第三マイクロコントローラーコアロジック32が第三プログラムカウンター322のプログラムを実行し、且つ、このプログラムアドレスは、プログラムメモリ33中の第三マイクロコントローラーコアロジックプログラム領域333に位置する。 3 and 5, FIG. 5 is a flowchart of the control method of the second embodiment of the present invention. The structure of the multi-microcontroller system having autonomous control capability is as described above and will not be described in detail here. The control method of the multi-microcontroller system having the autonomous control capability in the second embodiment is as follows. First, in step S11, the three microcontroller core logics 30, 31, and 32 execute their own programs. That is, the first microcontroller function logic 301 in the first microcontroller core logic 30 is executing an instruction at the program address specified by the first program counter 302, and this instruction is in the first micro memory in the program memory 33. It is located in the controller core logic program area 331. The second microcontroller function logic 311 in the second microcontroller core logic 31 is executing an instruction at the program address specified by the second program counter 312, and this instruction is the second microcontroller core in the program memory 33. Located in the logic program area 332. The third microcontroller function logic 321 in the third microcontroller core logic 32 is executing an instruction at the program address specified by the third program counter 322, and this instruction is the third microcontroller core in the program memory 33. Located in the logic program area 333. At this time, the system generates or receives an interrupt request, requests the system to execute one program starting from the program address 00f0, and the program address of the inserted program is already stored in the system program area 330. ing. Thus, it is necessary for the second microcontroller core logic 31 to terminate the program being executed (the program in the second microcontroller core logic program area 332), and the insertion program with a start address of 00f0 is executed. After completion of the insertion program execution, the second microcontroller core logic 31 recovers the original program execution. During step S12, the first microcontroller core logic 30 transmits a disable signal to the second microcontroller core logic 31 (and the second microcontroller function logic 311) by the microcontroller enable register 35, and the current program. Freeze at address (eg c202). During step S13, at this time, in the first microcontroller core logic 30, the index state of the first stack pointer 303 is the stack memory address i, and the first microcontroller function logic 301 of the first microcontroller core logic 30 is The content of the second program counter 312 in the second microcontroller core logic 31 is stored in the stack memory address i, and the method is, for example, using a push instruction, for example, pushPC2. During step S14, the state of the first stack pointer 303 of the first microcontroller core logic 30 is the stack memory address i + 1, and the program start address of the insertion program executed by the controlled second microcontroller core logic 31 is 00f0. Therefore, the first microcontroller functional logic 301 of the first microcontroller 0 core logic 30 stores 00F0 in the stack memory address i + 1 in the stack memory 34. During step S15, the first microcontroller functional logic 301 of the first microcontroller core logic 30 uses the contents in the stack memory address i + 1 stored in the stack memory 34 (ie, 00f0) in the second microcontroller core logic 31. The data is transmitted to the second program counter 312 and the transmission method is, for example, pop command and popPC2. During step S16, the first microcontroller core logic 30 transmits an enable signal to the second microcontroller core logic 31 (and the second microcontroller function logic 311) by the microcontroller enable register 35, and the second microcontroller The second microcontroller function logic 311 of the core logic 31 is caused to execute the system program with the program start address 00f0 indicated by the second program counter 312. Subsequently, during step S17, the second microcontroller core logic 31 waits for the insertion system program having the program start address 00f0 to be completed, and notifies the first microcontroller core logic 30 of the end of execution of this program. During step S18, the first microcontroller core logic 30 outputs a disable signal through the microcontroller enable register 35, temporarily stops the second microcontroller core logic 31, and stops the currently executed program. In step S19, the content (c202) of the address i stored in the stack memory 34 of the first microcontroller function logic 301 of the first microcontroller core logic 30 is stored in the second program counter 312 in the second microcontroller core logic 31. This operation indicates that the second program counter 312 in the second microcontroller core logic 31 has re-designated the address c202 in the program memory 33. During step S20, the first microcontroller core logic 30 outputs an enable signal from the microcontroller enable register 35 to enable the second microcontroller function logic 311 of the second microcontroller core logic 31, and the second microcontroller core After the logic 31 is re-enabled, the program in the second microcomputer core logic program area 322 is continuously executed in the second program counter 312 by the task before interruption of the program address. Finally, during step S21, the second program counter 312 in the second microcontroller core logic 31 has already been directed to the program memory address c202, and thus the state of the three microcontroller core logics 30, 31, 32 Respectively, the first microcontroller functional logic 301 of the first microcontroller core logic 30 executes the program in the first program counter 302, and the program address is the first microcontroller core in the program memory 33. Located in the logic program area 331: the second microcontroller core logic 31 executes the program of the second program counter 312 and this program address is stored in the second program memory 33 Situated in Lee Black controller core logic program area 332. The third microcontroller core logic 32 executes the program of the third program counter 322, and this program address is located in the third microcontroller core logic program area 333 in the program memory 33.
上述の実施例中、第一マイクロコントローラーコアロジックがMCUコアロジックとして描写されているが、任意のマイクロコントローラーコアロジックをコントローラーMCUコアロジックとすることができ、挿入プログラムの開始アドレスを被制御のマイクロコントローラーコアロジックプログラムカウンター中に配置する。 In the above embodiment, the first microcontroller core logic is depicted as MCU core logic, but any microcontroller core logic can be the controller MCU core logic, and the start address of the insertion program is controlled by the controlled microcontroller. Place in the controller core logic program counter.
この他、図3中では、マイクロコントローラーコアロジックは、マイクロコントローラー機能ロジック、プログラムカウンター、及び、スタックポインターから構成されるが、これらの構造は、本発明を分かりやすくするために作成され、実際、各マイクロコントローラー機能ロジックとプログラムカウンター、スタックポインター間の作業は、動態性の対応関係で、固定の対応関係ではない。 In addition, in FIG. 3, the microcontroller core logic is composed of a microcontroller function logic, a program counter, and a stack pointer, but these structures are created to make the present invention easier to understand. The operation between each microcontroller function logic, program counter, and stack pointer is a dynamic correspondence, not a fixed correspondence.
更に、上述の実施例中、挿入プログラムのプログラムアドレスは、システムプログラム領域内(330)に保存されるが、本技術を熟知する者なら分かるように、挿入プログラムのプログラムアドレスは、任意の適当な位置に保存され、例えば、汎用レジスタ(general register)に保存される。実施例中のシステムプログラム領域は、一種の実施様態を示すのにすぎない。 Further, in the above-described embodiment, the program address of the insertion program is stored in the system program area (330). However, as will be understood by those skilled in the art, the program address of the insertion program can be any suitable address. Stored in a location, for example, in a general register. The system program area in the embodiment only shows a kind of embodiment.
また、上述の実施例中、プログラムアドレスは、スタックメモリとスタックポインター(実施例中はMCUコアロジック30のスタックポインター)を利用し、被制御のマイクロコントローラーコアロジック(実施例中は31)に伝送、或いは、そこから出力される。しかし、本技術を熟知する者なら分かるように、多くの同等の方法はこの目的を達成できる。例えば、プログラムアドレスは汎用レジスタ、データメモリ、或いは、任意のメモリを使用することにより、異なるメモリ位置の間で転移する。同様に、プッシュ命令とポップ命令は唯一の応用可能な命令ではなく、その他の命令、例えば、移動(move)命令、コール(call)命令、戻り(return)命令、或いは、ロードテーブル(load table)、或いは、その他の方法も応用でき、プログラムアドレスを伝送する目的を達成する。 In the above embodiment, the program address is transmitted to the controlled microcontroller core logic (31 in the embodiment) using the stack memory and the stack pointer (in the embodiment, the stack pointer of the MCU core logic 30). Or output from there. However, many equivalent methods can achieve this goal, as will be appreciated by those skilled in the art. For example, program addresses can be transferred between different memory locations by using general purpose registers, data memory, or arbitrary memory. Similarly, push and pop instructions are not the only applicable instructions, but other instructions such as a move instruction, a call instruction, a return instruction, or a load table. Alternatively, other methods can be applied to achieve the purpose of transmitting the program address.
公知技術と比較して分かるように、本発明は、直接、被制御のマイクロコントローラーコアロジック中のプログラムカウンターの内容を変更する。よって、MCUマイクロコントローラーコアロジックはフラグの設定が不要で、被制御のマイクロコントローラーコアロジックの応答を待つ必要もない。これにより、数個の、更には十数個のタイミングの反応時間が節約でき、本発明の自律制御能力を有するマルチマイクロコントローラーシステム、及び、方法は、簡単、効果的、反応速度が速いという特性を有する。 As can be seen in comparison with the prior art, the present invention directly modifies the contents of the program counter in the controlled microcontroller core logic. Thus, the MCU microcontroller core logic does not need to set a flag and does not need to wait for the response of the controlled microcontroller core logic. As a result, several or even dozens of timing reaction times can be saved, and the multi-microcontroller system and method having the autonomous control capability of the present invention are simple, effective, and fast in reaction speed. Have
本発明では好ましい実施例を前述の通り開示したが、これらは決して本発明に限定するものではなく、当該技術を熟知する者なら誰でも、本発明の精神と領域を脱しない範囲内で各種の変動や潤色を加えることができ、従って本発明の保護範囲は、特許請求の範囲で指定した内容を基準とする。 In the present invention, preferred embodiments have been disclosed as described above. However, the present invention is not limited to the present invention, and any person who is familiar with the technology can use various methods within the spirit and scope of the present invention. Variations and moist colors can be added, so the protection scope of the present invention is based on what is specified in the claims.
10、11、12 マイクロコントローラー
101、111、121 プログラムメモリ
102、112、122 マイクロコントローラーコアロジック
13 データメモリ
14 周辺素子
15、16 マイクロコントローラーコアユニット
151、161 命令バッファ
152、162 マイクロコントローラーコアロジック
17 プログラムメモリ
18 データメモリ
20 マイクロコントローラーコアロジック
24 プログラムカウンター
26 スタックメモリ
30 第一マイクロコントローラーコアロジック
31 第二マイクロコントローラーコアロジック
32 第三マイクロコントローラーコアロジック
301 第一マイクロコントローラー機能ロジック
311 第二マイクロコントローラー機能ロジック
321 第三マイクロコントローラー機能ロジック
302 第一プログラムカウンタ
312 第二プログラムカウンタ
322 第三プログラムカウンタ
303 第一スタックポインタ
313 第二スタックポインタ
323 第三スタックポインタ
33 プログラムメモリ
330 システムプログラム領域
331 第一マイクロコントローラーコアロジックプログラム領域
332 第二マイクロコントローラーコアロジックプログラム領域
333 第三マイクロコントローラーコアロジックプログラム領域
334 プログラムメモリバス
34 スタックメモリ
341 第一マイクロコントローラーコアロジックスタック領域
342 第二マイクロコントローラーコアロジックスタック領域
343 第三マイクロコントローラーコアロジックスタック領域
344 スタックメモリバス
35 マイクロコントローラーイネーブルレジスタ
10, 11, 12 microcontroller
101, 111, 121 Program memory
102, 112, 122 Microcontroller core logic
13 Data memory
14 Peripheral elements
15, 16 Microcontroller core unit
151, 161 instruction buffer
152, 162 Microcontroller core logic
17 Program memory
18 Data memory
20 Microcontroller core logic
24 program counter
26 Stack memory
30 First microcontroller core logic
31 Second microcontroller core logic
32 Third microcontroller core logic
301 First microcontroller functional logic
311 Second microcontroller functional logic
321 Third Microcontroller Functional Logic
302 First program counter
312 Second program counter
322 Third program counter
303 First stack pointer
313 Second stack pointer
323 Third stack pointer
33 Program memory
330 System program area
331 First Microcontroller Core Logic Program Area
332 Second Microcontroller Core Logic Program Area
333 Third Microcontroller Core Logic Program Area
334 Program memory bus
34 Stack memory
341 1st Microcontroller Core Logic Stack Area
342 Second Microcontroller Core Logic Stack Area
343 Third Microcontroller Core Logic Stack Area
344 Stacked memory bus
35 Microcontroller enable register
Claims (20)
複数のマイクロコントローラー機能ロジックと複数のプログラムカウンターとからなり、各プログラムカウンターは、それぞれ一つのマイクロコントローラー機能ロジックと結合し、プログラムアドレスを前記マイクロコントローラー機能ロジックに提供するマルチコントローラーユニットと、
前記マルチマイクロコントローラーユニットと連接し、前記マイクロコントローラー機能ロジックを無効、有効にするマイクロコントローラーイネーブルレジスタと、
前記マルチマイクロコントローラーユニットと連接し、前記マルチマイクロコントローラーユニットにより要求されるプログラムを保存する少なくとも一つのメモリと、
からなり、前記の各マイクロコントローラー機能ロジックは、上述の任意のプログラムカウンターの内容を変更することができることを特徴とするマルチマイクロコントローラーシステム。 A multi-microcontroller system,
A multi-controller unit comprising a plurality of microcontroller function logics and a plurality of program counters, each program counter being coupled to one microcontroller function logic and providing a program address to the microcontroller function logic;
A microcontroller enable register connected to the multi-microcontroller unit to disable and enable the microcontroller function logic;
At least one memory connected to the multi-microcontroller unit and storing a program required by the multi-microcontroller unit;
A multi-microcontroller system, wherein each of the microcontroller functional logics can change the contents of any of the above-mentioned program counters.
前記のもう一つのマイクロコントローラー機能ロジックを有効にする:
前記のもう一つのマイクロコントローラー機能ロジックを無効にする:
プログラムアドレスを前記のもう一つのマイクロコントローラー機能ロジックと対応するプログラムカウンター中に転移する:或いは、
前記のもう一つのマイクロコントローラー機能ロジックと対応するプログラムカウンターの内容を少なくとも一つのメモリ中に転移することを特徴とする請求項2に記載のマルチマイクロコントローラーシステム。 The command is one of the following several commands:
Enable the other microcontroller function logic described above:
Disable the other microcontroller function logic described above:
Transfer the program address into the other microcontroller function logic and corresponding program counter:
3. The multi-microcontroller system according to claim 2, wherein the contents of the program counter corresponding to the other microcontroller function logic are transferred to at least one memory.
プログラムメモリバスにより前記マルチマイクロコントローラーユニットと連接し、複数のプログラムメモリアドレスを有し、少なくとも一つのプログラムを保存する少なくとも一つのプログラムメモリと、
スタックメモリバスにより前記マルチマイクロコントローラーユニットと連接し、複数のスタックメモリアドレスを有し、前記マルチマイクロコントローラーユニットが実行するプログラムの少なくとも一つのプログラムアドレスを保存する少なくとも一つのスタックメモリと、からなり、且つ、
前記マルチマイクロコントローラーユニットは、更に、
それぞれ、前記マイクロコントローラー機能ロジックと連接し、スタックメモリアドレスを提供する複数のスタックポインターと、
からなることを特徴とする請求項1に記載のマルチマイクロコントローラーシステム。 The at least one memory is
At least one program memory connected to the multi-microcontroller unit by a program memory bus, having a plurality of program memory addresses, and storing at least one program;
A plurality of stack memory addresses connected to the multi-microcontroller unit by a stack memory bus, and comprising at least one stack memory storing at least one program address of a program executed by the multi-microcontroller unit; and,
The multi-microcontroller unit further includes:
A plurality of stack pointers each connected to the microcontroller functional logic and providing a stack memory address;
The multi-microcontroller system according to claim 1, comprising:
前記被制御マイクロコントローラー機能ロジックがプッシュ命令を発する工程と、
前記システムは、前記被制御マイクロコントローラー機能ロジックと対応するプログラムカウンターの内容を前記メモリ位置に保存する工程と、
からなることを特徴とする制御方法。 A push control method applied in a multi-microcontroller system, wherein the multi-microcontroller system corresponds to at least one controller MCU function logic, a controlled microcontroller function logic, and the controlled microcontroller function logic The control method comprises a program counter and a memory.
The controlled microcontroller functional logic issuing a push command;
The system stores the contents of a program counter corresponding to the controlled microcontroller functional logic in the memory location;
A control method comprising:
前記マイクロコントローラー機能ロジックがポップ命令を発する工程と、
前記システムは、プログラムアドレスを前記被制御コントローラー機能ロジックの前記プログラムカウンターに挿入する工程と、
からなることを特徴とする制御方法。 A pop control method applied in a multi-microcontroller system, wherein the multi-microcontroller system corresponds to at least one controller MCU function logic, a controlled microcontroller function logic, and the controlled microcontroller function logic The control method comprises a program counter and a memory.
The microcontroller functional logic issuing a pop command;
The system inserts a program address into the program counter of the controlled controller functional logic;
A control method comprising:
前記被制御マイクロコントローラー機能ロジックを無効にする工程と、
前記プログラムカウンターを凍結する工程と、
前記メモリ内の第一位置の内容を前記プログラムカウンター内に伝送する工程と、
前記被制御マイクロコントローラー機能ロジックを有効にする工程と、
からなることを特徴とする制御方法。 A control method applied in a multi-microcontroller system, wherein the multi-microcontroller system includes at least one controller MCU function logic, a controlled microcontroller function logic, a program counter corresponding to the controlled microcontroller function logic, and , Memory, and the control method is:
Disabling the controlled microcontroller functional logic;
Freezing the program counter;
Transmitting the contents of the first location in the memory into the program counter;
Enabling the controlled microcontroller functional logic;
A control method comprising:
前記スタックポインターの索引により、前記プログラムカウンターの内容を前記スタックメモリの一位置中に保存する工程を含むことを特徴とする請求項17に記載の制御方法。 The system further includes a stack pointer corresponding to the stack memory, and the step of “saving the contents of the program counter in a second location in the memory” includes:
18. The control method according to claim 17, further comprising the step of storing the contents of the program counter in a location of the stack memory according to the index of the stack pointer.
前記スタックポインターの第一索引により、前記メモリの第一位置の内容を前記スタックメモリの一位置中に暫時保存する工程と、
前記スタックポインターの第二索引により、前記スタックメモリの上述位置の内容を前記プログラムカウンター中に保存する工程と、
を含むことを特徴とする請求項16に記載の制御方法。 The system further comprises a stack pointer corresponding to the stack memory, and the step of “transferring the contents in the first location in the memory into the program counter” comprises:
Temporarily storing the contents of the first location of the memory in a location of the stack memory by a first index of the stack pointer;
Storing the contents of the location of the stack memory in the program counter by a second index of the stack pointer;
The control method according to claim 16, further comprising:
前記被制御マイクロコントローラー機能ロジックを無効にする工程と、
前記プログラムカウンターを凍結する工程と、
前記スタックポインターの第一索引により、前記メモリカウンターの内容を前記スタックメモリの第一位置に保存する工程と、
前記スタックポインターの第二位置により、前記プログラムメモリの一アドレスを前記スタックメモリ内の第二位置に暫時保存する工程と、
前記スタックポインターの第二索引により、前記スタックメモリ内の第二位置の内容を前記プログラムカウンターに保存する工程と、
前記被制御マイクロコントローラー機能ロジックを有効にし、前記被制御マイクロコントローラー機能ロジックに、前記プログラムメモリアドレス内の内容と対応するタスクを実行させる工程と、
前記被制御マイクロコントローラー機能ロジックを無効にする工程と、
前記スタックメモリの第一位置の内容を前記プログラムカウンター内に回復させる工程と、
前記被制御マイクロコントローラー機能ロジックに本来実行中であったプログラムを継続実行させる工程と、からなることを特徴とする制御方法。 A control method applied to a multi-microcontroller system, wherein the multi-microcontroller system includes at least one MCU function logic, a controlled multi-controller function logic, a program counter corresponding to the controlled multi-controller function logic, and a program memory , A stack memory, and a stack pointer corresponding to the stack memory, and the control method includes:
Disabling the controlled microcontroller functional logic;
Freezing the program counter;
Storing the contents of the memory counter in a first location of the stack memory by a first index of the stack pointer;
Temporarily storing one address of the program memory in a second position in the stack memory by a second position of the stack pointer;
Storing the contents of the second location in the stack memory in the program counter by a second index of the stack pointer;
Enabling the controlled microcontroller functional logic and causing the controlled microcontroller functional logic to perform a task corresponding to the content in the program memory address;
Disabling the controlled microcontroller functional logic;
Restoring the contents of the first location of the stack memory into the program counter;
And a step of causing the controlled microcontroller function logic to continuously execute a program that was originally being executed.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW095113415A TW200725393A (en) | 2005-12-23 | 2006-04-14 | Self-control multi-microcontroller system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007287126A true JP2007287126A (en) | 2007-11-01 |
Family
ID=38758803
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006326773A Pending JP2007287126A (en) | 2006-04-14 | 2006-12-04 | Multi-microcontroller system and control method |
Country Status (4)
Country | Link |
---|---|
JP (1) | JP2007287126A (en) |
KR (1) | KR100946561B1 (en) |
FR (1) | FR2911415B1 (en) |
TW (1) | TW200725393A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833476A (en) * | 2010-05-28 | 2010-09-15 | 西安交通大学 | Independent Stack Function Calling Method under Speculative Multithreading Mechanism Based on CMP |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5881063A (en) * | 1996-04-08 | 1999-03-09 | Ford Motor Company | Half-message based multiplex communication interface circuit which uses a main microcontroller to detect a match in addresses and generate a qualified signal |
US6085307A (en) * | 1996-11-27 | 2000-07-04 | Vlsi Technology, Inc. | Multiple native instruction set master/slave processor arrangement and method thereof |
US6341344B1 (en) | 1998-03-20 | 2002-01-22 | Texas Instruments Incorporated | Apparatus and method for manipulating data for aligning the stack memory |
-
2006
- 2006-04-14 TW TW095113415A patent/TW200725393A/en unknown
- 2006-11-30 KR KR1020060119680A patent/KR100946561B1/en active Active
- 2006-12-04 JP JP2006326773A patent/JP2007287126A/en active Pending
-
2007
- 2007-01-17 FR FR0752727A patent/FR2911415B1/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833476A (en) * | 2010-05-28 | 2010-09-15 | 西安交通大学 | Independent Stack Function Calling Method under Speculative Multithreading Mechanism Based on CMP |
Also Published As
Publication number | Publication date |
---|---|
KR100946561B1 (en) | 2010-03-11 |
FR2911415A1 (en) | 2008-07-18 |
KR20070102370A (en) | 2007-10-18 |
TWI312941B (en) | 2009-08-01 |
FR2911415B1 (en) | 2013-12-27 |
TW200725393A (en) | 2007-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7716673B2 (en) | Tasks distribution in a multi-processor including a translation lookaside buffer shared between processors | |
US6728800B1 (en) | Efficient performance based scheduling mechanism for handling multiple TLB operations | |
US8566832B1 (en) | Power optimization for multi-core devices having a shared memory manager | |
JP4119945B2 (en) | Task processing device | |
US7590774B2 (en) | Method and system for efficient context swapping | |
US9052920B2 (en) | Electronic devices and methods for switching between dual operating systems | |
US7870308B2 (en) | Programmable direct memory access engine | |
US8918553B2 (en) | Multithreaded programmable direct memory access engine | |
US20180095792A1 (en) | Multi-core system including heterogeneous processor cores with different instruction set architectures | |
JPWO2009022371A1 (en) | Task processing device | |
KR20170141205A (en) | A central processing unit having a DSP engine and an enhanced context switch function unit | |
JPWO2008023427A1 (en) | Task processing device | |
US20060101427A1 (en) | Handover between software and hardware accelarator | |
CN114662136A (en) | A high-speed encryption and decryption system and method of multi-algorithm IP core based on PCIE channel | |
CN114579188A (en) | A RISC-V vector memory access processing system and processing method | |
JPH0135367B2 (en) | ||
JP5155336B2 (en) | Task processing device | |
WO2021061626A1 (en) | Instruction executing method and apparatus | |
US5948093A (en) | Microprocessor including an interrupt polling unit configured to poll external devices for interrupts when said microprocessor is in a task switch state | |
CN100549942C (en) | Self-controlled multiple micro-control system and method | |
JP2007287126A (en) | Multi-microcontroller system and control method | |
US7480812B2 (en) | Microprocessor | |
US20040024988A1 (en) | Synchronization of processor states | |
US20130246670A1 (en) | Information processing system | |
CN118245114A (en) | A processor and its task scheduling method, chip, and storage medium |