WO2014163168A1 - Application-specific virtual machine generation system, device, method, and program - Google Patents

Application-specific virtual machine generation system, device, method, and program Download PDF

Info

Publication number
WO2014163168A1
WO2014163168A1 PCT/JP2014/059903 JP2014059903W WO2014163168A1 WO 2014163168 A1 WO2014163168 A1 WO 2014163168A1 JP 2014059903 W JP2014059903 W JP 2014059903W WO 2014163168 A1 WO2014163168 A1 WO 2014163168A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
application
code
specialized
virtual machine
Prior art date
Application number
PCT/JP2014/059903
Other languages
French (fr)
Japanese (ja)
Inventor
幸一 中本
幸秀 辻
Original Assignee
日本電気株式会社
兵庫県
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電気株式会社, 兵庫県 filed Critical 日本電気株式会社
Priority to JP2015510146A priority Critical patent/JP6350831B2/en
Publication of WO2014163168A1 publication Critical patent/WO2014163168A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation

Definitions

  • the present invention relates to a virtual machine generation technique specialized for an application for reducing power consumption when updating a computer program.
  • sensor networks that network sensor nodes having a sensing function by wireless communication have attracted attention. Since a large number of sensor nodes are distributed in the sensor network, it is possible to reduce the number of sensor node batteries to be replaced or to eliminate the need for replacement (the number of replacements is 0), and to increase the usable time of the entire system. Necessary for practical use of sensor networks. On the other hand, versatility is required for the CPU (Central Processing Unit) of the sensor node, the amount of accessible memory increases, and the program size installed in the sensor node increases. When the program size mounted on the sensor node increases, there is a problem that the power consumption at the time of updating the program increases.
  • CPU Central Processing Unit
  • such a system includes, for example, a host computer 1 that generates an instruction code program and a target computer 2 that executes the instruction code program.
  • the compiler 20 compiles a processing program (a source program written in a programming language such as C language) of the target computer 2 on the host computer 1.
  • the compiler 20 generates a program of the instruction code (second CPU 22 instruction program 23) of the second CPU 22 of the target computer 2.
  • the second CPU 22 instruction program 23 generated by the compiler 20 is transferred from the host computer 1 to the target computer 2 and stored in the memory of the target computer 2.
  • the second CPU 22 reads the second CPU 22 instruction program 23 from the memory of the target computer 2 and executes it. If the second CPU 22 instruction program 23 is changed, the above process is repeated.
  • a program is executed by a computer, its execution method is roughly divided into two methods, a compiler method and an interpreter method. In the following, the compiler and interpreter will be described.
  • the compiler is a process for converting a program written in a programming language into a machine language instruction code that can be understood by the CPU.
  • the CPU executes the program based on the machine language instruction code.
  • the compiling method at the stage where the CPU executes the program, syntax analysis and translation into machine language are finished, so that an optimal execution processing speed by the CPU can be obtained.
  • the compiler method has a problem that it is difficult to change the instruction code to be executed.
  • the interpreter is a process for translating a program written in a programming language into an intermediate instruction code different from the machine language. The interpreter interprets and executes the program based on the intermediate instruction code. Therefore, in the interpreter system, it is easier to add instruction codes than in the compile system. Also, by changing the interpreter, the function of the instruction code can be easily changed.
  • the interpreter method it is difficult to increase the speed because the interpreter executes the intermediate instruction code as a program. Recently, the processing speed of the CPU itself has become very high, and unless it is a special application that requires high-speed processing, the interpreter method can satisfy the required processing.
  • the interpreter in this specification and the drawings is used synonymously with a virtual machine. That is, the interpreter is software that converts a source program of a specific programming language into an intermediate instruction code and interprets and executes the intermediate instruction code program.
  • a target computer that operates by battery drive such as a sensor node as described below, a technique for executing at high speed by reducing the program size while maintaining versatility is known.
  • the program size can be reduced by adding multimedia extension instructions and saturation instructions used in multimedia to the CPU instructions.
  • ASIP Application Specific Instruction Processor
  • an application specific instruction processor in which an application specific instruction code is implemented in hardware on a CPU is known (see, for example, Non-Patent Document 1).
  • a technique for generating a program such as Java (registered trademark) in a virtual machine instruction format (byte code) independent of the CPU of the target computer, and executing the program on the CPU of the target computer by a virtual machine instruction interpreter.
  • Java registered trademark
  • byte code virtual machine instruction format independent of the CPU of the target computer
  • Non-Patent Document 3 a technique for proposing a virtual machine in order to reduce the download size of a program on an OS (Operating System) dedicated to the sensor node is known (see, for example, Non-Patent Document 3).
  • the virtual machine instruction code is fixed in order to reduce the download size of the program.
  • a technique is known in which a byte instruction code of a virtual machine code is replaced with a macro instruction code, and when the virtual machine interprets the macro instruction code, the implementation address of the macro instruction code is checked and the instruction is executed. (See Patent Document 1).
  • Non-volatile logic circuit using a non-volatile element that can change specifications in a manufactured logic circuit is known (see, for example, Patent Documents 2 to 7).
  • Programmable semiconductor integrated circuits such as FPGA (Field Programmable Gate Array) can change the logic operation and wiring connection by storing the operation of the logic circuit and arithmetic circuit and the connection between the logic circuit and arithmetic circuit in the memory.
  • FPGA Field Programmable Gate Array
  • the memory element is formed in the same layer as the transistor on the semiconductor substrate, there is a problem of occupying a very large area. For this reason, the programmable integrated circuit has a problem that the chip area increases and the manufacturing cost increases.
  • the FPGA since the area of the wiring switch for changing the connection between the logic circuit and the arithmetic circuit is increased, there is a problem that the ratio of the logic circuit and the arithmetic circuit in the chip area is reduced.
  • the non-volatile logic circuit using the non-volatile element it is possible to replace both the memory element or the memory circuit for storing the configuration information and the pass transistor for connecting the wirings with a wiring structure. .
  • an object of the present invention is to reduce the power consumption required at the time of program update and execution of a target computer by reducing the size of a program transferred to and executed by a target computer such as a sensor node. To do. It is another object of the present invention to reduce power consumption required for program update and execution by partially executing a program on a target computer.
  • the application-specific virtual machine generation system of the present invention is provided with the following means 1) to 4) on the host computer and the interpreter generated by the following 3) interpreter generation means on the target computer.
  • the application specific instruction embedded code generated by the specialized instruction embedded code generating means 4) below is mounted.
  • Specialized instruction embedded code generation means for generating application-specific instruction embedded code by compiling source code written in a general-purpose programming language with a compiler generated by the compiler generation means.
  • the size of a program to be transferred / executed to the target computer can be reduced, and the power required for updating and executing the program on the target computer can be reduced.
  • a virtual machine instruction specialized for each application means a virtual machine instruction code compactized in accordance with the characteristics of the application source code described in a high-level program language.
  • the characteristics of the application source code include, for example, frequent repeat processing (loop processing), frequent conditional branch processing, frequent store instructions, predictable number of data to be stored, constants to store, It has characteristics indicating that the number of data digits can be predicted, a series of processing frequently occurs, and the like.
  • the specialized instruction defining means analyzes the characteristics of the application source code and creates a replacement table that replaces these characteristics with specialized character strings, numeric strings, symbols, and codes that do not appear in the source code. Specifically, on the host computer screen, special instruction code that replaces repeated processing (loop processing), special instruction code that replaces conditional branch processing, and special instruction code that replaces a series of processes such as store / forward Define.
  • the general-purpose virtual machine instructions are the same instructions that the host computer compiles the target processing program and generates a program of the instruction code of the CPU of the target computer.
  • the compiler generating means of 2) generates a compiler capable of generating a special instruction embedded code combining the application specific instruction defined in 1) and a general-purpose virtual machine instruction.
  • This compiler differs from conventional compilers in that it can generate specialized instruction embedded code that combines application-specific instructions and general-purpose virtual machine instructions.
  • the interpreter generating means of 3) generates an interpreter that can interpret and execute the specialized instruction embedded code.
  • the interpreter generated on the host computer is transferred to the target computer and mounted on the target computer.
  • the specialized instruction embedded code generation means of 4) above compiles the source code of a program described in a general-purpose program language (that is, a high-level program language) with a compiler generated by the compiler generation means, Generate application specific instruction embedded code. That is, the compiler generated by the compiler generation unit analyzes the source code of the target process. The compiler compiles while discriminating an application-specific instruction code included in the source code and a general-purpose virtual machine-specific instruction code. Therefore, the compiler can generate the special instruction embedded code combining the application special instruction code and the virtual machine instruction code.
  • the specialized instruction embedded code generation means compiles the source code of the pre-update program and the source code of the post-update program with the compiler, respectively, Analyzing the specialized instruction embedded code and the application specialized instruction embedded code of the updated program to generate an application specialized instruction embedded differential code, and the interpreter includes an application specialized instruction embedded differential code, More preferably, the application-specific instruction embedded code before update is merged and interpreted.
  • the interpreter is configured by a nonvolatile logic circuit using a nonvolatile element, and a part of the circuit board of the target computer is configured by a nonvolatile logic circuit. preferable.
  • a part of the program of the target computer is transferred to the nonvolatile theory. Can be reduced.
  • the present invention is applied to a sensor node in which power ON / OFF operations are frequently performed, since it is non-volatile, it is not necessary to transfer the configuration data of the interpreter that occurs every time it recovers, reducing power consumption. And a delay at the time of starting can be avoided.
  • an extension instruction can be added and hard coding (hardware) for the additional instruction can be performed, and the interpreter in the present invention can be realized.
  • the application-specific instruction specifically means that an instruction code composed of a plurality of words is shortened and replaced with an instruction code having a shorter length.
  • Another application-specific instruction is to integrate a plurality of instruction codes and replace them with an instruction code having a shorter length.
  • another application specific instruction shortens the processing data to the number of bits corresponding to the assumed value, or changes the address of the processing data to a position identifier shortened to the number of bits corresponding to the assumed address. Is.
  • shortening to the number of bits corresponding to the assumed address means changing to a 4-bit position identifier if the assumed address is 0 to 15, and changing to an 8-bit position identifier if it is 0 to 255. That is.
  • Another application-specific instruction shortens the instruction code bit by limiting the number of instruction codes. For example, if the number of instruction codes is 32, the instruction code bits can be expressed by 5 bits, and further the instruction code is limited to 4 instruction codes, that is, if the number of instruction codes is 4, the instruction code The code bit can be expressed by 2 bits.
  • the application-specific virtual machine generation device of the present invention includes the following a) to d).
  • Specialized instruction definition means for defining a virtual machine instruction (application specific instruction) specialized for each application.
  • Compiler generation means for generating a compiler capable of generating a special instruction embedded code combining a defined application special instruction and a general-purpose virtual machine instruction.
  • Interpreter generating means for generating an interpreter capable of interpreting and executing the specialized instruction embedded code.
  • Specialized instruction embedded code generation means for generating application-specific instruction embedded code by compiling source code written in a general-purpose programming language with a compiler generated by the compiler generation means.
  • the application-specific virtual machine generation apparatus of the present invention the size of a program to be transferred / executed to a target computer can be reduced, and power consumption required when updating and executing a program on the target computer can be reduced.
  • the descriptions of a) to d) are the same as those of 1) to 4) described above, and a description thereof will be omitted.
  • the application-specific virtual machine generation method of the present invention includes the following A) to D).
  • a compiler generation step for generating a compiler capable of generating a special instruction embedded code combining a defined application special instruction and a general-purpose virtual machine instruction.
  • a specialized instruction embedded code generation step of generating an application specific instruction embedded code by compiling source code written in a general-purpose programming language with a compiler generated by the compiler generation means.
  • the size of a program to be transferred / executed to a target computer can be reduced, so that it is possible to reduce power consumption required when updating and executing a program on the target computer.
  • the description of A) to D) is the same as 1) to 4) described above, and the description is omitted.
  • the interpreter generated by the interpreter generation step and the application-specific instruction embedded code generated by the specialized instruction embedded code generation step are transferred to the target computer. More preferably, a transfer step is further provided. Since the application specific instruction embedded code generated by the special instruction embedded code generation step optimizes the program size, it is possible to reduce power consumption due to data transfer when the target computer updates the program.
  • the interpreter generated in the interpreter generation step is configured by a nonvolatile logic circuit using a nonvolatile element, and a part of the circuit board of the target computer is configured as a nonvolatile logic.
  • a circuit configuration step configured by a circuit
  • an application-specific instruction embedded differential code is generated, and the interpreter executes the application-specific instruction embedded differential code and the pre-update More preferably, the application-specific instruction embedded code is merged and interpreted.
  • the application-specific virtual machine generation program of the present invention causes a computer to function as the following i) to iv). i) Specialized instruction definition means for defining virtual machine instructions (application specific instructions) specialized for each application.
  • Compiler generation means for generating a compiler capable of generating special instruction embedded code combining the defined application specific instruction and a general-purpose virtual machine instruction.
  • interpreter generating means for generating an interpreter capable of interpreting and executing the specialized instruction embedded code.
  • specialized instruction embedded code generation means for generating application specific instruction embedded code by compiling source code written in a general-purpose programming language with the compiler generated by the compiler generation means.
  • the program size can be reduced, and as a result, the program size transmitted at the time of program update is reduced. Further, according to the present invention, there is an effect that the power consumption during the program execution can be reduced by executing a part of the program in the target computer by hardware.
  • FIG. 1 is a block diagram showing an application-specific virtual machine generation system.
  • FIG. 2A is a conceptual diagram showing a constant store instruction by a conventional CPU.
  • FIG. 2B is a conceptual diagram showing an application specific instruction.
  • FIG. 3A is a schematic diagram illustrating store and forward operations between sensor nodes.
  • FIG. 3B is a conceptual diagram showing a store instruction and a forward instruction by a conventional CPU.
  • FIG. 3C is a conceptual diagram showing an application specific instruction.
  • FIG. 4 is an explanatory diagram of a specialized instruction for a function call instruction.
  • FIG. 5 is a block diagram showing another type of application-specific virtual machine generation system.
  • FIG. 6 is a flowchart showing a processing flow of the host computer.
  • FIG. 7 is a flowchart showing a processing flow of the target computer.
  • FIG. 8 is a block diagram showing a conventional system.
  • the application-specific virtual machine generation system of the present invention is a system that includes a host computer 1 and a target computer 2 that can be connected by data transfer means including a communication network such as wireless communication.
  • a connectable system includes both a constantly connected system and a temporarily connected system.
  • the specialized instruction defining unit 12 defines a specialized instruction for each application (hereinafter referred to as “AP specialized instruction”).
  • the compiler generation unit 14 generates a compiler 16 (hereinafter referred to as “AP-specific compiler 16”) that generates a program of an AP-specific instruction and a normal virtual machine instruction.
  • the interpreter generation means 15 generates an interpreter 17 that interprets and executes a program of an AP special instruction and a normal virtual machine instruction (hereinafter referred to as “AP special instruction interpreter 17”).
  • the compiler generation unit 14 and the interpreter generation unit 15 are called a virtual machine generator 13 specialized for an application.
  • the non-volatile circuit converting means 18 converts the AP-specific instruction interpreter 17 into an AP-specific interpreter 25 using a non-volatile logic circuit.
  • the specialized instruction embedded code generation means 19 has an AP specialized compiler 16.
  • the AP special compiler 16 operates on the host computer 1 and compiles the processing program 3 written in a programming language such as C language into a program 24 based on AP special instructions.
  • the program 24 based on the AP special instruction is transferred to the target computer 2.
  • an AP specialized instruction interpreter 25 based on a nonvolatile circuit interprets and executes the program 24 based on the AP specialized instruction.
  • the program size can be reduced, so that the power related to program transmission can be reduced.
  • the program 24 by the AP special instruction is executed by the AP special instruction interpreter 25 by the nonvolatile circuit, the power consumption is reduced.
  • a method for changing the variable value of the program in the constant store instruction will be described.
  • the variable value of the program in the sensor node is often changed in order to adjust the parameter of data collection.
  • a constant store instruction is prepared in a general CPU as shown in FIG. 2A.
  • the CPU is generally used, two 32 bits (one word) are required.
  • FIG. 2B in the application-specific virtual machine generation system, if the variable value of a program can be changed by specifying a constant value with a value represented by 16 bits and a storage location with an 8-bit identifier, This can be realized by one 32-bit (one word). Therefore, in the application-specific virtual machine generation system, a constant store instruction code composed of a plurality of two words is shortened and replaced with a one-word constant store instruction code.
  • the operation movement which the sensor node in a sensor network transfers a sensor command is demonstrated.
  • the sensor node B stores the sensor command received from the adjacent sensor node A and transmits the data to the next adjacent sensor node C.
  • the sensor node C performs the same process as that of the sensor node B when there is a further adjacent sensor node.
  • a store instruction code and a forward instruction code are required separately as shown in FIG. 3B.
  • an instruction of several tens of steps is required.
  • the operation can be realized with one store-forward instruction as shown in FIG.
  • the store address of the command data of the sensor node can be specified by an 8-bit identifier, and the address of the adjacent node is held by the wireless driver. Since it can be realized by one store-forward instruction, the size of the program 24 by the AP-specific instruction is reduced, so that the power required for data transmission can be reduced.
  • changeCalVal a program that frequently uses a function called changeCalVal () is assumed.
  • the function called changeCalVal () has two actual arguments, one of which is a variable, and the other is a threshold constant. It is also assumed that the value that the variable can take when operating the program is an integer of 100 or less.
  • the application-specific instruction defines an application-specific instruction code for changeCalVal (x, v). Specifically, if there is a description of changeCalVal (x, v) (x and v are arguments), it is recognized as a continuous instruction of three lines of codeof (changeCalVal), codeof (x), and codeof (v). .
  • codeof (A) represents the encoded A.
  • changeCalVal (x, v) :: codeof (changeCalVal) codeof (x) codeof (v)
  • codeof changeCalVal codeof (x) codeof (v)
  • the application (AP) specialized compiler 16 converts it into a specialized instruction code compressed to 32 bits.
  • FIG. 5 is a block diagram illustrating functions of the application-specific virtual machine generation system according to the fifth embodiment.
  • the source code of the pre-update program 3a and the source code of the post-update program 3b are respectively AP-specific. Compile with the compiler 16.
  • the AP-specific compiler 16 analyzes the application-specific instruction embedded code of the pre-update program 3a and the application-specific instruction embedded code of the post-update program 3b, and the difference program 26 is an application-specific instruction embedded differential code. Is generated.
  • the AP special instruction interpreter 25 using a nonvolatile circuit interprets and executes a program obtained by merging the pre-update program 27 and the difference program 26 using the AP special instruction.
  • FIG. 6 is a flowchart of processing executed by the host computer 1
  • FIG. 7 is a flowchart of processing executed by the target computer 2.
  • a processing flow of the host computer 1 will be described with reference to FIG.
  • the host computer 1 defines a virtual machine instruction (AP special instruction) specialized for each application (step S11).
  • an AP specialized compiler capable of generating specialized instruction embedded code combining an application (AP) specialized instruction and a general-purpose virtual machine instruction is generated (step S12).
  • an AP special instruction interpreter capable of interpreting and executing the special instruction embedded code is generated (step S13).
  • the source code of the program is compiled by the AP specialized compiler generated in step S12, and an application (AP) specialized instruction embedded code is generated (step S14).
  • the target computer 1 downloads an AP-specific instruction interpreter from the host computer 1 (transfers it from the host computer to the target computer) (step S21).
  • the AP-specific instruction embedded code is downloaded from the host computer 1 (step S22).
  • the AP special instruction interpreter interprets and executes the AP special instruction embedded code (step S23).
  • the AP-specific instruction interpreter is configured by a nonvolatile logic circuit using a nonvolatile element, and a part of the circuit board of the target computer is configured by a nonvolatile logic circuit. In this case, steps S22 and S23 are performed without performing step S21.
  • the present invention is useful for a battery-driven sensor node and actuator node. Further, the present invention can be applied to a computer system that can be used for several decades with only a battery. For example, it can be used in a wide range of fields that require data collection, such as buildings, tunnels, farms, and roads.

Abstract

Means (1-4) are provided on a host computer, and generated interpreter and application-specific instruction-embedded code are installed on a target computer. 1) A specialized instruction definition means for defining an application-specific instruction, 2) a compiler generation means for generating a compiler capable of generating a specialized instruction-embedded code obtained by combining the application-specific instruction and a general-purpose virtual machine instruction, 3) an interpreter generation means for generating the interpreter capable of analyzing and executing the specialized instruction-embedded code, and 4) a specialized instruction-embedded code generation means for generating the application-specific instruction-embedded code by compiling a source code written in a general-purpose programming language by the compiler generated by the complier generation means.

Description

アプリケーション特化仮想マシン生成システム、装置、方法およびプログラムApplication-specific virtual machine generation system, apparatus, method, and program
 本発明は、コンピュータのプログラム更新時の消費電力を少なくするためのアプリケーションに特化した仮想マシンの生成技術に関するものである。 The present invention relates to a virtual machine generation technique specialized for an application for reducing power consumption when updating a computer program.
 近年、センシング機能を有するセンサノードを無線通信によってネットワーク化するセンサネットワークが注目を集めている。センサネットワークには多数のセンサノードが分散配置しているため、センサノードのバッテリーの交換回数を削減あるいは交換不要(交換回数を0回)とし、システム全体の可用時間の長期化を図ることが、センサネットワークの実用化に必要である。一方で、センサノードのCPU(Central Processing Unit)に汎用性が要求され、アクセス可能なメモリ量が多くなると共に、センサノードに搭載されるプログラムサイズが大きくなっている。センサノードに搭載されるプログラムサイズが大きくなると、プログラムの更新時の電力の消費量が大きくなる問題がある。
 また、センサノード以外にも、ターゲットコンピュータのCPUに汎用性が要求され、アクセス可能なメモリ量も大きい場合、ターゲットコンピュータの命令コードのサイズは大きくなる傾向にある。通常、このようなターゲットコンピュータの命令コードは、ホストコンピュータで生成している。したがって、ターゲットコンピュータは、プログラムの更新時に受信するプログラムサイズが大きくなるため、消費電力が大きくなるという問題がある。
 このようなシステムは、図8に示すように、例えば命令コードのプログラムを生成するホストコンピュータ1と、命令コードのプログラムを実行させるターゲットコンピュータ2とから構成される。
 一般的なセンサネットワークでは、図8に示すように、ホストコンピュータ1上で、コンパイラ20がターゲットコンピュータ2の処理プログラム(C言語などのプログラミング言語で記述されたソースプログラム)をコンパイルする。そして、コンパイラ20はターゲットコンピュータ2の第2CPU22の命令コード(第2CPU22命令プログラム23)のプログラムを生成する。コンパイラ20によって生成された第2CPU22命令プログラム23は、ホストコンピュータ1からターゲットコンピュータ2へ転送され、ターゲットコンピュータ2のメモリに格納される。そして、第2CPU22は、ターゲットコンピュータ2のメモリから第2CPU22命令プログラム23を読み出して実行する。また第2CPU22命令プログラム23に変更があれば、上記の処理を繰り返す。
 ここで、プログラムをコンピュータで実行するとき、その実行方法には大きく分けて、コンパイラ方式とインタプリタ方式の2つの方法がある。以下で、コンパイラとインタプリタについて説明する。
 コンパイラは、プログラミング言語で記述されたプログラムをCPUが理解できる機械語の命令コードに変換する処理である。CPUは、機械語の命令コードに基づいてプログラムを実行する。コンパイル方式では、CPUがプログラムを実行する段階では、構文解析や機械語への翻訳は終わっているため、CPUによる最適な実行処理速度が得られる。しかしながら、コンパイラ方式の場合、実行する命令コードの変更が難しいという問題がある。
 コンパイラに対して、インタプリタは、プログラミング言語で記述されたプログラムを機械語とは異なる中間命令コードに翻訳する処理である。そして、インタプリタは、中間命令コードに基づいてプログラムを解釈実行する。そのため、インタプリタ方式では、命令コードの追加がコンパイル方式に比べて容易である。
 また、インタプリタを変更することで、命令コードの機能を変更することが容易にできる。しかしながら、インタプリタ方式の場合、中間命令コードをインタプリタがプログラムで実行するため、高速化が困難であった。最近は、CPU自体の処理速度が非常に高速になり、高速処理が必要な特別なアプリケーションでない限り、インタプリタ方式でも要求処理を満足できるようになってきている。
 なお、本明細書および図面におけるインタプリタは、仮想マシンと同義で用いている。つまり、インタプリタは、特定のプログラミング言語のソースプログラムを中間命令コードに変換すると共に、中間命令コードプログラムを解釈実行するソフトウェアである。
 また、下記に示すようなセンサノード等のバッテリー駆動で動作するターゲットコンピュータの場合に、汎用性を維持しつつ、プログラムサイズを小さくすることで、高速実行する技術が知られている。
 例えば、マルチメディアアプリケーションにおいて、マルチメディアで利用されるマルチメディア拡張命令や飽和命令をCPU命令に追加することにより、プログラムサイズを小さくすることができる。
 また、アプリケーション固有の命令コードをCPUにハードウェアで実現したもの、すなわち、アプリケーション固有命令プロセッサ(ASIP :Application Specific Instruction Processor)が知られている(例えば、非特許文献1を参照。)。
 また、ターゲットコンピュータのCPUから独立した仮想マシン命令形式(バイトコード)でJava(登録商標)等のプログラムを生成し、ターゲットコンピュータのCPU上では仮想マシン命令インタプリタにより、当該プログラムを実行する技術知られている(例えば、非特許文献2を参照。)。
 この技術の場合、バイトコードはスタックで実行されるため、オペランドを指定しなくてすむため命令コードサイズは小さくなる。その結果としてプログラムサイズが小さくなるという効果がある。
 また、センサノードに専用のOS(Operating System)上に、プログラムのダウンロードサイズを小さくするために、仮想マシンを提案する技術が知られている(例えば、非特許文献3を参照。)。
 非特許文献3に開示された技術では、プログラムのダウンロードサイズを小さくするために、仮想マシン命令コードは固定されている。
 また、仮想マシンコードのバイト命令コードをマクロ命令コードで置換し、仮想マシンが当該マクロ命令コードをインタプリトするときに、マクロ命令コードの実装アドレスを調べて、その命令を実行する技術が知れている(特許文献1を参照。)。
 また、近年、製造後の論理回路において仕様の変更を可能とする不揮発性素子を用いた不揮発性論理回路が知られている(例えば、特許文献2~7を参照。)。FPGA(Field Programmable Gate Array)などのプログラム可能な半導体集積回路では、論理回路や演算回路の動作や論理回路や演算回路同士の接続をメモリに記憶することで論理動作や配線の接続の変更を可能とする。しかしながら、メモリ素子が半導体基板上のトランジスタと同じ層に形成されているため、非常に大きな面積を占有する問題がある。このことから、プログラム可能な集積回路はチップ面積が大きくなり、製造コストが上昇するという問題がある。また、FPGAでは、論理回路や演算回路同士の接続を変更する配線スイッチの面積が大きくなるために、チップ面積に占める論理回路や演算回路の割合が低くなってしまうも問題がある。
 上記の不揮発性素子を用いた不揮発性論理回路では、構成情報を記憶するためのメモリ素子またはメモリ回路と、配線同士の接続を行うためのパストランジスタの双方を配線構造で置き換えることが可能である。
In recent years, sensor networks that network sensor nodes having a sensing function by wireless communication have attracted attention. Since a large number of sensor nodes are distributed in the sensor network, it is possible to reduce the number of sensor node batteries to be replaced or to eliminate the need for replacement (the number of replacements is 0), and to increase the usable time of the entire system. Necessary for practical use of sensor networks. On the other hand, versatility is required for the CPU (Central Processing Unit) of the sensor node, the amount of accessible memory increases, and the program size installed in the sensor node increases. When the program size mounted on the sensor node increases, there is a problem that the power consumption at the time of updating the program increases.
In addition to the sensor node, when the CPU of the target computer is required to be versatile and the accessible memory amount is large, the size of the instruction code of the target computer tends to increase. Usually, the instruction code of such a target computer is generated by a host computer. Therefore, the target computer has a problem in that power consumption increases because the program size received when updating the program is large.
As shown in FIG. 8, such a system includes, for example, a host computer 1 that generates an instruction code program and a target computer 2 that executes the instruction code program.
In a general sensor network, as shown in FIG. 8, the compiler 20 compiles a processing program (a source program written in a programming language such as C language) of the target computer 2 on the host computer 1. Then, the compiler 20 generates a program of the instruction code (second CPU 22 instruction program 23) of the second CPU 22 of the target computer 2. The second CPU 22 instruction program 23 generated by the compiler 20 is transferred from the host computer 1 to the target computer 2 and stored in the memory of the target computer 2. Then, the second CPU 22 reads the second CPU 22 instruction program 23 from the memory of the target computer 2 and executes it. If the second CPU 22 instruction program 23 is changed, the above process is repeated.
Here, when a program is executed by a computer, its execution method is roughly divided into two methods, a compiler method and an interpreter method. In the following, the compiler and interpreter will be described.
The compiler is a process for converting a program written in a programming language into a machine language instruction code that can be understood by the CPU. The CPU executes the program based on the machine language instruction code. In the compiling method, at the stage where the CPU executes the program, syntax analysis and translation into machine language are finished, so that an optimal execution processing speed by the CPU can be obtained. However, the compiler method has a problem that it is difficult to change the instruction code to be executed.
For the compiler, the interpreter is a process for translating a program written in a programming language into an intermediate instruction code different from the machine language. The interpreter interprets and executes the program based on the intermediate instruction code. Therefore, in the interpreter system, it is easier to add instruction codes than in the compile system.
Also, by changing the interpreter, the function of the instruction code can be easily changed. However, in the case of the interpreter method, it is difficult to increase the speed because the interpreter executes the intermediate instruction code as a program. Recently, the processing speed of the CPU itself has become very high, and unless it is a special application that requires high-speed processing, the interpreter method can satisfy the required processing.
Note that the interpreter in this specification and the drawings is used synonymously with a virtual machine. That is, the interpreter is software that converts a source program of a specific programming language into an intermediate instruction code and interprets and executes the intermediate instruction code program.
In addition, in the case of a target computer that operates by battery drive such as a sensor node as described below, a technique for executing at high speed by reducing the program size while maintaining versatility is known.
For example, in a multimedia application, the program size can be reduced by adding multimedia extension instructions and saturation instructions used in multimedia to the CPU instructions.
Also, an application specific instruction processor (ASIP: Application Specific Instruction Processor) in which an application specific instruction code is implemented in hardware on a CPU is known (see, for example, Non-Patent Document 1).
Also known is a technique for generating a program such as Java (registered trademark) in a virtual machine instruction format (byte code) independent of the CPU of the target computer, and executing the program on the CPU of the target computer by a virtual machine instruction interpreter. (For example, see Non-Patent Document 2).
In this technique, since the byte code is executed on the stack, it is not necessary to specify an operand, so the instruction code size is reduced. As a result, the program size is reduced.
In addition, a technique for proposing a virtual machine in order to reduce the download size of a program on an OS (Operating System) dedicated to the sensor node is known (see, for example, Non-Patent Document 3).
In the technique disclosed in Non-Patent Document 3, the virtual machine instruction code is fixed in order to reduce the download size of the program.
Also, a technique is known in which a byte instruction code of a virtual machine code is replaced with a macro instruction code, and when the virtual machine interprets the macro instruction code, the implementation address of the macro instruction code is checked and the instruction is executed. (See Patent Document 1).
In recent years, a non-volatile logic circuit using a non-volatile element that can change specifications in a manufactured logic circuit is known (see, for example, Patent Documents 2 to 7). Programmable semiconductor integrated circuits such as FPGA (Field Programmable Gate Array) can change the logic operation and wiring connection by storing the operation of the logic circuit and arithmetic circuit and the connection between the logic circuit and arithmetic circuit in the memory. And However, since the memory element is formed in the same layer as the transistor on the semiconductor substrate, there is a problem of occupying a very large area. For this reason, the programmable integrated circuit has a problem that the chip area increases and the manufacturing cost increases. Further, in the FPGA, since the area of the wiring switch for changing the connection between the logic circuit and the arithmetic circuit is increased, there is a problem that the ratio of the logic circuit and the arithmetic circuit in the chip area is reduced.
In the non-volatile logic circuit using the non-volatile element, it is possible to replace both the memory element or the memory circuit for storing the configuration information and the pass transistor for connecting the wirings with a wiring structure. .
特表2003−510681号公報Japanese translation of PCT publication No. 2003-510681 特開2009−124175号公報JP 2009-124175 A 特開2009−117866号公報JP 2009-117866 A 特許第4992859号Patent No. 4992859 特許第4985583号Japanese Patent No. 4985583 特許第4992858号Patent No. 4992858 特許第4356542号Japanese Patent No. 4356542
 上記状況に鑑みて、本発明は、センサノードなどのターゲットコンピュータへ転送・実行するプログラムサイズを小さくすることで、ターゲットコンピュータのプログラム更新時と実行時に必要となる電力消費を低減することを目的とする。
 また、本発明は、ターゲットコンピュータでのプログラムを一部ハードウェア実行することにより、プログラム更新時と実行時に必要となる電力消費を低減することを目的とする。
In view of the above situation, an object of the present invention is to reduce the power consumption required at the time of program update and execution of a target computer by reducing the size of a program transferred to and executed by a target computer such as a sensor node. To do.
It is another object of the present invention to reduce power consumption required for program update and execution by partially executing a program on a target computer.
 上記目的を達成すべく、本発明のアプリケーション特化仮想マシン生成システムは、ホストコンピュータ上に下記1)~4)の手段が設けられ、ターゲットコンピュータ上に下記3)のインタプリタ生成手段が生成したインタプリタと、下記4)の特化命令組込コード生成手段が生成したアプリケーション特化命令組込コードが搭載される構成とされる。
1)アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)を定義する特化命令定義手段。
2)定義されたアプリケーション特化命令と汎用の仮想マシン命令とを組合せた特化命令組込コードを生成し得るコンパイラを生成するコンパイラ生成手段。
3)特化命令組込コードを解釈実行し得るインタプリタを生成するインタプリタ生成手段。
4)汎用のプログラム言語で書かれたソースコードを、コンパイラ生成手段が生成したコンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する特化命令組込コード生成手段。
 上記の構成のシステムでは、ターゲットコンピュータへ転送・実行するプログラムサイズを小さくでき、ターゲットコンピュータのプログラム更新時と実行時に必要となる電力を低減することができる。
 ここで、アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)とは、高級プログラム言語で記述されたアプリケーションのソースコードの特性に応じてコンパクト化した仮想マシンの命令コードを意味する。
 アプリケーションのソースコードの特性とは、例えば、繰り返し処理(ループ処理)が頻出すること、条件分岐処理が頻出すること、ストア命令が頻出すること、ストアするデータの個数が予測できること、ストアする定数・データのケタ数が予測できること、一連の処理が頻出すること等を示す特性ある。
 特化命令定義手段は、アプリケーションのソースコードの特性を解析し、それらの特性をソースコードには出現しない特化した文字列・数字列・記号・符号に置き換える置換テーブルを作成する。具体的には、ホストコンピュータの画面上で、繰り返し処理(ループ処理)を置き換える特化命令コード、条件分岐処理を置き換える特化命令コード、ストア・フォワードなどの一連の処理を置き換える特化命令コードを定義する。
 また、汎用の仮想マシン命令は、ホストコンピュータが目的の処理プログラムをコンパイルして、ターゲットコンピュータのCPUの命令コードのプログラムを生成するものと同じ命令である。
 上記2)のコンパイラ生成手段は、上記1)で定義されたアプリケーション特化命令と、汎用の仮想マシン命令とを組合せた特化命令組込コードを生成できるコンパイラを生成する。このコンパイラは、アプリケーション特化命令と、汎用の仮想マシン命令とを組合せた特化命令組込コードを生成できる点で、従来のコンパイラと異なる。
 また、上記3)のインタプリタ生成手段は、特化命令組込コードを解釈実行できるインタプリタを生成する。ホストコンピュータ上で生成されたインタプリタは、ターゲットコンピュータに転送され、ターゲットコンピュータに搭載される。
 また、上記4)の特化命令組込コード生成手段は、汎用のプログラム言語(すなわち、高級プログラム言語)で記述されたプログラムのソースコードを、コンパイラ生成手段が生成したコンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する。
 即ち、コンパイラ生成手段が生成したコンパイラは、目的とするプロセスのソースコードを解析する。また、このコンパイラは、ソースコードに含まれるアプリケーション特化命令コードと、汎用の仮想マシン特化命令コードとを判別しながらコンパイルする。したがって、コンパイラは、アプリケーション特化命令コードと、仮想マシン命令コードとを組み合わせた特化命令組み込みコードを生成することができる。
 また、本発明のアプリケーション特化仮想マシン生成システムにおいて、特化命令組込コード生成手段は、更新前プログラムのソースコードと更新後プログラムのソースコードをそれぞれ前記コンパイラでコンパイルし、更新前プログラムのアプリケーション特化命令組込コードと更新後プログラムのアプリケーション特化命令組込コードを解析して、アプリケーション特化命令組込差分コードを生成し、また、インタプリタは、アプリケーション特化命令組込差分コードと、更新前のアプリケーション特化命令組込コードをマージして解釈実行することがより好ましい。
 差分コードを生成し、それをターゲットコンピュータに転送することにより、ターゲットコンピュータへ転送・実行するプログラムサイズを更に小さくでき、転送に伴う消費電力を更に低減することができる。
 また、本発明のアプリケーション特化仮想マシン生成システムにおいて、インタプリタが不揮発性素子を用いた不揮発性論理回路で構成され、ターゲットコンピュータの回路基板の一部が不揮発性論理回路で構成されることがより好ましい。
 上記構成によれば、ターゲットコンピュータのプログラムの一部を不揮発性論
Figure JPOXMLDOC01-appb-I000001
を低減することができる。また、電源のON,OFF操作が頻繁に行われるセンサノードに本発明を適用した場合、不揮発性であるために、復帰時に毎回発生するインタプリタのコンフィギュレーションデータの転送が不要になり、電力が低減でき、かつ、起動時の遅延を回避することができる。
 また、不揮発性論理回路には、拡張命令の追加と、追加命令に対するハードコーディング(ハードウェア化)が可能であり、本発明におけるインタプリタを実現することができる。
 また、本発明のアプリケーション特化仮想マシン生成システムにおいて、アプリケーション特化命令とは、具体的には、複数ワードで構成されている命令コードを短縮して、より短い長さの命令コードに置換するものである。
 また、他のアプリケーション特化命令は、複数の命令コードを、統合して、より短い長さの命令コードに置換するものである。
 また、他のアプリケーション特化命令は、処理データを想定される値に応じたビット数に短縮し、或いは、処理データのアドレスを想定されるアドレスに応じたビット数に短縮した位置識別子に変更するものである。例えば、想定されるアドレスに応じたビット数に短縮するというのは、想定されるアドレスが0~15であれば4ビットの位置識別子、0~255であれば8ビットの位置識別子に変更するということである。
 また、他のアプリケーション特化命令は、命令コード数を限定することにより、命令コードビットを短縮するものである。例えば、命令コード数が32個であれば命令コードビットが5ビットで表現でき、また、更に命令コードを限定して4つの命令コードに限定、すなわち、命令コード数を4個にすれば、命令コードビットが2ビットで表現できる。
 次に、本発明のアプリケーション特化仮想マシン生成装置は、下記a)~d)を備える。
a)アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)を定義する特化命令定義手段。
b)定義されたアプリケーション特化命令と汎用の仮想マシン命令とを組合せた特化命令組込コードを生成し得るコンパイラを生成するコンパイラ生成手段。
c)特化命令組込コードを解釈実行し得るインタプリタを生成するインタプリタ生成手段。
d)汎用のプログラム言語で書かれたソースコードを、コンパイラ生成手段が生成したコンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する特化命令組込コード生成手段。
 本発明のアプリケーション特化仮想マシン生成装置によれば、ターゲットコンピュータへ転送・実行するプログラムサイズを小さくでき、ターゲットコンピュータのプログラム更新時と実行時に必要となる電力消費を低減することができる。
 なお、上記a)~d)の説明は、上述の1)~4)と同じであり説明は割愛する。
 次に、本発明のアプリケーション特化仮想マシン生成方法は、下記A)~D)を備える。
A)アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)を定義する特化命令定義ステップ。
B)定義されたアプリケーション特化命令と汎用の仮想マシン命令とを組合せた特化命令組込コードを生成し得るコンパイラを生成するコンパイラ生成ステップ。
C)特化命令組込コードを解釈実行し得るインタプリタを生成するインタプリタ生成ステップ。
D)汎用のプログラム言語で書かれたソースコードを、コンパイラ生成手段が生成したコンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する特化命令組込コード生成ステップ。
 本発明のアプリケーション特化仮想マシン生成方法によれば、ターゲットコンピュータへ転送・実行するプログラムサイズを小さくできるため、ターゲットコンピュータのプログラム更新時と実行時に必要となる電力消費を低減することができる。
 なお、上記A)~D)の説明は、上述の1)~4)と同じであり説明は割愛する。
 本発明のアプリケーション特化仮想マシン生成方法において、ターゲットコンピュータに対して、インタプリタ生成ステップにより生成されたインタプリタと、特化命令組込コード生成ステップにより生成されたアプリケーション特化命令組込コードとを転送する転送ステップを更に備えたことがより好ましい。
 特化命令組込コード生成ステップにより生成されたアプリケーション特化命令組込コードは、プログラムサイズを最適化していることから、ターゲットコンピュータのプログラム更新時のデータ転送による電力消費を低減することができる。
 また、本発明のアプリケーション特化仮想マシン生成方法において、インタプリタ生成ステップにより生成されたインタプリタを、不揮発性素子を用いた不揮発性論理回路で構成し、ターゲットコンピュータの回路基板の一部を不揮発性論理回路で構成する回路構成ステップと、ターゲットコンピュータに、特化命令組込コード生成ステップにより生成されたアプリケーション特化命令組込コードを転送する転送ステップを更に備えたことがより好ましい。
 これにより、ターゲットコンピュータでのプログラムを一部ハードウェア実行することになり、プログラム更新時と実行時に必要となる電力消費を低減できる。
 また、本発明のアプリケーション特化仮想マシン生成方法における特化命令組込コード生成ステップにおいて、更新前プログラムのソースコードと更新後プログラムのソースコードをそれぞれ前記コンパイラでコンパイルし、更新前プログラムのアプリケーション特化命令組込コードと更新後プログラムのアプリケーション特化命令組込コードを解析して、アプリケーション特化命令組込差分コードを生成し、インタプリタが、アプリケーション特化命令組込差分コードと、更新前の前記アプリケーション特化命令組込コードをマージして解釈実行することがより好ましい。
 差分コードを生成し、それをターゲットコンピュータに転送することにより、ターゲットコンピュータへ転送・実行するプログラムサイズを更に小さくでき、転送に伴う電力消費を更に低減することができる。
 本発明のアプリケーション特化仮想マシン生成プログラムは、コンピュータを下記i)~iv)として機能させる。
i)アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)を定義する特化命令定義手段。
ii)定義された前記アプリケーション特化命令と汎用の仮想マシン命令とを組合せた特化命令組込コードを生成し得るコンパイラを生成するコンパイラ生成手段。
iii)前記特化命令組込コードを解釈実行し得るインタプリタを生成するインタプリタ生成手段。
iv)汎用のプログラム言語で書かれたソースコードを、前記コンパイラ生成手段が生成した前記コンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する特化命令組込コード生成手段。
 本発明のアプリケーション特化仮想マシン生成プログラムによれば、ターゲットコンピュータへ転送・実行するプログラムサイズを小さくでき、ターゲットコンピュータのプログラム更新時と実行時に必要となる電力消費を低減することができる。
 なお、上記i)~iv)の説明は、上述の1)~4)と同じであり説明は割愛する。
In order to achieve the above object, the application-specific virtual machine generation system of the present invention is provided with the following means 1) to 4) on the host computer and the interpreter generated by the following 3) interpreter generation means on the target computer. In addition, the application specific instruction embedded code generated by the specialized instruction embedded code generating means 4) below is mounted.
1) Specialized instruction defining means for defining a virtual machine instruction (application specific instruction) specialized for each application.
2) Compiler generation means for generating a compiler capable of generating a special instruction embedded code combining a defined application special instruction and a general-purpose virtual machine instruction.
3) Interpreter generating means for generating an interpreter capable of interpreting and executing the specialized instruction embedded code.
4) Specialized instruction embedded code generation means for generating application-specific instruction embedded code by compiling source code written in a general-purpose programming language with a compiler generated by the compiler generation means.
In the system configured as described above, the size of a program to be transferred / executed to the target computer can be reduced, and the power required for updating and executing the program on the target computer can be reduced.
Here, a virtual machine instruction specialized for each application (application-specific instruction) means a virtual machine instruction code compactized in accordance with the characteristics of the application source code described in a high-level program language.
The characteristics of the application source code include, for example, frequent repeat processing (loop processing), frequent conditional branch processing, frequent store instructions, predictable number of data to be stored, constants to store, It has characteristics indicating that the number of data digits can be predicted, a series of processing frequently occurs, and the like.
The specialized instruction defining means analyzes the characteristics of the application source code and creates a replacement table that replaces these characteristics with specialized character strings, numeric strings, symbols, and codes that do not appear in the source code. Specifically, on the host computer screen, special instruction code that replaces repeated processing (loop processing), special instruction code that replaces conditional branch processing, and special instruction code that replaces a series of processes such as store / forward Define.
The general-purpose virtual machine instructions are the same instructions that the host computer compiles the target processing program and generates a program of the instruction code of the CPU of the target computer.
The compiler generating means of 2) generates a compiler capable of generating a special instruction embedded code combining the application specific instruction defined in 1) and a general-purpose virtual machine instruction. This compiler differs from conventional compilers in that it can generate specialized instruction embedded code that combines application-specific instructions and general-purpose virtual machine instructions.
The interpreter generating means of 3) generates an interpreter that can interpret and execute the specialized instruction embedded code. The interpreter generated on the host computer is transferred to the target computer and mounted on the target computer.
The specialized instruction embedded code generation means of 4) above compiles the source code of a program described in a general-purpose program language (that is, a high-level program language) with a compiler generated by the compiler generation means, Generate application specific instruction embedded code.
That is, the compiler generated by the compiler generation unit analyzes the source code of the target process. The compiler compiles while discriminating an application-specific instruction code included in the source code and a general-purpose virtual machine-specific instruction code. Therefore, the compiler can generate the special instruction embedded code combining the application special instruction code and the virtual machine instruction code.
In the application-specific virtual machine generation system of the present invention, the specialized instruction embedded code generation means compiles the source code of the pre-update program and the source code of the post-update program with the compiler, respectively, Analyzing the specialized instruction embedded code and the application specialized instruction embedded code of the updated program to generate an application specialized instruction embedded differential code, and the interpreter includes an application specialized instruction embedded differential code, More preferably, the application-specific instruction embedded code before update is merged and interpreted.
By generating the difference code and transferring it to the target computer, the program size transferred / executed to the target computer can be further reduced, and the power consumption associated with the transfer can be further reduced.
In the application-specific virtual machine generation system of the present invention, the interpreter is configured by a nonvolatile logic circuit using a nonvolatile element, and a part of the circuit board of the target computer is configured by a nonvolatile logic circuit. preferable.
According to the above configuration, a part of the program of the target computer is transferred to the nonvolatile theory.
Figure JPOXMLDOC01-appb-I000001
Can be reduced. In addition, when the present invention is applied to a sensor node in which power ON / OFF operations are frequently performed, since it is non-volatile, it is not necessary to transfer the configuration data of the interpreter that occurs every time it recovers, reducing power consumption. And a delay at the time of starting can be avoided.
Further, in the nonvolatile logic circuit, an extension instruction can be added and hard coding (hardware) for the additional instruction can be performed, and the interpreter in the present invention can be realized.
In the application-specific virtual machine generation system of the present invention, the application-specific instruction specifically means that an instruction code composed of a plurality of words is shortened and replaced with an instruction code having a shorter length. Is.
Another application-specific instruction is to integrate a plurality of instruction codes and replace them with an instruction code having a shorter length.
In addition, another application specific instruction shortens the processing data to the number of bits corresponding to the assumed value, or changes the address of the processing data to a position identifier shortened to the number of bits corresponding to the assumed address. Is. For example, shortening to the number of bits corresponding to the assumed address means changing to a 4-bit position identifier if the assumed address is 0 to 15, and changing to an 8-bit position identifier if it is 0 to 255. That is.
Another application-specific instruction shortens the instruction code bit by limiting the number of instruction codes. For example, if the number of instruction codes is 32, the instruction code bits can be expressed by 5 bits, and further the instruction code is limited to 4 instruction codes, that is, if the number of instruction codes is 4, the instruction code The code bit can be expressed by 2 bits.
Next, the application-specific virtual machine generation device of the present invention includes the following a) to d).
a) Specialized instruction definition means for defining a virtual machine instruction (application specific instruction) specialized for each application.
b) Compiler generation means for generating a compiler capable of generating a special instruction embedded code combining a defined application special instruction and a general-purpose virtual machine instruction.
c) Interpreter generating means for generating an interpreter capable of interpreting and executing the specialized instruction embedded code.
d) Specialized instruction embedded code generation means for generating application-specific instruction embedded code by compiling source code written in a general-purpose programming language with a compiler generated by the compiler generation means.
According to the application-specific virtual machine generation apparatus of the present invention, the size of a program to be transferred / executed to a target computer can be reduced, and power consumption required when updating and executing a program on the target computer can be reduced.
Note that the descriptions of a) to d) are the same as those of 1) to 4) described above, and a description thereof will be omitted.
Next, the application-specific virtual machine generation method of the present invention includes the following A) to D).
A) A specialized instruction defining step for defining a virtual machine instruction (application specialized instruction) specialized for each application.
B) A compiler generation step for generating a compiler capable of generating a special instruction embedded code combining a defined application special instruction and a general-purpose virtual machine instruction.
C) An interpreter generation step for generating an interpreter capable of interpreting and executing the specialized instruction embedded code.
D) A specialized instruction embedded code generation step of generating an application specific instruction embedded code by compiling source code written in a general-purpose programming language with a compiler generated by the compiler generation means.
According to the application-specific virtual machine generation method of the present invention, the size of a program to be transferred / executed to a target computer can be reduced, so that it is possible to reduce power consumption required when updating and executing a program on the target computer.
The description of A) to D) is the same as 1) to 4) described above, and the description is omitted.
In the application-specific virtual machine generation method of the present invention, the interpreter generated by the interpreter generation step and the application-specific instruction embedded code generated by the specialized instruction embedded code generation step are transferred to the target computer. More preferably, a transfer step is further provided.
Since the application specific instruction embedded code generated by the special instruction embedded code generation step optimizes the program size, it is possible to reduce power consumption due to data transfer when the target computer updates the program.
In the application-specific virtual machine generation method of the present invention, the interpreter generated in the interpreter generation step is configured by a nonvolatile logic circuit using a nonvolatile element, and a part of the circuit board of the target computer is configured as a nonvolatile logic. It is more preferable to further comprise a circuit configuration step configured by a circuit and a transfer step of transferring the application-specific instruction embedded code generated by the specific instruction embedded code generation step to the target computer.
Thereby, a part of the program on the target computer is executed by hardware, and the power consumption required at the time of program update and execution can be reduced.
Further, in the specialized instruction embedded code generation step in the application specific virtual machine generation method of the present invention, the source code of the pre-update program and the source code of the post-update program are respectively compiled by the compiler, and the application special of the program before update is compiled. By analyzing the embedded instruction embedded code and the application-specific instruction embedded code of the updated program, an application-specific instruction embedded differential code is generated, and the interpreter executes the application-specific instruction embedded differential code and the pre-update More preferably, the application-specific instruction embedded code is merged and interpreted.
By generating the difference code and transferring it to the target computer, the program size transferred / executed to the target computer can be further reduced, and the power consumption associated with the transfer can be further reduced.
The application-specific virtual machine generation program of the present invention causes a computer to function as the following i) to iv).
i) Specialized instruction definition means for defining virtual machine instructions (application specific instructions) specialized for each application.
ii) Compiler generation means for generating a compiler capable of generating special instruction embedded code combining the defined application specific instruction and a general-purpose virtual machine instruction.
iii) interpreter generating means for generating an interpreter capable of interpreting and executing the specialized instruction embedded code.
iv) specialized instruction embedded code generation means for generating application specific instruction embedded code by compiling source code written in a general-purpose programming language with the compiler generated by the compiler generation means.
According to the application-specific virtual machine generation program of the present invention, the size of a program to be transferred / executed to the target computer can be reduced, and the power consumption required when updating and executing the program of the target computer can be reduced.
The description of i) to iv) is the same as 1) to 4) described above, and the description is omitted.
 本発明によれば、プログラムの命令コードをアプリケーションに特化したものにすることにより、プログラムサイズを小さくすることができ、その結果、プログラム更新時に送信するプログラムサイズが小さくなるといった効果を有する。
 また、本発明によれば、ターゲットコンピュータでのプログラムを一部ハードウェア実行することによりプログラム実行時の消費電力も小さくすることができるといった効果を有する。
According to the present invention, by making the instruction code of a program specialized for an application, the program size can be reduced, and as a result, the program size transmitted at the time of program update is reduced.
Further, according to the present invention, there is an effect that the power consumption during the program execution can be reduced by executing a part of the program in the target computer by hardware.
 図1は、アプリケーション特化仮想マシン生成システムを示すブロック図である。
 図2Aは、従来のCPUによる定数ストア命令を示す概念図である。
 図2Bは、アプリケーション特化命令を示す概念図である。
 図3Aは、センサノード間のストアとフォワードの動作を示す模式図である。
 図3Bは、従来のCPUによるストア命令とフォワード命令を示す概念図である。
 図3Cは、アプリケーション特化命令を示す概念図である。
 図4は、関数呼び出し命令についての特化命令の説明図である。
 図5は、他の形態のアプリケーション特化仮想マシン生成システムを示すブロック図である。
 図6は、ホストコンピュータの処理の流れを示すフローチャートである。
 図7は、ターゲットコンピュータの処理の流れを示すフローチャートである。
 図8は、従来システムを示すブロック図である。
FIG. 1 is a block diagram showing an application-specific virtual machine generation system.
FIG. 2A is a conceptual diagram showing a constant store instruction by a conventional CPU.
FIG. 2B is a conceptual diagram showing an application specific instruction.
FIG. 3A is a schematic diagram illustrating store and forward operations between sensor nodes.
FIG. 3B is a conceptual diagram showing a store instruction and a forward instruction by a conventional CPU.
FIG. 3C is a conceptual diagram showing an application specific instruction.
FIG. 4 is an explanatory diagram of a specialized instruction for a function call instruction.
FIG. 5 is a block diagram showing another type of application-specific virtual machine generation system.
FIG. 6 is a flowchart showing a processing flow of the host computer.
FIG. 7 is a flowchart showing a processing flow of the target computer.
FIG. 8 is a block diagram showing a conventional system.
 以下、本発明の実施形態について、図面を参照しながら詳細に説明する。なお、本発明の範囲は、以下の実施例や図示例に限定されるものではなく、幾多の変更及び変形が可能である。
 本発明のアプリケーション特化仮想マシン生成システムについて、図1を参照して説明する。本発明のアプリケーション特化仮想マシン生成システムは、ホストコンピュータ1とターゲットコンピュータ2から構成され、それらが無線通信等の通信ネットワークを含むデータ転送手段で接続可能なシステムである。接続可能なシステムとは、常時接続するもの、一時的に接続するものの双方を含む。
 まず、図1に示すように、特化命令定義手段12は、アプリケーション毎に特化した命令(以下、「AP特化命令」と称する。)を定義する。コンパイラ生成手段14は、AP特化命令と、通常の仮想マシン命令とのプログラムを生成するコンパイラ16(以下、「AP特化コンパイラ16」と称する。)を生成する。インタプリタ生成手段15は、AP特化命令と、通常の仮想マシン命令とのプログラムを解釈実行するインタプリタ17(以下、「AP特化命令インタプリタ17」と称する。)を生成する。コンパイラ生成手段14とインタプリタ生成手段15を、アプリケーションに特化した仮想マシンジェネレータ13と呼ぶ。
 不揮発性回路化手段18は、AP特化命令インタプリタ17を不揮発性論理回路によるAP特化インタプリタ25に変換する。
 特化命令組込コード生成手段19は、AP特化コンパイラ16を有している。AP特化コンパイラ16は、ホストコンピュータ1上で動作し、C言語などのプログラミング言語で書かれた処理プログラム3をAP特化命令によるプログラム24にコンパイルする。AP特化命令によるプログラム24はターゲットコンピュータ2に転送される。ターゲットコンピュータ2では不揮発性回路によるAP特化命令インタプリタ25がAP特化命令によるプログラム24を解釈実行する。この際、プログラムの実行命令コードをアプリケーションに特化することにより、プログラムサイズを小さくすることができるため、プログラムの送信に関わる電力を小さくすることができる。また、AP特化命令によるプログラム24は、不揮発性回路によるAP特化命令インタプリタ25により実行されるため、消費電力が小さくなる。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The scope of the present invention is not limited to the following examples and illustrated examples, and many changes and modifications can be made.
The application-specific virtual machine generation system of the present invention will be described with reference to FIG. The application-specific virtual machine generation system of the present invention is a system that includes a host computer 1 and a target computer 2 that can be connected by data transfer means including a communication network such as wireless communication. A connectable system includes both a constantly connected system and a temporarily connected system.
First, as shown in FIG. 1, the specialized instruction defining unit 12 defines a specialized instruction for each application (hereinafter referred to as “AP specialized instruction”). The compiler generation unit 14 generates a compiler 16 (hereinafter referred to as “AP-specific compiler 16”) that generates a program of an AP-specific instruction and a normal virtual machine instruction. The interpreter generation means 15 generates an interpreter 17 that interprets and executes a program of an AP special instruction and a normal virtual machine instruction (hereinafter referred to as “AP special instruction interpreter 17”). The compiler generation unit 14 and the interpreter generation unit 15 are called a virtual machine generator 13 specialized for an application.
The non-volatile circuit converting means 18 converts the AP-specific instruction interpreter 17 into an AP-specific interpreter 25 using a non-volatile logic circuit.
The specialized instruction embedded code generation means 19 has an AP specialized compiler 16. The AP special compiler 16 operates on the host computer 1 and compiles the processing program 3 written in a programming language such as C language into a program 24 based on AP special instructions. The program 24 based on the AP special instruction is transferred to the target computer 2. In the target computer 2, an AP specialized instruction interpreter 25 based on a nonvolatile circuit interprets and executes the program 24 based on the AP specialized instruction. At this time, by specializing the execution instruction code of the program for the application, the program size can be reduced, so that the power related to program transmission can be reduced. In addition, since the program 24 by the AP special instruction is executed by the AP special instruction interpreter 25 by the nonvolatile circuit, the power consumption is reduced.
 図2Aおよび図2Bを参照して、定数ストア命令におけるプログラムの変数値を変更する方法について説明する。
 センサノードでは、データ収集のパラメータの調整のために、センサノード中のプログラムの変数値を変更する場合が多いと予想される。
 プログラムの変数値を変更する場合、図2Aに示すように、一般のCPUでは定数ストア命令が用意されていた。しかしながら、通常はCPUが汎用的であるために、2つの32ビット(1ワード)が必要となる。
 図2Bを参照すると、アプリケーション特化仮想マシン生成システムでは、プラグラムの変数値の変更は、定数値を16ビットで表される値で、ストアする場所を8ビットの識別子で指定可能であるならば1つの32ビット(1ワード)で実現可能である。したがって、アプリケーション特化仮想マシン生成システムでは、複数の2ワードで構成されている定数ストア命令コードを、短縮して1ワードの定数ストア命令コードに置換する。
With reference to FIG. 2A and FIG. 2B, a method for changing the variable value of the program in the constant store instruction will be described.
In the sensor node, it is expected that the variable value of the program in the sensor node is often changed in order to adjust the parameter of data collection.
When changing a variable value of a program, a constant store instruction is prepared in a general CPU as shown in FIG. 2A. However, since the CPU is generally used, two 32 bits (one word) are required.
Referring to FIG. 2B, in the application-specific virtual machine generation system, if the variable value of a program can be changed by specifying a constant value with a value represented by 16 bits and a storage location with an 8-bit identifier, This can be realized by one 32-bit (one word). Therefore, in the application-specific virtual machine generation system, a constant store instruction code composed of a plurality of two words is shortened and replaced with a one-word constant store instruction code.
 図3A、図3Bおよび図3Cを参照して、センサネットワークにおけるセンサノードがセンサコマンドを転送する動作について説明する。
 図3Aを参照すると、センサノードBは、隣接したセンサノードAから受信したセンサコマンドをストアすると共に、そのデータを次の隣接したセンサノードCに送信する。センサノードCは、更に隣接したセンサノードがある場合には、センサノードBと同様の処理を行う。
 この動作を汎用命令コードでプログラムするためには、図3Bに示すように、ストア命令コードと、フォワード命令コードとが別々に必要である。実際には、数十ステップの命令が必要になる。
 これに対してアプリケーション特化仮想マシン生成システムでは、図3Cに示すようなストア・フォワードの1つの命令で動作を実現できる。この場合、センサノードのコマンドデータのストアアドレスは8ビットの識別子で指定可能であり、隣接するノードのアドレスは無線ドライバが保有していると仮定している。ストア・フォワードの1つの命令で実現できることから、AP特化命令によるプログラム24のサイズは小さくなるため、データ送信に要する電力を低減できる。
With reference to FIG. 3A, FIG. 3B, and FIG. 3C, the operation | movement which the sensor node in a sensor network transfers a sensor command is demonstrated.
Referring to FIG. 3A, the sensor node B stores the sensor command received from the adjacent sensor node A and transmits the data to the next adjacent sensor node C. The sensor node C performs the same process as that of the sensor node B when there is a further adjacent sensor node.
In order to program this operation with a general-purpose instruction code, a store instruction code and a forward instruction code are required separately as shown in FIG. 3B. In practice, an instruction of several tens of steps is required.
On the other hand, in the application-specific virtual machine generation system, the operation can be realized with one store-forward instruction as shown in FIG. 3C. In this case, it is assumed that the store address of the command data of the sensor node can be specified by an 8-bit identifier, and the address of the adjacent node is held by the wireless driver. Since it can be realized by one store-forward instruction, the size of the program 24 by the AP-specific instruction is reduced, so that the power required for data transmission can be reduced.
 次に、図4を参照して、関数呼び出し命令が頻出するプログラムに関するアプリケーション特化命令について説明する。例えば、changeCalVal( )という関数を頻繁に用いるプログラムを想定する。そして、このchangeCalVal( )という関数は2つの実引数を有し、その実引数の1つは変数であり、もう1つは閾値の定数であるとする。またプログラムの運用時に変数がとり得る値が100以下の整数であることも予想できるとする。
 このような場合、アプリケーション特化命令は、changeCalVal(x,v)に対してアプリケーション特化命令コードを定義する。具体的には、changeCalVal(x,v)の記述があれば(x,vは引数)、それをcodeof(changeCalVal),codeof(x),codeof(v)の3行の連続する命令と認識する。そして、図4で示すような32ビットのコード内における上位16ビットに実行関数changeCalValに対応するコードを配置し、下位16ビットに実行関数の2つの実引数(x,v)に対応する値を配置する。ここで、codeof(A)はAをコード化したものを表している。
 下記定義は、::=の左辺にあるchangeCalVal(x,v)を、::=の右辺のアプリケーション特化命令コードに対応させていることを示している。
 changeCalVal(x,v)::=
   codeof(changeCalVal)
       codeof(x)
       codeof(v)
 これにより、関数のポインター情報(アドレス情報)、実引数xの32ビット情報および実引数vの32ビット情報を合わせた少なくとも96ビットを要していた命令コードを32ビットに圧縮することが可能になる。アプリケーション(AP)特化コンパイラ16は、プログラムのソースコードに、changeCalVal(x,v)があれば、32ビットに圧縮された特化命令コードに変換する。
Next, with reference to FIG. 4, application specific instructions relating to programs in which function call instructions frequently appear will be described. For example, a program that frequently uses a function called changeCalVal () is assumed. The function called changeCalVal () has two actual arguments, one of which is a variable, and the other is a threshold constant. It is also assumed that the value that the variable can take when operating the program is an integer of 100 or less.
In such a case, the application-specific instruction defines an application-specific instruction code for changeCalVal (x, v). Specifically, if there is a description of changeCalVal (x, v) (x and v are arguments), it is recognized as a continuous instruction of three lines of codeof (changeCalVal), codeof (x), and codeof (v). . Then, the code corresponding to the execution function changeCalVal is arranged in the upper 16 bits in the 32-bit code as shown in FIG. 4, and the values corresponding to the two actual arguments (x, v) of the execution function are set in the lower 16 bits. Deploy. Here, codeof (A) represents the encoded A.
The following definition indicates that changeCalVal (x, v) on the left side of :: = is associated with the application-specific instruction code on the right side of :: =.
changeCalVal (x, v) :: =
codeof (changeCalVal)
codeof (x)
codeof (v)
As a result, it is possible to compress an instruction code that required at least 96 bits including the pointer information (address information) of the function, the 32-bit information of the actual argument x, and the 32-bit information of the actual argument v to 32 bits. Become. If there is changeCalVal (x, v) in the program source code, the application (AP) specialized compiler 16 converts it into a specialized instruction code compressed to 32 bits.
 次に、頻出する実行文パターンを有するプログラムに関するアプリケーション特化命令について説明する。例えば、頻出する実行文パターンとして条件分岐命令が頻出するプログラムを想定する。
 このような場合、下記に示すように条件分岐の条件パラメータを、分岐後の呼び出し関数と連続する命令と認識し、これらを圧縮した特化命令コードに変換する。
 下記定義は、::=の左辺にあるif文の実行文パターンを、::=の右辺のアプリケーション特化命令コードに対応させていることを示している。
 if(x>0){
    method1();
 }else{
    method2();
 }
 ::= codeof(callMethod)
 codeof(0)
 codeof(method1)
 codeof(method2)
Next, an application-specific instruction relating to a program having a frequently executed statement pattern will be described. For example, suppose a program in which conditional branch instructions frequently appear as frequently executed statement patterns.
In such a case, as shown below, the conditional parameter of the conditional branch is recognized as an instruction continuous with the call function after the branch, and these are converted into a compressed special instruction code.
The following definition indicates that the executable statement pattern of the if statement on the left side of :: = corresponds to the application-specific instruction code on the right side of :: =.
if (x> 0) {
method1 ();
} Else {
method2 ();
}
:: = codeof (callMethod)
codeof (0)
codeof (method1)
codeof (method2)
 図5は、実施例5のアプリケーション特化仮想マシン生成システムの機能を示すブロック図である。図5を参照すると、上述したシステムと異なり、ターゲットコンピュータ2となるセンサノードへ転送するプログラムの量を減らすために、更新前プログラム3aのソースコードと更新後プログラム3bのソースコードとをそれぞれAP特化コンパイラ16でコンパイルする。AP特化コンパイラ16は、更新前プログラム3aのアプリケーション特化命令組込コードと、更新後プログラム3bのアプリケーション特化命令組込コードとを解析しアプリケーション特化命令組込差分コードである差分プログラム26を生成する。
 ターゲットコンピュータ2であるセンサノードでは、AP特化命令による更新前プログラム27と差分プログラム26をマージしたプログラムを、不揮発性回路によるAP特化命令インタプリタ25が解釈実行する。
FIG. 5 is a block diagram illustrating functions of the application-specific virtual machine generation system according to the fifth embodiment. Referring to FIG. 5, unlike the system described above, in order to reduce the amount of the program transferred to the sensor node serving as the target computer 2, the source code of the pre-update program 3a and the source code of the post-update program 3b are respectively AP-specific. Compile with the compiler 16. The AP-specific compiler 16 analyzes the application-specific instruction embedded code of the pre-update program 3a and the application-specific instruction embedded code of the post-update program 3b, and the difference program 26 is an application-specific instruction embedded differential code. Is generated.
In the sensor node which is the target computer 2, the AP special instruction interpreter 25 using a nonvolatile circuit interprets and executes a program obtained by merging the pre-update program 27 and the difference program 26 using the AP special instruction.
 図6はホストコンピュータ1が実行する処理のフローチャートであり、図7はターゲットコンピュータ2が実行する処理のフローチャートである。
 図6を参照してホストコンピュータ1の処理フローを説明する。
 まず、ホストコンピュータ1は、アプリケーション毎に特化した仮想マシン命令(AP特化命令)を定義する(ステップS11)。
 次いで、アプリケーション(AP)特化命令と、汎用の仮想マシン命令とを組合せた特化命令組込コードを生成できるAP特化コンパイラを生成する(ステップS12)。
 次に、特化命令組込コードを解釈実行できるAP特化命令インタプリタを生成する(ステップS13)。
 そして、プログラムのソースコードを、ステップS12で生成したAP特化コンパイラでコンパイルし、アプリケーション(AP)特化命令組込コードを生成する(ステップS14)。
 図7を参照してターゲットコンピュータ2の処理フローを説明する。
 まず、ターゲットコンピュータ1は、AP特化命令インタプリタをホストコンピュータ1からダウンロード(ホストコンピュータからターゲットコンピュータへ転送)する(ステップS21)。
 次いで、AP特化命令組込コードをホストコンピュータ1からダウンロードする(ステップS22)。
 そして、AP特化命令インタプリタがAP特化命令組込コードを解釈実行する(ステップS23)。
 なお、図7において実施例1のように、AP特化命令インタプリタが不揮発性素子を用いた不揮発性論理回路で構成され、かつ、ターゲットコンピュータの回路基板の一部が不揮発性論理回路で構成される場合、上記ステップS21を行わずに、上記ステップS22とS23を行うことになる。
6 is a flowchart of processing executed by the host computer 1, and FIG. 7 is a flowchart of processing executed by the target computer 2.
A processing flow of the host computer 1 will be described with reference to FIG.
First, the host computer 1 defines a virtual machine instruction (AP special instruction) specialized for each application (step S11).
Next, an AP specialized compiler capable of generating specialized instruction embedded code combining an application (AP) specialized instruction and a general-purpose virtual machine instruction is generated (step S12).
Next, an AP special instruction interpreter capable of interpreting and executing the special instruction embedded code is generated (step S13).
Then, the source code of the program is compiled by the AP specialized compiler generated in step S12, and an application (AP) specialized instruction embedded code is generated (step S14).
The processing flow of the target computer 2 will be described with reference to FIG.
First, the target computer 1 downloads an AP-specific instruction interpreter from the host computer 1 (transfers it from the host computer to the target computer) (step S21).
Next, the AP-specific instruction embedded code is downloaded from the host computer 1 (step S22).
Then, the AP special instruction interpreter interprets and executes the AP special instruction embedded code (step S23).
In FIG. 7, as in the first embodiment, the AP-specific instruction interpreter is configured by a nonvolatile logic circuit using a nonvolatile element, and a part of the circuit board of the target computer is configured by a nonvolatile logic circuit. In this case, steps S22 and S23 are performed without performing step S21.
 本発明は、バッテリー駆動動作のセンサノードやアクチュエータノードに有用である。また、バッテリーのみで数十年に渡って利用可能なコンピュータシステムに適用可能である。例えば、建築物、トンネル、農場、道路など広範囲でデータ収集が必要な分野で利用可能である。 The present invention is useful for a battery-driven sensor node and actuator node. Further, the present invention can be applied to a computer system that can be used for several decades with only a battery. For example, it can be used in a wide range of fields that require data collection, such as buildings, tunnels, farms, and roads.
 1  ホストコンピュータ
 2  ターゲットコンピュータ
 3  プログラム
 3a 更新前プログラム
 3b 更新後プログラム
 12 特化命令定義手段
 13 仮想マシンジェネレータ
 14 コンパイラ生成手段
 15 インタプリタ生成手段
 16 AP特化コンパイラ
 17 AP特化インタプリタ
 18 不揮発性回路化手段
 19 特化命令組込コード生成手段
 20 コンパイラ
 この出願は、2013年3月30日に出願された日本出願特願第2013−075504号を基礎とする優先権を主張し、その開示のすべてをここに取り込む。
DESCRIPTION OF SYMBOLS 1 Host computer 2 Target computer 3 Program 3a Program before update 3b Program after update 12 Specialized instruction definition means 13 Virtual machine generator 14 Compiler generation means 15 Interpreter generation means 16 AP specialization compiler 17 AP specialization interpreter 18 Nonvolatile circuitization means 19 Specialized instruction embedded code generation means 20 Compiler This application claims priority based on Japanese Patent Application No. 2013-075504 filed on March 30, 2013, the entire disclosure of which is here Into.

Claims (13)

  1.  ホストコンピュータ上に、
    1)アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)を定義する特化命令定義手段と、
    2)定義された前記アプリケーション特化命令と汎用の仮想マシン命令とを組合せた特化命令組込コードを生成し得るコンパイラを生成するコンパイラ生成手段と、
    3)前記特化命令組込コードを解釈実行し得るインタプリタを生成するインタプリタ生成手段と、
    4)汎用のプログラム言語で書かれたソースコードを、前記コンパイラ生成手段が生成した前記コンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する特化命令組込コード生成手段と、
     を備え、
    5)ターゲットコンピュータ上に、
     前記インタプリタ生成手段が生成した前記インタプリタと、
     前記特化命令組込コード生成手段が生成した前記アプリケーション特化命令組込コードと、が搭載される、
     ことを特徴とするアプリケーション特化仮想マシン生成システム。
    On the host computer
    1) specialized instruction defining means for defining virtual machine instructions (application specialized instructions) specialized for each application;
    2) Compiler generation means for generating a compiler capable of generating special instruction embedded code combining the defined application specific instruction and a general-purpose virtual machine instruction;
    3) interpreter generating means for generating an interpreter capable of interpreting and executing the specialized instruction embedded code;
    4) Specialized instruction embedded code generation means for generating application-specific instruction embedded code by compiling source code written in a general-purpose programming language with the compiler generated by the compiler generation means;
    With
    5) On the target computer,
    The interpreter generated by the interpreter generating means;
    The application-specific instruction embedded code generated by the specialized instruction embedded code generation means is mounted,
    An application-specific virtual machine generation system characterized by that.
  2.  前記特化命令組込コード生成手段が、更新前プログラムのソースコードと更新後プログラムのソースコードをそれぞれ前記コンパイラでコンパイルし、更新前プログラムのアプリケーション特化命令組込コードと更新後プログラムのアプリケーション特化命令組込コードを解析しアプリケーション特化命令組込差分コードを生成し、
     前記インタプリタが、前記アプリケーション特化命令組込差分コードと、更新前の前記アプリケーション特化命令組込コードをマージして解釈実行する、
     ことを特徴とする請求項1に記載のアプリケーション特化仮想マシン生成システム。
    The specialized instruction embedded code generation means compiles the source code of the pre-update program and the source code of the post-update program with the compiler, respectively, and the application special instruction embedded code of the pre-update program and the application special of the post-update program Analyzing embedded instruction embedded code and generating application specific instruction embedded differential code,
    The interpreter merges and interprets the application-specific instruction embedded differential code and the application-specific instruction embedded code before update.
    The application-specific virtual machine generation system according to claim 1.
  3.  前記インタプリタが不揮発性素子を用いた不揮発性論理回路で構成され、
     前記ターゲットコンピュータの回路基板の一部が前記不揮発性論理回路で構成される、
    ことを特徴とする請求項1又は2に記載のアプリケーション特化仮想マシン生成システム。
    The interpreter is composed of a nonvolatile logic circuit using a nonvolatile element,
    A part of the circuit board of the target computer is composed of the nonvolatile logic circuit,
    The application-specific virtual machine generation system according to claim 1 or 2.
  4.  前記アプリケーション特化命令は、
     複数ワードで構成されている命令コードを、短縮して、より短い長さの命令コードに置換するものである、ことを特徴とする請求項1~3のいずれかに記載のアプリケーション特化仮想マシン生成システム。
    The application specific instruction is:
    4. The application-specific virtual machine according to claim 1, wherein an instruction code composed of a plurality of words is shortened and replaced with an instruction code having a shorter length. Generation system.
  5.  前記アプリケーション特化命令は、
     複数の命令コードを、統合して、より短い長さの命令コードに置換するものである、ことを特徴とする請求項1~3のいずれかに記載のアプリケーション特化仮想マシン生成システム。
    The application specific instruction is:
    The application-specific virtual machine generation system according to any one of claims 1 to 3, wherein a plurality of instruction codes are integrated and replaced with an instruction code having a shorter length.
  6.  前記アプリケーション特化命令は、
     処理データを、想定される値に応じたビット数に短縮し、
     或いは、
     処理データのアドレスを、想定されるアドレスに応じたビット数に短縮した位置識別子に変更するものであることを特徴とする請求項1~3のいずれかに記載のアプリケーション特化仮想マシン生成システム。
    The application specific instruction is:
    Reduce processing data to the number of bits corresponding to the expected value,
    Or
    4. The application-specific virtual machine generation system according to claim 1, wherein an address of the processing data is changed to a position identifier shortened to a bit number corresponding to an assumed address.
  7.  前記アプリケーション特化命令は、
     命令コード数を限定することにより、命令コードビットを短縮するものである、ことを特徴とする請求項1~3のいずれかに記載のアプリケーション特化仮想マシン生成システム。
    The application specific instruction is:
    4. The application-specific virtual machine generation system according to claim 1, wherein the instruction code bits are shortened by limiting the number of instruction codes.
  8. 1)アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)を定義する特化命令定義手段と、
    2)定義された前記アプリケーション特化命令と汎用の仮想マシン命令とを組合せた特化命令組込コードを生成し得るコンパイラを生成するコンパイラ生成手段と、
    3)前記特化命令組込コードを解釈実行し得るインタプリタを生成するインタプリタ生成手段と、
    4)汎用のプログラム言語で書かれたソースコードを、前記コンパイラ生成手段が生成した前記コンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する特化命令組込コード生成手段と、
     を備えたことを特徴とするアプリケーション特化仮想マシン生成装置。
    1) specialized instruction defining means for defining virtual machine instructions (application specialized instructions) specialized for each application;
    2) Compiler generation means for generating a compiler capable of generating special instruction embedded code combining the defined application specific instruction and a general-purpose virtual machine instruction;
    3) interpreter generating means for generating an interpreter capable of interpreting and executing the specialized instruction embedded code;
    4) Specialized instruction embedded code generation means for generating application-specific instruction embedded code by compiling source code written in a general-purpose programming language with the compiler generated by the compiler generation means;
    An application-specific virtual machine generation device characterized by comprising:
  9. 1)アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)を定義する特化命令定義ステップと、
    2)定義された前記アプリケーション特化命令と汎用の仮想マシン命令とを組合せた特化命令組込コードを生成し得るコンパイラを生成するコンパイラ生成ステップと、
    3)前記特化命令組込コードを解釈実行し得るインタプリタを生成するインタプリタ生成ステップと、
    4)汎用のプログラム言語で書かれたソースコードを、前記コンパイラ生成手段が生成した前記コンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する特化命令組込コード生成ステップと、
     を備えたことを特徴とするアプリケーション特化仮想マシン生成方法。
    1) a specialized instruction definition step for defining a virtual machine instruction (application specialized instruction) specialized for each application;
    2) a compiler generating step for generating a compiler capable of generating a specialized instruction embedded code combining the defined application specialized instruction and a general-purpose virtual machine instruction;
    3) an interpreter generation step for generating an interpreter capable of interpreting and executing the specialized instruction embedded code;
    4) A specialized instruction embedded code generation step of generating an application specific instruction embedded code by compiling a source code written in a general-purpose programming language with the compiler generated by the compiler generation unit;
    An application-specific virtual machine generation method characterized by comprising:
  10.  ターゲットコンピュータに対して、前記インタプリタ生成ステップにより生成された前記インタプリタと、前記特化命令組込コード生成ステップにより生成された前記アプリケーション特化命令組込コードとを転送する転送ステップを、
     更に備えたことを特徴とする請求項9に記載のアプリケーション特化仮想マシン生成方法。
    A transfer step of transferring the interpreter generated by the interpreter generation step and the application-specific instruction embedded code generated by the specialized instruction embedded code generation step to a target computer;
    The application-specific virtual machine generation method according to claim 9, further comprising:
  11.  前記インタプリタ生成ステップにより生成された前記インタプリタを、不揮発性素子を用いた不揮発性論理回路で構成し、ターゲットコンピュータの回路基板の一部を前記不揮発性論理回路で構成する回路構成ステップと、
     ターゲットコンピュータに、
     前記特化命令組込コード生成ステップにより生成された前記アプリケーション特化命令組込コードを転送する転送ステップを、
     更に備えたことを特徴とする請求項9に記載のアプリケーション特化仮想マシン生成方法。
    A circuit configuration step in which the interpreter generated by the interpreter generation step is configured by a nonvolatile logic circuit using a nonvolatile element, and a part of a circuit board of a target computer is configured by the nonvolatile logic circuit;
    On the target computer,
    A transfer step of transferring the application-specific instruction embedded code generated by the specialized instruction embedded code generation step;
    The application-specific virtual machine generation method according to claim 9, further comprising:
  12.  前記特化命令組込コード生成ステップにおいて、更新前プログラムのソースコードと更新後プログラムのソースコードをそれぞれ前記コンパイラでコンパイルし、更新前プログラムのアプリケーション特化命令組込コードと更新後プログラムのアプリケーション特化命令組込コードを解析しアプリケーション特化命令組込差分コードを生成し、
     前記インタプリタが、前記アプリケーション特化命令組込差分コードと、更新前の前記アプリケーション特化命令組込コードをマージして解釈実行する、
     ことを特徴とする請求項9~11のいずれかに記載のアプリケーション特化仮想マシン生成方法。
    In the special instruction embedded code generation step, the source code of the pre-update program and the source code of the post-update program are respectively compiled by the compiler, and the application special instruction embedded code of the pre-update program and the application special of the post-update program are compiled. Analyzing embedded instruction embedded code and generating application specific instruction embedded differential code,
    The interpreter merges and interprets the application-specific instruction embedded differential code and the application-specific instruction embedded code before update.
    12. The application-specific virtual machine generation method according to claim 9, wherein the application-specific virtual machine is generated.
  13.  コンピュータを、
    1)アプリケーション毎に特化した仮想マシン命令(アプリケーション特化命令)を定義する特化命令定義手段、
    2)定義された前記アプリケーション特化命令と汎用の仮想マシン命令とを組合せた特化命令組込コードを生成し得るコンパイラを生成するコンパイラ生成手段、
    3)前記特化命令組込コードを解釈実行し得るインタプリタを生成するインタプリタ生成手段、
    4)汎用のプログラム言語で書かれたソースコードを、前記コンパイラ生成手段が生成した前記コンパイラでコンパイルすることにより、アプリケーション特化命令組込コードを生成する特化命令組込コード生成手段、
     として機能させるアプリケーション特化仮想マシン生成プログラム。
    Computer
    1) Specialized instruction definition means for defining virtual machine instructions (application specific instructions) specialized for each application,
    2) Compiler generation means for generating a compiler capable of generating a special instruction embedded code combining the defined application specific instruction and a general-purpose virtual machine instruction;
    3) interpreter generating means for generating an interpreter capable of interpreting and executing the specialized instruction embedded code;
    4) Specialized instruction embedded code generation means for generating application specific instruction embedded code by compiling source code written in a general-purpose programming language with the compiler generated by the compiler generation means,
    Application-specific virtual machine generation program to function as.
PCT/JP2014/059903 2013-03-30 2014-03-28 Application-specific virtual machine generation system, device, method, and program WO2014163168A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015510146A JP6350831B2 (en) 2013-03-30 2014-03-28 Application-specific virtual machine generation system, apparatus, method, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013-075504 2013-03-30
JP2013075504 2013-03-30

Publications (1)

Publication Number Publication Date
WO2014163168A1 true WO2014163168A1 (en) 2014-10-09

Family

ID=51658459

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/059903 WO2014163168A1 (en) 2013-03-30 2014-03-28 Application-specific virtual machine generation system, device, method, and program

Country Status (2)

Country Link
JP (1) JP6350831B2 (en)
WO (1) WO2014163168A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10055208B2 (en) * 2015-08-09 2018-08-21 Oracle International Corporation Extending a virtual machine instruction set architecture
JP2020510937A (en) * 2017-03-17 2020-04-09 ロベルト・ボッシュ・ゲゼルシャフト・ミト・ベシュレンクテル・ハフツングRobert Bosch Gmbh Processing control of sensor system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6027029A (en) * 1983-07-25 1985-02-12 Matsushita Electric Ind Co Ltd Data processor
JPH03121532A (en) * 1989-10-04 1991-05-23 Nec Field Service Ltd Copy correcting device for software and firmware
JPH096609A (en) * 1995-06-15 1997-01-10 Sanyo Electric Co Ltd Program execution device and program conversion method
JPH11119993A (en) * 1997-10-13 1999-04-30 Matsushita Electric Ind Co Ltd Signal processor
JP2007199869A (en) * 2006-01-24 2007-08-09 Univ Nagoya Automatic decentralization program and apparatus of device cooperation mechanism, and device cooperation mechanism
JP2008015963A (en) * 2006-07-10 2008-01-24 Oki Electric Ind Co Ltd Compiler
JP2010098565A (en) * 2008-10-17 2010-04-30 Nippon Telegr & Teleph Corp <Ntt> Sensor network system, program distribution apparatus, sensor node, and program
JP2010527473A (en) * 2007-05-02 2010-08-12 シナプス ワイヤレス,インコーポレーテッド System and method for dynamically configuring the action of nodes in a sensor network
WO2012099626A1 (en) * 2011-01-19 2012-07-26 Algotochip Corporation Tool generator

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06301522A (en) * 1993-04-09 1994-10-28 Sony Corp Computer system constituting method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6027029A (en) * 1983-07-25 1985-02-12 Matsushita Electric Ind Co Ltd Data processor
JPH03121532A (en) * 1989-10-04 1991-05-23 Nec Field Service Ltd Copy correcting device for software and firmware
JPH096609A (en) * 1995-06-15 1997-01-10 Sanyo Electric Co Ltd Program execution device and program conversion method
JPH11119993A (en) * 1997-10-13 1999-04-30 Matsushita Electric Ind Co Ltd Signal processor
JP2007199869A (en) * 2006-01-24 2007-08-09 Univ Nagoya Automatic decentralization program and apparatus of device cooperation mechanism, and device cooperation mechanism
JP2008015963A (en) * 2006-07-10 2008-01-24 Oki Electric Ind Co Ltd Compiler
JP2010527473A (en) * 2007-05-02 2010-08-12 シナプス ワイヤレス,インコーポレーテッド System and method for dynamically configuring the action of nodes in a sensor network
JP2010098565A (en) * 2008-10-17 2010-04-30 Nippon Telegr & Teleph Corp <Ntt> Sensor network system, program distribution apparatus, sensor node, and program
WO2012099626A1 (en) * 2011-01-19 2012-07-26 Algotochip Corporation Tool generator

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
RYUSUKE NEBASHI ET AL.: "Investigation of stand- by power free electric system using non- volatile CPU", IPSJ SIG NOTES 2011 (HEISEI 23) NENDO 6 [ DVD -ROM, vol. 2012, no. 24, 25, 15 April 2012 (2012-04-15), pages 1 - 6 *
SHINPEI YAMADA ET AL.: "Prototype implementation of non-volatile CPU simulator with power consumption estimation facility", FIT2012 DAI 11 KAI FORUM ON INFORMATION KOEN RONBUNSHU, vol. 1, 21 August 2012 (2012-08-21), pages 303 - 304 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10055208B2 (en) * 2015-08-09 2018-08-21 Oracle International Corporation Extending a virtual machine instruction set architecture
US10802802B2 (en) 2015-08-09 2020-10-13 Oracle International Corporation Extending a virtual machine instruction set architecture
US11385872B2 (en) 2015-08-09 2022-07-12 Oracle International Corporation Extending a virtual machine instruction set architecture
JP2020510937A (en) * 2017-03-17 2020-04-09 ロベルト・ボッシュ・ゲゼルシャフト・ミト・ベシュレンクテル・ハフツングRobert Bosch Gmbh Processing control of sensor system
US11263163B2 (en) 2017-03-17 2022-03-01 Robert Bosch Gmbh Processing control of a sensor system

Also Published As

Publication number Publication date
JPWO2014163168A1 (en) 2017-02-16
JP6350831B2 (en) 2018-07-04

Similar Documents

Publication Publication Date Title
KR101640295B1 (en) Method and apparatus for compiling regular expressions
US7739696B2 (en) Message translation systems and methods
CN102741811A (en) Improving performance of template based JavaScript widgets
US9383979B2 (en) Optimizing intermediate representation of script code by eliminating redundant reference count operations
US10269087B2 (en) Language translation using preprocessor macros
JP5226328B2 (en) Code converter
CN107111505B (en) System and method for executing algorithms on parallel heterogeneous systems
JP2014506692A (en) Use of dedicated elements to implement FSM
CN102023856A (en) Method for outputting and operating data at server in formatting way according to demands of user
US8869123B2 (en) System and method for applying a sequence of operations code to program configurable logic circuitry
CN110569628B (en) Code obfuscation method and device, computer device and storage medium
US20180365082A1 (en) Communicating between applications, running on different nodes, having logic in differing languages
JP6350831B2 (en) Application-specific virtual machine generation system, apparatus, method, and program
CN101266543A (en) Graphical interfaces processing unit and method
JP2010231478A (en) Compile method, compile program and semiconductor integrated circuit manufacturing method
JP2020071833A (en) Engineering device, method for controlling engineering device, and program
KR20060089862A (en) Pre-compiling device
CN103455337A (en) Method for using dynamic library under Android development environment
KR100771057B1 (en) Device and method for transforming WIPI into intermediate language
US8893099B1 (en) Inner function local variable name shadowing
US9292267B2 (en) Compiling nested relational algebras with multiple intermediate representations
JP2010049439A (en) System construction method using software model and modeling device
KR101670916B1 (en) Method for storing function and system device using the same
Hnat et al. A modular and extensible macroprogramming compiler
US20150378698A1 (en) Integrated compilation modes for data flow code generation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14778118

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015510146

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14778118

Country of ref document: EP

Kind code of ref document: A1