JP2003323597A - Memory card - Google Patents
Memory cardInfo
- Publication number
- JP2003323597A JP2003323597A JP2002194193A JP2002194193A JP2003323597A JP 2003323597 A JP2003323597 A JP 2003323597A JP 2002194193 A JP2002194193 A JP 2002194193A JP 2002194193 A JP2002194193 A JP 2002194193A JP 2003323597 A JP2003323597 A JP 2003323597A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- stored
- memory card
- program data
- volatile memory
- 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.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
- Storage Device Security (AREA)
Abstract
(57)【要約】
【課題】 回路規模を小さくすることができるメモリカ
ードを提供する。
【解決手段】 Java(TM)で記述されたソースコ
ードはバイトコードに変換(コンパイル)されてデジタ
ル機器2からメモリカード1へダウンロードされる。メ
モリカード1にダウンロードされたバイトコード(クラ
スファイル)は仮想マシン130においてstatic
変数の部分とAppletコードおよびstatic
final変数の部分とに分離される。書き換えが発生
する可能性がある部分(static変数の部分)はE
EPROM150に格納され、書き換えが発生する可能
性がない部分(Appletコードおよびstatic
final変数の部分)は暗号処理部170で暗号化さ
れた後にフラッシュメモリ200に格納される。
(57) [Summary] To provide a memory card capable of reducing the circuit scale. A source code described in Java (TM) is converted (compiled) into bytecode and downloaded from a digital device to a memory card. The bytecode (class file) downloaded to the memory card 1 is static in the virtual machine 130.
Variable part, Applet code and static
It is separated into the final variable part. The part where rewriting may occur (the part of static variable) is E
A part stored in the EPROM 150 and having no possibility of rewriting (Applet code and static
The final variable part) is stored in the flash memory 200 after being encrypted by the encryption processing unit 170.
Description
【0001】[0001]
【発明の属する技術分野】この発明はメモリカードに関
し、さらに詳しくは、プログラムデータをダウンロード
して不揮発性メモリに格納するメモリカードに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory card, and more particularly to a memory card that downloads program data and stores it in a nonvolatile memory.
【0002】[0002]
【従来の技術および発明が解決しようとする課題】デジ
タルカメラ・PDA・携帯型オーディオ・携帯電話・パ
ソコンなどのデジタル機器での情報の書き込み/読み出
しにメモリカードが利用されている。メモリカードには
フラッシュメモリとコントローラの2つのチップが搭載
されている。近年、メモリカードに搭載されるフラッシ
ュメモリは大容量化しつつあり、これに応じて大規模な
データをフラッシュメモリに格納できるようになりつつ
ある。ところが現状では、メモリカードはデジタル機器
とデータのやりとりをするだけである。なお、ICカー
ドにはアプリケーションプログラムをダウンロードして
実行可能なものが存在する。しかし、プログラム格納用
の不揮発性メモリの容量は、メモリカードに搭載される
フラッシュメモリの容量に比べて非常に小さい。2. Description of the Related Art Memory cards are used for writing / reading information in digital devices such as digital cameras, PDAs, portable audios, mobile phones, and personal computers. The memory card has two chips, a flash memory and a controller. In recent years, the flash memory mounted on a memory card has been increasing in capacity, and accordingly, large-scale data can be stored in the flash memory. However, at present, memory cards only exchange data with digital devices. Some IC cards can download and execute application programs. However, the capacity of the non-volatile memory for storing the program is much smaller than the capacity of the flash memory mounted on the memory card.
【0003】この発明の目的は、回路規模を小さくする
ことができるメモリカードを提供することである。An object of the present invention is to provide a memory card whose circuit scale can be reduced.
【0004】[0004]
【課題を解決するための手段および発明の効果】この発
明によるメモリカードは、第1の不揮発性メモリと、第
2の不揮発性メモリと、分離部とを備える。第1の不揮
発性メモリは所定の消去単位を有する。第2の不揮発性
メモリは、第1の不揮発性メモリの消去単位よりも大き
い消去単位を有する。分離部は、メモリカードにダウン
ロードされたプログラムデータのうち少なくとも書き換
えが発生する可能性がある部分を分離し、分離した部分
を第1の不揮発性メモリへ格納し、残りの部分を第2の
不揮発性メモリへ格納する。A memory card according to the present invention comprises a first non-volatile memory, a second non-volatile memory, and a separating section. The first nonvolatile memory has a predetermined erase unit. The second nonvolatile memory has an erase unit larger than the erase unit of the first nonvolatile memory. The separating unit separates at least a portion of the program data downloaded to the memory card where rewriting may occur, stores the separated portion in the first nonvolatile memory, and stores the remaining portion in the second nonvolatile memory. Stored in the memory.
【0005】上記メモリカードでは、ダウンロードした
プログラムの実行処理において、プログラム中のデータ
の書き換え処理は第2の不揮発性メモリにおいては発生
せず第1の不揮発性メモリにおいてのみ発生する。この
ように、消去単位の小さい第1の不揮発性メモリにおい
て変数などの書き換え処理を行うことにより、消去単位
の大きい第2の不揮発性メモリにおいて処理を行う場合
に比べて、必要なバッファサイズが小さくてよく、回路
規模を小さくできる。In the above memory card, in the execution process of the downloaded program, the rewriting process of the data in the program does not occur in the second non-volatile memory but occurs only in the first non-volatile memory. In this way, by performing the rewriting process of variables and the like in the first non-volatile memory having a small erase unit, the required buffer size is smaller than that in the case of performing the process in the second non-volatile memory having a large erase unit. The circuit scale can be reduced.
【0006】また、書き換えのために一時的にバッファ
リングするデータのサイズは第2の不揮発性メモリより
も第1の不揮発性メモリのほうが小さい。したがって、
第2の不揮発性メモリにおいて書き換え処理を行う場合
に比べて書き換えのためのバッファリング処理時間が少
なくてすみ、書き換えに必要な処理時間を少なくでき
る。The size of the data temporarily buffered for rewriting is smaller in the first non-volatile memory than in the second non-volatile memory. Therefore,
The buffering processing time for rewriting can be reduced as compared with the case where the rewriting processing is performed in the second nonvolatile memory, and the processing time required for rewriting can be shortened.
【0007】また、ダウンロードしたプログラムデータ
を第1の不揮発性メモリと第2の不揮発性メモリとに分
離して格納しているためセキュリティ性が向上する。Further, since the downloaded program data is stored separately in the first non-volatile memory and the second non-volatile memory, the security is improved.
【0008】好ましくは、上記プログラムデータは、関
数と変数とから構成される。上記分離部は、上記関数を
第2の不揮発性メモリへ格納し、上記変数のうち書き換
えが発生する可能性のあるものを第1の不揮発性メモリ
に格納し、上記変数のうち書き換えが発生する可能性が
ないものを第2の不揮発性メモリへ格納する。Preferably, the program data is composed of a function and a variable. The separation unit stores the function in the second non-volatile memory, stores one of the variables that may be rewritten in the first non-volatile memory, and rewrites the variable. What is not possible is stored in the second non-volatile memory.
【0009】好ましくは、上記プログラムデータは、オ
ブジェクト指向プログラミング言語で記述されたクラス
である。上記分離部は、上記クラスの変数を第1の不揮
発性メモリへ格納し、上記クラスのメソッドを第2の不
揮発性メモリへ格納する。Preferably, the program data is a class written in an object-oriented programming language. The separation unit stores the variable of the class in the first non-volatile memory and stores the method of the class in the second non-volatile memory.
【0010】好ましくは、上記プログラムデータは、オ
ブジェクト指向プログラミング言語で記述されたクラス
である。上記分離部は、上記クラスの変数のうち書き換
えが発生する可能性があるものを第1の不揮発性メモリ
へ格納し、上記クラスの変数のうち書き換えが発生する
可能性がないものおよび上記クラスのメソッドを第2の
不揮発性メモリへ格納する。Preferably, the program data is a class written in an object-oriented programming language. The separation unit stores, in the first non-volatile memory, variables of the class that may be rewritten, and variables of the class that are not likely to be rewritten and the variables of the class. The method is stored in the second non-volatile memory.
【0011】好ましくは、上記メモリカードは暗号処理
部をさらに備える。暗号処理部は、第2の不揮発性メモ
リに格納されるべき上記残りの部分を暗号化する。そし
て第1の不揮発性メモリ、分離部および暗号処理部は同
一チップ上に形成される。Preferably, the memory card further includes an encryption processing unit. The encryption processing unit encrypts the remaining portion to be stored in the second non-volatile memory. Then, the first non-volatile memory, the separation unit, and the encryption processing unit are formed on the same chip.
【0012】上記メモリカードでは、第2の不揮発性メ
モリに格納するプログラムデータについては暗号処理部
において暗号化しているためセキュリティ性がさらに向
上する。In the above memory card, the program data stored in the second non-volatile memory is encrypted by the encryption processing section, so that the security is further improved.
【0013】好ましくは、上記第1の不揮発性メモリは
EEPROMであり、上記第2の不揮発性メモリはフラ
ッシュメモリである。Preferably, the first non-volatile memory is an EEPROM and the second non-volatile memory is a flash memory.
【0014】[0014]
【発明の実施の形態】以下、この発明の実施の形態を図
面を参照して詳しく説明する。なお、図中同一または相
当部分には同一の符号を付しその説明は繰り返さない。BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will now be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference numerals, and the description thereof will not be repeated.
【0015】<メモリカードシステムの全体構成>図1
は、この発明の実施の形態によるメモリカードシステム
の全体構成を示すブロック図である。図1に示すシステ
ムでは、デジタル機器2(たとえば、デジタルカメラ・
PDA・携帯型オーディオ・携帯電話・パソコンなど)
のスロット(図示せず)にメモリカード1が挿入され、
デジタル機器2からメモリカード1にプログラムデータ
がダウンロードされる。ダウンロードされたプログラム
はメモリカード1内部で実行される。<Overall Configuration of Memory Card System> FIG.
FIG. 1 is a block diagram showing an overall configuration of a memory card system according to an embodiment of the present invention. In the system shown in FIG. 1, a digital device 2 (for example, a digital camera
(PDA, portable audio, mobile phone, personal computer, etc.)
Insert the memory card 1 into the slot (not shown)
Program data is downloaded from the digital device 2 to the memory card 1. The downloaded program is executed inside the memory card 1.
【0016】<デジタル機器2>デジタル機器2は、オ
ブジェクト指向プログラミング言語であるJava(T
M)で記述されたソースコードをバイトコードに変換
(コンパイル)してメモリカード1へ転送する。<Digital Device 2> The digital device 2 is a Java (T) which is an object-oriented programming language.
The source code described in M) is converted (compiled) into a byte code and transferred to the memory card 1.
【0017】<メモリカード1>メモリカード1は、コ
ントローラチップ100とフラッシュメモリチップ20
0とを備える。<Memory Card 1> The memory card 1 includes a controller chip 100 and a flash memory chip 20.
With 0 and.
【0018】コントローラチップ100は、インターフ
ェース110,140,180と、CPU120と、仮
想マシン130と、EEPROM150と、バッファR
AM145,160と、暗号処理部170とを含む。The controller chip 100 includes interfaces 110, 140 and 180, a CPU 120, a virtual machine 130, an EEPROM 150, and a buffer R.
It includes AMs 145 and 160 and a cryptographic processing unit 170.
【0019】インターフェース110は、デジタル機器
2とコントローラチップ100との間のインターフェー
スである。インターフェース110は、デジタル機器2
からダウンロードしたクラスファイル(バイトコード)
を仮想マシン130へ転送する。The interface 110 is an interface between the digital device 2 and the controller chip 100. The interface 110 is the digital device 2
Class file downloaded from (byte code)
To the virtual machine 130.
【0020】仮想マシン130は、インターフェース1
10より与えられるクラスファイルからstatic変
数を分離してインターフェース140に供給し、残り
(appletコードおよびstatic final
変数)をバッファRAM160に供給する。また仮想マ
シン130は、EEPROM150およびフラッシュメ
モリチップ200から読み出されたプログラムデータ
(バイトコード)をCPU120が実行可能な形式にイ
ンタープリタ方式で変換する。The virtual machine 130 has an interface 1
The static variable is separated from the class file given by 10 and supplied to the interface 140, and the rest (applet code and static final
Variable) is supplied to the buffer RAM 160. Further, the virtual machine 130 converts the program data (byte code) read from the EEPROM 150 and the flash memory chip 200 into a format executable by the CPU 120 by an interpreter method.
【0021】CPU120は、仮想マシン130によっ
て変換されたプログラムを実行する。またCPU120
は、コントローラチップ100の動作を制御する。The CPU 120 executes the program converted by the virtual machine 130. Also, the CPU 120
Controls the operation of the controller chip 100.
【0022】インターフェース140は、仮想マシン1
30およびCPU120とEEPROM150およびバ
ッファRAM145との間のインターフェースである。
インターフェース140は、仮想マシン130からのs
tatic変数をバッファRAM145を介してEEP
ROM150に転送する。The interface 140 is the virtual machine 1.
30 and the CPU 120 and the EEPROM 150 and the buffer RAM 145.
The interface 140 uses the virtual machine 130
The tent variable is EEP via the buffer RAM 145.
Transfer to the ROM 150.
【0023】バッファRAM145は、EEPROM1
50へ転送するデータおよびEEPROM150から出
力されるデータをバッファリングする。またバッファR
AM145は、EEPROM150に記録されているデ
ータを書き替える際に当該データを一時的にバッファリ
ングする。The buffer RAM 145 is the EEPROM 1
The data to be transferred to 50 and the data output from the EEPROM 150 are buffered. Also buffer R
The AM 145 temporarily buffers the data recorded in the EEPROM 150 when rewriting the data.
【0024】EEPROM150は、インターフェース
140からのstatic変数を記憶する。EEPRO
M150は、ワード単位でデータの消去を行う不揮発性
メモリである。The EEPROM 150 stores static variables from the interface 140. EEPRO
M150 is a non-volatile memory that erases data in word units.
【0025】バッファRAM160は、仮想マシン13
0からのappletコードおよびstatic fi
nal変数を一時的に記憶する。またバッファRAM1
60は、フラッシュメモリ200から読み出され暗号処
理部170で復号されたプログラムデータを一時的に記
憶する。The buffer RAM 160 is used for the virtual machine 13
Applet code from 0 and static fi
The nal variable is temporarily stored. Also buffer RAM1
Reference numeral 60 temporarily stores the program data read from the flash memory 200 and decrypted by the cryptographic processing unit 170.
【0026】暗号処理部170は、バッファRAM16
0に記憶されたプログラムデータ(appletコード
およびstatic final変数)を暗号化してイ
ンターフェース180に供給する。また暗号処理部17
0は、フラッシュメモリチップ200から読み出された
プログラムデータを復号化する。The cryptographic processing section 170 has a buffer RAM 16
The program data (applet code and static final variable) stored in 0 is encrypted and supplied to the interface 180. Also, the encryption processing unit 17
0 decodes the program data read from the flash memory chip 200.
【0027】インターフェース180は、コントローラ
チップ100とフラッシュメモリチップ200との間の
インターフェースである。インターフェース180は、
暗号処理部170によって暗号化されたプログラムデー
タ(appletコードおよびstatic fina
l変数)をフラッシュメモリチップ200に転送する。
またインターフェース180は、フラッシュメモリチッ
プ200から読み出されたプログラムデータを暗号処理
部170に転送する。The interface 180 is an interface between the controller chip 100 and the flash memory chip 200. The interface 180 is
Program data encrypted by the cryptographic processing unit 170 (applet code and static fina
(l variable) is transferred to the flash memory chip 200.
The interface 180 also transfers the program data read from the flash memory chip 200 to the encryption processing unit 170.
【0028】フラッシュメモリチップ200は、インタ
ーフェース180からの暗号化プログラムデータ(ap
pletコードおよびstatic final変数)
を記憶する。フラッシュメモリチップ200は、ブロッ
ク単位またはチップ単位でデータの消去を行う不揮発性
メモリである。すなわちフラッシュメモリチップ200
の消去単位はEEPROM150の消去単位よりも大き
い。The flash memory chip 200 uses the encrypted program data (ap
(plet code and static final variables)
Memorize The flash memory chip 200 is a non-volatile memory that erases data in block units or chip units. That is, the flash memory chip 200
The erase unit is larger than that of the EEPROM 150.
【0029】<プログラムのダウンロード>次に、図1
に示したメモリカードシステムにおけるデジタル機器2
からメモリカード1へのプログラムデータのダウンロー
ドについて説明する。<Download of Program> Next, referring to FIG.
Digital device 2 in the memory card system shown in
The download of the program data from the memory card 1 to the memory card 1 will be described.
【0030】ここでは、図2に示すようなソースコード
のプログラムデータがダウンロードされる。図2に示す
ソースコードは、メモリカード1をポイントカードとし
て利用するためのアプリケーションプログラムであり、
Java(TM)で記述されている。このプログラムで
は、購入した品目(食品、衣料品、電化製品)ごとに異
なるポイント還元率でポイント数が加算されていく。ポ
イント残高は購入品目ごとに記録される。ポイント残高
は商品の購入のたびに更新されるためstatic変数
として宣言されている。一方、ポイント還元率は初期設
定値のまま不変であるためstatic final変
数として宣言されている。Here, the program data of the source code as shown in FIG. 2 is downloaded. The source code shown in FIG. 2 is an application program for using the memory card 1 as a point card,
It is written in Java (TM). In this program, points are added at different point return rates for each item purchased (food, clothing, electrical appliances). The point balance is recorded for each purchased item. The point balance is declared as a static variable because it is updated each time a product is purchased. On the other hand, since the point return rate remains unchanged at the initial setting value, it is declared as a static final variable.
【0031】Java(TM)で記述されたソースコー
ドはバイトコードに変換(コンパイル)されてデジタル
機器2からメモリカード1へダウンロードされる。メモ
リカード1にダウンロードされたバイトコード(クラス
ファイル)は仮想マシン130においてstatic変
数の部分とAppletコードおよびstaticfi
nal変数の部分とに分離される。Appletコード
およびstaticfinal変数の部分はフラッシュ
メモリ200に格納され、static変数の部分はE
EPROM150に格納される。このように、書き換え
が発生する可能性がある部分(static変数の部
分)はEEPROM150に格納され、書き換えが発生
する可能性がない部分(Appletコードおよびst
atic final変数の部分)は暗号処理部170
で暗号化された後にフラッシュメモリ200に格納され
る。なお、アプリケーションプログラムをダウンロード
して実行可能なICカードでは、図2に示すように、ダ
ウンロードしたバイトコード(クラスファイル)は分離
されることなくすべて内部のEEPROMに格納され
る。A source code written in Java (TM) is converted (compiled) into a byte code and downloaded from the digital device 2 to the memory card 1. In the virtual machine 130, the bytecode (class file) downloaded to the memory card 1 is a static variable portion, an Applet code, and a staticfi.
It is separated into the nal variable part. The part of the Applet code and staticfinal variable is stored in the flash memory 200, and the part of the static variable is E.
It is stored in the EPROM 150. As described above, the portion in which rewriting may occur (static variable portion) is stored in the EEPROM 150, and the portion in which rewriting does not occur (Applet code and st
The portion of the atic final variable) is the cryptographic processing unit 170.
It is stored in the flash memory 200 after being encrypted by. In an IC card that can download and execute an application program, as shown in FIG. 2, all downloaded bytecodes (class files) are stored in the internal EEPROM without being separated.
【0032】次に、仮想メモリ130において行われる
分離処理を図3を参照しつつ具体的に説明する。Next, the separation process performed in the virtual memory 130 will be specifically described with reference to FIG.
【0033】デジタル機器2からメモリカード1にダウ
ンロードされるクラスファイルには、appletコー
ド部(メソッド)と、static final変数
と、static変数とが含まれている。applet
コード部の先頭1バイトは0x01である。stati
c final変数の先頭1バイトは0x02である。
static変数の先頭1バイトは0x03である。こ
のように、デジタル機器2においてコンパイルされたク
ラスファイルでは、先頭1バイトを判断することによっ
てappletコード部・static final変
数・static変数をそれぞれ識別できるようになっ
ている。この判断は、仮想マシン130のアドレス解析
部131において行われる。The class file downloaded from the digital device 2 to the memory card 1 includes an applet code part (method), a static final variable, and a static variable. applet
The first 1 byte of the code part is 0x01. stati
The first byte of the c final variable is 0x02.
The first 1 byte of the static variable is 0x03. As described above, in the class file compiled in the digital device 2, the applet code portion, the static final variable, and the static variable can be identified by determining the first byte. This determination is performed by the address analysis unit 131 of the virtual machine 130.
【0034】アドレス解析部131の判別結果に応じて
格納部132はフラッシュメモリ200またはEEPR
OM150にプログラムデータを格納する。先頭1バイ
トが0x01であると判断されたときは、当該プログラ
ムデータ(appletコード部)をフラッシュメモリ
200に格納する。先頭1バイトが0x02であると判
断されたときは、当該プログラムデータ(static
final変数)を(暗号処理部170で暗号化した
後に)フラッシュメモリ200に格納する。先頭1バイ
トが0x03であると判断されたときは、当該プログラ
ムデータ(static変数)をEEPROM150に
格納する。The storage unit 132 stores the flash memory 200 or the EEPR according to the determination result of the address analysis unit 131.
The program data is stored in the OM 150. When it is determined that the first byte is 0x01, the program data (applet code part) is stored in the flash memory 200. When it is determined that the first 1 byte is 0x02, the program data (static
The final variable) is stored in the flash memory 200 (after being encrypted by the encryption processing unit 170). When it is determined that the first 1 byte is 0x03, the program data (static variable) is stored in the EEPROM 150.
【0035】以上のような処理の結果、図4に示すよう
に、フラッシュメモリ200にはappletコードお
よびstatic final変数が格納され、EEP
ROM150にはstatic変数が格納される。As a result of the above processing, as shown in FIG. 4, the flash memory 200 stores the applet code and the static final variable, and the EEP
The ROM 150 stores static variables.
【0036】<ダウンロードしたプログラムの実行>次
に、フラッシュメモリ200およびEEPROM150
に分離して格納されたプログラムの実行処理について説
明する。ここで実行される処理は、図5(a)のソース
コードで示される内容の処理である。以下、図5(b)
および(c)を参照しつつ説明する。<Execution of Downloaded Program> Next, the flash memory 200 and the EEPROM 150.
The execution processing of the program stored separately in the following will be described. The processing executed here is the processing of the content shown in the source code of FIG. Hereinafter, FIG. 5 (b)
A description will be given with reference to (c).
【0037】購入金額(value)と品目種別を示す
インデックス(i)とがCPU120に入力されると、
仮想マシン130はフラッシュメモリ200上のapp
letコード部(addPoint)に格納されてい
る”命令”をフェッチし、インタープリタ部において、
CPU120が実行可能な形式にインタープリタ方式で
変換する。変換された命令がCPU120によって実行
される。このようにして以下の処理が行われる。When the purchase amount (value) and the index (i) indicating the item type are input to the CPU 120,
The virtual machine 130 is an app on the flash memory 200.
The "instruction" stored in the let code part (addPoint) is fetched, and in the interpreter part,
It is converted into an executable format by the CPU 120 by an interpreter method. The converted instruction is executed by the CPU 120. In this way, the following processing is performed.
【0038】<ステップST51>
_baload・・・フラッシュメモリ200上のka
ngenritu配列のi番目のデータ(kangen
ritu[i])を取得する(X)。<Step ST51> _load ... ka on the flash memory 200
i-th data of ngenritu array (kangen
Ritu [i]) is acquired (X).
【0039】<ステップST52>
_mul・・・Valueとkangenritu
[i]とのかけ算処理を行う。<Step ST52> _mul ... Value and kangenritu
Multiply with [i].
【0040】<ステップST53>
_baload・・・EEPROM150上のpoin
t配列のi番目のデータ(point[i])を取得す
る(Y)。<Step ST53> _load ... point on the EEPROM 150
The i-th data (point [i]) of the t array is acquired (Y).
【0041】<ステップST54>
_add・・・ステップST52におけるかけ算処理の
結果とステップST53で取得したpoint[i]と
を加算する。<Step ST54> _add ... Adds the result of the multiplication process in step ST52 and the point [i] obtained in step ST53.
【0042】<ステップST55>
_bastore・・・ステップST54における加算
処理の結果をEEPROM150上のpoint[i]
に格納する(Z)。すなわち、point[i]の内容
を書き換える。<Step ST55> _bastore ... The result of the addition process in step ST54 is point [i] on the EEPROM 150.
(Z). That is, the content of point [i] is rewritten.
【0043】<効果>現在の技術においては、EEPR
OMの記憶容量はフラッシュメモリに比べて非常に小さ
い。このため、規模の大きいプログラムの場合にはフラ
ッシュメモリに記憶させることが必要となってくる。<Effect> In the present technology, EEPR
The storage capacity of OM is much smaller than that of flash memory. Therefore, in the case of a large-scale program, it becomes necessary to store it in the flash memory.
【0044】通常、プログラムの実行の際には、プログ
ラム中の小さなデータ(変数など)を書き換える処理が
発生する。フラッシュメモリに格納したプログラムを実
行する場合には消去単位でこの書き換え処理が行われ
る。しかしながら、フラッシュメモリの消去単位はEE
PROMの消去単位と比べると非常に大きい。このた
め、フラッシュメモリに格納したプログラムを実行する
際には、変数の書き換えなどのために巨大なバッファメ
モリが必要になる。Normally, when executing a program, a process of rewriting small data (variables, etc.) in the program occurs. When the program stored in the flash memory is executed, this rewriting process is performed in erase units. However, the erase unit of the flash memory is EE
It is much larger than the erase unit of PROM. Therefore, when executing a program stored in the flash memory, a huge buffer memory is required for rewriting variables.
【0045】たとえば、
記憶容量:512Mbit
プログラム単位:512byte=1page
消去単位:32page
のNAND型フラッシュメモリの場合には、16kby
teのバッファRAMが必要となる。For example, in the case of a NAND flash memory having a storage capacity of 512 Mbit, a program unit of 512 bytes = 1 page, and an erase unit of 32 pages, 16 kby.
te buffer RAM is required.
【0046】この発明の実施の形態によるメモリカード
システムでは、デジタル機器2からメモリカード1にダ
ウンロードしたプログラムデータ(クラスファイル)の
うち書き換えが発生する可能性がある部分(stati
c変数)をEEPROM150に格納し、書き換えが発
生する可能性がない部分(Appletコードおよびs
tatic final変数)をフラッシュメモリ20
0に格納している。したがって、プログラム中のデータ
の書き換え処理はフラッシュメモリ200においては発
生せずEEPROM150においてのみ発生する。この
ように、消去単位の小さいEEPROM150において
変数などの書き換え処理を行うため、消去単位の大きい
フラッシュメモリ200において処理を行う場合に比べ
ると、書き換え処理に必要なバッファメモリ(バッファ
RAM145)の容量が小さくてすみ、回路規模を小さ
くできる。また、書き換えのために一時的にバッファリ
ングするデータのサイズはフラッシュメモリ200より
もEEPROM150のほうが小さい。したがって、フ
ラッシュメモリ200において書き換え処理を行う場合
に比べて書き換えのためのバッファリング処理時間が短
くてすみ、書き換えに必要な処理時間を短くできる。In the memory card system according to the embodiment of the present invention, a portion (stati) in which program data (class file) downloaded from the digital device 2 to the memory card 1 may be rewritten (stati).
c variable) is stored in the EEPROM 150, and there is no possibility that rewriting will occur (Applet code and s
(tatic final variable) to the flash memory 20
It is stored in 0. Therefore, the rewriting process of the data in the program does not occur in the flash memory 200 but only in the EEPROM 150. As described above, since the variable rewriting process is performed in the EEPROM 150 having a small erase unit, the capacity of the buffer memory (buffer RAM 145) required for the rewriting process is smaller than that in the flash memory 200 having a large erase unit. The circuit scale can be reduced. Further, the size of the data temporarily buffered for rewriting is smaller in the EEPROM 150 than in the flash memory 200. Therefore, the buffering processing time for rewriting can be shortened as compared with the case where rewriting processing is performed in the flash memory 200, and the processing time required for rewriting can be shortened.
【0047】また、メモリカード1にダウンロードした
プログラムデータをフラッシュメモリ200とEEPR
OM150とに分離して格納しているためセキュリティ
性が向上する。フラッシュメモリチップ200に格納す
るプログラムデータについては暗号処理部170におい
て暗号化しているためセキュリティ性がさらに向上す
る。In addition, the program data downloaded to the memory card 1 is transferred to the flash memory 200 and the EEPR.
Since it is stored separately from the OM 150, security is improved. Since the program data stored in the flash memory chip 200 is encrypted by the encryption processing unit 170, security is further improved.
【0048】また、EEPROM150に格納されたプ
ログラムデータにアクセスする場合には暗号化/復号化
処理を行う必要がないため処理時間が向上される。Further, when accessing the program data stored in the EEPROM 150, it is not necessary to perform the encryption / decryption processing, so that the processing time is improved.
【0049】なお、ここではstatic変数をEEP
ROM150に格納し、Appletコードおよびst
atic final変数をフラッシュメモリ200に
格納したが、static変数およびstatic f
inal変数をEEPROM150に格納し、Appl
etコードをフラッシュメモリ200に格納するように
してもよい。Here, the static variable is set to EEP.
Stored in ROM150, Applet code and st
The static final variable is stored in the flash memory 200, but the static variable and static f
The internal variable is stored in the EEPROM 150, and Appl
The et code may be stored in the flash memory 200.
【0050】また、フラッシュメモリ200からの読み
出しおよび暗号処理部170による復号処理にかかる時
間がEEPROM150からの読み出しにかかる時間よ
りも長い場合は、CPU120の制御により、フラッシ
ュメモリ200のアクセス回数の多い部分をEEPRO
M150に書き込んでもよい。If the time required for reading from the flash memory 200 and the decryption processing by the encryption processing unit 170 is longer than the time required for reading from the EEPROM 150, the CPU 120 controls the flash memory 200 to be accessed frequently. EEPRO
You may write in M150.
【0051】また、バッファRAM145とバッファR
AM160とを共通の1つのRAMで構成しこのRAM
を、EEPROM150の動作時にはEEPROM15
0用バッファRAMとして動作させ、フラッシュメモリ
200の動作時にはフラッシュメモリ200用バッファ
RAMとして動作させるようにしてもよい。これによ
り、RAMに必要な回路面積を小さくすることができ、
回路規模を小さくできる。In addition, the buffer RAM 145 and the buffer R
This RAM is composed of one common RAM with AM160.
When the EEPROM 150 is operating, the EEPROM 15
It may be operated as the 0 buffer RAM, and may be operated as the flash memory 200 buffer RAM when the flash memory 200 is operating. As a result, the circuit area required for the RAM can be reduced,
The circuit scale can be reduced.
【図1】 この発明の実施の形態によるメモリカードシ
ステムの全体構成を示すブロック図である。FIG. 1 is a block diagram showing an overall configuration of a memory card system according to an embodiment of the present invention.
【図2】 デジタル機器からダウンロードしたプログラ
ムデータをメモリカードに格納する様子を示す図であ
る。FIG. 2 is a diagram showing how program data downloaded from a digital device is stored in a memory card.
【図3】 デジタル機器からダウンロードしたプログラ
ムデータをメモリカードに格納する様子を示す図であ
る。FIG. 3 is a diagram showing how program data downloaded from a digital device is stored in a memory card.
【図4】 フラッシュメモリおよびEEPROMに格納
されるプログラムデータを示す図である。FIG. 4 is a diagram showing program data stored in a flash memory and an EEPROM.
【図5】 (a)〜(c)は、プログラムの実行手順を
説明するための図である。5A to 5C are diagrams for explaining a program execution procedure.
1 メモリカード、100 コントローラチップ、20
0 フラッシュメモリチップ(第2の不揮発性メモ
リ)、130 仮想マシン(分離部)、150 EEP
ROM(第1の不揮発性メモリ)、170 暗号処理
部。1 memory card, 100 controller chips, 20
0 flash memory chip (second non-volatile memory), 130 virtual machine (separation unit), 150 EEP
ROM (first non-volatile memory), 170 cryptographic processing unit.
フロントページの続き (72)発明者 杉田 亮一 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 水嶋 美紀 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 菊地 隆文 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 Fターム(参考) 5B017 AA07 BA07 CA14 5B035 AA00 AA13 BB09 CA11 5B076 AB08 BA04 BA07 BA10 Continued front page (72) Inventor Ryoichi Sugita 1006 Kadoma, Kadoma-shi, Osaka Matsushita Electric Sangyo Co., Ltd. (72) Inventor Miki Mizushima 1006 Kadoma, Kadoma-shi, Osaka Matsushita Electric Sangyo Co., Ltd. (72) Inventor Takafumi Kikuchi 1006 Kadoma, Kadoma-shi, Osaka Matsushita Electric Sangyo Co., Ltd. F-term (reference) 5B017 AA07 BA07 CA14 5B035 AA00 AA13 BB09 CA11 5B076 AB08 BA04 BA07 BA10
Claims (6)
単位を有する第2の不揮発性メモリと、 前記メモリカードにダウンロードされたプログラムデー
タのうち少なくとも書き換えが発生する可能性がある部
分を分離し、分離した部分を前記第1の不揮発性メモリ
へ格納し、残りの部分を前記第2の不揮発性メモリへ格
納する分離部とを備えることを特徴とするメモリカー
ド。1. A memory card, comprising: a first nonvolatile memory having a predetermined erasing unit; and a second nonvolatile memory having an erasing unit larger than the erasing unit of the first nonvolatile memory. At least a portion where rewriting may occur in the program data downloaded to the memory card is separated, the separated portion is stored in the first nonvolatile memory, and the remaining portion is stored in the second nonvolatile memory. A memory card comprising: a separation unit for storing in a memory.
数のうち書き換えが発生する可能性のあるものを前記第
1の不揮発性メモリに格納し、前記変数のうち書き換え
が発生する可能性がないものを前記第2の不揮発性メモ
リへ格納することを特徴とするメモリカード。2. The program data according to claim 1, wherein the program data includes a function and a variable, and the separation unit stores the function in the second non-volatile memory, and rewriting of the variable occurs. A memory card, wherein a possible one is stored in the first non-volatile memory, and one of the variables that is not likely to be rewritten is stored in the second non-volatile memory.
ング言語で記述されたクラスであり、 前記分離部は、 前記クラスの変数を前記第1の不揮発性メモリへ格納
し、前記クラスのメソッドを前記第2の不揮発性メモリ
へ格納することを特徴とするメモリカード。3. The program data according to claim 1, wherein the program data is a class described in an object-oriented programming language, and the separation unit stores a variable of the class in the first non-volatile memory. A memory card, wherein the method is stored in the second non-volatile memory.
ング言語で記述されたクラスであり、 前記分離部は、 前記クラスの変数のうち書き換えが発生する可能性があ
るものを前記第1の不揮発性メモリへ格納し、前記クラ
スの変数のうち書き換えが発生する可能性がないものお
よび前記クラスのメソッドを前記第2の不揮発性メモリ
へ格納することを特徴とするメモリカード。4. The program data according to claim 1, wherein the program data is a class written in an object-oriented programming language, and the separating unit selects one of the variables of the class that may be rewritten. 1. A memory card, characterized in that it is stored in a first non-volatile memory, and variables of the class that are unlikely to be rewritten and methods of the class are stored in the second non-volatile memory.
部分を暗号化する暗号処理部をさらに備え、 前記第1の不揮発性メモリ、前記分離部および前記暗号
処理部は同一チップ上に形成されることを特徴とするメ
モリカード。5. The encryption processing unit according to claim 1, further comprising an encryption processing unit that encrypts the remaining portion to be stored in the second nonvolatile memory, the first nonvolatile memory, the separating unit, and the A memory card characterized in that the encryption processing unit is formed on the same chip.
とを特徴とするメモリカード。6. The memory card according to claim 1, wherein the first non-volatile memory is an EEPROM, and the second non-volatile memory is a flash memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002194193A JP3913128B2 (en) | 2002-02-28 | 2002-07-03 | Memory card |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002-53099 | 2002-02-28 | ||
JP2002053099 | 2002-02-28 | ||
JP2002194193A JP3913128B2 (en) | 2002-02-28 | 2002-07-03 | Memory card |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2003323597A true JP2003323597A (en) | 2003-11-14 |
JP3913128B2 JP3913128B2 (en) | 2007-05-09 |
Family
ID=29552097
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002194193A Expired - Fee Related JP3913128B2 (en) | 2002-02-28 | 2002-07-03 | Memory card |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3913128B2 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008065430A (en) * | 2006-09-05 | 2008-03-21 | Matsushita Electric Ind Co Ltd | Semiconductor device and IC card |
JP2010500656A (en) * | 2006-08-08 | 2010-01-07 | サンディスク コーポレイション | Portable mass storage with virtual machine activation |
US7702872B2 (en) * | 2003-12-08 | 2010-04-20 | Giesecke & Devrient Gmbh | Java smart card chip having memory area reserved for global variables |
JP4869337B2 (en) * | 2005-05-12 | 2012-02-08 | ギーゼッケ ウント デフリエント ゲーエムベーハー | Safe processing of data |
-
2002
- 2002-07-03 JP JP2002194193A patent/JP3913128B2/en not_active Expired - Fee Related
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7702872B2 (en) * | 2003-12-08 | 2010-04-20 | Giesecke & Devrient Gmbh | Java smart card chip having memory area reserved for global variables |
JP4869337B2 (en) * | 2005-05-12 | 2012-02-08 | ギーゼッケ ウント デフリエント ゲーエムベーハー | Safe processing of data |
US8983072B2 (en) | 2005-05-12 | 2015-03-17 | Giesecke & Devrient Gmbh | Portable data carrier featuring secure data processing |
JP2010500656A (en) * | 2006-08-08 | 2010-01-07 | サンディスク コーポレイション | Portable mass storage with virtual machine activation |
JP2008065430A (en) * | 2006-09-05 | 2008-03-21 | Matsushita Electric Ind Co Ltd | Semiconductor device and IC card |
Also Published As
Publication number | Publication date |
---|---|
JP3913128B2 (en) | 2007-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6772955B2 (en) | Memory card | |
JP3015377B2 (en) | IC card | |
TW556200B (en) | Improved register interface for flash EEPROM memory arrays | |
US7340566B2 (en) | System and method for initializing a memory device from block oriented NAND flash | |
JPH08328762A (en) | Semiconductor disk device and memory management method therefor | |
JP2005515542A (en) | Apparatus and method for writing to NV memory in a controller architecture together with a corresponding computer program and a corresponding computer-readable storage medium | |
CN109542495A (en) | A kind of method for upgrading software and device | |
US8645624B2 (en) | Portable electronic device, smartcard and control method for portable electronic device | |
CN100412893C (en) | storage card | |
US20090144511A1 (en) | Enhanced Microprocessor or Microcontroller | |
JP2005532622A (en) | Securing downloaded applications, especially on smart cards | |
JP2003323597A (en) | Memory card | |
KR20050103448A (en) | Semiconductor memory card and computer readable program | |
CN113760193A (en) | Data reading and writing method and device for resource-limited device and instruction set | |
KR100350972B1 (en) | Computer system and method possessing the function of storing an ID in its ROM | |
CN101840520B (en) | Intelligent card and method for accessing flash memory of intelligent card | |
JPH0926875A (en) | Storage medium, computer and computer system having software unauthorized use prevention function | |
US11308160B2 (en) | Threaded linking pointer mechanism | |
US20070130425A1 (en) | Semiconductor memory card | |
JP7559404B2 (en) | Electronic information storage medium, program addition method, and program | |
JP2003256209A (en) | Program execution device | |
JPH07295802A (en) | Program card and computer using the card | |
JPS636690A (en) | Portable electronic device | |
JPS62130484A (en) | Portable electronic device | |
Asgari et al. | Classification of Smart Card Operating Systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041216 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20061012 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20061024 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061218 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070116 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070130 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100209 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110209 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120209 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130209 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |