JP2007249666A - Information processor, information processing program and information processing method - Google Patents

Information processor, information processing program and information processing method Download PDF

Info

Publication number
JP2007249666A
JP2007249666A JP2006073089A JP2006073089A JP2007249666A JP 2007249666 A JP2007249666 A JP 2007249666A JP 2006073089 A JP2006073089 A JP 2006073089A JP 2006073089 A JP2006073089 A JP 2006073089A JP 2007249666 A JP2007249666 A JP 2007249666A
Authority
JP
Japan
Prior art keywords
data length
instruction
argument
memory
information processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2006073089A
Other languages
Japanese (ja)
Inventor
Yoshiyuki Ono
義之 小野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2006073089A priority Critical patent/JP2007249666A/en
Publication of JP2007249666A publication Critical patent/JP2007249666A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently process instructions different in data length in an information processor. <P>SOLUTION: In the information processor 1, a CPU 8 includes a numerical expression form storage circuit 104 storing a value showing a numerical expression form and an argument conversion circuit 105 converting the argument of an instruction to a form matched to the numerical expression form. When instructions different in data length, for example, an instruction to perform detailed coordinate calculation of less than 1 pixel in processing for drawing a character image and an instruction to perform massive coordinate calculation are treated, an instruction for designating the numerical expression form is executed, whereby the operation of the CPU 8 is switched to perform change in interpretation of the argument and conversion of data length of the argument in the CPU 8. Therefore, instructions different in data length can be efficiently processed. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、入力された命令を解釈・実行して演算を行う情報処理装置、情報処理プログラムおよび情報処理方法に関する。   The present invention relates to an information processing apparatus, an information processing program, and an information processing method that perform an operation by interpreting and executing an input instruction.

従来、ソフトウェアを実行する情報処理装置として、汎用プロセッサが用いられている。汎用プロセッサによってソフトウェアが実行される場合、汎用プロセッサの命令セットに適合する形式で記述されたソフトウェアを、汎用プロセッサのデコード部がデコードし、各演算回路において具体的な演算処理が行われる。
また、ソフトウェアは、引数として、8ビット型、16ビット型、32ビット型といった段階的に異なる数値表現形式を混在して取り扱うものであり、プロセッサ側においても、それらの数値表現形式を取り扱えるように、引数の数値表現形式に応じた異なる命令が用意されている。
Conventionally, a general-purpose processor has been used as an information processing apparatus that executes software. When software is executed by a general-purpose processor, software described in a format compatible with the instruction set of the general-purpose processor is decoded by a decoding unit of the general-purpose processor, and specific arithmetic processing is performed in each arithmetic circuit.
Also, the software handles a mixture of numerical expression formats such as 8-bit type, 16-bit type, and 32-bit type as arguments, so that the processor side can also handle these numerical expression formats. Different instructions are prepared according to the numerical expression format of the arguments.

一方、プリンタ等の高解像度な印刷装置では、高い解像度で大きな物理サイズの画像データを処理するため、広範囲の座標値を取り扱いながら画像処理を行っており、そのような座標値を表現するために、長いビット長の引数を持つ命令が使用されている。
さらに、近年では、電子ペーパーと呼ばれる、印刷物並みの高解像度を有すると共に1画素で多階調の濃淡を表現できるディスプレイも登場している。
このような情報処理装置における画像処理では、本来期待する位置に正確に描画するためには、1画素未満の精度で座標を計算する必要がある。
On the other hand, a high-resolution printing apparatus such as a printer processes image data of a large physical size at a high resolution, and therefore performs image processing while handling a wide range of coordinate values. In order to express such coordinate values, Instructions with long bit length arguments are used.
Furthermore, in recent years, a display called electronic paper, which has a resolution as high as that of a printed matter and can express multi-tone gradation with one pixel, has appeared.
In image processing in such an information processing apparatus, it is necessary to calculate coordinates with an accuracy of less than one pixel in order to accurately draw at the originally expected position.

また、多階調を表現できるディスプレイにおいては、アンチエイリアス処理を行うために1画素未満の座標値が計算されることがある。即ち、アンチエイリアス処理では、ディスプレイにおける最小の表現単位である本来の1画素を、複数の微細な画素に仮想的に分割し、描画する点が、本来の1画素のうち、仮想的に分割された画素をどの程度着色するかに応じて、本来の1画素で表現する点の濃度値を決定している。したがって、アンチエイリアス処理では、1画素未満の座標値を示す小数部と、広範囲の座標を示す整数部との両方を表現する必要があり、プロセッサ内部の数値表現形式は、それらを合わせた長いビット長となっている。   In a display capable of expressing multiple gradations, a coordinate value of less than one pixel may be calculated in order to perform antialiasing processing. That is, in the anti-aliasing process, the original one pixel which is the smallest expression unit in the display is virtually divided into a plurality of fine pixels, and the drawing point is virtually divided among the original one pixels. Depending on how much the pixel is colored, the density value of the point represented by the original one pixel is determined. Therefore, in the anti-aliasing process, it is necessary to express both a decimal part indicating a coordinate value of less than one pixel and an integer part indicating a wide range of coordinates, and the numerical expression format inside the processor has a long bit length combining them. It has become.

そして、用意された数値表現形式のうち、このような整数部と小数部を合わせたデータ長以上のデータを取り扱える数値表現形式を用いて、座標計算が行われる。
例えば、画像処理に必要な座標値が、整数部20ビット、小数部4ビットである場合、合計は24ビットの数値データとなるが、プロセッサが8ビット型、16ビット型、32ビット型の数値表現形式にのみ対応し、24ビット型の数値表現形式には対応していない場合、24ビットを超える中で最小である32ビット型の数値表現形式によって座標計算を行うこととなる。
Coordinate calculation is performed using a numerical expression format that can handle data having a data length equal to or greater than the combined integer part and decimal part of the prepared numerical expression form.
For example, when the coordinate values necessary for image processing are an integer part 20 bits and a decimal part 4 bits, the total is 24-bit numeric data, but the processor is an 8-bit, 16-bit, or 32-bit numeric value. When only the representation format is supported and the 24-bit numeric representation format is not supported, the coordinate calculation is performed by the 32-bit numeric representation format that is the smallest among the 24-bit numeric representation formats.

なお、プロセッサにおいて命令を処理する手法が、特開平11−53187号公報に記載されており、本号公報に記載された技術は、プロセッサにおいて命令を実行する際の実行サイクルを低減することを目的とするものである。
特開平11−53187号公報
Note that a technique for processing instructions in a processor is described in Japanese Patent Application Laid-Open No. 11-53187, and the technique described in this publication aims to reduce an execution cycle when instructions are executed in a processor. It is what.
Japanese Patent Laid-Open No. 11-53187

しかしながら、画像処理における座標データは、特定の座標範囲に偏って出現する傾向にあることが知られている。例えば、上述のように1画素未満の細かい座標を計算する場合には、命令引数の整数部分が同一の座標データが処理されることから、広範囲の座標を示す上位ビット(整数部分)は使用されていない。
このような場合、特許文献1に記載された技術を含め、従来の技術においては、引数の上位ビットに全てゼロを挿入することで、例えば32ビット型の命令とし、実際には小数点以下を表すデータのみを使用するという手法が取られている。
However, it is known that coordinate data in image processing tends to appear biased in a specific coordinate range. For example, as described above, when calculating a fine coordinate of less than one pixel, since the coordinate data with the same integer part of the command argument is processed, the upper bits (integer part) indicating a wide range of coordinates are used. Not.
In such a case, in the conventional technique including the technique described in Patent Document 1, for example, a 32-bit type instruction is obtained by inserting all zeros in the upper bits of the argument, and actually represents the decimal part. The approach is to use only data.

したがって、ゼロが挿入されることにより、命令データ中に冗長な領域が発生し、命令を記憶するためのメモリ領域が増大してコストの上昇を招いたり、命令を読み出す際にメモリアクセス回数が増加することにより、消費電力が増加するといった事態を招くこととなる。
なお、このような事態は、座標データを計算する場合のみならず、データ長が異なる命令を混在して取り扱う場合において共通するものである。
Therefore, by inserting zero, a redundant area is generated in the instruction data, the memory area for storing the instruction is increased, resulting in an increase in cost, and the number of memory accesses is increased when reading the instruction. By doing so, a situation in which power consumption increases is caused.
Such a situation is common not only when calculating coordinate data but also when handling instructions having different data lengths in a mixed manner.

このように、従来の技術では、情報処理装置においてデータ長の異なる命令を効率的に処理することが困難であった。
本発明の課題は、情報処理装置においてデータ長の異なる命令を効率的に処理できるようにし、命令を記憶するためのメモリコストおよびメモリアクセス時の消費電力を削減することである。
Thus, with the conventional technology, it has been difficult to efficiently process instructions having different data lengths in the information processing apparatus.
An object of the present invention is to enable an information processing apparatus to efficiently process instructions having different data lengths, and to reduce the memory cost for storing the instructions and the power consumption during memory access.

以上の課題を解決するため、本発明は、
メモリ(例えば、図1におけるメモリ4)に格納された命令をプロセッサ(例えば、図1におけるCPU8)が読み出して演算処理する情報処理装置(例えば、図1における情報処理装置1)であって、前記メモリから読み出された命令に含まれる引数のデータ長を設定するデータ長設定手段(例えば、第1実施形態における“FMT”命令を格納したメモリ4およびそれを実行する際のCPU8における数値表現形式記憶回路104)と、前記メモリから読み出された命令に含まれる引数を、前記データ長設定手段によって設定されたデータ長に変換するデータ長変換手段(例えば、第1実施形態における“LD.W”命令を実行する際のCPU8における引数変換回路105)と、を備え、前記プロセッサが、前記データ長変換手段によって変換されたデータ長の引数に対して演算処理を行うことを特徴としている。
In order to solve the above problems, the present invention provides:
An information processing apparatus (for example, the information processing apparatus 1 in FIG. 1) in which a processor (for example, the CPU 8 in FIG. 1) reads out and stores an instruction stored in a memory (for example, the memory 4 in FIG. 1), Data length setting means for setting the data length of the argument included in the instruction read from the memory (for example, the memory 4 storing the “FMT” instruction in the first embodiment and the numerical expression format in the CPU 8 when executing it) Storage circuit 104) and data length conversion means (for example, “LD.W in the first embodiment) for converting an argument included in the instruction read from the memory into a data length set by the data length setting means. An argument conversion circuit 105 in the CPU 8 when executing the instruction, and the processor uses the data length conversion means. It is characterized by performing the arithmetic processing on the converted data length argument Te.

このような構成により、データ長設定手段によって、演算処理におけるデータ長を設定することができ、データ長変換手段によって、メモリに格納された命令の引数を、演算処理における所定のデータ長に変換した上でプロセッサに実行させることができる。
したがって、情報処理装置においてデータ長の異なる命令を効率的に処理することが可能となる。
With such a configuration, the data length in the arithmetic processing can be set by the data length setting means, and the argument of the instruction stored in the memory is converted into the predetermined data length in the arithmetic processing by the data length converting means. The above can be executed by the processor.
Therefore, it is possible to efficiently process instructions having different data lengths in the information processing apparatus.

また、本発明は、
前記プロセッサ内部に、演算処理におけるデータ長の設定を記憶する設定データ長記憶回路(例えば、図3の数値表現形式記憶回路104)と、命令に含まれる引数を、前記データ長設定手段に設定されているデータ長に変換するデータ長変換回路(例えば、図3の引数変換回路105)とを備え、前記データ長設定手段は、前記プロセッサが前記メモリから演算処理におけるデータ長を設定する命令を読み出して実行した場合に、該命令に示されたデータ長を前記データ長記憶回路に記憶し、前記データ長変換手段は、前記プロセッサが前記メモリから演算処理を行う命令を読み出して実行する場合に、前記データ長変換回路によって、該命令における引数を前記データ長記憶回路に記憶されたデータ長に変換することを特徴としている。
The present invention also provides:
In the processor, a setting data length storage circuit (for example, the numerical expression format storage circuit 104 in FIG. 3) for storing the data length setting in the arithmetic processing and an argument included in the instruction are set in the data length setting means. A data length conversion circuit (for example, the argument conversion circuit 105 in FIG. 3) that converts the data length into a data length, and the data length setting means reads an instruction for the processor to set the data length in the arithmetic processing from the memory The data length indicated in the instruction is stored in the data length storage circuit, and the data length converting means reads and executes the instruction for the processor to perform arithmetic processing from the memory. The data length conversion circuit converts an argument in the instruction into a data length stored in the data length storage circuit.

このような構成により、データ長の異なる命令を取り扱う場合に、演算処理におけるデータ長の設定および引数のデータ長の変換をプロセッサ内において行うことができ、演算処理を高速に行うことが可能となる。   With such a configuration, when handling instructions having different data lengths, the data length setting and the argument data length conversion in the arithmetic processing can be performed in the processor, and the arithmetic processing can be performed at high speed. .

また、本発明は、
前記データ長設定手段は、前記プロセッサが前記メモリから演算処理におけるデータ長を設定する命令を読み出して実行した場合に、該命令に示されたデータ長を前記メモリに記憶し、前記データ長変換手段は、前記プロセッサが前記メモリから演算処理を行う命令を読み出して実行する場合に、前記メモリに記憶されたデータ長を参照し、該命令における引数を該データ長に変換することを特徴としている。
The present invention also provides:
The data length setting means stores the data length indicated in the instruction in the memory when the processor reads and executes an instruction for setting the data length in the arithmetic processing from the memory, and the data length conversion means Is characterized by referring to a data length stored in the memory and converting an argument in the instruction to the data length when the processor reads and executes an instruction for performing an arithmetic process from the memory.

このような構成により、汎用のプロセッサを用いた場合でも、ソフトウェアの変更のみによって、本発明の機能を実現することができ、情報処理装置においてデータ長の異なる命令を効率的に処理することが可能となる。   With such a configuration, even when a general-purpose processor is used, the functions of the present invention can be realized only by changing the software, and instructions with different data lengths can be efficiently processed in the information processing apparatus. It becomes.

また、本発明は、
前記メモリに格納された命令には、所定ビット長の引数のうち、上位ビットおよび下位ビットの一部によって表現される値を引数とする演算処理命令が含まれ、上位ビットの一部によって表現される値を引数とする命令に先行して、該上位ビットの一部によって表現される値を演算処理におけるデータ長とさせるデータ長設定命令が格納されていると共に、下位ビットの一部によって表現される値を引数とする命令に先行して、該下位ビットの一部によって表現される値を演算処理におけるデータ長とさせるデータ長設定命令が格納されており、前記データ長設定手段は、前記プロセッサが前記データ長設定命令を読み出して実行した場合に、前記上位ビットあるいは下位ビットの一部によって表現される値を変換するデータ長を設定し、前記データ長変換手段は、前記プロセッサが前記上位ビットあるいは下位ビットの一部によって表現される値を引数とする演算処理命令を読み出して実行する場合に、該演算処理命令に含まれる引数を、シフト処理およびゼロを挿入する処理によって前記データ長設定手段によって設定されたデータ長に変換することを特徴としている。
The present invention also provides:
The instruction stored in the memory includes an arithmetic processing instruction whose argument is a value expressed by a part of upper bits and lower bits among arguments of a predetermined bit length, and is expressed by a part of upper bits. A data length setting instruction for storing a value represented by a part of the upper bits as a data length in the arithmetic processing is stored in advance of an instruction having a value as an argument, and is represented by a part of the lower bits. A data length setting instruction for storing a value represented by a part of the lower bits as a data length in the arithmetic processing is stored prior to the instruction having the value as an argument, and the data length setting means includes the processor Sets the data length for converting the value expressed by the upper bit or a part of the lower bit when the data length setting instruction is read and executed, When the processor reads and executes an arithmetic processing instruction having a value represented by the upper bit or a part of the lower bit as an argument, the data length converting means shifts the argument included in the arithmetic processing instruction. The data length is converted into the data length set by the data length setting means by the process of inserting zeros.

このような構成により、整数部と小数部を含むデータに対し、広範な値を示す上位ビット側のデータ、および、詳細な値を示す下位側のデータそれぞれを区別して取り扱う命令が混在している場合にも、プロセッサにおいて演算処理を行う際に、それらを所定データ長に変換して処理することが可能となり、命令データにおいて不要なデータ領域が発生することを防止できる。   With such a configuration, for data including an integer part and a decimal part, there are a mixture of instructions for handling the upper bit side data indicating a wide range of values and the lower side data indicating a detailed value separately. Even in this case, when performing arithmetic processing in the processor, it is possible to convert them into a predetermined data length and to process them, thereby preventing an unnecessary data area from being generated in the instruction data.

また、本発明は、
メモリに格納された命令をプロセッサが読み出して演算処理する情報処理装置を制御するための情報処理プログラムであって、前記メモリから読み出された命令に含まれる引数のデータ長を設定するデータ長設定機能と、前記メモリから読み出された命令に含まれる引数を、前記データ長設定機能によって設定されたデータ長に変換するデータ長変換機能とを備え、前記プロセッサに、前記データ長変換機能によって変換されたデータ長の引数に対して演算処理を行わせることを特徴としている。
The present invention also provides:
An information processing program for controlling an information processing apparatus in which a processor reads an instruction stored in a memory and performs arithmetic processing, and sets a data length of an argument included in the instruction read from the memory And a data length conversion function for converting an argument included in an instruction read from the memory into a data length set by the data length setting function, and converting the processor by the data length conversion function It is characterized in that an arithmetic process is performed on the argument of the data length.

さらに、本発明は、
メモリに格納された命令をプロセッサが読み出して演算処理する情報処理装置における情報処理方法であって、前記メモリから読み出された命令に含まれる引数のデータ長を設定させるデータ長設定命令を前記プロセッサに実行させるデータ長設定ステップと、前記メモリから読み出された命令に含まれる引数を、前記データ長設定ステップにおいて設定されたデータ長に変換させるデータ長変換ステップと、前記プロセッサが、前記データ長変換手段によって変換されたデータ長の引数に対して演算処理を行う演算処理ステップとを含むことを特徴としている。
Furthermore, the present invention provides
An information processing method in an information processing apparatus in which an instruction stored in a memory is read and processed by a processor, and a data length setting instruction for setting a data length of an argument included in the instruction read from the memory A data length setting step to be executed, a data length conversion step for converting an argument included in the instruction read from the memory into a data length set in the data length setting step, and the processor And an arithmetic processing step for performing arithmetic processing on the argument of the data length converted by the converting means.

このように、本発明によれば、情報処理装置においてデータ長の異なる命令を効率的に処理することが可能となる。   Thus, according to the present invention, it is possible to efficiently process instructions having different data lengths in the information processing apparatus.

以下、図を参照して本発明に係る情報処理装置の実施の形態を説明する。
<第1実施形態>
Embodiments of an information processing apparatus according to the present invention will be described below with reference to the drawings.
<First Embodiment>

<情報処理装置の構成>
本実施形態に係る情報処理装置は、データ長の異なる命令が入力された場合に、プロセッサ内部においてデータ長を変換し、所定データ長に整えた上で演算を実行する機能を有するものである。なお、ここでは、データ長の異なる命令の例として、文字画像の描画処理において座標計算を行う場合に、広範囲の座標を演算するための整数部(20ビット)と、1画素未満の詳細な座標を演算するための小数部(4ビット)の2つの異なるデータ長を取り扱うものとして説明する。
<Configuration of information processing apparatus>
The information processing apparatus according to the present embodiment has a function of executing an operation after converting a data length inside the processor and adjusting the data length to a predetermined data length when instructions having different data lengths are input. Here, as an example of a command having a different data length, an integer part (20 bits) for calculating a wide range of coordinates and a detailed coordinate of less than one pixel are used when coordinate calculation is performed in a character image drawing process. In the following description, it is assumed that two different data lengths of the decimal part (4 bits) for computing are handled.

まず、構成を説明する。
図1は、本実施形態の情報処理装置1の内部構成を示すブロック図である。この図1に示すように、情報処理装置1は、入力手段2、入力手段コントローラ3、メモリ4、メモリコントローラ5、外部記憶6、外部記憶コントローラ7、CPU(Central Processing Unit)8、表示コントローラ9、表示体10、バスコントローラ11、及び電源コントローラ12を含んで構成される。
First, the configuration will be described.
FIG. 1 is a block diagram illustrating an internal configuration of the information processing apparatus 1 according to the present embodiment. As shown in FIG. 1, the information processing apparatus 1 includes an input unit 2, an input unit controller 3, a memory 4, a memory controller 5, an external storage 6, an external storage controller 7, a CPU (Central Processing Unit) 8, and a display controller 9. , The display 10, the bus controller 11, and the power supply controller 12.

入力手段2は、例えばマウスやキーボードといった、文字の描画等の命令を入力するときに操作される機器である。そして、入力手段2は、命令を入力するための操作が行われると、入力された命令を入力手段コントローラ3を介してCPU8に出力する。
入力手段コントローラ3は、入力手段2とCPU8との間のデータ転送を制御する。
メモリ4は、CPU8がプログラムを実行するときに各種プログラムを展開するワークエリアを形成するとともに、CPU8により実行される各種プログラムに係るデータや、表示対象である情報のデータを記憶する記憶領域を形成する。また、本実施形態において、メモリ4には、図2に示す一連の命令(プログラム)が格納されている。
The input unit 2 is a device that is operated when inputting a command such as drawing a character, such as a mouse or a keyboard. When an operation for inputting a command is performed, the input unit 2 outputs the input command to the CPU 8 via the input unit controller 3.
The input means controller 3 controls data transfer between the input means 2 and the CPU 8.
The memory 4 forms a work area for developing various programs when the CPU 8 executes the programs, and also forms a storage area for storing data related to the various programs executed by the CPU 8 and data of information to be displayed. To do. In the present embodiment, the memory 4 stores a series of instructions (programs) shown in FIG.

図2は、メモリ4に格納されているプログラムを示す図である。
この図2に示すように、メモリ4には、
FMT 0
LD.W R3,#10.125
LD.W R4,#20.375
ADD.L R5,R3,R4
FMT 8
LD.W R6,#820000
LD.W R7,#128000
ADD.L R8,R6,R7
の各命令からなる8行のプログラムが格納されており、各命令は1ワード分の16ビットのデータ長で表現されている。
FIG. 2 is a diagram showing a program stored in the memory 4.
As shown in FIG. 2, the memory 4 has
FMT 0
LD. WR3, # 10.125
LD. WR4, # 20.375
ADD. L R5, R3, R4
FMT 8
LD. WR6, # 820000
LD. WR7, # 128000
ADD. L R8, R6, R7
Are stored, and each instruction is expressed by a data length of 16 bits for one word.

図1に戻り、メモリコントローラ5は、メモリ4とCPU8との間のデータ転送を制御する。
外部記憶6は、CPU8により実行される基本制御プログラムやアプリケーションプログラム等の各種プログラム及びこれら各種プログラムに係るデータを格納する。
外部記憶コントローラ7は、外部記憶6とCPU8との間のデータ転送を制御する。
Returning to FIG. 1, the memory controller 5 controls data transfer between the memory 4 and the CPU 8.
The external storage 6 stores various programs such as a basic control program and application program executed by the CPU 8 and data related to these various programs.
The external storage controller 7 controls data transfer between the external storage 6 and the CPU 8.

CPU8は、外部記憶6に格納されている各種プログラムを読み込み、それらをメモリ4内に形成されるワークエリアに展開して各部2〜12を制御する。
例えば、CPU8は、入力手段2から文字の描画指示が出力されると、文字を描画する所定処理を実行する。そして、文字を描画する所定処理によって、その文字の文字コードに基づいて描画命令データを取得し、その描画命令データを解釈(デコード)・実行することにより、前記描画指示があった文字のビットマップを生成する。
The CPU 8 reads various programs stored in the external storage 6, develops them into a work area formed in the memory 4, and controls the units 2 to 12.
For example, when a character drawing instruction is output from the input unit 2, the CPU 8 executes a predetermined process for drawing a character. Then, by a predetermined process for drawing a character, drawing command data is acquired based on the character code of the character, and the drawing command data is interpreted (decoded) and executed, whereby the bitmap of the character for which the drawing instruction has been given Is generated.

図3は、CPU8の内部構成を示すブロック図である。この図3に示すように、CPU8は、制御回路101と、入力レジスタ102と、命令デコーダ103と、数値表現形式記憶回路104と、引数変換回路105と、レジスタファイル106と、ALU(Arithmetic and Logical Unit)107と、出力レジスタ108と、プログラムカウンタ109と、インクリメンタ110とを備えており、CPU8内の各部は、バスあるいは専用の信号線で接続されている。また、CPU8は、情報処理装置1の各部と外部データバスおよび外部アドレスバスによって接続されている。   FIG. 3 is a block diagram showing the internal configuration of the CPU 8. As shown in FIG. 3, the CPU 8 includes a control circuit 101, an input register 102, an instruction decoder 103, a numerical expression format storage circuit 104, an argument conversion circuit 105, a register file 106, an ALU (Arithmetic and Logical). Unit) 107, an output register 108, a program counter 109, and an incrementer 110, and each part in the CPU 8 is connected by a bus or a dedicated signal line. The CPU 8 is connected to each part of the information processing apparatus 1 by an external data bus and an external address bus.

制御回路101は、動作タイミングや動作の種類等、CPU8内部の各モジュールを制御する回路である。例えば、制御回路101は、プログラムカウンタ109に示されたメモリアドレスから命令を読み出して入力レジスタ102に記憶したり、出力レジスタ108に記憶されているデータを、メモリの所定アドレスに書き込んだりする。
入力レジスタ102は、外部データバスを介してメモリ4から読み出された命令(命令コードおよび命令データ)を一時的に記憶し、記憶している命令を命令デコーダ103に出力したり、命令の引数を数値表現形式記憶回路104あるいは引数変換回路105に出力したりする。
The control circuit 101 is a circuit that controls each module in the CPU 8 such as operation timing and operation type. For example, the control circuit 101 reads an instruction from the memory address indicated by the program counter 109 and stores the instruction in the input register 102, or writes data stored in the output register 108 to a predetermined address in the memory.
The input register 102 temporarily stores an instruction (instruction code and instruction data) read from the memory 4 via the external data bus, and outputs the stored instruction to the instruction decoder 103 or an instruction argument Are output to the numerical expression format storage circuit 104 or the argument conversion circuit 105.

命令デコーダ103は、入力レジスタ102から入力された命令の命令コードを基に、命令内容をデコードし、デコード結果を制御回路101に出力する。また、命令デコーダ103は、入力レジスタから入力された命令の命令データを基に、入出力するレジスタのアドレスを制御回路に出力する。
数値表現形式記憶回路104は、入力レジスタ102から数値表現形式の切り換え命令(後述するFMT命令)に含まれる引数(数値の表現形式を示す値)を受け取り、その表現形式を示す値を記憶する。
The instruction decoder 103 decodes the instruction content based on the instruction code of the instruction input from the input register 102, and outputs the decoded result to the control circuit 101. The instruction decoder 103 outputs the address of the input / output register to the control circuit based on the instruction data of the instruction input from the input register.
The numerical expression format storage circuit 104 receives an argument (a value indicating a numerical expression format) included in a numerical expression format switching instruction (an FMT instruction described later) from the input register 102, and stores a value indicating the expression format.

引数変換回路105は、数値表現形式記憶回路104に記憶されている数値表現形式を示す値を読み出し、入力レジスタ102から数値を示す引数を受け取って、その数値の表現形式を、数値表現形式記憶回路104が記憶している値に適合する形式に変換する。例えば、引数変換回路105は、数値表現形式記憶回路104に記憶されている数値表現形式を示す値が8の場合は、入力レジスタ102から入力された値を左に8ビットシフトし、不足するビットに0を追加することによって32ビットの値に変換する。仮に入力レジスタ102から16ビットの引数を受け取った場合は、左に8ビットシフトを行い、不足する上位8ビットおよび下位8ビットに“0”を追加することにより、その16ビット型のデータを32ビット型に変換する。   The argument conversion circuit 105 reads a value indicating a numerical expression format stored in the numerical expression format storage circuit 104, receives an argument indicating a numerical value from the input register 102, and converts the numerical expression format into a numerical expression format storage circuit. 104 converts to a format suitable for the stored value. For example, if the value indicating the numerical expression format stored in the numerical expression format storage circuit 104 is 8, the argument conversion circuit 105 shifts the value input from the input register 102 to the left by 8 bits, resulting in an insufficient bit. Is converted to a 32-bit value by adding 0 to. If a 16-bit argument is received from the input register 102, an 8-bit shift is performed to the left, and “0” is added to the lacking upper 8 bits and lower 8 bits, so that the 16-bit type data is 32. Convert to bit type.

そして、引数変換回路105は、変換後の数値データをレジスタファイル106に出力する。
レジスタファイル106は、複数のレジスタによって構成されており、引数変換回路105から入力された数値データやALU107の演算結果を、制御回路101によって指定されたアドレスのレジスタに記憶する。また、レジスタファイル106は、制御回路101によって指定されたアドレスのレジスタに記憶されている数値データを、ALU107あるいは出力レジスタ108に出力する。
Then, the argument conversion circuit 105 outputs the converted numerical data to the register file 106.
The register file 106 is composed of a plurality of registers, and stores the numerical data input from the argument conversion circuit 105 and the calculation result of the ALU 107 in the register at the address specified by the control circuit 101. The register file 106 also outputs numerical data stored in the register at the address designated by the control circuit 101 to the ALU 107 or the output register 108.

ALU107は、レジスタファイル106から出力された数値データに対し、加減算あるいは乗算といった演算を行う論理・算術演算を行う。そして、ALU107は、演算結果をレジスタファイル106に出力する。
出力レジスタ108は、レジスタファイル106から出力されたデータを一時的に記憶し、外部データバスを介してメモリ4に出力する。
The ALU 107 performs logical / arithmetic operations that perform operations such as addition / subtraction or multiplication on the numerical data output from the register file 106. Then, the ALU 107 outputs the calculation result to the register file 106.
The output register 108 temporarily stores the data output from the register file 106 and outputs the data to the memory 4 via the external data bus.

プログラムカウンタ109は、CPU8が次に実行する命令が格納されたメモリ4のアドレスを記憶しており、命令をメモリ4から読み出す毎に、インクリメンタ110によって、記憶しているアドレスが“1”加算される。
インクリメンタ110は、CPU8がメモリ4から命令を1つ読み出す毎に、プログラムカウンタ109に記憶されているアドレスを“1”加算する。
The program counter 109 stores the address of the memory 4 in which an instruction to be executed next by the CPU 8 is stored. Each time the instruction is read from the memory 4, the stored address is incremented by “1”. Is done.
Each time the CPU 8 reads one instruction from the memory 4, the incrementer 110 adds “1” to the address stored in the program counter 109.

図1に戻り、表示コントローラ9は、CPU8でビットマップが生成されると、そのビットマップを表示体10に描画する。
表示体10は、電力供給が停止されても表示内容を保持できる記憶性表示体(コレステリック液晶)を含んで構成される。そして、表示体10は、表示コントローラ9の描画動作によって表示内容が書き換えられる。
バスコントローラ11は、CPU8と各部2〜12との間のデータ転送を制御する。
電源コントローラ12は、CPU8からの指令に従って、情報処理装置1の各部2〜12への電源供給を制御する。
Returning to FIG. 1, when a bitmap is generated by the CPU 8, the display controller 9 draws the bitmap on the display body 10.
The display body 10 is configured to include a memory display body (cholesteric liquid crystal) that can retain display contents even when power supply is stopped. The display contents of the display body 10 are rewritten by the drawing operation of the display controller 9.
The bus controller 11 controls data transfer between the CPU 8 and the units 2 to 12.
The power controller 12 controls power supply to the units 2 to 12 of the information processing apparatus 1 in accordance with a command from the CPU 8.

<情報処理装置の動作>
情報処置装置1のメモリ4には、図2に示すように、プログラマによって記述された一連の命令(プログラム)が格納されており、プログラムの実行が指示入力されることにより、CPU8がこれらの命令を順に読み出して実行する。
<Operation of information processing apparatus>
As shown in FIG. 2, the memory 4 of the information processing apparatus 1 stores a series of instructions (programs) described by a programmer. When the instruction to execute the program is input, the CPU 8 Are sequentially read and executed.

具体的には、メモリ4には、
FMT 0
LD.W R3,#10.125
LD.W R4,#20.375
ADD.L R5,R3,R4
FMT 8
LD.W R6,#820000
LD.W R7,#128000
ADD.L R8,R6,R7
の各命令からなる8行のプログラムが格納されており、情報処理装置1のCPU8がこのプログラムを読み出して実行する。
Specifically, the memory 4 has
FMT 0
LD. WR3, # 10.125
LD. WR4, # 20.375
ADD. L R5, R3, R4
FMT 8
LD. WR6, # 820000
LD. WR7, # 128000
ADD. L R8, R6, R7
Are stored, and the CPU 8 of the information processing apparatus 1 reads out and executes the program.

上記プログラムのうち、第1行〜第4行が1画素未満の詳細な座標計算を行う命令であり、第5行〜第8行が広範囲の座標計算を行う命令である。
上記プログラムの実行が指示されると、CPU8は、第1行の命令“FMT 0”から順に実行を開始する。
“FMT 0”命令の実行に際しては、以下の手順でCPU8が動作する。
Among the above programs, the first line to the fourth line are instructions for performing detailed coordinate calculation of less than one pixel, and the fifth line to the eighth line are instructions for performing a wide range of coordinate calculation.
When the execution of the program is instructed, the CPU 8 starts execution in order from the instruction “FMT 0” on the first line.
When executing the “FMT 0” instruction, the CPU 8 operates in the following procedure.

1.プログラムカウンタ109が、次の命令をフェッチするメモリアドレス(“FMT 0”命令が格納されたメモリアドレス)を外部アドレスバスに出力する。
2.プログラムカウンタ109が示すアドレスから“FMT 0”命令(F00xxxxx)をフェッチし、入力レジスタ102に格納する。(「xxxxx」は未定義フィールドのため、値は問わない。以後も同様。)
3.命令デコーダ103が、入力レジスタ102の第1フィールド(命令コード:F)をデコードし、その結果、制御回路101はFMT命令の動作を開始する。
4.入力レジスタ102から第2フィールド(ビットシフト量:00)の値0を数値表現形式記憶回路104に出力する。
5.インクリメンタ110がプログラムカウンタ109の値を“1”加算する。
1. The program counter 109 outputs a memory address for fetching the next instruction (memory address storing the “FMT 0” instruction) to the external address bus.
2. The “FMT 0” instruction (F00xxxxx) is fetched from the address indicated by the program counter 109 and stored in the input register 102. ("Xxxxx" is an undefined field, so the value is not important.
3. The instruction decoder 103 decodes the first field (instruction code: F) of the input register 102, and as a result, the control circuit 101 starts the operation of the FMT instruction.
4). The value 0 of the second field (bit shift amount: 00) is output from the input register 102 to the numerical expression format storage circuit 104.
5). The incrementer 110 adds “1” to the value of the program counter 109.

“FMT 0”命令が実行されることにより、数値表現形式記憶回路104にビットシフト量“0”が設定され、以後の引数に対し、0ビット処理が施されることとなる。
“LD.W R3,#10.125”命令の実行に際しては、以下の手順でCPU8が動作する。
By executing the “FMT 0” instruction, the bit shift amount “0” is set in the numerical expression format storage circuit 104, and the subsequent argument is subjected to 0-bit processing.
When executing the “LD.WR3, # 10.125” instruction, the CPU 8 operates in the following procedure.

1.プログラムカウンタ109が、次の命令をフェッチするメモリアドレス(“LD.W R3,#10.125”命令が格納されたメモリアドレス)を外部アドレスバスに出力する。
2.プログラムカウンタ109が示すアドレスから“LD.W R3,#10.125”命令(13xx00A2)をフェッチし、入力レジスタ102に格納する。
3.命令デコーダ103が、入力レジスタ102の第1フィールド(命令コード:1)をデコードし、その結果、制御回路101はLD.W命令の動作を開始する。
4.命令デコーダ103が、入力レジスタ102の第2フィールド(レジスタ番号:3)をデコードし、その結果を制御回路101が保持する。
5.入力レジスタ102から第4フィールド(定数値:00A2)の値を引数変換回路105に出力する。
6.引数変換回路105は、数値表現形式記憶回路104から指示されている値0に従って、入力された値(00A2)を左に0ビットシフトし、不足するビットには0を補う。結果として、引数変換回路105は、000000A2を出力する(値000000A2は、4ビットシフト固定小数点形式で、10.125を表す数値である)。
7.引数変換回路105が出力する値000000A2を、レジスタファイル106のレジスタ(R3)に格納する。
8.インクリメンタ110がプログラムカウンタ109の値を“1”加算する。
1. The program counter 109 outputs a memory address at which the next instruction is fetched (memory address where the “LD.WR3, # 10.125” instruction is stored) to the external address bus.
2. The “LD.WR3, # 10.125” instruction (13xx00A2) is fetched from the address indicated by the program counter 109 and stored in the input register 102.
3. The instruction decoder 103 decodes the first field (instruction code: 1) of the input register 102. As a result, the control circuit 101 outputs the LD. Start the operation of the W instruction.
4). The instruction decoder 103 decodes the second field (register number: 3) of the input register 102, and the control circuit 101 holds the result.
5). The value of the fourth field (constant value: 00A2) is output from the input register 102 to the argument conversion circuit 105.
6). The argument conversion circuit 105 shifts the input value (00A2) to the left by 0 bits in accordance with the value 0 instructed from the numerical expression format storage circuit 104, and makes up 0 for missing bits. As a result, the argument conversion circuit 105 outputs 000000A2 (the value 000000A2 is a numerical value representing 10.125 in a 4-bit shift fixed point format).
7). The value 000000A2 output by the argument conversion circuit 105 is stored in the register (R3) of the register file 106.
8). The incrementer 110 adds “1” to the value of the program counter 109.

“LD.W R3,#10.125”命令が実行されることにより、命令中における引数00A2が000000A2(10進の10.125)に変換された上でレジスタR3に記憶される。
“LD.W R4,#20.375”命令の実行に際しては、以下の手順でCPU8が動作する。
By executing the “LD.W R3, # 10.125” instruction, the argument 00A2 in the instruction is converted into 000000A2 (decimal 10.125) and stored in the register R3.
When executing the “LD.WR4, # 20.375” instruction, the CPU 8 operates in the following procedure.

1.プログラムカウンタ109が、次の命令をフェッチするメモリアドレス(“LD.W R4,#20.375”命令が格納されたメモリアドレス)を外部アドレスバスに出力する。
2.プログラムカウンタ109が示すアドレスから“LD.W R4,#20.375”命令(14xx0146)をフェッチし、入力レジスタ102に格納する。
3.命令デコーダ103が、入力レジスタ102の第1フィールド(命令コード:1)をデコードし、その結果、制御回路はLD.W命令の動作を開始する。
4.命令デコーダ103が、入力レジスタ102の第2フィールド(レジスタ番号:4)をデコードし、その結果を制御回路が保持する。
5.入力レジスタ102から第4フィールド(定数値:0146)の値を引数変換回路105に出力する。
6.引数変換回路105は、数値表現形式記憶回路104から指示されている値0に従って、入力された値(0146)を左に0ビットシフトし、不足するビットには0を補う。結果として、00000146を出力する(値00000146は、4ビットシフト固定小数点形式で、20.375を表す数値である)。
7.引数変換回路105が出力する値00000146を、レジスタファイル106のレジスタ(R4)に格納する。
8.インクリメンタ110がプログラムカウンタ109の値を“1”加算する。
1. The program counter 109 outputs a memory address at which the next instruction is fetched (memory address where the “LD.WR4, # 20.375” instruction is stored) to the external address bus.
2. The “LD.WR4, # 20.375” instruction (14xx0146) is fetched from the address indicated by the program counter 109 and stored in the input register 102.
3. The instruction decoder 103 decodes the first field (instruction code: 1) of the input register 102. As a result, the control circuit outputs the LD. Start the operation of the W instruction.
4). The instruction decoder 103 decodes the second field (register number: 4) of the input register 102, and the control circuit holds the result.
5). The value of the fourth field (constant value: 0146) is output from the input register 102 to the argument conversion circuit 105.
6). The argument conversion circuit 105 shifts the input value (0146) to the left by 0 bits in accordance with the value 0 instructed from the numerical expression format storage circuit 104, and makes up 0 for the missing bits. As a result, 00000146 is output (value 00000146 is a numerical value representing 20.375 in the 4-bit shift fixed point format).
7). The value 00000146 output from the argument conversion circuit 105 is stored in the register (R4) of the register file 106.
8). The incrementer 110 adds “1” to the value of the program counter 109.

“LD.W R4,#20.375”命令が実行されることにより、命令中における引数0146が00000146(10進の20.375)に変換された上でレジスタR4に記憶される。
“ADD.L R5,R3,R4”命令の実行に際しては、以下の手順でCPU8が動作する。
By executing the “LD.W R4, # 20.375” instruction, the argument 0146 in the instruction is converted to 00000146 (decimal 20.375) and stored in the register R4.
When executing the “ADD.L R5, R3, R4” instruction, the CPU 8 operates in the following procedure.

1.プログラムカウンタ109が、次の命令をフェッチするメモリアドレス(“ADD.L R5,R3,R4”命令が格納されたメモリアドレス)を外部アドレスバスに出力する。
2.プログラムカウンタ109が示すアドレスから“ADD.L R5,R3,R4”命令(2534xxxx)をフェッチし、入力レジスタ102に格納する。
3.命令デコーダ103が、入力レジスタ102の第1フィールド(命令コード:2)をデコードし、その結果、制御回路101はADD.L命令の動作を開始する。
4.命令デコーダ103が、入力レジスタ102の第2フィールド(レジスタ番号:5)をデコードし、その結果を制御回路101が保持する。
5.命令デコーダ103が、入力レジスタ102の第3フィールド(レジスタ番号:3)をデコードし、その結果を制御回路101が保持する。
6.命令デコーダ103が、入力レジスタ102の第4フィールド(レジスタ番号:4)をデコードし、その結果を制御回路101が保持する。
7.レジスタファイル106は、レジスタ(R3)およびレジスタ(R4)の値をALU107に出力する。
8.ALU107は、レジスタ(R3)の値およびレジスタ(R4)の値を加算し、レジスタファイル106へ出力する。
9.レジスタファイル106は入力された値をレジスタ(R5)へ格納する。このとき、レジスタ(R5)の値は、10.125を表す値000000A2と、20.375を表す値00000146を加算した結果である、30.5を表す000001E8となっている。
10.インクリメンタ110がプログラムカウンタ109の値を“1”加算する。
1. The program counter 109 outputs a memory address for fetching the next instruction (memory address storing the “ADD.L R5, R3, R4” instruction) to the external address bus.
2. The “ADD.L R5, R3, R4” instruction (2534xxxx) is fetched from the address indicated by the program counter 109 and stored in the input register 102.
3. The instruction decoder 103 decodes the first field (instruction code: 2) of the input register 102, and as a result, the control circuit 101 causes the ADD. The operation of the L instruction is started.
4). The instruction decoder 103 decodes the second field (register number: 5) of the input register 102, and the control circuit 101 holds the result.
5). The instruction decoder 103 decodes the third field (register number: 3) of the input register 102, and the control circuit 101 holds the result.
6). The instruction decoder 103 decodes the fourth field (register number: 4) of the input register 102, and the control circuit 101 holds the result.
7). The register file 106 outputs the values of the register (R3) and the register (R4) to the ALU 107.
8). The ALU 107 adds the value of the register (R3) and the value of the register (R4) and outputs the result to the register file 106.
9. The register file 106 stores the input value in the register (R5). At this time, the value of the register (R5) is 000001E8 representing 30.5, which is the result of adding the value 000000A2 representing 10.125 and the value 00000146 representing 20.375.
10. The incrementer 110 adds “1” to the value of the program counter 109.

“ADD.L R5,R3,R4”が実行されることにより、レジスタR3に記憶された値000000A2と、レジスタR4に記憶された値00000146とが加算され、加算結果である値000001E8がレジスタR5に記憶される。
“FMT 8”命令の実行に際しては、以下の手順でCPU8が動作する。
By executing “ADD.L R5, R3, R4”, the value 000000A2 stored in the register R3 and the value 00000146 stored in the register R4 are added, and the value 000001E8 as the addition result is added to the register R5. Remembered.
When executing the “FMT 8” instruction, the CPU 8 operates in the following procedure.

1.プログラムカウンタ109が、次の命令をフェッチするメモリアドレス(“FMT 8”命令が格納されたメモリアドレス)を外部アドレスバスに出力する。
2.プログラムカウンタ109が示すアドレスから“FMT 8”命令(F08xxxxx)をフェッチし、入力レジスタ102に格納する。
3.命令デコーダ103が、入力レジスタ102の第1フィールド(命令コード:F)をデコードし、その結果、制御回路101はFMT命令の動作を開始する。
4.入力レジスタ102から第2フィールド(ビットシフト量:08)の値を数値表現形式記憶回路104に格納する。
5.インクリメンタ110がプログラムカウンタ109の値を“1”加算する。
1. The program counter 109 outputs a memory address for fetching the next instruction (memory address storing the “FMT 8” instruction) to the external address bus.
2. The “FMT 8” instruction (F08xxxxx) is fetched from the address indicated by the program counter 109 and stored in the input register 102.
3. The instruction decoder 103 decodes the first field (instruction code: F) of the input register 102, and as a result, the control circuit 101 starts the operation of the FMT instruction.
4). The value of the second field (bit shift amount: 08) is stored in the numerical expression format storage circuit 104 from the input register 102.
5). The incrementer 110 adds “1” to the value of the program counter 109.

“FMT 8”命令が実行されることにより、数値表現形式記憶回路104にビットシフト量“8”が設定され、以後の引数に対し、8ビット処理が施されることとなる。
“LD.W R6,#820000”命令の実行に際しては、以下の手順でCPU8が動作する。
When the “FMT 8” instruction is executed, the bit shift amount “8” is set in the numerical expression format storage circuit 104, and the subsequent arguments are subjected to 8-bit processing.
When executing the “LD.WR6, # 820000” instruction, the CPU 8 operates in the following procedure.

1.プログラムカウンタ109が、次の命令をフェッチするメモリアドレス(“LD.W R6,#820000”命令が格納されたメモリアドレス)を外部アドレスバスに出力する。
2.プログラムカウンタ109が示すアドレスから“LD.W R6,#820000”命令(16xxC832)をフェッチし、入力レジスタ102に格納する。
3.命令デコーダ103が、入力レジスタ102の第1フィールド(命令コード:1)をデコードし、その結果、制御回路101はLD.W命令の動作を開始する。
4.命令デコーダ103が、入力レジスタ102の第2フィールド(レジスタ番号:6)をデコードし、その結果を制御回路101が保持する。
5.入力レジスタ102から第4フィールド(定数値:C832)の値を引数変換回路105に出力する。
6.引数変換回路105は、数値表現形式記憶回路104から指示されている値8に従って、入力された値(C832)を左に8ビットシフトし、不足するビットには0を補う。結果として、引数変換回路105は、00C83200を出力する(値00C83200は、4ビットシフト固定小数点形式で、820000を表す数値である)。
7.引数変換回路105が出力する値00C83200を、レジスタファイル106のレジスタ(R6)に格納する。
8.インクリメンタ110がプログラムカウンタ109の値を“1”加算する。
1. The program counter 109 outputs the memory address at which the next instruction is fetched (the memory address where the “LD.WR6, # 820000” instruction is stored) to the external address bus.
2. The “LD.WR6, # 820000” instruction (16xxC832) is fetched from the address indicated by the program counter 109 and stored in the input register 102.
3. The instruction decoder 103 decodes the first field (instruction code: 1) of the input register 102. As a result, the control circuit 101 outputs the LD. Start the operation of the W instruction.
4). The instruction decoder 103 decodes the second field (register number: 6) of the input register 102, and the control circuit 101 holds the result.
5). The value of the fourth field (constant value: C832) is output from the input register 102 to the argument conversion circuit 105.
6). The argument conversion circuit 105 shifts the input value (C832) to the left by 8 bits according to the value 8 instructed from the numerical expression format storage circuit 104, and makes up 0 for the missing bits. As a result, the argument conversion circuit 105 outputs 00C83200 (value 00C83200 is a numerical value representing 820000 in a 4-bit shift fixed point format).
7). The value 00C83200 output from the argument conversion circuit 105 is stored in the register (R6) of the register file 106.
8). The incrementer 110 adds “1” to the value of the program counter 109.

“LD.W R6,#820000”命令が実行されることにより、命令中における引数C832が00C83200(10進の820000)に変換された上で、レジスタR6に記憶される。
“LD.W R7,#128000”命令の実行に際しては、以下の手順でCPU8が動作する。
By executing the “LD.WR6, # 820000” instruction, the argument C832 in the instruction is converted into 00C83200 (decimal 820000) and stored in the register R6.
When executing the “LD.WR7, # 128000” instruction, the CPU 8 operates in the following procedure.

1.プログラムカウンタ109が、次の命令をフェッチするメモリアドレス(“LD.W R7,#128000”命令が格納されたメモリアドレス)を外部アドレスバスに出力する。
2.プログラムカウンタ109が示すアドレスから“LD.W R7,#128000”命令(17xx1F40)をフェッチし、入力レジスタ102に格納する。
3.命令デコーダ103が、入力レジスタ102の第1フィールド(命令コード:1)をデコードし、その結果、制御回路101はLD.W命令の動作を開始する。
4.命令デコーダ103が、入力レジスタ102の第2フィールド(レジスタ番号:7)をデコードし、その結果を制御回路101が保持する。
5.入力レジスタ102から第4フィールド(定数値:1F40)の値を引数変換回路105に出力する。
6.引数変換回路105は、数値表現形式記憶回路104から指示されている値8に従って、入力された値(1F40)を左に8ビットシフトし、不足するビットには0を補う。結果として、引数変換回路105は、001F4000を出力する(値001F4000は、4ビットシフト固定小数点形式で、128000を表す数値である)。
7.引数変換回路105が出力する値001F4000を、レジスタファイル106のレジスタ(R7)に格納する。
8.インクリメンタ110がプログラムカウンタ109の値を“1”加算する。
1. The program counter 109 outputs a memory address for fetching the next instruction (memory address storing the “LD.WR7, # 128000” instruction) to the external address bus.
2. The “LD.WR7, # 128000” instruction (17xx1F40) is fetched from the address indicated by the program counter 109 and stored in the input register 102.
3. The instruction decoder 103 decodes the first field (instruction code: 1) of the input register 102. As a result, the control circuit 101 outputs the LD. Start the operation of the W instruction.
4). The instruction decoder 103 decodes the second field (register number: 7) of the input register 102, and the control circuit 101 holds the result.
5). The value of the fourth field (constant value: 1F40) is output from the input register 102 to the argument conversion circuit 105.
6). The argument conversion circuit 105 shifts the input value (1F40) to the left by 8 bits according to the value 8 instructed from the numerical expression format storage circuit 104, and makes up 0 for the missing bits. As a result, the argument conversion circuit 105 outputs 001F4000 (value 001F4000 is a numerical value representing 128000 in a 4-bit shift fixed point format).
7). The value 001F4000 output from the argument conversion circuit 105 is stored in the register (R7) of the register file 106.
8). The incrementer 110 adds “1” to the value of the program counter 109.

“LD.W R7,#128000”命令が実行されることにより、命令中における引数1F40が001F4000(10進の128000)に変換された上でレジスタR7に記憶される。
“ADD.L R8,R6,R7”命令の実行に際しては、以下の手順でCPU8が動作する。
By executing the “LD.W R7, # 128000” instruction, the argument 1F40 in the instruction is converted into 001F4000 (decimal 128000) and stored in the register R7.
When executing the “ADD.L R8, R6, R7” instruction, the CPU 8 operates in the following procedure.

1.プログラムカウンタ109が、次の命令をフェッチするメモリアドレス(“ADD.L R8,R6,R7”命令が格納されたメモリアドレス)を外部アドレスバスに出力する。
2.プログラムカウンタ109が示すアドレスから“ADD.L R8,R6,R7”命令(2867xxxx)をフェッチし、入力レジスタ102に格納する。
3.命令デコーダ103が、入力レジスタ102の第1フィールド(命令コード:2)をデコードし、その結果、制御回路101はADD.L命令の動作を開始する。
4.命令デコーダ103が、入力レジスタ102の第2フィールド(レジスタ番号:8)をデコードし、その結果を制御回路101が保持する。
5.命令デコーダ103が、入力レジスタ102の第3フィールド(レジスタ番号:6)をデコードし、その結果を制御回路101が保持する。
6.命令デコーダ103が、入力レジスタ102の第4フィールド(レジスタ番号:7)をデコードし、その結果を制御回路101が保持する。
7.レジスタファイル106は、レジスタ(R6)およびレジスタ(R7)の値をALU107に出力する。
8.ALU107は、レジスタ(R6)の値およびレジスタ(R7)の値を加算し、レジスタファイル106へ出力する。
9.レジスタファイル106は入力された値をレジスタ(R8)へ格納する。このとき、レジスタ(R8)の値は、820000を表す値00C83200と、128000を表す値001F4000を加算した結果である、948000を表す00E77200となっている。
10.インクリメンタ110がプログラムカウンタ109の値を“1”加算する。
1. The program counter 109 outputs the memory address at which the next instruction is fetched (memory address storing the “ADD.L R8, R6, R7” instruction) to the external address bus.
2. The “ADD.L R8, R6, R7” instruction (2867xxxx) is fetched from the address indicated by the program counter 109 and stored in the input register 102.
3. The instruction decoder 103 decodes the first field (instruction code: 2) of the input register 102, and as a result, the control circuit 101 causes the ADD. The operation of the L instruction is started.
4). The instruction decoder 103 decodes the second field (register number: 8) of the input register 102, and the control circuit 101 holds the result.
5). The instruction decoder 103 decodes the third field (register number: 6) of the input register 102, and the control circuit 101 holds the result.
6). The instruction decoder 103 decodes the fourth field (register number: 7) of the input register 102, and the control circuit 101 holds the result.
7). The register file 106 outputs the values of the register (R6) and the register (R7) to the ALU 107.
8). The ALU 107 adds the value of the register (R6) and the value of the register (R7) and outputs the result to the register file 106.
9. The register file 106 stores the input value in the register (R8). At this time, the value of the register (R8) is 00E77200 representing 948000, which is the result of adding the value 00C83200 representing 820,000 and the value 001F4000 representing 128000.
10. The incrementer 110 adds “1” to the value of the program counter 109.

“ADD.L R8,R6,R7”命令が実行されることにより、レジスタR6に記憶された値00C83200と、レジスタR7に記憶された値001F4000とが加算され、加算結果である値00E77200がレジスタR8に記憶される。
このように動作することで、例えば整数部20ビット小数部4ビットの4ビットシフト固定小数点形式の数字を扱うためには、従来、図4に示すように、2ワード分の長さを要する32ビット型の定数値を扱う命令(LD.L)を使う必要があり、その分命令語が長くなっていたところ、本発明においては、図2に示すように、より短い表現形式の命令(16ビット型等)を用いることができる。
By executing the “ADD.L R8, R6, R7” instruction, the value 00C83200 stored in the register R6 and the value 001F4000 stored in the register R7 are added, and the value 00E77200 as the addition result is stored in the register R8. Is remembered.
By operating in this way, for example, in order to handle a number in a 4-bit shift fixed-point format with an integer part 20 bits and a decimal part 4 bits, conventionally, as shown in FIG. Since it is necessary to use an instruction (LD.L) that handles a bit-type constant value, and the instruction word becomes longer by that amount, in the present invention, as shown in FIG. Bit type etc.) can be used.

即ち、上述のFMT命令を用いることで、本来は16ビット長では表現しきれないような小さすぎる値(前半の4命令)や大きすぎる値(後半の4命令)を、引数変換回路105が4ビットシフト固定小数点形式の32ビット長の値に変換する。その結果、より短い、1ワード分の長さで済む16ビット型の定数値を扱う命令(LD.W)を使用できるようになり、全体の命令の長さを短くすることができる。   That is, by using the above-described FMT instruction, the argument conversion circuit 105 generates a value that is too small (four instructions in the first half) or a value that is too large (four instructions in the second half) that cannot be expressed in 16-bit length. Convert to 32-bit value in bit-shifted fixed-point format. As a result, it is possible to use a shorter instruction (LD.W) that handles a 16-bit constant value that only requires a length of one word, and the overall instruction length can be reduced.

以上のように、本実施形態に係る情報処理装置1においては、CPU8内に数値の表現形式を示す値を記憶する数値表現形式記憶回路104と、その数値表現形式に適合する形式に命令の引数を変換する引数変換回路105とを備えている。そして、データ長の異なる命令、例えば、文字画像を描画する処理における1画素未満の詳細な座標計算を行う命令(上記第2行から第4行の命令)と広範囲の座標計算を行う命令(上記第6行から第8行の命令)とを取り扱う場合に、数値表現形式を指定する命令を実行することにより、CPU8の動作を切り換える。即ち、上記第2行から第4行の命令を実行するのに先立ち、数値表現形式を1画素未満の座標計算に適合させるための上記第1行の命令を実行し、上記第6行から第8行の命令を実行するのに先立ち、数値表現形式を広範囲の座標計算に適合させるための上記第5行の命令を実行することにより、CPU8における引数の解釈の変更および引数のデータ長の変換が行われる。   As described above, in the information processing apparatus 1 according to the present embodiment, the numeric expression format storage circuit 104 that stores a value indicating the numeric expression format in the CPU 8, and the instruction argument in a format that conforms to the numeric expression format And an argument conversion circuit 105 for converting. An instruction having a different data length, for example, an instruction for performing detailed coordinate calculation of less than one pixel in the process of drawing a character image (instructions on the second to fourth lines) and an instruction for performing a wide range of coordinate calculations (above described above) When the instructions from the sixth line to the eighth line) are handled, the operation of the CPU 8 is switched by executing the instruction designating the numerical expression format. That is, prior to executing the instructions from the second line to the fourth line, the instruction of the first line for adapting the numerical expression format to the coordinate calculation of less than one pixel is executed. Prior to the execution of the 8-line instruction, the interpretation of the argument in the CPU 8 and the conversion of the argument data length are performed by executing the instruction in the fifth line for adapting the numerical expression format to a wide range of coordinate calculations. Is done.

したがって、データ長の異なる命令を取り扱う場合に、より短いデータ長を扱う命令を使用できるようになり、命令データ長を短くすることができると共に、CPU8内において数値表現形式の管理およびデータ長の変換を行うことができるため、高速な処理を行うことが可能となる。
即ち、本実施形態に係る情報処理装置1によれば、データ長の異なる命令を効率的に処理することが可能となり、命令を記憶するためのメモリ領域を削減することでメモリコストを削減し、また、命令を読み出す際のメモリアクセス回数の減少によって消費電力を削減することができる。
Therefore, when handling instructions having different data lengths, it becomes possible to use an instruction that handles a shorter data length, the instruction data length can be shortened, and the numeric expression format is managed and the data length is converted in the CPU 8. Therefore, high-speed processing can be performed.
That is, according to the information processing apparatus 1 according to the present embodiment, it is possible to efficiently process instructions having different data lengths, and it is possible to reduce the memory cost by reducing the memory area for storing the instructions. Further, power consumption can be reduced by reducing the number of memory accesses when reading an instruction.

<第2実施形態>
本実施形態に係る情報処理装置は、第1実施形態における情報処理装置の機能を、プロセッサ構造を汎用なものとしたまま、ソフトウェアによって実現するものである。
本実施形態における情報処理装置は、プロセッサとして汎用のものを用いる(即ち、第1実施形態における数値表現形式記憶回路104および引数変換回路105を備えていない)点を除き、情報処理装置全体の構成は第1実施形態と同様である。
したがって、第1実施形態における図1を参照して説明することとする。
なお、図1において、CPU8の構成以外については第1実施形態と同様であるため、CPU8の構成を主として説明する。
Second Embodiment
The information processing apparatus according to the present embodiment realizes the functions of the information processing apparatus according to the first embodiment by software while maintaining a general-purpose processor structure.
The information processing apparatus according to the present embodiment is a general configuration of the information processing apparatus except that a general-purpose processor is used (that is, the numerical expression format storage circuit 104 and the argument conversion circuit 105 in the first embodiment are not provided). Is the same as in the first embodiment.
Therefore, it will be described with reference to FIG. 1 in the first embodiment.
In FIG. 1, since the configuration other than the CPU 8 is the same as that of the first embodiment, the configuration of the CPU 8 will be mainly described.

CPU8は、外部記憶6に格納されている各種プログラムを読み込み、それらをメモリ4内に形成されるワークエリアに展開して各部2〜12を制御する。
具体的には、CPU8は、入力手段2から文字の描画指示が出力されると、文字描画処理を実行する。そして、文字描画処理によって、その文字の文字コードに基づいて描画命令データ(前記文字を構成する各要素それぞれを描画するための複数のニーモニック(命令と当該命令に付随する引数との組み合わせを示すデータ)からなるデータ、所定の順番でニーモニックが並べられたデータ)を取得し、その描画命令データからニーモニックを前記所定の順序に従って1つずつ取得し、そのニーモニックに基づいて、前記描画指示があった文字のビットマップを生成する。
The CPU 8 reads various programs stored in the external storage 6, develops them into a work area formed in the memory 4, and controls the units 2 to 12.
Specifically, the CPU 8 executes a character drawing process when a character drawing instruction is output from the input unit 2. Then, by the character drawing process, drawing command data (data indicating a combination of a plurality of mnemonics for drawing each element constituting the character and an argument attached to the command) based on the character code of the character. ), Data in which a mnemonic is arranged in a predetermined order), and mnemonics are acquired one by one from the drawing command data according to the predetermined order, and the drawing instruction is based on the mnemonic Generate a bitmap of characters.

また、CPU8は、描画モードを設定するためのニーモニック(モード設定用ニーモニック)が取得された場合には、そのモード設定用ニーモニックに従って、後に取得される前記描画指示があった文字を構成する各要素に対応するニーモニック(要素対応ニーモニック)に含まれる座標値(ビット列)の取り扱い方法を設定する。
すなわち、描画命令データを構成するニーモニックは、モード設定用ニーモニックの後に、その描画モードに従って座標値を取り扱わせるニーモニックが配されている。モード設定用ニーモニックによって設定された描画モードは、メモリ4における所定の変数値として格納される。
Further, when a mnemonic (mode setting mnemonic) for setting the drawing mode is acquired, the CPU 8 configures each element constituting the character for which the drawing instruction is acquired later according to the mode setting mnemonic. The method of handling coordinate values (bit strings) included in the mnemonic corresponding to (element corresponding mnemonic) is set.
That is, the mnemonic constituting the drawing command data is provided with a mnemonic for handling coordinate values according to the drawing mode after the mode setting mnemonic. The drawing mode set by the mode setting mnemonic is stored as a predetermined variable value in the memory 4.

ここで、モード設定用ニーモニックとしては、図5に示すように、ChangeRelInt、ChangeRelFix、ChangeAbsInt、及びChangeAbsFixが挙げられる。
ChangeRelIntは、要素対応ニーモニックの座標値を、直前に描画された要素の終点の座標値との相対座標を整数形式(整数部のみを含む形式)で表現したものとして扱うことを指示する。
Here, the mode setting mnemonics include ChangeRelInt, ChangeRelFix, ChangeAbsInt, and ChangeAbsFix, as shown in FIG.
ChangeRelInt instructs to treat the coordinate value of the element-corresponding mnemonic as a relative coordinate with the coordinate value of the end point of the element drawn immediately before in the integer format (a format including only the integer part).

ChangeRelFixは、要素対応ニーモニックの座標値を、直前に描画された要素の終点の座標値との相対座標を小数形式(整数部と小数部との両方を含む形式)で表現したものとして扱うことを指示する。
ChangeAbsIntは、要素対応ニーモニックの座標値を、絶対座標を整数形式で表現したものとして扱うことを指示する。
ChangeRelFix treats the coordinate value of the element-corresponding mnemonic as a relative coordinate with the coordinate value of the end point of the element drawn immediately before in the decimal format (a format that includes both the integer part and the decimal part). Instruct.
ChangeAbsInt instructs to handle the coordinate value of the element corresponding mnemonic as an absolute coordinate expressed in integer form.

ChangeAbsFixは、要素対応ニーモニックの座標値を、絶対座標を小数形式で表現したものとして扱うことを指示する。
なお、図5において、EndOfCodeは、描画命令データを構成する最後のニーモニックであることを示すコードである。
また、要素対応ニーモニックとしては、図6〜図9に示すように、MoveTo_S、MoveTo_M、MoveTo_L、HorLineTo_S、HorLineTo_M、HorLineTo_L、VerLineTo_S、VerLineTo_M、VerLineTo_L、LineTo_S、LineTo_M、LineTo_L、ConicCurveTo_S、ConicCurveTo_M、ConicCurveTo_L、CubicCurveTo_S、CubicCurveTo_M、及びCubicCurveTo_Lが挙げられる。
ChangeAbsFix indicates that the coordinate value of the element-corresponding mnemonic is handled as a representation of absolute coordinates in decimal format.
In FIG. 5, EndOfCode is a code indicating that it is the last mnemonic constituting the drawing command data.
As shown in FIGS. 6 to 9, the element-corresponding mnemonics include MoveTo_S, MoveTo_M, MoveTo_L, HorLineTo_S, HorLineTo_M, HorLineTo_L, VerLineTo_S, VerLineTo_M, VerLineTo_L, LineTo_S, LineTo_L, ConicCveTo, LTo CubicCurveTo_M and CubicCurveTo_L.

MoveTo_S、MoveTo_M及びMoveTo_Lは、引数の数(2)及び座標値(X1、Y1)を含むコードである。そして、最後に読み込まれたモード設定用ニーモニックがChangeRelInt 又はChangeRelFixである場合には、直前に描画された要素の終点からの相対座標が座標値(X1,Y2)となる点に移動することを指示する。また、最後に読み込まれたモード設定用ニーモニックがChangeAbsInt 又はChangeAbsFixである場合には、絶対座標系で座標値(X1,Y2)に移動することを指示する。
なお、本実施形態では、表示体10の左上隅に絶対座標の原点が設定され、平面視右方向にX軸が形成され、平面視下方向にY軸が形成される。
MoveTo_S, MoveTo_M, and MoveTo_L are codes including the number of arguments (2) and coordinate values (X1, Y1). When the last read mode setting mnemonic is ChangeRelInt or ChangeRelFix, it is instructed to move to the point where the relative coordinates from the end point of the element drawn immediately before are the coordinate values (X1, Y2) To do. When the mode setting mnemonic read last is ChangeAbsInt or ChangeAbsFix, it is instructed to move to the coordinate value (X1, Y2) in the absolute coordinate system.
In the present embodiment, the origin of absolute coordinates is set at the upper left corner of the display body 10, the X axis is formed in the right direction in plan view, and the Y axis is formed in the down direction in plan view.

HorLineTo_S、HorLineTo_M及びHorLineTo_Lは、引数の数(1)及びX方向の座標値X1を含むコードである。そして、最後に読み込まれたモード設定用ニーモニックがChangeRelInt 又はChangeRelFixである場合には、直前に描画された要素の終点を始点とし、その始点からX方向に長さX1の水平線を描画することを指示する。また、最後に読み込まれたモード設定用ニーモニックがChangeAbsInt 又はChangeAbsFixである場合には、直前に描画された要素の終点を始点とし、その始点とY座標が等しく且つX座標値がX1となる点を終点とする水平線を描画することを指示する。   HorLineTo_S, HorLineTo_M, and HorLineTo_L are codes including the number of arguments (1) and the coordinate value X1 in the X direction. If the last read mode setting mnemonic is ChangeRelInt or ChangeRelFix, it is instructed to draw a horizontal line of length X1 in the X direction from the start point of the last drawn element as the start point To do. If the last read mode setting mnemonic is ChangeAbsInt or ChangeAbsFix, the end point of the element drawn immediately before is the start point, the start point is the same as the Y coordinate, and the X coordinate value is X1. Instructs to draw a horizontal line as the end point.

VerLineTo_S、VerLineTo_M及びVerLineTo_Lは、引数の数(1)及びY方向の座標値Y1を含むコードである。そして、最後に読み込まれたモード設定用ニーモニックがChangeRelInt 又はChangeRelFixである場合には、直前に描画された要素の終点を始点とし、その始点からY方向に長さY1の垂直線を描画することを指示する。また、最後に読み込まれたモード設定用ニーモニックがChangeAbsInt 又はChangeAbsFixである場合には、直前に描画された要素の終点を始点とし、その始点とX座標が等しく且つY座標値がY1となる点を終点とする垂直線を描画することを指示する。   VerLineTo_S, VerLineTo_M, and VerLineTo_L are codes including the number of arguments (1) and the coordinate value Y1 in the Y direction. If the last read mnemonic for mode setting is ChangeRelInt or ChangeRelFix, start the end point of the element drawn immediately before, and draw a vertical line of length Y1 from the start point in the Y direction. Instruct. When the last read mode setting mnemonic is ChangeAbsInt or ChangeAbsFix, the end point of the element drawn immediately before is the start point, the start point is the same as the X coordinate, and the Y coordinate value is Y1. Instructs to draw a vertical line as the end point.

LineTo_S、LineTo_M及びLineTo_Lは、引数の数(2)及び1つの座標値(X1、Y1)を含むコードである。そして、最後に読み込まれたモード設定用ニーモニックがChangeRelInt 又はChangeRelFixである場合には、直前に描画された要素の終点を始点とし、その始点からの相対座標が座標値(X1、Y1)となる点を終点とする直線を描画することを指示する。また、最後に読み込まれたモード設定用ニーモニックがChangeAbsInt 又はChangeAbsFixである場合には、直前に描画された要素の終点を始点とし、座標値(X1、Y1)を終点とする直線を描画することを指示する。   LineTo_S, LineTo_M, and LineTo_L are codes including the number of arguments (2) and one coordinate value (X1, Y1). When the last read mode setting mnemonic is ChangeRelInt or ChangeRelFix, the starting point is the end point of the element drawn immediately before, and the relative coordinates from the starting point are the coordinate values (X1, Y1). To draw a straight line with the end point. If the last read mode setting mnemonic is ChangeAbsInt or ChangeAbsFix, draw a straight line with the end point of the element drawn immediately before as the start point and the coordinate value (X1, Y1) as the end point. Instruct.

ConicCurveTo_S、ConicCurveTo_M及びConicCurveTo_Lは、引数の数(4)及び座標値(X1、Y1)(X2、Y2)を含むコードである。そして、最後に読み込まれたモード設定用ニーモニックがChangeRelInt 又はChangeRelFixである場合には、直前に描画された要素の終点を始点とし、その始点からの相対座標が座標値(X1、Y1)となる点を制御点とし、前記制御点からの相対座標が座標値(X2、Y2)となる点を終点とする2次ベジエ曲線を描画することを指示する。また、最後に読み込まれたモード設定用ニーモニックがChangeAbsInt 又はChangeAbsFixである場合には、直前に描画された要素の終点を始点とし、座標値(X1、Y1)を制御点とし、座標値(X2、Y2)を終点とする2次ベジエ曲線を描画することを指示する。   ConicCurveTo_S, ConicCurveTo_M and ConicCurveTo_L are codes including the number of arguments (4) and coordinate values (X1, Y1) (X2, Y2). When the last read mode setting mnemonic is ChangeRelInt or ChangeRelFix, the starting point is the end point of the element drawn immediately before, and the relative coordinates from the starting point are the coordinate values (X1, Y1). Is designated as a control point, and it is instructed to draw a quadratic Bezier curve whose end point is a point whose relative coordinates from the control point are coordinate values (X2, Y2). When the last read mode setting mnemonic is ChangeAbsInt or ChangeAbsFix, the end point of the element drawn immediately before is used as the start point, the coordinate values (X1, Y1) are used as control points, and the coordinate values (X2, Instructs to draw a quadratic Bezier curve with Y2) as the end point.

CubicCurveTo_S、CubicCurveTo_M及びCubicCurveTo_Lは、引数の数(6)及び座標値(X1、Y1)(X2、Y2)(X3、Y3)を含むコードである。そして、最後に読み込まれたモード設定用ニーモニックがChangeRelInt 又はChangeRelFixである場合には、直前に描画された要素の終点を始点とし、その始点からの相対座標が座標値(X1、Y1)となる点を第一制御点とし、前記第一制御点からの相対座標が座標値(X2、Y2)となる点を第二制御点とし、前記第二制御点からの相対座標が座標値(X3、Y3)となる点を終点とする3次ベジエ曲線を描画することを指示する。また、最後に読み込まれたモード設定用ニーモニックがChangeAbsInt 又はChangeAbsFixである場合には、直前に描画された要素の終点を始点とし、座標値(X1、Y1)を第一制御点とし、座標値(X2、Y2)を第二制御点とし、(X3、Y3)を終点とする3次ベジエ曲線を描画することを指示する。   CubicCurveTo_S, CubicCurveTo_M, and CubicCurveTo_L are codes including the number of arguments (6) and coordinate values (X1, Y1) (X2, Y2) (X3, Y3). When the last read mode setting mnemonic is ChangeRelInt or ChangeRelFix, the starting point is the end point of the element drawn immediately before, and the relative coordinates from the starting point are the coordinate values (X1, Y1). Is a first control point, a point at which the relative coordinate from the first control point is a coordinate value (X2, Y2) is a second control point, and the relative coordinate from the second control point is a coordinate value (X3, Y3). Instructs to draw a cubic Bezier curve whose end point is a point. When the last read mode setting mnemonic is ChangeAbsInt or ChangeAbsFix, the end point of the element drawn immediately before is the start point, the coordinate values (X1, Y1) are the first control points, and the coordinate value ( It is instructed to draw a cubic Bezier curve having X2, Y2) as the second control point and (X3, Y3) as the end point.

また、MoveTo_S、HorLineTo_S、VerLineTo_S、LineTo_S、ConicCurveTo_S、CubicCurveTo_Sにあっては、最後に読み込まれたモード設定用ニーモニックがChangeRelInt又はChangeAbsIntである場合には、座標値として7ビットのビット列を用いている。また、最後に読み込まれたモード設定用ニーモニックがChangeRelFix又はChangeAbsFixである場合には、座標値として整数部分に3ビットのビット列を用い且つ小数部分に4ビットのビット列を用いている。   For MoveTo_S, HorLineTo_S, VerLineTo_S, LineTo_S, ConicCurveTo_S, and CubicCurveTo_S, if the mode setting mnemonic read last is ChangeRelInt or ChangeAbsInt, a 7-bit bit string is used as the coordinate value. When the mode setting mnemonic read last is ChangeRelFix or ChangeAbsFix, a 3-bit bit string is used for the integer part and a 4-bit bit string is used for the decimal part as coordinate values.

MoveTo_M、HorLineTo_M、VerLineTo_M、LineTo_M、ConicCurveTo_M、CubicCurveTo_Mは、最後に読み込まれたモード設定用ニーモニックがChangeRelInt又はChangeAbsIntである場合には、座標値として10ビットのビット列を用いている。また、最後に読み込まれたモード設定用ニーモニックがChangeRelFix又はChangeAbsFixである場合には、座標値として整数部分に6ビットのビット列を用い且つ小数部分に4ビットのビット列を用いている。   MoveTo_M, HorLineTo_M, VerLineTo_M, LineTo_M, ConicCurveTo_M, and CubicCurveTo_M use a 10-bit bit string as a coordinate value when the last-read mode setting mnemonic is ChangeRelInt or ChangeAbsInt. When the mode setting mnemonic read last is ChangeRelFix or ChangeAbsFix, a 6-bit bit string is used as an integer part and a 4-bit bit string is used as a decimal part as coordinate values.

MoveTo_L、HorLineTo_L、VerLineTo_L、LineTo_L、ConicCurveTo_L及びCubicCurveTo_Lは、最後に読み込まれたモード設定用ニーモニックがChangeRelInt又はChangeAbsIntである場合には、座標値として16ビットのビット列を用いている。また、最後に読み込まれたモード設定用ニーモニックがChangeRelFix又はChangeAbsFixである場合には、座標値として整数部分に20ビットのビット列を用い且つ小数部分に4ビットのビット列を用いている。   MoveTo_L, HorLineTo_L, VerLineTo_L, LineTo_L, ConicCurveTo_L, and CubicCurveTo_L use a 16-bit bit string as the coordinate value when the last-read mode setting mnemonic is ChangeRelInt or ChangeAbsInt. When the mode setting mnemonic read last is ChangeRelFix or ChangeAbsFix, a 20-bit bit string is used as the coordinate part and a 4-bit bit string is used as the decimal part.

<CPUの動作>
次に、CPU8で実行される文字描画処理を図10のフローチャートに基づいて説明する。
この文字描画処理は、文字の描画指示があると実行される処理であって、まず、そのステップS101で、前記描画指示された文字の文字コードを取得し、その文字コードをフォントデータのインデックスに変換する。
<CPU operation>
Next, the character drawing process executed by the CPU 8 will be described based on the flowchart of FIG.
This character drawing process is executed when a character drawing instruction is issued. First, in step S101, the character code of the character instructed to be drawn is acquired, and the character code is used as an index of font data. Convert.

次にステップS102に移行して、前記ステップS101で変換されたインデックスに基づいて描画命令データ(所定の順番に従って並べられた、複数のニーモニックからなるデータ)を取得する。
次にステップS103に移行して、前記ステップS102で取得された描画命令データに基づいて、前記描画指示があった文字のビットマップを生成するビットマップ生成処理(後述)を実行してから、この演算処理を終了する。
Next, the process proceeds to step S102, where drawing command data (data composed of a plurality of mnemonics arranged in a predetermined order) is acquired based on the index converted in step S101.
Next, the process proceeds to step S103, and after executing a bitmap generation process (described later) for generating a bitmap of the character for which the rendering instruction has been given based on the rendering command data acquired in step S102, The computation process ends.

次に、前記文字描画処理のステップS103で実行されるビットマップ生成処理を図11のフローチャートに基づいて説明する。
このビットマップ生成処理は、まず、そのステップS201で、処理対象である画素を示す座標値(現在座標値)vを(0、0)とする。
次にステップS202に移行して、描画モードを示すパラメータModeを(Rel、Int)(モード設定用ニーモニックChanegeRelIntが読み込まれた状態)とする。
Next, the bitmap generation process executed in step S103 of the character drawing process will be described based on the flowchart of FIG.
In this bitmap generation process, first, in step S201, the coordinate value (current coordinate value) v indicating the pixel to be processed is set to (0, 0).
In step S202, the parameter Mode indicating the drawing mode is set to (Rel, Int) (a state in which the mode setting mnemonic “ChangeRelInt” is read).

次にステップS203に移行して、前記ステップS102で取得された描画命令データからニーモニックを所定の順番に従って1つ取得する。
次にステップS204に移行して、前記ステップS203で取得されたニーモニックがEndOfCodeであるか否かを判定する。そして、EndOfCodeである場合には(Yes)ステップS206に移行し、EndOfCodeでない場合には(No)ステップS205に移行する。
In step S203, one mnemonic is acquired in accordance with a predetermined order from the drawing command data acquired in step S102.
In step S204, it is determined whether the mnemonic acquired in step S203 is EndOfCode. If it is EndOfCode (Yes), the process proceeds to step S206. If it is not EndOfCode (No), the process proceeds to step S205.

前記ステップS205では、前記ステップS203で取得されたニーモニックに基づいて、前記描画指示があった文字の輪郭を示す輪郭データを生成する輪郭データ生成処理(後述)を実行してから、前記ステップS203に移行する。
一方、前記ステップS206では、前記ステップS205で生成された輪郭データに基づいて、前記描画指示があった文字のビットマップを生成してから、この演算処理を終了する。
In step S205, based on the mnemonic acquired in step S203, outline data generation processing (described later) for generating outline data indicating the outline of the character for which the drawing instruction has been given is executed, and then in step S203. Transition.
On the other hand, in step S206, a bit map of the character for which the drawing instruction has been given is generated based on the contour data generated in step S205, and then the calculation process is terminated.

次に、前記ビットマップ生成処理のステップS205で実行される輪郭データ生成処理を図12のフローチャートに基づいて説明する。
この輪郭データ生成処理は、まず、そのステップS301で、前記ステップS203で取得されたニーモニックがChangeRelInt、ChangeRelFix、ChangeAbsInt、ChangeAbsFix、及びEndOfCodeのいずれかであるか否かを判定する。そして、ChangeRelInt等のいずれかである場合には(Yes)ステップS302に移行し、ChangeRelInt等のいずれでもない場合には(No)ステップS303に移行する。
Next, the contour data generation process executed in step S205 of the bitmap generation process will be described based on the flowchart of FIG.
In this contour data generation process, first, in step S301, it is determined whether or not the mnemonic acquired in step S203 is any one of ChangeRelInt, ChangeRelFix, ChangeAbsInt, ChangeAbsFix, and EndOfCode. If it is any of ChangeRelInt or the like (Yes), the process proceeds to step S302, and if it is not any of ChangeRelInt or the like (No), the process proceeds to step S303.

前記ステップS302では、前記ステップS203で取得されたニーモニックに応じてパラメータModeを設定してから、この演算処理を終了する。
一方、前記ステップS303では、前記ステップS203で取得されたニーモニックから引数の数を取得し、座標値の数を示すパラメータargnumとする。
次にステップS304に移行して、前記ステップS303で設定されたパラメータargnumが「0」であるか否かを判定する。そして、「0」である場合には(Yes)ステップS313に移行し、「0」でない場合には(No)ステップS305に移行する。
In step S302, the parameter Mode is set according to the mnemonic acquired in step S203, and then the calculation process is terminated.
On the other hand, in step S303, the number of arguments is acquired from the mnemonic acquired in step S203, and set as a parameter argnum indicating the number of coordinate values.
In step S304, it is determined whether the parameter argnum set in step S303 is “0”. If it is “0” (Yes), the process proceeds to step S313. If it is not “0” (No), the process proceeds to step S305.

前記ステップS305では、前記ステップS203で取得されたニーモニックから座標値を所定の順番に従って1つ取得する。
次にステップS306に移行して、前記ステップS302で設定されたModeにIntが含まれるか否かを判定する。そして、Intが含まれる場合には(Yes)ステップS307に移行し、Intが含まれない場合には(No)ステップS308に移行する。
In step S305, one coordinate value is acquired from the mnemonic acquired in step S203 in a predetermined order.
Next, the process proceeds to step S306, and it is determined whether or not Int is included in the Mode set in step S302. If Int is included (Yes), the process proceeds to step S307. If Int is not included (No), the process proceeds to step S308.

前記ステップS307では、前記ステップS305で取得された座標値(ビット列)を整数値dに変換してから、ステップS309に移行する。
一方、前記ステップS307では、前記ステップS305で取得された座標値を小数値dに変換してから、前記ステップS309に移行する。
前記ステップS309では、前記ステップS302で設定されたModeにRelが含まれるか否かを判定する。そして、Relが含まれる場合には(Yes)ステップS310に移行し、Relが含まれていない場合には(No)ステップS311に移行する。
In step S307, the coordinate value (bit string) acquired in step S305 is converted into an integer value d, and then the process proceeds to step S309.
On the other hand, in step S307, the coordinate value acquired in step S305 is converted into a decimal value d, and then the process proceeds to step S309.
In step S309, it is determined whether or not Rel is included in the Mode set in step S302. If Rel is included (Yes), the process proceeds to step S310. If Rel is not included (No), the process proceeds to step S311.

前記ステップS310では、前記ステップS307又はS308で変換された座標値dをそれまでの現在座標値vに加算して、新しい現在座標値vを算出してから、ステップS312に移行する。
一方、前記ステップS311では、前記ステップS307又はS308で変換された座標値dを新しい現在座標値vとしてから、前記ステップS312に移行する。
In step S310, the coordinate value d converted in step S307 or S308 is added to the current coordinate value v so far to calculate a new current coordinate value v, and then the process proceeds to step S312.
On the other hand, in step S311, the coordinate value d converted in step S307 or S308 is set as a new current coordinate value v, and then the process proceeds to step S312.

前記ステップS312では、パラメータargnumから「1」を減算して、新しいargnumを算出してから、前記ステップS304に移行する。
一方、前記ステップS313では、前記ステップS310又はS311で順次設定された現在座標値vに基づいて、前記描画指示のあった文字の輪郭データを生成してから、この演算処理を終了する。
なお、前記ステップS203で取得されたニーモニックにMoveToが含まれる場合には、座標値の計算だけを行い、文字の輪郭データは生成しない。
In step S312, "1" is subtracted from the parameter argnum to calculate a new argnum, and then the process proceeds to step S304.
On the other hand, in step S313, based on the current coordinate value v sequentially set in step S310 or S311, the outline data of the character for which the drawing instruction has been given is generated, and then this calculation process is terminated.
When MoveTo is included in the mnemonic acquired in step S203, only the coordinate value is calculated, and no character outline data is generated.

<情報処理装置の動作>
次に、本実施形態の情報処理装置1の動作を具体的状況に基づいて説明する。
まず、利用者が文字の描画を指示する操作を行い、入力手段2によって、文字の描画指示がCPU8に出力されたとする。すると、CPU8によって、文字描画処理が実行され、図10に示すように、まず、そのステップS101で、前記描画指示された文字の文字コードが取得され、その文字コードがフォントデータのインデックスに変換され、ステップS102で、そのインデックスに基づいて描画命令データが取得され、ステップS103で、その描画命令データに基づいてビットマップ生成処理を実行される。
<Operation of information processing apparatus>
Next, the operation of the information processing apparatus 1 according to the present embodiment will be described based on a specific situation.
First, it is assumed that the user performs an operation for instructing the drawing of characters, and the input unit 2 outputs a character drawing instruction to the CPU 8. Then, a character drawing process is executed by the CPU 8, and as shown in FIG. 10, first, in step S101, the character code of the character instructed to be drawn is acquired, and the character code is converted into an index of font data. In step S102, drawing command data is acquired based on the index, and in step S103, bitmap generation processing is executed based on the drawing command data.

ビットマップ生成処理が実行されると、図11に示すように、まず、そのステップS201で、処理対象である画素を示す座標値(現在座標値)vが(0、0)とされ、ステップS202で、描画モードを示すパラメータModeが(Rel、Int)とされ、ステップS203で、前記取得された描画命令データからニーモニックが所定の順番に従って1つ取得され、ステップS204の判定が「No」となり、ステップS205で、前記取得されたニーモニックに基づいて輪郭データ生成処理が実行される。   When the bitmap generation processing is executed, as shown in FIG. 11, first, in step S201, the coordinate value (current coordinate value) v indicating the pixel to be processed is set to (0, 0), and step S202. Then, the parameter Mode indicating the drawing mode is set to (Rel, Int), and in step S203, one mnemonic is acquired from the acquired drawing command data in a predetermined order, and the determination in step S204 is “No”. In step S205, contour data generation processing is executed based on the acquired mnemonic.

図13に示すように、前記取得されたニーモニックがChangeRelIntであった場合、輪郭データ生成処理が実行されると、図12に示すように、まず、そのステップS301の判定が「Yes」となり、ステップS302で、前記取得されたニーモニックに応じてパラメータMode(Rel、Int)が設定された後、この演算処理を終了する。
そして、前記ステップS203及びS204を経て、次のニーモニックが取得され、前記ステップS205で、そのニーモニックに基づいて輪郭データ生成処理が実行される。
As shown in FIG. 13, when the acquired mnemonic is ChangeRelInt, when the contour data generation process is executed, first, as shown in FIG. 12, the determination in step S301 is “Yes”. In S302, the parameter Mode (Rel, Int) is set in accordance with the acquired mnemonic, and then the calculation process is terminated.
Then, the next mnemonic is acquired through the steps S203 and S204, and the contour data generation process is executed based on the mnemonic in the step S205.

前記取得されたニーモニックがMoveTo_Sであった場合、輪郭データ生成処理が実行されると、図12に示すように、前記ステップS301の判定が「No」となり、ステップS303で、前記取得されたニーモニックから引数の数(2)が取得され、座標値の数を示すパラメータargnumとされ、ステップS304の判定が「No」となり、ステップS305で、前記取得されたニーモニックから座標値が所定の順番に従って1つ取得され、ステップS306の判定が「Yes」となり、ステップS307で、前記取得された座標値が整数値dに変換され、ステップS309の判定が「Yes」となり、ステップS310で、前記変換された座標値dがそれまでの現在座標値vに加算され、新しい現在座標値vが算出され、ステップS312で、パラメータargnum(1)から「1」が減算され、新しいargnum(0)が算出され、前記ステップS304の判定が「Yes」となり、ステップS313を経た後、この演算処理を終了する。   When the acquired mnemonic is MoveTo_S, when the contour data generation process is executed, the determination in step S301 becomes “No” as shown in FIG. 12, and the acquired mnemonic is determined in step S303. The number of arguments (2) is acquired, and is set as a parameter argnum indicating the number of coordinate values. The determination in step S304 is “No”, and in step S305, one coordinate value is obtained from the acquired mnemonic according to a predetermined order. Is acquired, the determination in step S306 is “Yes”, the acquired coordinate value is converted into an integer value d in step S307, the determination in step S309 is “Yes”, and the converted coordinate is determined in step S310. The value d is added to the current coordinate value v so far, and a new current coordinate value v is calculated. "1" is subtracted from the meter argnum (1), the new argnum (0) is calculated, after the determination of the step S304 has undergone "Yes", the step S313, and ends the operation process.

そして、前記ステップS203及びS204を経て、次のニーモニックが取得され、上記フローが繰り返し実行され、文字の輪郭データが生成される。
上記フローが繰り返されるうちに、EndOfCodeが取得されたとする。すると、前記ステップS204の判定が「Yes」となり、ステップS206で、前記生成された輪郭データに基づいて、前記描画指示があった文字のビットマップが生成される。
そして、表示コントローラ9によって、その生成されたビットマップが表示体10に描画され、前記描画指示された文字が表示体10に表示される。
Then, through the steps S203 and S204, the next mnemonic is acquired, the above flow is repeatedly executed, and character outline data is generated.
Assume that EndOfCode is acquired while the above flow is repeated. Then, the determination in step S204 is “Yes”, and in step S206, a bitmap of the character for which the drawing instruction has been given is generated based on the generated contour data.
Then, the generated bitmap is drawn on the display body 10 by the display controller 9, and the character instructed to be drawn is displayed on the display body 10.

このように、本実施形態の情報処理装置にあっては、ChangeRelInt、ChangeRelFixが取得された場合、後に取得されるニーモニックに含まれる座標値を、直前に描画した要素の終点の座標値との相対座標の形式で表現したものとして扱い、ChangeAbsInt、ChangeAbsFixが取得された場合、後に取得されるニーモニックに含まれる座標値を、絶対座標の形式で表現したものとして扱うようにした。また、ChangeRelInt、ChangeAbsIntが取得された場合、後に取得されるニーモニックに含まれる座標値を、整数部のみで表現したものとして扱い、ChangeRelFix、ChangeAbsFixが取得された場合、後に取得されるニーモニックに含まれる座標値を、整数部と小数部との組で表現したものとして扱うようにした。そのため、ニーモニックに含まれる座標値を相対座標(又は整数部のみ)で表現したものとして取り扱わせるニーモニックと絶対座標(又は整数部と小数部との組)で表現したものとして取り扱わせるニーモニックとで同じニーモニックを用いることができるため、ニーモニックの種類が少なくて済み、その結果、描画命令データの圧縮率を向上することができる。   Thus, in the information processing apparatus according to the present embodiment, when ChangeRelInt and ChangeRelFix are acquired, the coordinate value included in the mnemonic acquired later is relative to the coordinate value of the end point of the element drawn immediately before. Handled as expressed in the coordinate format, and when ChangeAbsInt and ChangeAbsFix were acquired, the coordinate value included in the mnemonic acquired later was handled as expressed in the absolute coordinate format. Also, when ChangeRelInt and ChangeAbsInt are acquired, the coordinate value included in the mnemonic acquired later is handled as expressed only by the integer part, and when ChangeRelFix and ChangeAbsFix are acquired, it is included in the mnemonic acquired later Coordinate values were handled as those expressed as a combination of an integer part and a decimal part. Therefore, the mnemonic that treats the coordinate value included in the mnemonic as expressed in relative coordinates (or only the integer part) and the mnemonic that treats it as expressed in absolute coordinates (or a combination of the integer part and the decimal part) are the same. Since mnemonics can be used, the number of mnemonics can be reduced, and as a result, the compression ratio of the drawing command data can be improved.

なお、図14に示すように、ChangeRelInt等のモード設定用ニーモニックを用いることで描画命令データの累計ビット数は当該モード設定用ニーモニックの分増加するものの、通常、描画モードの変更の頻度は低いため、ビット数の増加量は僅かである。   As shown in FIG. 14, the cumulative number of bits of the drawing command data is increased by the mode setting mnemonic by using a mode setting mnemonic such as ChangeRelInt. However, since the frequency of changing the drawing mode is usually low. The amount of increase in the number of bits is slight.

また、ChangeRelFix、ChangeAbsFixが取得された場合には、ChangeRelInt、ChangeAbsIntが取得された場合に比べ、後に取得されるニーモニックに含まれる座標値を、より多くのビット幅(24ビット)が割り当てられているものとして扱うようにした。そのため、例えば、図形を描画するためのニーモニックの取得前に、ChangeRelFix、ChangeAbsFixを取得させることで、前記ニーモニックに含まれる座標値に24ビットを割り当てることができ、表示体10全体に図形を描画する際に、拡大・縮小率を変更することなく、緻密な描画が可能になる。また、例えば、直線やベジエ曲線を分割せずに済み、その結果、ニーモニックの総数が増えることを防止することができる。   In addition, when ChangeRelFix and ChangeAbsFix are acquired, a larger bit width (24 bits) is assigned to the coordinate values included in the mnemonic acquired later than when ChangeRelInt and ChangeAbsInt are acquired. I treated it as a thing. Therefore, for example, by obtaining ChangeRelFix and ChangeAbsFix before obtaining a mnemonic for drawing a figure, 24 bits can be assigned to the coordinate values included in the mnemonic, and the figure is drawn on the entire display 10. In this case, precise drawing can be performed without changing the enlargement / reduction ratio. For example, it is not necessary to divide a straight line or a Bezier curve, and as a result, it is possible to prevent the total number of mnemonics from increasing.

<描画データの生成方法>
次に、本発明の情報処理装置で利用される描画命令データの生成方法について説明する。
<Drawing data generation method>
Next, a method for generating drawing command data used in the information processing apparatus of the present invention will be described.

<ChangeRelIntによる生成方法>
図15は、ChangeRelIntで描画モードが設定された描画命令データを生成するRelInt描画命令生成処理を示すフローチャートである。
このRelInt描画命令生成処理は、描画命令生成用のコンピュータで実行される処理であって、まず、そのステップS401で、書き込みバッファに格納されているデータを全て破棄する(書き込みバッファをクリアする)。
<Generation method using ChangeRelInt>
FIG. 15 is a flowchart showing RelInt drawing command generation processing for generating drawing command data in which the drawing mode is set by ChangeRelInt.
This RelInt drawing command generation process is a process executed by a drawing command generation computer. First, in step S401, all data stored in the write buffer is discarded (the write buffer is cleared).

次にステップS402に移行して、描画命令データを構成する最初のニーモニックとしてChangeRelIntを格納する。
次にステップS403に移行して、現在座標値vを(0、0)とする。
次にステップS404に移行して、描画命令データの構成に用いるニーモニックが残っているか否かを判定する。そして、残っている場合には(Yes)ステップS405に移行し、残っていない場合には(No)ステップS406に移行する。
In step S402, ChangeRelInt is stored as the first mnemonic constituting the drawing command data.
In step S403, the current coordinate value v is set to (0, 0).
Next, the process proceeds to step S404, and it is determined whether or not there remains a mnemonic used for the configuration of the drawing command data. If it remains (Yes), the process proceeds to step S405. If it does not remain (No), the process proceeds to step S406.

前記ステップS405では、前記ステップS404で残っていると判定されたニーモニックに対応するデータを書き込みバッファに格納するRelInt命令格納処理(後述)を実行してから、前記ステップS404に移行する。
一方、前記ステップS406では、描画命令データを構成する最後のニーモニックとしてEndOfCodeを格納する。
In step S405, a RelInt instruction storage process (described later) for storing data corresponding to the mnemonic determined to remain in step S404 in the write buffer is executed, and then the process proceeds to step S404.
On the other hand, in step S406, EndOfCode is stored as the last mnemonic constituting the drawing command data.

次にステップS407に移行して、前記ステップS405の命令格納処理で書き込みバッファに格納されたデータを、描画命令データを構成する要素として出力してから(書き込みバッファをフラッシュしてから)、この演算処理を終了する。
次に、前記RelInt描画命令生成処理のステップS405で実行されるRelInt命令格納処理を図16のフローチャートに基づいて説明する。
このRelInt命令格納処理は、まず、そのステップS501で、前記ステップS404で残っていると判定されたニーモニックの種類を判定する。
次にステップS502に移行して、変数nを「0」とする。
Next, the process proceeds to step S407, and after the data stored in the write buffer in the instruction storage process of step S405 is output as an element constituting the drawing command data (after the write buffer is flushed), this calculation is performed. The process ends.
Next, the RelInt instruction storage process executed in step S405 of the RelInt drawing instruction generation process will be described based on the flowchart of FIG.
In the RelInt instruction storing process, first, in step S501, the type of mnemonic determined to remain in step S404 is determined.
In step S502, the variable n is set to “0”.

次にステップS503に移行して、前記ステップS501で種類が判定されたニーモニックの引数(例えば、X1、Y1等)を後述するステップS504〜507で全て処理したか否かを判定する。そして、引数を全て処理した場合には(Yes)ステップS508に移行し、全ては処理していない場合には(No)ステップS504に移行する。
次にステップS504に移行して、前記ステップS501で種類が判定されたニーモニックの引数argを取得する。
In step S503, it is determined whether all the mnemonic arguments (eg, X1, Y1, etc.) determined in step S501 have been processed in steps S504 to S507 described later. If all arguments have been processed (Yes), the process proceeds to step S508. If all arguments have not been processed (No), the process proceeds to step S504.
In step S504, the mnemonic argument arg whose type is determined in step S501 is acquired.

次にステップS505に移行して、現在座標値vとの差分d[n]を算出する。
次にステップS506に移行して、前記ステップS504で取得された引数argを新しい現在座標値vとする。
次にステップS507に移行して、変数nに「1」を加算して、新しい変数nを算出してから、前記ステップS503に移行する。
In step S505, a difference d [n] from the current coordinate value v is calculated.
In step S506, the argument arg acquired in step S504 is set as a new current coordinate value v.
Next, the process proceeds to step S507, "1" is added to the variable n to calculate a new variable n, and then the process proceeds to step S503.

一方、前記ステップS508では、引数bit長に対応する命令を取得する。
次にステップS509に移行して、前記ステップS501で判定された種類に応じた命令コードを書き込みバッファに格納させる。
次にステップS510に移行して、前記ステップS505で算出された差分d[n]それぞれを書き込みバッファに格納させる。
On the other hand, in step S508, an instruction corresponding to the argument bit length is acquired.
In step S509, the instruction code corresponding to the type determined in step S501 is stored in the write buffer.
Next, the process proceeds to step S510, and each difference d [n] calculated in step S505 is stored in the write buffer.

次にステップS511に移行して、前記ステップS509又はS510で書き込みバッファに格納されたデータの総量が32ビット以上であるか否かを判定する。そして、32ビット以上である場合には(Yes)ステップS512に移行し、32ビットより少ない場合には(No)この演算処理を終了する。
前記ステップS512では、前記ステップS509又はS510で書き込みバッファに格納されたデータを、描画命令データの構成要素として32ビット分出力してから、前記ステップS511に移行する。
In step S511, it is determined whether the total amount of data stored in the write buffer in step S509 or S510 is 32 bits or more. If it is 32 bits or more (Yes), the process proceeds to step S512, and if it is less than 32 bits (No), this calculation process is terminated.
In step S512, the data stored in the write buffer in step S509 or S510 is output as 32 bits as a component of the drawing command data, and then the process proceeds to step S511.

<ChangeAbsIntによる生成方法>
図17は、ChangeAbsIntで描画モードが設定された描画命令データを生成するAbsInt描画命令生成処理を示すフローチャートである。
このAbsInt描画命令生成処理は、描画命令生成用のコンピュータで実行される処理であって、まず、そのステップS601で、描画命令データを構成する最初のニーモニックとしてChangeAbsIntを格納する。
<Generation method using ChangeAbsInt>
FIG. 17 is a flowchart showing AbsInt drawing command generation processing for generating drawing command data in which the drawing mode is set by ChangeAbsInt.
This AbsInt drawing command generation processing is processing executed by a drawing command generation computer. First, in step S601, ChangeAbsInt is stored as the first mnemonic constituting the drawing command data.

次にステップS602に移行して、描画命令データの構成に用いるニーモニックが残っているか否かを判定する。そして、残っている場合には(Yes)ステップS603に移行し、残っていない場合には(No)ステップS604に移行する。
前記ステップS603では、前記ステップS602で残っていると判定されたニーモニックに対応するデータを書き込みバッファに格納するAbsInt命令格納処理(後述)を実行してから、前記ステップS602に移行する。
Next, the process proceeds to step S602, where it is determined whether or not there remains a mnemonic used for the configuration of the drawing command data. And when it remains (Yes), it transfers to step S603, and when it does not remain (No), it transfers to step S604.
In step S603, an AbsInt instruction storage process (described later) for storing data corresponding to the mnemonic determined to remain in step S602 in the write buffer is executed, and then the process proceeds to step S602.

一方、前記ステップS604では、描画命令データを構成する最後のニーモニックとしてEndOfCodeを格納してから、この演算処理を格納する。
次に、前記AbsInt描画命令生成処理のステップS603で実行されるAbsInt命令格納処理を図18のフローチャートに基づいて説明する。
このAbsInt命令格納処理は、まず、そのステップS701で、前記ステップS602で残っていると判定されたニーモニックの種類を判定する。
On the other hand, in step S604, EndOfCode is stored as the last mnemonic constituting the drawing command data, and then this calculation process is stored.
Next, the AbsInt instruction storage process executed in step S603 of the AbsInt drawing instruction generation process will be described with reference to the flowchart of FIG.
In this AbsInt instruction storing process, first, in step S701, the type of mnemonic determined to remain in step S602 is determined.

次にステップS702に移行して、前記ステップS701で判定された種類に応じた命令コードを書き込みバッファに格納させる。
次にステップS703に移行して、前記ステップS701で種類が判定されたニーモニックの引数(例えば、X1、Y1等)を後述するステップS704、705で全て処理したか否かを判定する。そして、引数を全て処理した場合には(Yes)この演算処理を終了し、全ては処理していない場合には(No)ステップS704に移行する。
In step S702, the instruction code corresponding to the type determined in step S701 is stored in the write buffer.
In step S703, it is determined whether all the mnemonic arguments (for example, X1, Y1, etc.) determined in step S701 have been processed in steps S704 and 705 described later. If all the arguments have been processed (Yes), this calculation process is terminated. If all have not been processed (No), the process proceeds to step S704.

次にステップS704に移行して、前記ステップS701で種類が判定されたニーモニックの引数argを取得する。
次にステップS705に移行して、前記ステップS704で取得された引数argそれぞれを書き込みバッファに格納させてから、前記ステップS703に移行する。
そして、このようなフロー構成とすることにより、RelInt描画命令生成処理或いはChangeAbsInt描画命令生成処理を実行することで、描画命令データとして、モード設定用ニーモニック(ChangeRelInt、ChangeAbsInt)の後に、その描画モードに従って座標値を取り扱わせるニーモニックが配されたものを生成することができる。
In step S704, the mnemonic argument arg whose type is determined in step S701 is acquired.
Next, the process proceeds to step S705, each argument arg acquired in step S704 is stored in the write buffer, and then the process proceeds to step S703.
With this flow configuration, by executing the RelInt drawing instruction generation process or the ChangeAbsInt drawing instruction generation process, after the mode setting mnemonic (ChangeRelInt, ChangeAbsInt) as the drawing instruction data, according to the drawing mode A mnemonic that handles coordinate values can be generated.

なお、上記実施形態では、図12のステップS301及びS302が特許請求の範囲に記載の設定機能を構成し、以下同様に、図12のステップS306〜S311が表示機能を構成し、図1のCPU8、図12のステップS301及びS302が設定手段を構成し、図1のCPU8、表示コントローラ9、表示体10、図12のステップS306〜S311が表示手段を構成する。
また、本発明の表示プログラム、データ構造及び情報処理装置は、上記実施の形態の内容に限定されるものではなく、本発明の趣旨を逸脱しない範囲で適宜変更可能である。
In the above embodiment, steps S301 and S302 in FIG. 12 constitute the setting function described in the claims, and similarly, steps S306 to S311 in FIG. 12 constitute the display function, and the CPU 8 in FIG. 12, steps S301 and S302 constitute the setting means, and the CPU 8, display controller 9, and display body 10 in FIG. 1 and steps S306 to S311 in FIG. 12 constitute the display means.
Further, the display program, data structure, and information processing apparatus of the present invention are not limited to the contents of the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention.

上記実施形態では、モード設定用ニーモニック(ChangeRelInt、ChangeAbsInt等)が取得された場合に、後に取得されるニーモニックに含まれる座標値を相対座標及び絶対座標のいずれかの形式で表現したものとして扱う例を示したが、これに限られるものではない。例えば、描画モードとして、新たに取得された座標値を低圧縮座標指定(ニーモニックの命令ビット長と座標ビット長との合計が8、16、32等、ソフトウェア処理にとって扱いやすいビット数の倍数になるように調整された命令体系)で表現されたものとして扱うモードと、新たに取得された座標値を高圧縮座標指定(低圧縮座標指定以外の命令体系)で表現されたものとして扱うモードとを有し、特定のモード設定用ニーモニックを取得された場合に、後に取得されるニーモニックに含まれる座標値を前記低圧縮座標指定及び前記高圧縮座標指定のいずれかの形式で表現したものとして扱うようにしてもよい。そのようにすれば、低圧縮座標指定を用いることにより、ソフトウェアで動的に命令を生成する際、ビット演算が不要になるため、高速に処理ができるようになる。   In the above embodiment, when a mode setting mnemonic (ChangeRelInt, ChangeAbsInt, etc.) is acquired, an example in which a coordinate value included in a mnemonic acquired later is treated as expressed in either relative coordinate or absolute coordinate format However, the present invention is not limited to this. For example, as a drawing mode, newly acquired coordinate values are designated as low-compressed coordinates (the sum of the mnemonic instruction bit length and coordinate bit length is a multiple of the number of bits easy to handle for software processing, such as 8, 16, 32, etc. A mode that treats a newly acquired coordinate value as if expressed in a high compression coordinate specification (an instruction system other than a low compression coordinate specification). And when a specific mode setting mnemonic is acquired, the coordinate value included in the mnemonic acquired later is treated as being expressed in either the low-compression coordinate specification or the high-compression coordinate specification. It may be. In such a case, by using the low-compression coordinate designation, when an instruction is dynamically generated by software, a bit operation is not required, so that high-speed processing can be performed.

第1実施形態の情報処理装置1の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the information processing apparatus 1 of 1st Embodiment. メモリ4に格納されているプログラムを示す図である。It is a figure which shows the program stored in the memory. CPU8の内部構成を示すブロック図である。2 is a block diagram showing an internal configuration of a CPU 8. FIG. メモリ4に格納されているプログラムの従来における記述形式を示す図である。It is a figure which shows the conventional description format of the program stored in the memory 4. モード設定用ニーモニックを説明するための説明図である。It is explanatory drawing for demonstrating the mnemonic for mode setting. ChangeRelIntが取得された後の要素対応ニーモニックの取り扱いを説明するための説明図である。It is explanatory drawing for demonstrating the handling of the element corresponding | compatible mnemonic after ChangeRelInt is acquired. ChangeAbsIntが取得された後の要素対応ニーモニックの取り扱いを説明するための説明図である。It is explanatory drawing for demonstrating the handling of the element corresponding | compatible mnemonic after ChangeAbsInt is acquired. ChangeRelFixが取得された後の要素対応ニーモニックの取り扱いを説明するための説明図である。It is explanatory drawing for demonstrating the handling of the element corresponding | compatible mnemonic after ChangeRelFix is acquired. ChangeAbsFixが取得された後の要素対応ニーモニックの取り扱いを説明するための説明図である。It is explanatory drawing for demonstrating the handling of the element corresponding | compatible mnemonic after ChangeAbsFix is acquired. 文字描画処理のフローを示すフローチャートである。It is a flowchart which shows the flow of a character drawing process. ビットマップ生成処理のフローを示すフローチャートである。It is a flowchart which shows the flow of a bitmap production | generation process. 輪郭データ生成処理のフローを示すフローチャートである。It is a flowchart which shows the flow of an outline data generation process. 本実施形態の動作を説明するための説明図である。It is explanatory drawing for demonstrating the operation | movement of this embodiment. 本実施形態の動作を説明するための説明図である。It is explanatory drawing for demonstrating the operation | movement of this embodiment. RelInt描画命令生成処理のフローを示すフローチャートである。It is a flowchart which shows the flow of a RelInt drawing command production | generation process. RelInt命令格納処理のフローを示すフローチャートである。It is a flowchart which shows the flow of a RelInt instruction | indication storage process. AbsInt描画命令生成処理のフローを示すフローチャートである。It is a flowchart which shows the flow of an AbsInt drawing command production | generation process. AbsInt命令格納処理のフローを示すフローチャートである。It is a flowchart which shows the flow of AbsInt instruction | indication storage processing.

符号の説明Explanation of symbols

1は情報処理装置、2は入力手段、3は入力手段コントローラ、4はメモリ、5はメモリコントローラ、6は外部記憶、7は外部記憶コントローラ、8はCPU、9は表示コントローラ、10は表示体、11はバスコントローラ、12は電源コントローラ、101は制御回路、102は入力レジスタ、103は命令デコーダ、104は数値表現形式記憶回路、105は引数変換回路、106はレジスタファイル、107はALU、108は出力レジスタ、109はプログラムカウンタ、110はインクリメンタ 1 is an information processing apparatus, 2 is an input means, 3 is an input means controller, 4 is a memory, 5 is a memory controller, 6 is an external storage, 7 is an external storage controller, 8 is a CPU, 9 is a display controller, and 10 is a display body , 11 is a bus controller, 12 is a power supply controller, 101 is a control circuit, 102 is an input register, 103 is an instruction decoder, 104 is a numerical expression storage circuit, 105 is an argument conversion circuit, 106 is a register file, 107 is an ALU, 108 Is an output register, 109 is a program counter, 110 is an incrementer

Claims (6)

メモリに格納された命令をプロセッサが読み出して演算処理する情報処理装置であって、
前記メモリから読み出された命令に含まれる引数のデータ長を設定するデータ長設定手段と、
前記メモリから読み出された命令に含まれる引数を、前記データ長設定手段によって設定されたデータ長に変換するデータ長変換手段と、
を備え、前記プロセッサが、前記データ長変換手段によって変換されたデータ長の引数に対して演算処理を行うことを特徴とする情報処理装置。
An information processing apparatus in which an instruction stored in a memory is read by a processor and processed.
Data length setting means for setting the data length of an argument included in the instruction read from the memory;
A data length conversion means for converting an argument included in the instruction read from the memory into a data length set by the data length setting means;
An information processing apparatus comprising: the processor performing an arithmetic process on an argument having a data length converted by the data length conversion unit.
前記プロセッサ内部に、
演算処理におけるデータ長の設定を記憶する設定データ長記憶回路と、
命令に含まれる引数を、前記データ長設定手段に設定されているデータ長に変換するデータ長変換回路とを備え、
前記データ長設定手段は、前記プロセッサが前記メモリから演算処理におけるデータ長を設定する命令を読み出して実行した場合に、該命令に示されたデータ長を前記データ長記憶回路に記憶し、
前記データ長変換手段は、前記プロセッサが前記メモリから演算処理を行う命令を読み出して実行する場合に、前記データ長変換回路によって、該命令における引数を前記データ長記憶回路に記憶されたデータ長に変換することを特徴とする請求項1記載の情報処理装置。
Inside the processor,
A setting data length storage circuit for storing the setting of the data length in the arithmetic processing;
A data length conversion circuit for converting an argument included in the instruction into a data length set in the data length setting means;
The data length setting means stores the data length indicated in the instruction in the data length storage circuit when the processor reads and executes an instruction for setting the data length in the arithmetic processing from the memory,
When the processor reads and executes an instruction to perform arithmetic processing from the memory, the data length conversion means converts the argument in the instruction into the data length stored in the data length storage circuit by the data length conversion circuit. The information processing apparatus according to claim 1, wherein the information processing apparatus performs conversion.
前記データ長設定手段は、前記プロセッサが前記メモリから演算処理におけるデータ長を設定する命令を読み出して実行した場合に、該命令に示されたデータ長を前記メモリに記憶し、
前記データ長変換手段は、前記プロセッサが前記メモリから演算処理を行う命令を読み出して実行する場合に、前記メモリに記憶されたデータ長を参照し、該命令における引数を該データ長に変換することを特徴とする請求項1記載の情報処理装置。
The data length setting means stores the data length indicated in the instruction in the memory when the processor reads and executes an instruction for setting the data length in the arithmetic processing from the memory,
The data length conversion means refers to a data length stored in the memory and converts an argument in the instruction into the data length when the processor reads and executes an instruction for performing an arithmetic process from the memory. The information processing apparatus according to claim 1.
前記メモリに格納された命令には、所定ビット長の引数のうち、上位ビットおよび下位ビットの一部によって表現される値を引数とする演算処理命令が含まれ、上位ビットの一部によって表現される値を引数とする命令に先行して、該上位ビットの一部によって表現される値を演算処理におけるデータ長とさせるデータ長設定命令が格納されていると共に、下位ビットの一部によって表現される値を引数とする命令に先行して、該下位ビットの一部によって表現される値を演算処理におけるデータ長とさせるデータ長設定命令が格納されており、
前記データ長設定手段は、前記プロセッサが前記データ長設定命令を読み出して実行した場合に、前記上位ビットあるいは下位ビットの一部によって表現される値を変換するデータ長を設定し、
前記データ長変換手段は、前記プロセッサが前記上位ビットあるいは下位ビットの一部によって表現される値を引数とする演算処理命令を読み出して実行する場合に、該演算処理命令に含まれる引数を、シフト処理およびゼロを挿入する処理によって前記データ長設定手段によって設定されたデータ長に変換することを特徴とする請求項1から3のいずれか1項に記載の情報処理装置。
The instruction stored in the memory includes an arithmetic processing instruction whose argument is a value represented by a part of the upper bits and a part of the lower bits among arguments having a predetermined bit length, and is represented by a part of the upper bits. A data length setting instruction for storing a value represented by a part of the upper bits as a data length in the arithmetic processing is stored in advance of an instruction having a value as an argument, and is represented by a part of the lower bits. A data length setting instruction for storing a value represented by a part of the lower bits as a data length in the arithmetic processing is stored in advance of an instruction having a value as an argument.
The data length setting means sets a data length for converting a value represented by the upper bit or a part of the lower bit when the processor reads and executes the data length setting instruction,
The data length converting means shifts an argument included in the arithmetic processing instruction when the processor reads out and executes an arithmetic processing instruction having a value represented by the upper bit or a part of the lower bit as an argument. The information processing apparatus according to any one of claims 1 to 3, wherein the data length is set to the data length set by the data length setting means by a process and a process of inserting zeros.
メモリに格納された命令をプロセッサが読み出して演算処理する情報処理装置を制御するための情報処理プログラムであって、
前記メモリから読み出された命令に含まれる引数のデータ長を設定するデータ長設定機能と、
前記メモリから読み出された命令に含まれる引数を、前記データ長設定機能によって設定されたデータ長に変換するデータ長変換機能と、
を備え、前記プロセッサに、前記データ長変換機能によって変換されたデータ長の引数に対して演算処理を行わせることを特徴とする情報処理プログラム。
An information processing program for controlling an information processing apparatus in which a processor reads an instruction stored in a memory and performs arithmetic processing,
A data length setting function for setting the data length of an argument included in the instruction read from the memory;
A data length conversion function for converting an argument included in the instruction read from the memory into a data length set by the data length setting function;
And an information processing program for causing the processor to perform arithmetic processing on an argument of the data length converted by the data length conversion function.
メモリに格納された命令をプロセッサが読み出して演算処理する情報処理装置における情報処理方法であって、
前記メモリから読み出された命令に含まれる引数のデータ長を設定させるデータ長設定命令を前記プロセッサに実行させるデータ長設定ステップと、
前記メモリから読み出された命令に含まれる引数を、前記データ長設定ステップにおいて設定されたデータ長に変換させるデータ長変換ステップと、
前記プロセッサが、前記データ長変換手段によって変換されたデータ長の引数に対して演算処理を行う演算処理ステップと、
を含むことを特徴とする情報処理方法。
An information processing method in an information processing apparatus in which a processor reads an instruction stored in a memory and performs arithmetic processing,
A data length setting step for causing the processor to execute a data length setting instruction for setting a data length of an argument included in the instruction read from the memory;
A data length conversion step for converting an argument included in the instruction read from the memory into the data length set in the data length setting step;
An arithmetic processing step in which the processor performs arithmetic processing on an argument of the data length converted by the data length converting means;
An information processing method comprising:
JP2006073089A 2006-03-16 2006-03-16 Information processor, information processing program and information processing method Withdrawn JP2007249666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006073089A JP2007249666A (en) 2006-03-16 2006-03-16 Information processor, information processing program and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006073089A JP2007249666A (en) 2006-03-16 2006-03-16 Information processor, information processing program and information processing method

Publications (1)

Publication Number Publication Date
JP2007249666A true JP2007249666A (en) 2007-09-27

Family

ID=38593881

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006073089A Withdrawn JP2007249666A (en) 2006-03-16 2006-03-16 Information processor, information processing program and information processing method

Country Status (1)

Country Link
JP (1) JP2007249666A (en)

Similar Documents

Publication Publication Date Title
JP5294313B2 (en) Bezier curve drawing device, Bezier curve drawing method and program
US20060250397A1 (en) Graphics processing unit and graphics processing system
JPH0792789B2 (en) Graph display device
EP2330560B1 (en) Method and device for processing vector graphics
JPH0719240B2 (en) Small electronic calculator with graph display function
KR20160074154A (en) Compiler
JPH1049369A (en) Data processor
JP2009282855A (en) Image forming device, method for rendering gradation graphic image, gradation graphic image rendering program, and recording medium
JP2010287110A (en) Information processor, information processing method, program, and recording medium
CN107851022B (en) Vector length query instruction
JP5770534B2 (en) Processor, compression program, compression apparatus, and compression method
JP2007249666A (en) Information processor, information processing program and information processing method
JP2007240848A (en) Display program, data structure and display device
JP4419973B2 (en) Display program and display device
JP2010501891A (en) Method for reducing the size of instruction font generation and improving speed
JP4284559B2 (en) Microprocessor, microcomputer, electronic equipment
JP4315922B2 (en) Variable precision data compression / decompression method for computer graphics and game machine using the method
JP2007272629A (en) Calculator and calculation program
JP2004341253A (en) Character and graphic display apparatus, character and graphic display method, program, and recording medium
JPH10207688A (en) Graphics processor
JP2007328581A (en) Image processing apparatus and shader device
JP4522216B2 (en) Image processing device
JP2009157726A (en) Electronic equipment having graph-display function, and program
JP4099669B2 (en) Scale character display method, information processing apparatus, and program
JP4420083B2 (en) Image processing circuit, display device and printing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090204

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20110121