JPH04359334A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH04359334A
JPH04359334A JP13413291A JP13413291A JPH04359334A JP H04359334 A JPH04359334 A JP H04359334A JP 13413291 A JP13413291 A JP 13413291A JP 13413291 A JP13413291 A JP 13413291A JP H04359334 A JPH04359334 A JP H04359334A
Authority
JP
Japan
Prior art keywords
address
data storage
byte
storage area
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP13413291A
Other languages
Japanese (ja)
Inventor
Norio Masui
桝井 規雄
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP13413291A priority Critical patent/JPH04359334A/en
Publication of JPH04359334A publication Critical patent/JPH04359334A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3816Instruction alignment, e.g. cache line crossing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To access data, which is mis-aligned across the word boundary on a memory, in one bus cycle. CONSTITUTION:A CPU 25 outputs start address 'Y' of data. An address increment signal generating block 26 generates address increment signals 24a, 24b, and 24c to memory blocks 23a, 23b, and 23c by lower bits AD30 and AD31 of the address and byte control signals 22a, 22b, 22c, and 22d. In the memory block 23a, the one-byte area designated by a value Y/4 of upper 30 bits of the start address of normal data is accessed, and the one-byte area designated by a value Y/4+1 is accessed by input of the address increment signal 24a. Thus, a mis-aligned data storage area can be accessed in one bus cycle.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はnバイト(nは自然数)
のデータ格納領域ごとに一つのアドレスを割当て、Kn
バイト(Kは1以上の整数)のデータを同時にアクセス
できるマイクロコンピュータに関するものである。
[Industrial Application Field] The present invention uses n bytes (n is a natural number)
Assign one address to each data storage area of Kn
The present invention relates to a microcomputer that can simultaneously access data of bytes (K is an integer of 1 or more).

【0002】0002

【従来の技術】図5は従来のメモリの構成を示す模式図
である。上位アドレスが入力されるローデコーダ2はワ
ード線4と接続され、ワード線4を介してメモリセルア
レイ1と接続される。下位アドレスが入力されるカラム
デコーダ3はビット選択線8と接続され、ビット選択線
8を介してビット選択部7と接続される。ビット選択部
7にはデータ入出力線9が接続される。メモリセルアレ
イ1内において、ワード線4及びビット線5は交差する
ように配置され、各交点に対応してメモリセル6,6…
が配置される。各メモリセル6,6…は、夫々と対応す
る位置で交差するワード線4及びビット線5と接続され
る。
2. Description of the Related Art FIG. 5 is a schematic diagram showing the structure of a conventional memory. A row decoder 2 to which an upper address is input is connected to a word line 4, and then connected to the memory cell array 1 via the word line 4. Column decoder 3 to which the lower address is input is connected to bit selection line 8 and via bit selection line 8 to bit selection section 7 . A data input/output line 9 is connected to the bit selection section 7 . In the memory cell array 1, word lines 4 and bit lines 5 are arranged to intersect, and memory cells 6, 6, . . . are arranged corresponding to each intersection.
is placed. Each memory cell 6, 6, . . . is connected to a word line 4 and a bit line 5 which intersect with each other at corresponding positions.

【0003】次にこのメモリの動作を、便宜上全て正論
理で説明する。メモリをアクセスするために、メモリに
アドレスが与えられる。アドレスのうち、上位アドレス
がローデコーダ2に与えられると、ローデコーダ2は上
位アドレスをデコードし、ワード線4のうちの1本を「
H」レベルにする。メモリセルは、それに接続されてい
るワード線4が「H」レベルになると、ビット線5を介
してアクセスされる。アドレスのうち、下位アドレスは
カラムデコーダ3に入力される。
Next, the operation of this memory will be explained using positive logic for convenience. In order to access memory, an address is given to the memory. When the upper address among the addresses is given to the row decoder 2, the row decoder 2 decodes the upper address and selects one of the word lines 4 as "
Set to "H" level. A memory cell is accessed via a bit line 5 when a word line 4 connected thereto goes to an "H" level. Among the addresses, lower addresses are input to the column decoder 3.

【0004】カラムデコーダ3は下位アドレスをデコー
ドし、ビット選択線8のうちの1本を「H」レベルにす
る。ビット選択部7内では、ビット選択線8とビット線
5とが1対1に対応しているから、「H」レベルになっ
たビット選択線8の1本に対応するビット線5の1本を
選択してデータ入出力線9に接続する。例えば、ワード
線4c及びビット線8cがともに「H」レベルになった
場合、メモリセル6cがビット線5c及びデータ入出力
線9を介してアクセスされる。即ち、1つのアドレスに
対して1つのメモリセルが対応してアクセスされる。
The column decoder 3 decodes the lower address and sets one of the bit selection lines 8 to the "H" level. In the bit selection unit 7, since the bit selection lines 8 and the bit lines 5 correspond one to one, one of the bit lines 5 corresponds to one of the bit selection lines 8 that has become "H" level. Select and connect to data input/output line 9. For example, when the word line 4c and the bit line 8c are both at the "H" level, the memory cell 6c is accessed via the bit line 5c and the data input/output line 9. That is, one memory cell is accessed in response to one address.

【0005】図6は、従来の32ビットCPU のメモ
リマップの一部を示す概念図である。夫々が1バイトで
あるデータ格納領域40,41 …47のアドレスは、
その順にY,Y+1,…Y+7である。そしてデータバ
スのビットを、最上位ビットMSB から最下位ビット
LSB に向かって順次D0,D1 …D31 とする
。データ格納領域40及び44はビットD0〜D7に、
データ格納領域41及び45はビットD8〜D15 に
、データ格納領域42及び46はビットD16 〜D2
3 に、データ格納領域43及び47はビットD24 
〜D31 に、夫々対応している。
FIG. 6 is a conceptual diagram showing part of a memory map of a conventional 32-bit CPU. The addresses of the data storage areas 40, 41...47, each of which is 1 byte, are:
In that order, they are Y, Y+1, . . . Y+7. The bits of the data bus are sequentially D0, D1, . . . D31 from the most significant bit MSB to the least significant bit LSB. Data storage areas 40 and 44 have bits D0 to D7,
The data storage areas 41 and 45 are bits D8 to D15, and the data storage areas 42 and 46 are bits D16 to D2.
3, data storage areas 43 and 47 are bit D24.
~D31, respectively.

【0006】次に従来の32ビットCPU によるメモ
リのアクセス動作を図6により説明する。CPU は1
バイトのデータに1つの32ビットアドレスを割当て、
データを一度に最大4バイトまで入出力できるとする。 CPU はメモリをアクセスする場合、32ビットアド
レスの上位30ビットにより4バイト単位のデータ位置
を指定するとともに、バイトコントロール信号により、
前記4バイトデータ中の各1バイトデータに対するアク
セスの有無を指定する。
Next, a memory access operation by a conventional 32-bit CPU will be explained with reference to FIG. CPU is 1
Assign one 32-bit address to a byte of data,
Assume that data can be input and output up to 4 bytes at a time. When the CPU accesses memory, it specifies the data location in 4-byte units using the upper 30 bits of a 32-bit address, and also uses the byte control signal to
Specifies whether or not each 1-byte data in the 4-byte data is to be accessed.

【0007】以下、「Y」を4の倍数とする。例えば3
2ビットアドレス「Y+2」のデータ格納領域42及び
「Y+3」のデータ格納領域43の2バイトデータをア
クセスする場合、32ビットアドレス「Y+2」の下位
2ビットを切捨てた上位30ビットにより32ビットア
ドレス「Y」〜「Y+3」のデータ格納領域40,41
,42,43 の4バイトデータが指定され、バイトコ
ントロール信号によりデータバス上の下位2バイトが指
定され、データ格納領域42及び43の2バイトのデー
タがアクセスされることになる。
[0007] Hereinafter, "Y" will be a multiple of 4. For example 3
When accessing 2-byte data in the data storage area 42 of 2-bit address "Y+2" and the data storage area 43 of "Y+3", the 32-bit address " Data storage areas 40, 41 from “Y” to “Y+3”
, 42, and 43 are designated, and the lower two bytes on the data bus are designated by the byte control signal, and the two bytes of data in the data storage areas 42 and 43 are accessed.

【0008】ところで、32ビットアドレス「Y」〜「
Y+3」及び「Y+4」〜「Y+7」の下位2ビットを
切捨てた上位30ビットにより指定される連続した二つ
の4バイトデータのデータ格納領域に跨がって4バイト
以下のデータを格納する場合がある。このような二つの
4バイトデータのデータ格納領域の境界をワード境界と
称し、前述したように格納されたデータをワード境界を
跨ぐミスアラインしたデータと言う。
By the way, 32-bit addresses "Y" to "
There are cases where data of 4 bytes or less is stored across two consecutive 4-byte data storage areas specified by the upper 30 bits of ``Y+3'' and ``Y+4'' to ``Y+7'', with the lower 2 bits rounded down. be. The boundary between two data storage areas for 4-byte data is called a word boundary, and the data stored as described above is called misaligned data that straddles the word boundary.

【0009】例えばデータ格納領域42,43,44,
45 に格納されたワード境界を跨ぐミスアラインした
4バイトデータをアクセスする場合、1度目のバスサイ
クルで先頭バイト42の32ビットアドレス「Y+2」
の上位30ビット及びデータバス上の下位2バイトを指
定するバイトコントロール信号によりデータ格納領域4
2及び43の4バイトデータの上位2バイトをアクセス
し、2度目のバスサイクルでデータ格納領域44の32
ビットアドレス「Y+4」の上位30ビット及びデータ
バス上の上位2バイトを指定するバイトコントロール信
号によりデータ格納領域44及び45の4バイトデータ
の下位2バイトをアクセスする。
For example, data storage areas 42, 43, 44,
When accessing misaligned 4-byte data that straddles word boundaries stored in 45, the 32-bit address "Y+2" of the first byte 42 is accessed in the first bus cycle.
The data storage area 4 is controlled by a byte control signal that specifies the upper 30 bits of the data bus and the lower 2 bytes of the data bus.
The upper two bytes of the 4-byte data of numbers 2 and 43 are accessed, and the data storage area 44 of 32 is accessed in the second bus cycle.
The lower 2 bytes of the 4-byte data in the data storage areas 44 and 45 are accessed by a byte control signal specifying the upper 30 bits of the bit address "Y+4" and the upper 2 bytes on the data bus.

【0010】図7は従来の32ビットマイクロコンピュ
ータの構成の一部を示す模式図である。32ビットCP
U 14は30ビットアドレスバス17a を介して3
2ビットアドレスバス16と接続されており、また32
ビットデータバス20を介して32ビットデータバス1
9と接続されている。CPU 14はバイトコントロー
ル信号線22a,22b,22c,22d を各別に介
してメモリブロック15a,15b,15c,15d 
と接続されている。
FIG. 7 is a schematic diagram showing part of the configuration of a conventional 32-bit microcomputer. 32 bit CP
3 via the 30-bit address bus 17a.
2-bit address bus 16, and 32
32-bit data bus 1 via bit data bus 20
9 is connected. The CPU 14 connects the memory blocks 15a, 15b, 15c, 15d via byte control signal lines 22a, 22b, 22c, 22d separately.
is connected to.

【0011】32ビットのアドレスバス16は、30ビ
ットアドレスバス18a,18b,18c,18d を
各別に介してメモリブロック15a,15b,15c,
15d と接続されている。32ビットデータバス19
は8ビットデータバス21a,21b,21c,21d
 を各別に介してメモリブロック15a,15b,15
c,15d と接続されている。
The 32-bit address bus 16 connects memory blocks 15a, 15b, 15c,
15d is connected. 32 bit data bus 19
are 8-bit data buses 21a, 21b, 21c, 21d
through the memory blocks 15a, 15b, 15 separately.
c, 15d.

【0012】次にこの32ビットマイクロコンピュータ
の動作を図5,図6,図7により説明する。各メモリブ
ロック15a,15b,15c,15d は図5に示す
メモリで構成されており、夫々に接続されているバイト
コントロール信号線22a,22b,22c,22d 
を介してメモリブロック15a,15b,15c,15
d にバイトコントロール信号を与えると、夫々が接続
されているアドレスバス18a,18b,18c,18
d を介してアドレスを受取り、受取ったアドレスに対
応する1バイトのデータ格納領域がアクセス可能になる
Next, the operation of this 32-bit microcomputer will be explained with reference to FIGS. 5, 6, and 7. Each memory block 15a, 15b, 15c, 15d is composed of the memories shown in FIG. 5, and is connected to byte control signal lines 22a, 22b, 22c, 22d.
through memory blocks 15a, 15b, 15c, 15
When a byte control signal is given to d, the address buses 18a, 18b, 18c, and 18 to which they are connected
An address is received via d, and a 1-byte data storage area corresponding to the received address becomes accessible.

【0013】以下、図6に示すメモリマップ上のアドレ
スを単にアドレスとし、メモリブロック15a,15b
,15c,15d が各ブロック内部で使用するアドレ
スをブロック内アドレスとして説明する。CPU 14
が下位2ビットを切捨てたアドレス「Y」により、指定
する4バイトデータ格納領域40,41,42,43 
のうち、メモリブロック15a はデータ格納領域40
を、メモリブロック15b はデータ格納領域41を、
メモリブロック15c はデータ格納領域42を、メモ
リブロック15dはデータ格納領域43を、夫々のブロ
ック内アドレス「Y/4」に格納する。
Hereinafter, the addresses on the memory map shown in FIG. 6 will be simply referred to as addresses, and the memory blocks 15a and 15b will be
, 15c, 15d will be described as addresses used within each block as intra-block addresses. CPU 14
The 4-byte data storage area 40, 41, 42, 43 specified by the address "Y" with the lower 2 bits truncated.
Among them, the memory block 15a is the data storage area 40
, the memory block 15b has the data storage area 41,
The memory block 15c stores the data storage area 42, and the memory block 15d stores the data storage area 43 at address "Y/4" within each block.

【0014】CPU 14がアドレス「Y+2」及び「
Y+3」のデータ格納領域42及び43のメモリをアク
セスする場合、32ビットアドレス「Y+2」の上位3
0ビット「Y/4」をアドレスバス17a を介してア
ドレスバス16の上位30ビットに与えるとともに、バ
イトコントロール信号22c 及び22d を出力する
。それによりバイトコントロール信号22c はメモリ
ブロック15c に与えられ、バイトコントロール信号
22d はメモリブロック15d に与えられる。
[0014] The CPU 14 has addresses "Y+2" and "
When accessing the memories in the data storage areas 42 and 43 of ``Y+3'', the upper 3 of the 32-bit address ``Y+2''
The 0 bit "Y/4" is given to the upper 30 bits of the address bus 16 via the address bus 17a, and byte control signals 22c and 22d are output. As a result, the byte control signal 22c is applied to the memory block 15c, and the byte control signal 22d is applied to the memory block 15d.

【0015】メモリブロック15c は、アドレスバス
18c を介してアドレスバス16の上位30ビット「
Y/4」を取込み、ブロック内アドレス「Y/4」の1
バイトデータ格納領域42に対するCPU 14のアク
セスをデータバス21c,データバス19及び20上の
ビットD16 〜D23 を介して可能にする。また、
メモリブロック15d はアドレスバス18d を介し
てアドレスバス16の上位30ビット「Y/4」を取込
み、ブロック内アドレス「Y/4」の1バイトデータ格
納領域43に対するCPU 14のアクセスを、データ
バス21d 、データバス19及び32ビットデータバ
ス20上のビットD24 〜D31 を介して可能にす
る。
The memory block 15c receives the upper 30 bits of the address bus 16 via the address bus 18c.
Y/4” and 1 of the block address “Y/4”
Access by the CPU 14 to the byte data storage area 42 is enabled via bits D16 to D23 on the data bus 21c and data buses 19 and 20. Also,
The memory block 15d takes in the upper 30 bits "Y/4" of the address bus 16 via the address bus 18d, and controls access by the CPU 14 to the 1-byte data storage area 43 at address "Y/4" in the block via the data bus 21d. , via bits D24-D31 on data bus 19 and 32-bit data bus 20.

【0016】メモリブロック15c のブロック内アド
レス「Y/4」に対応する1バイトデータ格納領域はC
PU 14のアドレス「Y+2」の1バイトデータ格納
領域42であり、メモリブロック15d のブロック内
のアドレス「Y/4」に対応する1バイトデータ格納領
域は、CPU 14のアドレス「Y+3」の1バイトデ
ータ格納領域43であるから、結局CPU 14がアド
レス「Y+2」及び「Y+3」のデータ格納領域42及
び43のメモリアクセスを行ったことになる。
The 1-byte data storage area corresponding to the intra-block address "Y/4" of the memory block 15c is C.
The 1-byte data storage area 42 at the address "Y+2" of the PU 14 is the 1-byte data storage area 42 corresponding to the address "Y/4" in the block of the memory block 15d. Since this is the data storage area 43, the CPU 14 ended up accessing the data storage areas 42 and 43 at addresses "Y+2" and "Y+3".

【0017】CPU 14がアドレス「Y+2」〜「Y
+5」のデータ格納領域42,43,44,45 のワ
ード境界を跨ぐミスアラインした4バイトのデータ格納
領域をアクセスする場合、一度目のバスサイクルで32
ビットアドレス「Y+2」の上位30ビット「Y/4」
をアドレスバス17aを介してアドレスバス16の上位
30ビットに与えるとともに、バイトコントロール信号
22c 及び22d を出力して、メモリブロック15
c のブロック内アドレス「Y/4」の1バイトデータ
格納領域42とメモリブロック15d のブロック内ア
ドレス「Y/4」の1バイトデータ格納領域43をアク
セスする。
[0017] The CPU 14 uses addresses "Y+2" to "Y
+5'' data storage area 42, 43, 44, 45. When accessing a misaligned 4-byte data storage area that straddles word boundaries, 32 bytes are accessed in the first bus cycle.
Upper 30 bits “Y/4” of bit address “Y+2”
is applied to the upper 30 bits of the address bus 16 via the address bus 17a, and the byte control signals 22c and 22d are outputted to control the memory block 15.
The 1-byte data storage area 42 at the intra-block address "Y/4" of the memory block 15d and the 1-byte data storage area 43 at the intra-block address "Y/4" of the memory block 15d are accessed.

【0018】更に、CPU 14は二度目のバスサイク
ルを起動し、32ビットアドレス「Y+4」の上位30
ビット「(Y/4)+1」をアドレスバス17a を介
してアドレスバス16の上位30ビットに与えるととも
に、バイトコントロール信号22a 及び22b を出
力して、メモリブロック15a のブロック内アドレス
「(Y/4)+1」の1バイトデータ格納領域44とメ
モリブロック15b のブロック内アドレス「(Y/4
)+1」の1バイトデータ格納領域45をアクセスする
Furthermore, the CPU 14 starts a second bus cycle and transfers the upper 30 bits of the 32-bit address "Y+4".
The bit "(Y/4)+1" is given to the upper 30 bits of the address bus 16 via the address bus 17a, and the byte control signals 22a and 22b are output to set the intra-block address "(Y/4)" of the memory block 15a. )+1" 1-byte data storage area 44 and the block address "(Y/4
)+1" 1-byte data storage area 45 is accessed.

【0019】[0019]

【発明が解決しようとする課題】前述したように従来の
マイクロコンピュータでは、CPU がメモリ上のワー
ド境界を跨ぐミスアラインしたデータ格納領域をアクセ
スする場合に、バスサイクルを二度起動しなければなら
ず、プログラムの実行速度が遅いという問題がある。本
発明は斯かる問題に鑑み、CPU がワード境界を跨ぐ
ミスアラインしたデータ格納領域をアクセスする場合に
、一度のバスサイクルでアクセスできるマイクロコンピ
ュータを提供することを目的とする。
[Problems to be Solved by the Invention] As mentioned above, in conventional microcomputers, when the CPU accesses a misaligned data storage area that straddles word boundaries in memory, it is necessary to activate the bus cycle twice. , there is a problem that the program execution speed is slow. SUMMARY OF THE INVENTION In view of this problem, it is an object of the present invention to provide a microcomputer that allows a CPU to access a misaligned data storage area that straddles word boundaries in one bus cycle.

【0020】[0020]

【課題を解決するための手段】第1発明のマイクロコン
ピュータは、CPU が発したアドレスをインクリメン
トする手段と、前記アドレスのデータ格納領域及びイン
クリメントしたアドレスのデータ格納領域を1度のバス
サイクルでアクセスする手段とを備える。第2発明のマ
イクロコンピュータは、アクセスすべきデータ格納領域
の先頭バイトのアドレス全ビットを同時出力する手段と
、データバス上の有効バイトを指定する信号を発する手
段とを備える。
[Means for Solving the Problems] A microcomputer according to a first aspect of the invention includes means for incrementing an address issued by a CPU, and accessing a data storage area of the address and a data storage area of the incremented address in one bus cycle. and means to do so. A microcomputer according to a second aspect of the invention includes means for simultaneously outputting all address bits of the first byte of a data storage area to be accessed, and means for emitting a signal specifying a valid byte on a data bus.

【0021】第3発明のマイクロコンピュータは、アク
セスすべきデータ格納領域の先頭バイトのアドレス全ビ
ットを同時出力する手段と、データがミスアラインか否
かを表すバイトコントロール信号を出力する手段と、バ
イトコントロール信号及び先頭バイトのアドレス下位ビ
ットに基づいてアドレスインクリメント信号を発生させ
、アドレス下位ビットで区分される複数のメモリブロッ
クへ選択的に与える手段と、前記先頭バイトのアドレス
上位ビットで指定される複数のデータ格納領域のうち、
アドレスインクリメント信号が与えられていないメモリ
ブロックのデータ格納領域及び前記アドレス上位ビット
に1を加えたアドレスで指定される複数のデータ格納領
域のうち、アドレスインクリメント信号が与えられたメ
モリブロックのデータ格納領域をアクセスする手段とを
備える。
A microcomputer according to a third aspect of the invention includes means for simultaneously outputting all address bits of the first byte of a data storage area to be accessed, means for outputting a byte control signal indicating whether or not the data is misaligned, and a byte control signal. means for generating an address increment signal based on the signal and the address lower bits of the first byte, and selectively applying it to a plurality of memory blocks divided by the address lower bits; Of the data storage area,
Among the data storage area of the memory block to which the address increment signal is not applied and the data storage area of the memory block to which the address increment signal is applied, among the multiple data storage areas specified by the address obtained by adding 1 to the upper bits of the address. and a means for accessing the information.

【0022】第4発明のマイクロコンピュータは、アク
セスすべきデータ格納領域の先頭バイトを指定するため
アドレス全ビットを同時出力する手段と、ミスアライン
したデータ格納領域のアクセスを指令するミスアライン
データアクセス信号を発する手段と、該ミスアラインデ
ータアクセス信号及び前記先頭バイトのアドレス下位ビ
ットに基づいてアドレスインクリメント信号を発生させ
、アドレス下位ビットで区分される複数のメモリブロッ
クへ選択的に与える手段と、前記先頭バイトのアドレス
上位ビットで指定される複数のデータ格納領域のうち、
アドレスインクリメント信号が与えられていないメモリ
ブロックのデータ格納領域及び前記アドレス上位ビット
に1を加えたアドレスで指定される複数のデータ格納領
域のうち、アドレスインクリメント信号が与えられたメ
モリブロックのデータ格納領域をアクセスする手段とを
備える。
The microcomputer of the fourth invention includes means for simultaneously outputting all address bits to specify the first byte of the data storage area to be accessed, and a misaligned data access signal for instructing access to the misaligned data storage area. means for generating an address increment signal based on the misaligned data access signal and the address lower bits of the first byte, and means for selectively applying the address increment signal to a plurality of memory blocks divided by the address lower bits; Among the multiple data storage areas specified by the upper bits of the address,
Among the data storage area of the memory block to which the address increment signal is not applied and the data storage area of the memory block to which the address increment signal is applied, among the multiple data storage areas specified by the address obtained by adding 1 to the upper bits of the address. and a means for accessing the information.

【0023】[0023]

【作用】第1発明のマイクロコンピュータは、CPU 
が発したアドレスのデータ格納領域及びそのアドレスを
インクリメントしたアドレスのデータ格納領域を1度の
バスサイクルでアクセスする。第2発明のマイクロコン
ピュータは、アクセスすべきデータ格納領域の先頭バイ
トのアドレスをアドレスバスへ同時出力して先頭バイト
を指定する。データバス上の有効バイトを指定すると、
先頭バイトを先頭に、指定した有効バイトのデータ格納
領域を1度のバスサイクルでアクセスする。
[Operation] The microcomputer of the first invention has a CPU
The data storage area of the address issued by the address and the data storage area of the address that is incremented by that address are accessed in one bus cycle. The microcomputer of the second invention designates the first byte by simultaneously outputting the address of the first byte of the data storage area to be accessed to the address bus. Given the valid bytes on the data bus,
Starting from the first byte, the data storage area of the specified valid bytes is accessed in one bus cycle.

【0024】第3発明のマイクロコンピュータは、デー
タがミスアラインか否かを表すバイトコントロール信号
及びアクセスすべきデータ格納領域の先頭バイトのアド
レス下位ビットに基づいてアドレスインクリメント信号
を発生する。アドレスインクリメント信号をアドレス下
位ビットで区分される複数のメモリブロックへ選択的に
与える。アドレス上位ビットで複数のデータ格納領域を
指定すると、指定された複数のデータ格納領域のうち、
アドレスインクリメント信号が与えられていないメモリ
ブロックのデータ格納領域及びアドレス上位ビットに1
を加えたアドレスで指定される複数のデータ格納領域の
うち、アドレスインクリメント信号が与えられているメ
モリブロックのデータ格納領域を、1度のバスサイクル
でアクセスする。
The microcomputer of the third invention generates an address increment signal based on a byte control signal indicating whether or not data is misaligned and the lower address bit of the first byte of the data storage area to be accessed. An address increment signal is selectively applied to a plurality of memory blocks divided by address lower bits. If multiple data storage areas are specified using the upper bits of the address, one of the specified multiple data storage areas will be
1 in the data storage area and upper address bits of memory blocks to which the address increment signal is not applied.
Among the plurality of data storage areas specified by the address incremented by , the data storage area of the memory block to which the address increment signal is applied is accessed in one bus cycle.

【0025】第4発明に係るマイクロコンピュータは、
データがミスアラインしているとCPU はミスアライ
ンデータアクセス信号を出力する。このミスアラインデ
ータアクセス信号及びアクセスすべきデータ格納領域の
先頭バイトのアドレス下位ビットに基づいてアドレスイ
ンクリメント信号を発生する。アドレスインクリメント
信号をアドレス下位ビットで区分される複数のメモリブ
ロックへ選択的に与える。アドレス上位ビットで複数の
データ格納領域を指定すると、指定された複数のデータ
格納領域のうち、アドレスインクリメント信号が与えら
れていないメモリブロックのデータ格納領域及びアドレ
ス上位ビットに1を加えたアドレスで指定される複数の
データ格納領域のうち、アドレスインクリメント信号が
与えられているメモリブロックのデータ格納領域を1度
のバスサイクルでアクセスする。これにより、いずれの
マイクロコンピュータも1度のバスサイクルでワード境
界を跨ぐミスアラインしたデータをアクセスできる。
[0025] The microcomputer according to the fourth invention includes:
If the data is misaligned, the CPU outputs a misaligned data access signal. An address increment signal is generated based on this misaligned data access signal and the lower address bit of the first byte of the data storage area to be accessed. An address increment signal is selectively applied to a plurality of memory blocks divided by address lower bits. If multiple data storage areas are specified using the upper bits of the address, specify the data storage area of the memory block to which the address increment signal is not given among the specified multiple data storage areas, and the address obtained by adding 1 to the upper bits of the address. Among the plurality of data storage areas, the data storage area of the memory block to which the address increment signal is applied is accessed in one bus cycle. This allows any microcomputer to access misaligned data that straddles word boundaries in one bus cycle.

【0026】[0026]

【実施例】以下本発明をその実施例を示す図面により詳
述する。図1は本発明に係るマイクロコンピュータのメ
モリの構成を示す模式図である。上位アドレスが入力さ
れるローデコーダ2はワード線4と接続され、ワード線
4を介してシフタ10a のデータ入力側と接続される
シフタ10a のデータ出力側はワード線4を介してメ
モリセルアレイ1と接続される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be explained in detail below with reference to drawings showing embodiments thereof. FIG. 1 is a schematic diagram showing the configuration of a memory of a microcomputer according to the present invention. The row decoder 2 to which the upper address is input is connected to the word line 4, and the data output side of the shifter 10a is connected to the data input side of the shifter 10a via the word line 4 to the memory cell array 1 via the word line 4. Connected.

【0027】下位アドレスが入力されるカラムデコーダ
3はビット選択線8と接続され、ビット選択線8を介し
てシフタ10b のデータ入力側と接続される。シフタ
10b はビット選択線8と接続され、ビット選択線8
を介してビット選択部7と接続される。ビット選択部7
はビット線5を介してメモリセルアレイ1と接続される
。ビット選択部7にはデータ入出力線9が接続されてい
る。
Column decoder 3 to which the lower address is input is connected to bit selection line 8, and via bit selection line 8 to the data input side of shifter 10b. The shifter 10b is connected to the bit selection line 8, and the bit selection line 8
It is connected to the bit selection section 7 via. Bit selection section 7
is connected to the memory cell array 1 via the bit line 5. A data input/output line 9 is connected to the bit selection section 7.

【0028】アドレスインクリメント信号線12はシフ
タ10b のシフト信号端子11b 及びAND回路1
3の一入力端子と接続されている。AND 回路13の
他入力端子は、シフタ10bをビット選択部7と接続す
るビット選択線8のうちのカラムアドレスの最小値に対
応したビット選択線8aと接続されており、AND 回
路13の出力端子はシフタ10aのシフト信号端子11
a と接続されている。
The address increment signal line 12 is connected to the shift signal terminal 11b of the shifter 10b and the AND circuit 1.
It is connected to one input terminal of 3. The other input terminal of the AND circuit 13 is connected to the bit selection line 8a corresponding to the minimum value of the column address among the bit selection lines 8 connecting the shifter 10b to the bit selection section 7, and is connected to the output terminal of the AND circuit 13. is the shift signal terminal 11 of the shifter 10a
connected to a.

【0029】メモリセルアレイ1内において、ワード線
4及びビット線5を交差させて配置され、各交点に対応
してメモリセル6,6…が配置されている。各メモリセ
ル6,6…は、夫々と対応する交差位置でワード線4及
びビット線5と接続される。
In the memory cell array 1, word lines 4 and bit lines 5 are arranged to cross each other, and memory cells 6, 6, . . . are arranged corresponding to each intersection. Each memory cell 6, 6, . . . is connected to a word line 4 and a bit line 5 at corresponding intersection positions.

【0030】次にこのメモリセルアレイ1の動作を説明
する。シフタ10a,10b はシフト信号端子11a
,11b が「L」レベルの場合には、シフタ10a,
10b の入力側のワード線4、ビット選択線8を、そ
れと対応した出力側のワード線4、ビット選択線8と接
続する。一方、シフト信号端子11a,11b が「H
」レベルの場合には、シフタ10a,10b の入力側
のワード線4、ビット選択線8を、対応する上位アドレ
ス、下位アドレスが増加する方向へ1本分シフトさせて
、出力側のワード線4、ビット選択線8と接続する。
Next, the operation of this memory cell array 1 will be explained. Shifters 10a and 10b are shift signal terminals 11a
, 11b are at "L" level, the shifters 10a, 11b are at "L" level.
The word line 4 and bit selection line 8 on the input side of 10b are connected to the corresponding word line 4 and bit selection line 8 on the output side. On the other hand, the shift signal terminals 11a and 11b are "H"
'' level, the word line 4 and bit selection line 8 on the input side of the shifters 10a and 10b are shifted by one line in the direction in which the corresponding upper and lower addresses increase, and the word line 4 on the output side is shifted. , are connected to the bit selection line 8.

【0031】そして上位アドレスの最大値に対応するワ
ード線4b及び下位アドレスの最大値に対応するビット
選択線8bについては、夫々、上位アドレスの最小値に
対応するワード線4a又は下位アドレスの最小値に対応
するビット選択線8aにシフトされる。したがって、ア
ドレスインクリメント信号線12が「L」レベルの場合
は図5に示した従来のメモリセルアレイをアクセスする
場合と同様となる。
The word line 4b corresponding to the maximum value of the upper address and the bit selection line 8b corresponding to the maximum value of the lower address are connected to the word line 4a corresponding to the minimum value of the upper address or the minimum value of the lower address, respectively. is shifted to the bit selection line 8a corresponding to the bit selection line 8a. Therefore, when the address increment signal line 12 is at the "L" level, it is similar to the case where the conventional memory cell array shown in FIG. 5 is accessed.

【0032】しかし乍ら、アドレスインクリメント信号
線12が「H」レベルの場合は、シフタ10b のシフ
ト信号端子11b が「H」レベルになるため、シフタ
10b は前述したシフト動作をする。アドレスインク
リメント信号線12が「H」レベルで、シフタ10b 
のシフト動作により下位アドレスの最小値に対応するビ
ット選択線8aが「L」レベルとなった場合、シフタ1
0a のシフト信号端子11a は「L」レベルとなる
ためシフタ10a はシフト動作しない。
However, when the address increment signal line 12 is at the "H" level, the shift signal terminal 11b of the shifter 10b is at the "H" level, so that the shifter 10b performs the above-described shift operation. When the address increment signal line 12 is at "H" level, the shifter 10b
When the bit selection line 8a corresponding to the minimum value of the lower address becomes "L" level due to the shift operation, the shifter 1
Since the shift signal terminal 11a of 0a is at the "L" level, the shifter 10a does not perform a shift operation.

【0033】アドレスインクリメント信号線12が「H
」レベルで、シフタ10b のシフト動作により、下位
アドレスの最小値に対応するビット選択線8aが「H」
レベルとなった場合、シフタ10a のシフト信号端子
11a は「H」レベルになるため、シフタ10a は
シフト動作する。したがって、アドレスインクリメント
信号線12が「H」レベルの場合、入力されたアドレス
「X」に対して、アドレス「X+1」に対応するメモリ
セル6がアクセスされることになる。
Address increment signal line 12 is set to “H”.
” level, the shift operation of the shifter 10b causes the bit selection line 8a corresponding to the minimum value of the lower address to go to “H” level.
When the signal reaches the "H" level, the shift signal terminal 11a of the shifter 10a becomes "H" level, so that the shifter 10a performs a shifting operation. Therefore, when the address increment signal line 12 is at the "H" level, the memory cell 6 corresponding to the address "X+1" is accessed in response to the input address "X".

【0034】次に図1に示したメモリセルアレイ1をア
クセスする、例えば32ビットCPU のメモリアクセ
ス動作について説明する。この32ビットCPU のメ
モリマップは図6 に示したものと同様であり、図6と
ともに説明する。下位2ビットを切捨てたアドレス「Y
」により指定されるデータ格納領域40,41,42,
43 内に配置されるワード境界を跨がないデータ格納
領域のアクセス動作は従来のマイクロコンピュータと全
く同様である。
Next, a memory access operation of, for example, a 32-bit CPU that accesses the memory cell array 1 shown in FIG. 1 will be explained. The memory map of this 32-bit CPU is similar to that shown in FIG. 6, and will be explained in conjunction with FIG. Address “Y” with lower 2 bits truncated
” data storage areas 40, 41, 42,
The access operation of the data storage area located within 43, which does not cross word boundaries, is exactly the same as that of conventional microcomputers.

【0035】しかし乍ら、ワード境界を跨ぐミスアライ
ンしたデータ格納領域のメモリアクセスを行う場合、ア
ドレスの全32ビットによりデータ格納領域の先頭バイ
トを指定し、バイトコントロール信号によりデータバス
上の有効なバイトを指定すると、メモリのアクセスは一
度のバスサイクルで完了する。
However, when performing memory access to a misaligned data storage area that straddles a word boundary, the first byte of the data storage area is specified using all 32 bits of the address, and the byte control signal is used to specify the first byte of the data storage area. If you specify , memory access is completed in one bus cycle.

【0036】例えば、データ格納領域42,43,44
,45 のワード境界を跨ぐミスアラインした4バイト
のデータ格納領域をアクセスする場合、32ビットアド
レス「Y+2」により前記データ格納領域の先頭バイト
42を指定するとともに、バイトコントロール信号によ
りデータバス上の全4バイトが有効であることを指定し
て、一度のバスサイクルでデータ格納領域42,43,
44,45 のアクセスを完了する。
For example, data storage areas 42, 43, 44
, 45, the 32-bit address "Y+2" specifies the first byte 42 of the data storage area and all 4 bytes on the data bus are accessed using the byte control signal. Specifying that the byte is valid, data storage areas 42, 43,
44, 45 accesses are completed.

【0037】図2は、図1に示すメモリと32ビットC
PU とを用いた本発明の実施例を示すマイクロコンピ
ュータの要部ブロック図である。32ビットCPU 2
5は32ビットアドレスバス17を介して32ビットア
ドレスバス16と接続されており、また32ビットデー
タバス20を介して32ビットデータバス19と接続さ
れている。
FIG. 2 shows the memory shown in FIG. 1 and the 32-bit C
1 is a block diagram of main parts of a microcomputer showing an embodiment of the present invention using a PU. 32 bit CPU 2
5 is connected to a 32-bit address bus 16 via a 32-bit address bus 17, and to a 32-bit data bus 19 via a 32-bit data bus 20.

【0038】CPU 25はバイトコントロール信号線
22a,22b,22c,22d を各別に介してアド
レスインクリメント信号生成ブロック26と接続され、
またバイトコントロール信号線22a,22b,22c
,22d を各別に介してm×1バイト語構成(mは自
然数)のメモリブロック23a,23b,23c,15
d と接続されている。32ビットアドレスバス16は
30ビットアドレスバス18a,18b,18c,18
d を各別に介してメモリブロック23a,23b,2
3c,15dと接続されている。
The CPU 25 is connected to the address increment signal generation block 26 through byte control signal lines 22a, 22b, 22c, and 22d, respectively.
Also, byte control signal lines 22a, 22b, 22c
, 22d respectively, and memory blocks 23a, 23b, 23c, 15 each having an m×1 byte word configuration (m is a natural number).
connected to d. 32 bit address bus 16 is connected to 30 bit address buses 18a, 18b, 18c, 18
d separately through memory blocks 23a, 23b, 2
3c and 15d.

【0039】メモリブロック23a はデータバス21
a によりデータバス19上のビットD0〜D7に、メ
モリブロック23b はデータバス21b によりデー
タバス19上のビットD8〜D15に、メモリブロック
23c はデータバス21c によりデータバス19上
のビットD16 〜D23 に、メモリブロック15d
 はデータバス21d によりデータバス19上のビッ
トD24 〜D31 に夫々接続されている。アドレス
バス16及び17を最上位ビットから最下位ビットに向
かってアドレスビットAD0,AD1,…AD31とす
ると、アドレス下位ビットAD30及びAD31はアド
レスインクリメント信号生成ブロック26へ与えられる
The memory block 23a is connected to the data bus 21
a to bits D0 to D7 on data bus 19, memory block 23b to bits D8 to D15 on data bus 19 via data bus 21b, and memory block 23c to bits D16 to D23 on data bus 19 via data bus 21c. , memory block 15d
are connected to bits D24 to D31 on the data bus 19 by a data bus 21d, respectively. When the address buses 16 and 17 are designated as address bits AD0, AD1, .

【0040】アドレスインクリメント信号生成ブロック
26はアドレスインクリメント信号線24a,24b,
24c を各別に介してメモリブロック23a,23b
,23c と接続されている。メモリブロック23a,
23b,23c に与えられたアドレスインクリメント
信号は、夫々のメモリブロック23a,23b,23c
 を構成するメモリのアドレスをインクリメントする信
号として与えられる。図3は図2に示したアドレスイン
クリメント信号生成ブロック26の機能を示す真理値表
であり、図中「×」は不定値を表している。
The address increment signal generation block 26 connects address increment signal lines 24a, 24b,
24c respectively to the memory blocks 23a and 23b.
, 23c. memory block 23a,
The address increment signals given to the memory blocks 23b, 23c are
It is given as a signal that increments the address of the memory that makes up the memory. FIG. 3 is a truth table showing the functions of the address increment signal generation block 26 shown in FIG. 2, and "x" in the figure represents an undefined value.

【0041】次にこのように構成した32ビットCPU
 を用いたマイクロコンピュータの動作をメモリマップ
の概念図を示す図6とともに説明する。ワード境界を跨
がないデータ格納領域をアクセスする場合は、CPU 
25が発するバイトコントロール信号22a,22b,
22c,22d とアドレス下位ビットAD30及びA
D31との組合せから、アドレスインクリメント信号生
成ブロック26は図3に示す真理値表に基づいてアドレ
スインクリメント信号24a,24b,24c を出力
しないため、メモリブロック23a,23b,23c 
を構成する全メモリのアドレスインクリメント信号12
 (図1参照)が「L」レベルになる。それにより図7
に示した従来のマイクロコンピュータと全く同様のメモ
リアクセス動作をする。
Next, a 32-bit CPU configured as described above
The operation of a microcomputer using this will be explained with reference to FIG. 6, which shows a conceptual diagram of a memory map. When accessing a data storage area that does not cross word boundaries, the CPU
Byte control signals 22a, 22b,
22c, 22d and address lower bits AD30 and A
In combination with D31, the address increment signal generation block 26 does not output address increment signals 24a, 24b, 24c based on the truth table shown in FIG.
Address increment signal 12 for all memories that make up
(see FIG. 1) goes to "L" level. As a result, Figure 7
The memory access operation is exactly the same as that of the conventional microcomputer shown in .

【0042】しかし乍ら、CPU 25がデータ格納領
域42,43,44,45 のワード境界を跨ぐミスア
ラインした4バイトデータをアクセスする場合、32ビ
ットアドレス「Y+2」をアドレスバス17を介してア
ドレスバス16に与えるとともに、バイトコントロール
信号22a,22b,22c,22d を出力する。こ
のようにメモリブロック23a,23b,23c,15
dにバイトコントロール信号22a,22b,22c,
22d が与えられたため、アドレスバス18a,18
b,18c,18d を介して32ビットアドレス「Y
+2」の上位30ビット「Y/4」を取込み、夫々のメ
モリブロック内アドレスとする。
However, when the CPU 25 accesses misaligned 4-byte data that straddles word boundaries in the data storage areas 42, 43, 44, and 45, the 32-bit address "Y+2" is sent to the address bus 17 via the address bus 17. 16, and outputs byte control signals 22a, 22b, 22c, and 22d. In this way, memory blocks 23a, 23b, 23c, 15
Byte control signals 22a, 22b, 22c,
22d, the address buses 18a, 18
32-bit address “Y” via b, 18c, 18d
The upper 30 bits ``Y/4'' of ``+2'' are taken in and used as addresses within each memory block.

【0043】またCPU 25からバイトコントロール
信号22a,22b,22c,22d が出力されたた
めバイトコントロール信号22a,22b,22c,2
2d は全て「1」となり、32ビットアドレスは「Y
+2」であるために、アドレス下位ビットAD30が「
1」、AD31が「0」となる。したがって、アドレス
インクリメント信号生成ブロック26は図3の真理値表
に示したように、アドレスインクリメント信号24a及
び24b を出力し、アドレスインクリメント信号24
c を出力しない。
Also, since the CPU 25 outputs the byte control signals 22a, 22b, 22c, 22d, the byte control signals 22a, 22b, 22c, 2
2d are all “1” and the 32-bit address is “Y
+2", the address lower bit AD30 is "
1”, and AD31 becomes “0”. Therefore, the address increment signal generation block 26 outputs the address increment signals 24a and 24b as shown in the truth table of FIG.
Do not output c.

【0044】アドレスインクリメント信号24a がア
ドレスインクリメント信号生成ブロック26から出力さ
れたため、メモリブロック23aを構成する各メモリの
アドレスインクリメント信号12が「H」レベルになり
、取込んだメモリブロック内アドレス「Y/4」に対し
てメモリブロック内アドレス「(Y/4)+1」に対応
するメモリセルがアクセス可能になる。
Since the address increment signal 24a is output from the address increment signal generation block 26, the address increment signal 12 of each memory constituting the memory block 23a becomes "H" level, and the fetched address "Y/ 4", the memory cell corresponding to the address "(Y/4)+1" in the memory block becomes accessible.

【0045】それにより、メモリブロック23a はア
ドレス「Y+4」の1バイトデータ格納領域44のアク
セスが可能になる。またアドレスインクリメント信号2
4b がアドレスインクリメント信号生成ブロック26
から出力されたため、メモリブロック23bもメモリブ
ロック23a と同様の動作をし、取込んだメモリブロ
ック内アドレス「Y/4」に対してメモリブロック内ア
ドレス「(Y/4)+1」に対応する1バイトデータ格
納領域45のアクセスが可能になる。
As a result, the memory block 23a can access the 1-byte data storage area 44 at address "Y+4". Also, address increment signal 2
4b is the address increment signal generation block 26
Therefore, the memory block 23b operates in the same way as the memory block 23a, and the memory block 23b operates in the same way as the memory block 23a. Access to the byte data storage area 45 becomes possible.

【0046】したがってメモリブロック23b はメモ
リブロック内アドレス「Y+5」の1バイトデータ格納
領域45のアクセスが可能となる。アドレスインクリメ
ント信号24c を、アドレスインクリメント信号生成
ブロック26が出力しないため、メモリブロック23c
 を構成するメモリのアドレスインクリメント信号12
は「L」レベルとなり、取込んだメモリブロック内アド
レス「Y/4」に対応するメモリセルのアクセスが可能
になる。
Therefore, the memory block 23b can access the 1-byte data storage area 45 at address "Y+5" within the memory block. Since the address increment signal generation block 26 does not output the address increment signal 24c, the memory block 23c
Address increment signal 12 of the memory that constitutes
becomes the "L" level, and the memory cell corresponding to the fetched address "Y/4" in the memory block becomes accessible.

【0047】それにより、メモリブロック23c はメ
モリブロック内アドレス「Y+2」の1バイトデータ格
納領域42のアクセスが可能となる。メモリブロック1
5d は従来のメモリで構成されているため、取込んだ
メモリブロック内アドレス「Y/4」に対応する1バイ
トデータ格納領域43のアクセスが可能となる。したが
って、メモリブロック15d はメモリブロック内アド
レス「Y+3」の1バイトデータ格納領域43のアクセ
スを可能にする。
As a result, the memory block 23c can access the 1-byte data storage area 42 at address "Y+2" within the memory block. memory block 1
Since 5d is constituted by a conventional memory, it is possible to access the 1-byte data storage area 43 corresponding to the loaded address "Y/4" in the memory block. Therefore, the memory block 15d allows access to the 1-byte data storage area 43 at address "Y+3" within the memory block.

【0048】結局、CPU 25は1度のバスサイクル
でデータ格納領域42,43,44,45 のワード境
界を跨ぐミスアラインした4バイトのデータ格納領域を
アクセスしたことになる。
In the end, the CPU 25 accesses the misaligned 4-byte data storage area that straddles word boundaries in the data storage areas 42, 43, 44, and 45 in one bus cycle.

【0049】図4は本発明に係るマイクロコンピュータ
の他の実施例を示す要部ブロック図である。図2に示し
たマイクロコンピュータでは、アドレス下位ビットAD
30及びAD31とバイトコントロール信号22a,2
2b,22c,22d とに基づいてアドレスインクリ
メント信号24a,24b,24c を出力させている
が、CPU からミスアラインデータアクセス信号を発
するようにして、ワード境界を跨ぐミスアラインしたデ
ータ格納領域をアクセスする場合は、ミスアラインデー
タアクセス信号を発して、発したミスアラインデータア
クセス信号とアドレス下位ビットとを用いて簡単な論理
回路でアドレスインクリメント信号を出力させるように
構成している。
FIG. 4 is a block diagram of main parts showing another embodiment of the microcomputer according to the present invention. In the microcomputer shown in FIG. 2, the address lower bit AD
30 and AD31 and byte control signals 22a, 2
2b, 22c, 22d, address increment signals 24a, 24b, 24c are output based on the address increment signals 24a, 24b, 24c, but when a misaligned data storage area that straddles a word boundary is accessed by issuing a misaligned data access signal from the CPU. is configured to generate a misaligned data access signal and output an address increment signal using a simple logic circuit using the generated misaligned data access signal and lower address bits.

【0050】CPU 27はミスアラインデータアクセ
ス信号28を発するようになっており、このミスアライ
ンデータアクセス信号28はメモリブロック23a に
アドレスインクリメント信号24a として与えられ、
またAND 回路29の一入力端子及び3入力AND 
回路30の第1入力端子へ与えられている。AND 回
路29の他入力端子及び3入力AND 回路30の第2
入力端子にはアドレス下位ビットAD30が与えられて
いる。
The CPU 27 is configured to issue a misaligned data access signal 28, and this misaligned data access signal 28 is given to the memory block 23a as an address increment signal 24a.
In addition, one input terminal of the AND circuit 29 and three input terminals of the AND circuit 29
A first input terminal of circuit 30 is provided. The other input terminal of the AND circuit 29 and the second input terminal of the 3-input AND circuit 30
Address lower bit AD30 is applied to the input terminal.

【0051】3入力AND 回路30の第3入力端子に
はアドレス下位ビットAD31が与えられている。AN
D 回路29の出力はアドレスインクリメント信号24
b としてメモリブロック23b へ与えられ、3入力
AND 回路30の出力は、アドレスインクリメント信
号24cとしてメモリブロック23c へ与えられてい
る。32ビットCPU 27は32ビットアドレスバス
17を介して32ビットアドレスバス16と接続されて
おり、また32ビットデータバス20を介して32ビッ
トデータバス19と接続されている。
The third input terminal of the three-input AND circuit 30 is supplied with the address lower bit AD31. AN
The output of the D circuit 29 is the address increment signal 24.
b to the memory block 23b, and the output of the 3-input AND circuit 30 is fed to the memory block 23c as an address increment signal 24c. The 32-bit CPU 27 is connected to the 32-bit address bus 16 via a 32-bit address bus 17 and to the 32-bit data bus 19 via a 32-bit data bus 20.

【0052】アドレスバス16は30ビットアドレスバ
ス18a,18b,18c,18d を各別に介してメ
モリブロック23a,23b,23c,15d と接続
されている。メモリブロック23a はデータバス21
a によりデータバス19上のビットD0〜D7に、メ
モリブロック23b はデータバス21b によりデー
タバス19上のビットD8〜D15 に、メモリブロッ
ク23c はデータバス21c によりデータバス19
上のビットD16 〜D23に、メモリブロック15d
 はデータバス21d によりデータバス19上のビッ
トD24 〜D31 に夫々接続されている。
Address bus 16 is connected to memory blocks 23a, 23b, 23c, and 15d via 30-bit address buses 18a, 18b, 18c, and 18d, respectively. The memory block 23a is connected to the data bus 21
a to bits D0 to D7 on data bus 19, memory block 23b to bits D8 to D15 on data bus 19 via data bus 21b, and memory block 23c to bits D8 to D15 on data bus 19 via data bus 21c.
Upper bits D16 to D23 contain memory block 15d.
are connected to bits D24 to D31 on the data bus 19 by a data bus 21d, respectively.

【0053】次にこのように構成したマイクロコンピュ
ータのメモリアクセス動作を図1とともに説明する。ワ
ード境界を跨がないデータ格納領域をアクセスする場合
は、CPU 27はミスアラインデータアクセス信号2
8を出力せず、ミスアラインデータアクセス信号28は
「L」レベルであり、アドレスインクリメント信号24
a,24b,24cはメモリブロック23a,23b,
23c に与えられない。そのため、メモリブロック2
3a,23b,23c を構成する全メモリのアドレス
インクリメント信号12 (図1参照)が「L」レベル
になる。したがって、図7に示す従来のマイクロコンピ
ュータと同様のメモリアクセス動作をする。
Next, the memory access operation of the microcomputer configured as described above will be explained with reference to FIG. When accessing a data storage area that does not cross word boundaries, the CPU 27 sends a misaligned data access signal 2.
8 is not output, the misaligned data access signal 28 is at "L" level, and the address increment signal 24 is
a, 24b, 24c are memory blocks 23a, 23b,
23c. Therefore, memory block 2
The address increment signals 12 (see FIG. 1) of all the memories constituting 3a, 23b, and 23c become "L" level. Therefore, the memory access operation is similar to that of the conventional microcomputer shown in FIG.

【0054】しかし乍ら、CPU 27がワード境界を
跨ぐミスアラインしたデータ格納領域をアクセスする場
合は、ミスアラインデータアクセス信号28が出力され
、ミスアラインデータアクセス信号28が「H」レベル
になる。したがって、アドレスインクリメント信号24
a は、アドレス下位ビットAD30及びAD31に関
係なく「H」レベルになる。
However, when the CPU 27 accesses a misaligned data storage area that straddles a word boundary, the misaligned data access signal 28 is output, and the misaligned data access signal 28 becomes "H" level. Therefore, address increment signal 24
a becomes "H" level regardless of address lower bits AD30 and AD31.

【0055】そして、アドレス下位ビットAD30が「
0」であってアドレス下位ビットAD31が「1」であ
る場合、アドレスインクリメント信号24b 及び24
c がともに「0」になる。また、アドレス下位ビット
AD30が「1」でアドレス下位ビットAD31が「0
」である場合、アドレスインクリメント信号24b は
「1」となり、アドレスインクリメント信号24c は
「0」になる。
[0055] Then, address lower bit AD30 is "
0” and address lower bit AD31 is “1”, address increment signals 24b and 24
Both c become "0". Also, address lower bit AD30 is “1” and address lower bit AD31 is “0”.
'', the address increment signal 24b becomes "1" and the address increment signal 24c becomes "0".

【0056】更にアドレス下位ビットAD30が「1」
であり、アドレス下位ビットAD31が「1」である場
合、アドレスインクリメント信号24b 及び24c 
はともに「1」になる。即ち、図3に示す真理値表によ
り示されるアドレスインクリメント信号24a,24b
,24c の生成と全く同様に、アドレスインクリメン
ト信号24a,24b,24c が出力される。
Furthermore, the lower address bit AD30 is “1”
and when address lower bit AD31 is "1", address increment signals 24b and 24c
Both become "1". That is, the address increment signals 24a and 24b shown in the truth table shown in FIG.
, 24c are generated, address increment signals 24a, 24b, 24c are output.

【0057】そして図2に示したマイクロコンピュータ
のメモリアクセス動作と同様に、1度のバスサイクルで
ワード境界を跨ぐミスアラインしたデータ格納領域をア
クセスできる。
Similar to the memory access operation of the microcomputer shown in FIG. 2, misaligned data storage areas that straddle word boundaries can be accessed in one bus cycle.

【0058】なお、本実施例では、1バイトデータ格納
領域ごとに、1つのアドレスバスを割当て、4バイト幅
のデータバスを介して同時に4バイトデータをアクセス
できるCPU について説明したが、一度にアクセスで
きるバイト数は2バイト以上であればよく実施例のバイ
ト数に何ら限定されるものではない。
In this embodiment, one address bus is allocated to each 1-byte data storage area, and the CPU can access 4-byte data simultaneously via a 4-byte wide data bus. The possible number of bytes is not limited to the number of bytes in the embodiment as long as it is 2 or more bytes.

【0059】また、動作を正論理で説明したが、負論理
でもよいのは言うまでもない。また本実施例では1つの
データ格納領域に1つのアドレスを割当てたが、2つの
データ格納領域に1つのアドレスを割当ててもよい。
Furthermore, although the operation has been explained using positive logic, it goes without saying that negative logic may also be used. Further, in this embodiment, one address is assigned to one data storage area, but one address may be assigned to two data storage areas.

【0060】[0060]

【発明の効果】以上詳述したように、本発明によれば、
ワード境界を跨ぐミスアラインしたデータ格納領域を、
一度のバスサイクルでアクセスできるから、データがミ
スアラインしている場合に、メモリのアクセス回数が増
加せず、プログラムの実行速度が速いマイクロコンピュ
ータを提供できる優れた効果を奏する。
[Effects of the Invention] As detailed above, according to the present invention,
Misaligned data storage areas that cross word boundaries are
Since it can be accessed in one bus cycle, the number of memory accesses does not increase even when data is misaligned, and it has the excellent effect of providing a microcomputer that can execute programs at high speed.

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

【図1】第1発明及び第2発明に係るマイクロコンピュ
ータのメモリの要部構成を示すブロック図である。
FIG. 1 is a block diagram showing a main part configuration of a memory of a microcomputer according to a first invention and a second invention.

【図2】第3発明に係るマイクロコンピュータの要部構
成を示すブロック図である。
FIG. 2 is a block diagram showing the main part configuration of a microcomputer according to a third invention.

【図3】アドレスインクリメント信号生成ブロックの機
能を示す真理値表である。
FIG. 3 is a truth table showing the functions of an address increment signal generation block.

【図4】第4発明に係るマイクロコンピュータの要部構
成を示すブロック図である。
FIG. 4 is a block diagram showing the main part configuration of a microcomputer according to a fourth invention.

【図5】従来のマイクロコンピュータのメモリの要部構
成を示すブロック図である。
FIG. 5 is a block diagram showing the configuration of main parts of a memory of a conventional microcomputer.

【図6】CPU のメモリマップの概念図である。FIG. 6 is a conceptual diagram of a memory map of the CPU.

【図7】従来のマイクロコンピュータの要部構成を示す
ブロック図である。
FIG. 7 is a block diagram showing the main part configuration of a conventional microcomputer.

【符号の説明】[Explanation of symbols]

1  メモリセルアレイ 2  ローデコーダ 3  カラムデコーダ 4  ワード線 5  ビット線 6  メモリセル 10a,10b   シフタ 13  AND 回路 15d   メモリブロック 23a,23b,23c   メモリブロック25  
CPU 26  アドレスインクリメント信号生成ブロック27
  CPU 29,30   AND 回路 40〜47  データ格納領域
1 Memory cell array 2 Row decoder 3 Column decoder 4 Word line 5 Bit line 6 Memory cells 10a, 10b Shifter 13 AND circuit 15d Memory block 23a, 23b, 23c Memory block 25
CPU 26 Address increment signal generation block 27
CPU 29, 30 AND circuits 40 to 47 data storage area

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】  メモリのnバイト(nは自然数)のデ
ータ格納領域ごとに1つのアドレスを割当ててあり、2
nバイトのデータをCPU によりアクセス可能にして
いるマイクロコンピュータにおいて、前記CPU が発
したアドレスをインクリメントする手段と、前記アドレ
スのデータ格納領域及びインクリメントしたアドレスの
データ格納領域を1度のバスサイクルでアクセスする手
段とを備えることを特徴とするマイクロコンピュータ。
Claim 1: One address is assigned to each n-byte (n is a natural number) data storage area of the memory, and two
In a microcomputer in which n-byte data can be accessed by a CPU, a means for incrementing an address issued by the CPU, and a data storage area of the address and a data storage area of the incremented address are accessed in one bus cycle. A microcomputer characterized by comprising means for.
【請求項2】  メモリのnバイト(nは自然数)のデ
ータ格納領域ごとに1つのアドレスを割当ててあり、ワ
ード境界を跨ぐミスアラインしたKnバイト(Kは2以
上の整数)以上のデータを、CPU により1度のバス
サイクルでアクセス可能にしているマイクロコンピュー
タであって、アクセスすべきデータ格納領域の先頭バイ
トのアドレス全ビットをアドレスバスへ同時出力する手
段と、Knバイトより大なるデータバス上の有効バイト
を指定する信号を発する手段とを備え、先頭バイトを指
定するとともに有効バイト数を指定して、指定した有効
バイト数のデータ格納領域を、先頭バイトを先頭にアク
セスすべく構成してあることを特徴とするマイクロコン
ピュータ。
2. One address is assigned to each data storage area of n bytes (n is a natural number) of the memory, and misaligned data of Kn bytes (K is an integer of 2 or more) or more that straddles word boundaries is transferred to the CPU. A microcomputer that can be accessed in one bus cycle by means of a means for simultaneously outputting all address bits of the first byte of a data storage area to be accessed to an address bus, and a means for simultaneously outputting all address bits of the first byte of a data storage area to be accessed, and means for emitting a signal specifying the effective byte, and is configured to specify the first byte and the number of effective bytes, and access the data storage area of the specified number of effective bytes starting with the first byte. A microcomputer characterized by:
【請求項3】  メモリのnバイト(nは自然数)のデ
ータ格納領域ごとに1つのアドレスを割当ててあり、ワ
ード境界を跨ぐミスアラインしたKnバイト(Kは2以
上の整数)以上のデータを、CPU により1度のバス
サイクルでアクセス可能にしているマイクロコンピュー
タであって、アクセスすべきデータ格納領域の先頭バイ
トのアドレス全ビットを同時出力する手段と、データが
ミスアラインか否かを表すバイトコントロール信号を発
する手段と、該バイトコントロール信号及び前記先頭バ
イトのアドレス下位ビットに基づいてアドレスインクリ
メント信号を発生させ、アドレス下位ビットで区分され
る複数のメモリブロックへ選択的に与える手段と、前記
先頭バイトのアドレス上位ビットで指定される複数のデ
ータ格納領域のうち、アドレスインクリメント信号が与
えられていないメモリブロックのデータ格納領域及び前
記アドレス上位ビットに1を加えたアドレスで指定され
る複数のデータ格納領域のうち、アドレスインクリメン
ト信号が与えられたメモリブロックのデータ格納領域を
アクセスする手段とを備えることを特徴とするマイクロ
コンピュータ。
3. One address is assigned to each data storage area of n bytes (n is a natural number) of the memory, and misaligned data of Kn bytes (K is an integer of 2 or more) or more that cross word boundaries is transferred to the CPU. A microcomputer that can be accessed in one bus cycle by means of a means for simultaneously outputting all address bits of the first byte of a data storage area to be accessed, and a byte control signal indicating whether or not the data is misaligned. means for generating an address increment signal based on the byte control signal and the lower address bits of the first byte, and means for selectively applying the address increment signal to a plurality of memory blocks divided by the lower address bits; and the address of the first byte. Among the multiple data storage areas specified by the upper bits, the data storage area of a memory block to which an address increment signal is not given, and among the multiple data storage areas specified by the address obtained by adding 1 to the upper bits of the address. , means for accessing a data storage area of a memory block to which an address increment signal is applied.
【請求項4】  メモリのnバイト(nは自然数)のデ
ータ格納領域ごとに1つのアドレスを割当ててあり、ワ
ード境界を跨ぐミスアラインしたKnバイト(Kは2以
上の整数)のデータを、CPU により1度のバスサイ
クルでアクセス可能にしているマイクロコンピュータで
あって、アクセスすべきデータ格納領域の先頭バイトを
指定するためのアドレス全ビットを同時出力する手段と
、ミスアラインしたデータ格納領域のアクセスを指令す
るミスアラインデータアクセス信号を発する手段と、該
ミスアラインデータアクセス信号及び前記先頭バイトの
アドレス下位ビットに基づいてアドレスインクリメント
信号を発生させ、アドレス下位ビットで区分される複数
のメモリブロックへ選択的に与える手段と、前記先頭バ
イトのアドレス上位ビットで指定される複数のデータ格
納領域のうち、アドレスインクリメント信号が与えられ
ていないメモリブロックのデータ格納領域及び前記アド
レス上位ビットに1を加えたアドレスで指定される複数
のデータ格納領域のうち、アドレスインクリメント信号
が与えられたメモリブロックのデータ格納領域をアクセ
スする手段とを備えることを特徴とするマイクロコンピ
ュータ。
4. One address is assigned to each n-byte (n is a natural number) data storage area of the memory, and misaligned Kn-byte (K is an integer of 2 or more) data that straddles word boundaries is stored by the CPU. A microcomputer that can be accessed in one bus cycle, and includes means for simultaneously outputting all address bits to specify the first byte of the data storage area to be accessed, and commands to access misaligned data storage areas. means for generating a misaligned data access signal, and generating an address increment signal based on the misaligned data access signal and the address lower bits of the first byte, and selectively accessing a plurality of memory blocks divided by the address lower bits; and a data storage area of a memory block to which an address increment signal is not given among the plurality of data storage areas specified by the address upper bits of the first byte, and an address specified by adding 1 to the address upper bits. 1. A microcomputer comprising means for accessing a data storage area of a memory block to which an address increment signal is applied, among a plurality of data storage areas provided in the memory block.
JP13413291A 1991-06-05 1991-06-05 Microcomputer Pending JPH04359334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13413291A JPH04359334A (en) 1991-06-05 1991-06-05 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13413291A JPH04359334A (en) 1991-06-05 1991-06-05 Microcomputer

Publications (1)

Publication Number Publication Date
JPH04359334A true JPH04359334A (en) 1992-12-11

Family

ID=15121219

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13413291A Pending JPH04359334A (en) 1991-06-05 1991-06-05 Microcomputer

Country Status (1)

Country Link
JP (1) JPH04359334A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8539173B2 (en) 2010-03-29 2013-09-17 Renesas Electronics Corporation Memory device, memory system and microcontroller including memory device, and memory control device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8539173B2 (en) 2010-03-29 2013-09-17 Renesas Electronics Corporation Memory device, memory system and microcontroller including memory device, and memory control device

Similar Documents

Publication Publication Date Title
US5784637A (en) Single-chip semiconductor integrated circuit device and microcomputer integrated on a semiconductor chip
JPS6334554B2 (en)
JPH03222197A (en) Digital sound source device and external memory cartridge used therefor
EP0306962A2 (en) Single-chip microcomputer
US20050182885A1 (en) Semiconductor integrated circuit
US5127096A (en) Information processor operative both in direct mapping and in bank mapping, and the method of switching the mapping schemes
US5567900A (en) Electronic tone generator system with CPU and DSP
JPH04359334A (en) Microcomputer
JPH07302254A (en) Microcomputer system
US5764950A (en) Data processing system having a function of changing bus width
US5790883A (en) Multiple ports storage device with programmable overlapped data bits access
JPH0259560B2 (en)
JPS6148174B2 (en)
EP0373594B1 (en) Computer memory having its output lines selected for connection to a data bus by the memory address
JP2692180B2 (en) Microcomputer
JP3488059B2 (en) Interrupt address extension circuit
JPS6126699B2 (en)
JP3344488B2 (en) Microcomputer and method of manufacturing the same
JPH0338612B2 (en)
JPH10161929A (en) Electronic device
JPH01226052A (en) Memory controller
JPH048799B2 (en)
JPH07210458A (en) Method and device for controlling memory
JPH08221322A (en) Device and method for controlling memory
JPH02245861A (en) Data transfer method