JPS6313214B2 - - Google Patents

Info

Publication number
JPS6313214B2
JPS6313214B2 JP54162081A JP16208179A JPS6313214B2 JP S6313214 B2 JPS6313214 B2 JP S6313214B2 JP 54162081 A JP54162081 A JP 54162081A JP 16208179 A JP16208179 A JP 16208179A JP S6313214 B2 JPS6313214 B2 JP S6313214B2
Authority
JP
Japan
Prior art keywords
data
immediate
bit
program memory
prefix
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.)
Expired
Application number
JP54162081A
Other languages
Japanese (ja)
Other versions
JPS5685159A (en
Inventor
Joji Murakami
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP16208179A priority Critical patent/JPS5685159A/en
Publication of JPS5685159A publication Critical patent/JPS5685159A/en
Publication of JPS6313214B2 publication Critical patent/JPS6313214B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Microcomputers (AREA)

Description

【発明の詳細な説明】 本発明はワンチツプマイクロプロセツサのプロ
グラムメモリ、特にそのプログラムメモリのワー
ド構成法に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a program memory for a one-chip microprocessor, and more particularly to a word organization method for the program memory.

ワンチツプマイクロプロセツサは、CPU等の
演算処理機能(論理、算術等)を有する演算処理
部と、そのプログラムを書込んだプログラムメモ
リ(一般にはマスクROM)を同一デバイス上に
集積した回路素子である。かゝるマイクロプロセ
ツサにおいては、命令コードは通常演算処理部が
並列に処理可能なビツト長に合わせて作られる
か、或いはその整数倍のビツト長とされる。例え
ば8ビツトの演算機能を有する集積回路上には8
ビツト並列読出しのROMがプログラムメモリと
して用意される。その理由は(1)プログラム中にも
即値データとしてデータを格納する場合が多くあ
り、そのためには1ワードをビツト長もしくはそ
の整数倍としておこくのが便利である。なおこゝ
で即値データとは既知のように、例えばRAMの
i番地のデータに10を加えよというような演算に
おけるデータ10を言い、この10なるデータはプロ
グラムが作成された時点で既に確定されており、
勿論上記i番地のデータは可変であるがデータ10
は固定のものであつて、データの形をとつたプロ
グラムそれ自身といえる性格のものである。(2)こ
のワンチツプマイコンはいわゆる汎用(プログラ
ムメモリを外部に有する)マイクロプロセツサと
互換性を持たせる場合が多く、そのためには1ワ
ード長を8ビツトデータ長もしくはその整数倍と
することが便利である。しかしながら、上記のよ
うにプログラムメモリの1ワード長つまり並列読
出しビツト長をデータ長(の整数倍)に合わせる
と、即値データを扱う場合に必らずオペレーシヨ
ンコードと即値データの2つ以上(即値データが
nワードならオペレーシヨンと合わせて(n+
1)ワード以上)の領域がプログラムメモリ中で
占有される。
A one-chip microprocessor is a circuit element that integrates an arithmetic processing section such as a CPU with arithmetic processing functions (logic, arithmetic, etc.) and a program memory (generally masked ROM) in which the program is written on the same device. be. In such a microprocessor, the instruction code is usually created to match the bit length that can be processed in parallel by the arithmetic processing section, or has a bit length that is an integral multiple of that length. For example, on an integrated circuit with an 8-bit arithmetic function, there are 8
A bit parallel read ROM is provided as a program memory. The reasons for this are: (1) Data is often stored as immediate data in a program, and for this purpose it is convenient to store one word as a bit length or an integer multiple thereof. As is known, immediate data here refers to data 10 in an operation such as adding 10 to the data at address i in RAM, and this data 10 has already been determined at the time the program is created. Ori,
Of course, the data at address i above is variable, but data 10
is fixed and can be said to be a program itself in the form of data. (2) This one-chip microcontroller is often made compatible with so-called general-purpose microprocessors (having an external program memory), and for this purpose, the length of one word should be 8-bit data length or an integral multiple thereof. It's convenient. However, if the one-word length of the program memory, that is, the parallel read bit length, is adjusted to (an integral multiple of) the data length as described above, when handling immediate data, it is necessary to use two or more of the operation code and the immediate data (immediate If the data is n words, along with the operation (n+
1) an area (more than a word) is occupied in program memory.

一般にギブソンミツクス(Gibbson Mix)な
どのプログラム評価で知られているように即値デ
ータを扱う率は20〜30%とかなり高く、特にワン
チツプマイクロプロセツサのような制御系への応
用が多い場合にはその傾向が強い。
Generally, as is known in program evaluations such as Gibson Mix, the rate of handling immediate data is quite high at 20-30%, especially when it is often applied to control systems such as one-chip microprocessors. There is a strong tendency to do so.

オペレーシヨンコードを8ビツトとすれば命令
の種類は256となるがワンチツプマイコンでは256
種の命令は必要でないことが多い。しかもワンチ
ツプマイクロプロセツサのメモリ容量は2K/バ
イト程度が限界で、一般には1Kバイト程度の小
容量メモリが使用されることが多いので、該プロ
グラムメモリは有効に活用されることが好まし
い。
If the operation code is 8 bits, there are 256 types of instructions, but in a one-chip microcontroller there are 256 types of instructions.
Seed commands are often not necessary. Furthermore, the memory capacity of a one-chip microprocessor is limited to about 2K/byte, and generally a small capacity memory of about 1Kbyte is often used, so it is preferable that the program memory is used effectively.

本発明は、かゝる点に対処しようとするもの
で、即値データの使用頻度が高い点に着目し、こ
れを別扱いとすることでプログラムメモリの使用
効率を高めようとするものである。本発明は少な
くとも演算処理部およびプログラムメモリを1チ
ツプ上に形成してなるマイクロプロセツサにおい
て、該プログラムメモリの1ワード長を、該演算
処理部の並列処理可能ビツト長もしくはその整数
倍のビツト長に小数の付加ビツトを加えたものと
し、少なくとも即値データを操作する命令のオペ
レーシヨンコード又はオペレーシヨンプリフイツ
クスは、他の命令のオペレーシヨンコード及びオ
ペレーシヨンプリフイツクスよりも短いビツト長
で構成して該付加ビツトに記憶し、その他の前記
オペレーシヨンコード、オペレーシヨンプリフイ
ツク及び即値データは前記付加ビツトを除いた領
域に記憶して、前記演算処理部は該付加ビツトが
所定のオペレーシヨンコードを示す場合にはその
ワードの残りのビツトに記憶された即値データの
操作を実行し、該付加ビツトが所定のオペレーシ
ヨンプリフイツクスを示す場合にはそのワードの
残りのビツトに記憶されたオペレーシヨンコード
と共に構成される即値データの操作命令を実行す
る様にしたことを特徴とするが、以下図示の実施
例を参照しながらこれを詳細に説明する。
The present invention attempts to deal with this problem by focusing on the fact that immediate value data is frequently used, and by treating this data differently, it aims to improve the efficiency of program memory use. The present invention provides a microprocessor in which at least an arithmetic processing unit and a program memory are formed on one chip, in which the length of one word of the program memory is equal to the bit length that can be processed in parallel by the arithmetic processing unit or a bit length that is an integral multiple thereof. plus a decimal additional bit, and at least the operation code or operation prefix of an instruction that operates on immediate value data has a shorter bit length than the operation code or operation prefix of other instructions. The other operation code, operation prefix, and immediate value data are stored in an area other than the additional bit, and the arithmetic processing unit stores the additional bit in the predetermined operation. If the additional bits indicate a predetermined operation prefix, perform the operation on the immediate data stored in the remaining bits of the word; The present invention is characterized in that immediate data manipulation commands configured together with operation codes are executed, which will be described in detail below with reference to the illustrated embodiments.

第1図は本発明の一実施例を示すプログラムメ
モリの説明図で、10はオペレーシヨンコードお
よび即値データの記憶領域で、Wワードからな
る。従来のワンチツプマイコンのプログラムメモ
リはこの記憶領域10からなり、オペレーシヨン
コードはその1ワードを使つて書込み、また即値
データは「次のデータをアキユムレータへロード
せよ」というようなオペレーシヨンコードとその
データを各1ワードずつ使つて従つて計2ワード
(即値データのワード数が多ければそれ以上使つ
て)書込んでいた。20は本発明により付加され
た付加ビツト、本例では1ビツトを記憶する領域
であり、本発明ではこの付加ビツトを加えてプロ
グラムメモリの1ワード記憶領域30を構成す
る。メモリ全体としてWワード分の記憶領域があ
り、そして記憶領域10のビツト構成は図示せぬ
演算処理部の並列処理能力に合わせて例えば演算
処理能力が8ビツトであれば記憶領域10を8ビ
ツトもしくはその整数倍とする(以下では説明を
簡単にするため8ビツトとする)から、従来のプ
ログラムメモリは8Wビツトであるものが本例の
メモリでは記憶領域20が1ビツト加わるため、
1ワードの記憶領域30は9ビツト、全体では
9Wビツトとなる。記憶領域10には各種オペレ
ーシヨンコード12の他に、即値データ14を書
込み、そしてオペレーシヨンコードを書込んだワ
ードの付加ビツトには“0”を、即値データを書
込んだワードの付加ビツトへは“1”を書込む。
こゝで“0”は普通(従来と同じ)を意味し、
“1”は、後続ビツトは即値データであり、これ
はアキユムレータへロード、を意味する。このよ
うにすれば即値データに対するオペレーシヨンコ
ードを記憶領域10の該データの前のアドレスの
記憶領域へ書込む必要はなく、メモリセルの節約
が可能になる。オペレーシヨンコード12を書込
む記憶領域10に対応する記憶領域20には
“0”を書込み(これは何も書込まない、とも同
じ)、またオペレーシヨンコードが「アキユムレ
ータへロード」ではない他のものである場合は従
来と同様に記憶領域10へ2ワード以上使つて書
込んだ命令ビツトおよび即値デタの構成とし、そ
れらのワードの付加ビツトへは“0”を書込んで
おき、これが“0”ならば記憶領域10は従来と
同様に使用するようにシステムを構成しておくの
で、オペレーシヨンコードの種類に制限を受ける
ことはなく、またこれを拡張して全ての記憶領域
20に何も書込まなければ従来のプログラムメモ
リと同様に使用することができ、こうして汎用プ
ロセツサとの互換性を持つこともできる。但し、
通常使用となるワードにおける記憶領域20は無
駄なビツトとなるので、付加ビツト添加の功罪は
プログラムにおける即値データ出現頻度との関係
で評価される。
FIG. 1 is an explanatory diagram of a program memory showing an embodiment of the present invention. Reference numeral 10 denotes a storage area for operation codes and immediate value data, which consists of W words. The program memory of a conventional one-chip microcomputer consists of this storage area 10, and an operation code is written using one word of the memory area, and immediate data is written with an operation code such as "Load the next data to the accumulator" and its associated data. One word of data was used for each word, so a total of two words were written (or more if the number of words of the immediate data was large). Reference numeral 20 denotes an area for storing an additional bit added according to the present invention, 1 bit in this example. According to the present invention, this additional bit is added to constitute a 1-word storage area 30 of the program memory. The entire memory has a storage area for W words, and the bit configuration of the storage area 10 is adjusted to match the parallel processing capacity of an arithmetic processing unit (not shown).For example, if the arithmetic processing capacity is 8 bits, the storage area 10 can be configured as Since it is assumed to be an integer multiple of that value (in the following, it is assumed to be 8 bits to simplify the explanation), the conventional program memory is 8W bits, but in this example, the storage area 20 adds 1 bit, so
1 word storage area 30 is 9 bits, total
It becomes 9W bit. In addition to various operation codes 12, immediate value data 14 are written in the storage area 10, and "0" is written to the additional bit of the word in which the operation code is written, and "0" is written to the additional bit of the word in which the immediate value data is written. writes “1”.
Here, “0” means normal (same as before),
"1" means that the subsequent bit is immediate value data, which means that it is loaded into the accumulator. In this way, there is no need to write the operation code for the immediate data into the storage area of the storage area 10 at the address before the data, making it possible to save memory cells. Write "0" to the storage area 20 corresponding to the storage area 10 where the operation code 12 is written (this is the same as writing nothing), and write "0" to the storage area 20 corresponding to the storage area 10 where the operation code 12 is written. If it is, write the instruction bits and immediate value data to the storage area 10 using two or more words as in the past, write "0" to the additional bits of those words, and write "0" to the additional bits of those words. ``Then, the system is configured so that the storage area 10 is used in the same way as before, so there is no restriction on the type of operation code, and this can be expanded to allow all storage areas 20 to be used without any restrictions. If it is not written to, it can be used like a conventional program memory, thus making it compatible with general-purpose processors. however,
Since the storage area 20 in words that are normally used becomes wasted bits, the merits and demerits of adding additional bits are evaluated in relation to the frequency of appearance of immediate value data in the program.

即ち、従来の8ビツト長のプログラムメモリ
で、即値のロード命令がLワードあれば、この命
令に関して本発明では8×L=8Lビツトのプロ
グラムメモリの節約となり、一方、付加ビツトに
よるプログラムメモリ容量の増大はプログラムメ
モリの容量がWワードならWビツトとなり、従つ
て、 8L>W 即ち L/W>1/8 ならばプログラムメモリ容量の節約となる。この
L/Wはプログラム中の即値データの出現頻度で
あり、これが1/8=12.5%以上であれば(前述の
ようにこれは30〜40%であり、ワンチツプマイコ
ンをコントローラに使用する場合には50%にもな
ることが予想される)従来方式に比し本発明方式
は利点がある。
That is, in a conventional 8-bit program memory, if there are L words of an immediate load instruction, the present invention saves 8×L=8L bits of program memory for this instruction, while the additional bits reduce the program memory capacity. If the capacity of the program memory is W words, the increase will be W bits, and therefore, if 8L>W, that is, L/W>1/8, the program memory capacity will be saved. This L/W is the appearance frequency of immediate value data in the program, and if this is 1/8 = 12.5% or more (as mentioned above, this is 30 to 40%, and if a one-chip microcontroller is used as the controller) (It is expected that the reduction rate will be as high as 50%) The method of the present invention has advantages over the conventional method.

尚、付加ビツトにより判断されるのは必ずしも
命令(実行後割込の有無をサンプルする)である
必要はなく、プリイフイクスとして次のオペレー
シヨンコードと共に即値の操作命令を形成させる
ようにしてもよい。これらのいずれを選択するか
は、各マイクロプロセツサのレジスタ構造アーキ
テクチヤに依り、最もLの多くなる形式を選べば
よいわけてある。又付加ビツトによる命令(プリ
イフイクス)は必ずしも即値データをロードする
ものだけでなく、即値データを操作するものであ
れば、即値のストア、即値のかけ算などでもよく
又付加ビツトも1ビツトである必要はない。
It should be noted that what is judged by the additional bits does not necessarily have to be an instruction (sampling the presence or absence of an interrupt after execution), and an immediate operation instruction may be formed together with the next operation code as a prefix. Which of these should be selected depends on the register structure architecture of each microprocessor, and it is best to select the format that provides the largest number of L's. Also, the instructions (prefixes) using additional bits are not necessarily limited to those that load immediate value data, but as long as they operate on immediate value data, they may be stores of immediate values, multiplication of immediate values, etc. Also, the additional bit does not have to be 1 bit. do not have.

第2図は付加ビツトを2ビツトとした本発明の
他の実施例であり、記憶領域20は“00”、“01”、
“10”、“11”の4通りの記憶状態をとり得る。こ
のうち“00”を前例の“0”に、また“01”を前
例の“1”に対応させると、“10”を「アキユム
レータの内容と即値データ16をアンドして再び
アキユムレータにロードする」というリセツト命
令に、また“11”を「アキユムレータの内容と即
値データ18をオアして再びアキユムレータにロ
ードする」というセツト命令に用いることができ
る。最大付加ビツト数は上記のL/W>1/8の関
係により定まり、3ビツト程度である。
FIG. 2 shows another embodiment of the present invention in which the additional bits are 2 bits, and the storage area 20 has "00", "01",
It can have four storage states: "10" and "11". Of these, if "00" corresponds to "0" in the previous example, and "01" corresponds to "1" in the previous example, "10" is "ANDed with the contents of the accumulator and the immediate value data 16, and loaded into the accumulator again." In addition, "11" can be used as a set command to ``OR the contents of the accumulator and the immediate value data 18 and load it into the accumulator again.'' The maximum number of additional bits is determined by the above relationship of L/W>1/8, and is approximately 3 bits.

以上述べたように本発明によれば、ワンチツプ
マイクロプロセツサの小容量のプログラムメモリ
を効率良く使用することが期待でき、しかも汎用
プロセツサとの互換性を持たせることもできる利
点を有する。
As described above, according to the present invention, it is expected that the small capacity program memory of a one-chip microprocessor can be used efficiently, and the present invention has the advantage of being compatible with general-purpose processors.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図および第2図は本発明の異なる実施例を
示すプログラムメモリの説明図である。 図中、10はプログラムメモリのオペレーシヨ
ンコードおよび即値データ記憶領域、20は付加
ビツト記憶領域、30は1ワード分の記憶領域で
ある。
1 and 2 are explanatory diagrams of program memories showing different embodiments of the present invention. In the figure, 10 is an operation code and immediate value data storage area of the program memory, 20 is an additional bit storage area, and 30 is a storage area for one word.

Claims (1)

【特許請求の範囲】[Claims] 1 少なくとも演算処理部およびプログラムメモ
リを1チツプ上に形成してなるマイクロプロセツ
サにおいて、該プログラムメモリの1ワード長
を、該演算処理部の並列処理可能ビツト長もしく
はその整数倍のビツト長に少数の付加ビツトを加
えたものとし、少なくとも即値データを操作する
命令のオペレーシヨンコード又はオペレーシヨン
プリフイツクスは、他の命令のオペレーシヨンコ
ード及びオペレーシヨンプリフイツクスよりも短
いビツト長で構成して該付加ビツトに記憶し、そ
の他の前記オペレーシヨンコード、オペレーシヨ
ンプリフイツク及び即値データは前記付加ビツト
を除いた領域に記憶して、前記演算処理部は該付
加ビツトが所定のオペレーシヨンコードを示す場
合にはそのワードの残りのビツトに記憶された即
値データの操作を実行し、該付加ビツトが所定の
オペレーシヨンプリフイツクスを示す場合にはそ
のワードの残りのビツトに記憶されたオペレーシ
ヨンコードと共に構成される即値データの操作命
令を実行する様にしたことを特徴とするマイクロ
プロセツサ。
1. In a microprocessor in which at least an arithmetic processing section and a program memory are formed on one chip, one word length of the program memory is set to a bit length that can be processed in parallel by the arithmetic processing section or a bit length that is an integer multiple thereof. At least the operation code or operation prefix of an instruction that operates on immediate data has a shorter bit length than the operation code or operation prefix of other instructions. The operation code, operation prefix, and immediate value data are stored in the additional bit, and the other operation code, operation prefix, and immediate value data are stored in an area other than the additional bit, and the arithmetic processing unit stores the additional bit as a predetermined operation code. performs the operation on the immediate data stored in the remaining bits of the word if the additional bit indicates a predetermined operation prefix; A microprocessor characterized by executing instructions for manipulating immediate data configured together with code.
JP16208179A 1979-12-13 1979-12-13 Program memory of microprocessor Granted JPS5685159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16208179A JPS5685159A (en) 1979-12-13 1979-12-13 Program memory of microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16208179A JPS5685159A (en) 1979-12-13 1979-12-13 Program memory of microprocessor

Publications (2)

Publication Number Publication Date
JPS5685159A JPS5685159A (en) 1981-07-11
JPS6313214B2 true JPS6313214B2 (en) 1988-03-24

Family

ID=15747716

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16208179A Granted JPS5685159A (en) 1979-12-13 1979-12-13 Program memory of microprocessor

Country Status (1)

Country Link
JP (1) JPS5685159A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007088819A1 (en) * 2006-02-03 2007-08-09 Matsushita Electric Industrial Co., Ltd. Processor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5259537A (en) * 1975-11-11 1977-05-17 Mitsubishi Electric Corp Data processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007088819A1 (en) * 2006-02-03 2007-08-09 Matsushita Electric Industrial Co., Ltd. Processor

Also Published As

Publication number Publication date
JPS5685159A (en) 1981-07-11

Similar Documents

Publication Publication Date Title
JPH0248931B2 (en)
JPH04172533A (en) Electronic computer
WO2009073542A1 (en) Enhanced microprocessor or microcontroller
EP2215544B1 (en) Enhanced microprocessor or microcontroller
JPH10187530A (en) Programmable memory access
JPS589454B2 (en) Programmable control latch mechanism
JPH03216745A (en) Microprocessor incorporating cache memory
US4649476A (en) Microcomputer having an internal address mapper
JPH08212075A (en) Information processing device
JPH0436416B2 (en)
EP0787326B1 (en) System and method for processing of memory data and communication system comprising such system
JPH09505428A (en) Microcontroller with page address mode
US6321319B2 (en) Computer system for allowing a two word jump instruction to be executed in the same number of cycles as a single word jump instruction
JPS62107339A (en) Instruction constituting method for microcomputer
EP0503498A2 (en) Single-chip microcomputer with program/data memory flag
JPS63249206A (en) Programmable controller
JPS6399948U (en)
JPS645333B2 (en)
JPS59106047A (en) Microcomputer
JPS62182851A (en) Computer memory switching circuit
JPH0962503A (en) Microcomputer
JPS6226738B2 (en)
JPS6260034A (en) Stored program system controller
JPS62151955A (en) Memory addressing system
JPH02207327A (en) Numerical arithmetic processor