JP2011227592A - Data processor and data processing system - Google Patents

Data processor and data processing system Download PDF

Info

Publication number
JP2011227592A
JP2011227592A JP2010094647A JP2010094647A JP2011227592A JP 2011227592 A JP2011227592 A JP 2011227592A JP 2010094647 A JP2010094647 A JP 2010094647A JP 2010094647 A JP2010094647 A JP 2010094647A JP 2011227592 A JP2011227592 A JP 2011227592A
Authority
JP
Japan
Prior art keywords
program
reset
ram
data processor
boot loader
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2010094647A
Other languages
Japanese (ja)
Inventor
Asako Shimokawa
麻子 下川
Yoko Yamaki
陽子 山木
Yoji Kishi
洋司 岸
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2010094647A priority Critical patent/JP2011227592A/en
Publication of JP2011227592A publication Critical patent/JP2011227592A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a data processor capable of allowing flexible mapping of a program, which is initially loaded from an external memory, on the external memory using a simple configuration.SOLUTION: A data processor which executes a program initially loaded from an external memory to a RAM is provided with a boot loader controller. The boot loader controller reads transfer control information from the external memory in response to a given reset instruction, downloads a program from the external memory using address information indicated in the read transfer control information, transfers the downloaded program to the RAM, and instructs a central processing unit to cancel the given reset instruction upon completion of the transfer. Thus, it is only necessary to provide transfer control information on the basis of program mapping on the external memory, which would allow flexible mapping of programs on an external memory just with a simple configuration.

Description

本発明は、外部メモリから読み込んでRAMに格納したプログラムを実行するデータプロセッサ、及び当該データプロセッサを入力デバイスの制御に用いるデータ処理システムに関し、例えばPC(パーソナルコンピュータ)のキーボード及び電源制御を行うデータプロセッサやこれを搭載したPCに適用して有効な技術に関する。   The present invention relates to a data processor that executes a program that is read from an external memory and stored in a RAM, and a data processing system that uses the data processor for controlling an input device, for example, a PC (personal computer) keyboard and data for power control. The present invention relates to a technology effective when applied to a processor and a PC on which the processor is mounted.

データプロセッサにオンチップされた電気的に書換え可能なROMに当該データプロセッサが実行するプログラムを格納する場合には個別にマスクROMを設計する時間と費用を省くことができるが、電気的に書換え可能なROMを搭載することによってコストが上昇する。この点で、外部メモリからRAMにプログラムを読み込んで実行する構成を採用したデータプロセッサがある。   When the program to be executed by the data processor is stored in the electrically rewritable ROM on-chip in the data processor, the time and cost for designing the mask ROM can be saved individually, but it can be electrically rewritten. The cost increases by installing a simple ROM. In this regard, there is a data processor that employs a configuration in which a program is read from an external memory into a RAM and executed.

特許文献1には、CPU、シリアルフラッシュインタフェース回路、プログラム転送回路、プログラム用内蔵RAM、書き込みマスク回路などの各回路から構成されるマイクロコンピュータにおいて、このマイクロコンピュータの外部にシリアルフラッシュメモリが接続され、電源投入時、CPUが動作する前に、シリアルフラッシュメモリからプログラムを読み込んでプログラム用内蔵RAMに書き込む。CPUがプログラム用内蔵RAM上のプログラムを実行し、必要に応じてプログラム用内蔵RAMへの書き込みを禁止する、構成について記載される。   In Patent Document 1, in a microcomputer composed of a CPU, a serial flash interface circuit, a program transfer circuit, a program built-in RAM, a write mask circuit, and the like, a serial flash memory is connected to the outside of the microcomputer, When the power is turned on, the program is read from the serial flash memory and written into the program internal RAM before the CPU operates. A configuration is described in which the CPU executes a program on the program internal RAM and prohibits writing to the program internal RAM as necessary.

特許文献2には、システムLSIにおいて、シリアルフラッシュメモリ用のインタフェースであるブートローダを設け、シリアルフラッシュメモリからブートプログラムをリードし、該リードしたブートプログラムを実行してシリアルフラッシュメモリ内のメインプログラムをSDRAMにコピーする構成について記載がある。   In Patent Document 2, a boot loader that is an interface for a serial flash memory is provided in a system LSI, a boot program is read from the serial flash memory, the read boot program is executed, and a main program in the serial flash memory is executed by an SDRAM. Describes the configuration to be copied.

特開2003−141096号公報JP 2003-141096 A 特開2009−169485号公報JP 2009-169485 A

しかしながら、特許文献1に記載の技術ではRAMに転送するプログラムをリードするソースアドレスを任意に設定する場合にはMMUを用いて制御することが必要になり、CPUのリセット解除前にMMUを用いるためには特別な手段を用いてMMUの設定を行わなければならない。特許文献2に記載の技術ではブートプログラムの内容に従ってメインプログラムをダウンロードする構成になっており、シリアルフラッシュメモリ上におけるブートプログラムの配置を任意に設定することについては考慮されておらず、また、シリアルフラッシュメモリ上でメインプログラムを任意に配置する場合にはそれをブートプログラムの記述に行って行わなければならず、柔軟に対応するのは難しい。   However, in the technique described in Patent Document 1, when the source address for reading the program to be transferred to the RAM is arbitrarily set, it is necessary to control using the MMU, and the MMU is used before releasing the reset of the CPU. In this case, the MMU must be set using special means. The technique described in Patent Document 2 is configured to download the main program according to the contents of the boot program, and does not take into consideration the arbitrary setting of the arrangement of the boot program on the serial flash memory. When the main program is arbitrarily arranged on the flash memory, it must be done in the description of the boot program, and it is difficult to respond flexibly.

本発明の目的は、外部メモリからイニシャルロードするプログラムに対して外部メモリ上の自由なマッピングを簡単な構成によって許容することができるデータプロセッサを提供することにある。   An object of the present invention is to provide a data processor that can allow free mapping on an external memory to a program to be initially loaded from the external memory with a simple configuration.

本発明の別の目的は、外部メモリからイニシャルロードするプログラムに対する外部メモリ上の自由なマッピングを許容することができ、システムコストの低減に寄与することができるデータ処理システムを提供することにある。   Another object of the present invention is to provide a data processing system that can allow free mapping on an external memory to a program that is initially loaded from the external memory, and that can contribute to a reduction in system cost.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

すなわち、外部メモリからRAMにイニシャルロードされたプログラムを実行するデータプロセッサに、所定のリセット解除の指示に応答して、外部メモリから転送制御情報をリードし、リードした転送制御情報が示すアドレス情報に基づいて当該外部メモリからプログラムをダウンロードし、ダウンロードしたプログラムを前記RAMに転送し、この転送を完了した後に、前記中央処理装置へリセット解除の指示を与える、ブートローダコントローラを採用する。   In other words, in response to a predetermined reset release instruction, the transfer control information is read from the external memory to the data processor that executes the program initially loaded from the external memory to the RAM, and the address information indicated by the read transfer control information is displayed. Based on this, a boot loader controller is used that downloads a program from the external memory, transfers the downloaded program to the RAM, and after this transfer is completed, gives a reset release instruction to the central processing unit.

転送制御情報が示すアドレス情報に基づいてプログラムをダウンロードするから、そのプログラムに対して外部メモリ上のマッピングに応じた転送制御情報を用意すればよく、プログラムに対して外部メモリ上の自由なマッピングを簡単な構成によって許容することができる。この点で、システムコストの低減に資することができる。   Since the program is downloaded based on the address information indicated by the transfer control information, it is sufficient to prepare transfer control information corresponding to the mapping on the external memory for the program, and free mapping on the external memory for the program. It can be tolerated with a simple configuration. In this respect, the system cost can be reduced.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記のとおりである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、外部メモリからイニシャルロードするプログラムに対して外部メモリ上の自由なマッピングを簡単な構成によって許容することができる。   That is, free mapping on the external memory can be permitted with a simple configuration for a program that is initially loaded from the external memory.

システムコストの低減に寄与することができる。   This can contribute to a reduction in system cost.

図1は本発明の実施の形態1に係るデータプロセッサを例示するブロック図である。FIG. 1 is a block diagram illustrating a data processor according to Embodiment 1 of the present invention. 図2はブートローダコントローラのさらに詳細な構成を例示するブロック図である。FIG. 2 is a block diagram illustrating a more detailed configuration of the boot loader controller. 図3はプログラム転送情報の一例を示す説明図である。FIG. 3 is an explanatory diagram showing an example of program transfer information. 図4はブートローダコントローラによるダウンロード処理のフローチャートである。FIG. 4 is a flowchart of download processing by the boot loader controller. 図5は実施の形態2に係るデータプロセッサを例示するブロック図である。FIG. 5 is a block diagram illustrating a data processor according to the second embodiment. 図6は実施の形態3に係るデータプロセッサを例示するブロック図である。FIG. 6 is a block diagram illustrating a data processor according to the third embodiment. 図7は実施の形態4で使用するプログラム転送情報の構成を例示する説明図である。FIG. 7 is an explanatory diagram illustrating the configuration of program transfer information used in the fourth embodiment. 図8はアクセスサイズをプログラムサイズの1/16としてプログラムをダウンロードするときのシリアルフラッシュメモリ101に対するアクセス動作タイミングを例示するタイミングチャートである。FIG. 8 is a timing chart illustrating the access operation timing for the serial flash memory 101 when the access size is 1/16 of the program size and the program is downloaded. 図9は実施の形態5に係るデータプロセッサを例示するブロック図である。FIG. 9 is a block diagram illustrating a data processor according to the fifth embodiment. 図10はリセット要因毎に初期化が行なわれるか否かを機能ブロック(CPU,ブートローダコントローラ、RAM、その他)単位で示した説明図である。FIG. 10 is an explanatory diagram showing whether initialization is performed for each reset factor in units of functional blocks (CPU, boot loader controller, RAM, etc.). 図11は実施の形態7におけるシリアルフラッシュメモリ上におけるプログラムの配置とRAMにダウンロードされたプログラムの配置との関係を例示する説明図である。FIG. 11 is an explanatory diagram illustrating the relationship between the arrangement of programs on the serial flash memory and the arrangement of programs downloaded to the RAM according to the seventh embodiment. 図12は実施の形態で説明したデータプロセッサをキーボード及び電源制御用コントローラとして採用したノートPCの概略的な構成例示するブロック図である。FIG. 12 is a block diagram illustrating a schematic configuration example of a notebook PC that employs the data processor described in the embodiment as a keyboard and a controller for power control.

1.実施の形態の概要
先ず、本願において開示される発明の代表的な実施の形態について概要を説明する。代表的な実施の形態についての概要説明で括弧を付して参照する図面中の参照符号はそれが付された構成要素の概念に含まれるものを例示するに過ぎない。
1. First, an outline of a typical embodiment of the invention disclosed in the present application will be described. Reference numerals in the drawings referred to in parentheses in the outline description of the representative embodiments merely exemplify what are included in the concept of the components to which the reference numerals are attached.

〔1〕<リードした転送制御情報に基づくプログラムダウンロード>
本発明の代表的な実施の形態に係るデータプロセッサ(102,102A〜102C)は、外部メモリ(101)からRAM(105)に転送されたプログラム(131)を実行するデータプロセッサであって、与えられたリセット解除の指示に応答して前記RAMの所定アドレスを開始アドレスとしてプログラムの実行を開始する中央処理装置(103)を有する。さらに、所定のリセット解除の指示に応答して、前記外部メモリから転送制御情報(130)をリードし、リードした転送制御情報が示すアドレス情報に基づいて当該外部メモリからプログラムをダウンロードし、ダウンロードしたプログラムを前記RAMに転送し、この転送を完了した後に、前記中央処理装置へリセット解除の指示を与えるブートローダコントローラ(104)を有する。
[1] <Program download based on read transfer control information>
A data processor (102, 102A to 102C) according to a representative embodiment of the present invention is a data processor that executes a program (131) transferred from an external memory (101) to a RAM (105). A central processing unit (103) for starting execution of a program with a predetermined address in the RAM as a start address in response to a reset release instruction. Further, in response to a predetermined reset release instruction, the transfer control information (130) is read from the external memory, and the program is downloaded from the external memory based on the address information indicated by the read transfer control information. A boot loader controller (104) is provided for transferring a program to the RAM and giving a reset release instruction to the central processing unit after the transfer is completed.

転送制御情報が示すアドレス情報に基づいてプログラムをダウンロードするから、そのプログラムに対して外部メモリ上のマッピングに応じた転送制御情報を用意すればよく、プログラムに対して外部メモリ上の自由なマッピングを簡単な構成によって許容することができる。この点で、システムコストの低減に資することができる。   Since the program is downloaded based on the address information indicated by the transfer control information, it is sufficient to prepare transfer control information corresponding to the mapping on the external memory for the program, and free mapping on the external memory for the program. It can be tolerated with a simple configuration. In this respect, the system cost can be reduced.

〔2〕<RAMへのプログラム転送専用経路>
項1のデータプロセッサにおいて、前記ブートローダコントローラから前記RAMへプログラムを転送するための専用経路(108)を有する。
[2] <Program transfer dedicated path to RAM>
The data processor according to item 1, further comprising a dedicated path (108) for transferring a program from the boot loader controller to the RAM.

共通バス経由で転送する場合に比べると、ブートローダコントローラは共通バスアクセス機能を備えることを要せず、転送制御に要する回路規模を縮小することができる。   Compared to the case of transferring via the common bus, the boot loader controller does not need to have a common bus access function, and the circuit scale required for transfer control can be reduced.

〔3〕<プログラム転送の誤りを検出>
項1又は2のデータプロセッサにおいて、前記ブートローダコントローラは、前記ダウンロードしたプログラムに対して転送誤りの有無を検出する誤り検出回路(122)を有する。
[3] <Detect error in program transfer>
In the data processor according to item 1 or 2, the boot loader controller has an error detection circuit (122) that detects the presence or absence of a transfer error in the downloaded program.

転送誤りによる誤動作を未然に防止することができる。   It is possible to prevent malfunctions due to transfer errors.

〔4〕<プログラム転送の誤りを検出したときのリトライ回数の指定>
項3のデータプロセッサにおいて、前記ブートローダコントローラは、前記誤り検出回路によるプログラム転送の誤りを検出したとき、前記転送制御情報で指定される回数を上限として、転送誤りの無いことが検出されるまでプログラムダウンロードのリトライを行う。
[4] <Specifying retry count when program transfer error is detected>
In the data processor according to item 3, when the boot loader controller detects an error in program transfer by the error detection circuit, the program is executed until it is detected that there is no transfer error up to the number of times specified by the transfer control information. Retry download.

リトライを許可することによって、解消可能な一時的要因による転送誤りを容易に解消することができる。   By permitting the retry, a transfer error due to a temporary factor that can be eliminated can be easily eliminated.

〔5〕<誤り検出の有効無効切替>
項3又は4のデータプロセッサにおいて、前記ブートローダコントローラは、前記誤り検出回路による検出動作の有効(CRCENの活性)が指示されたときその検出動作を行う。
[5] <Enable / disable switching of error detection>
In the data processor according to item 3 or 4, the boot loader controller performs a detection operation when an instruction to validate the detection operation by the error detection circuit (activation of CRCEN) is given.

転送誤りを殆ど生じない環境下で処理するような場合にブート動作の高速化を優先させることが可能になる。   In the case where processing is performed in an environment in which transfer errors hardly occur, it is possible to give priority to speeding up the boot operation.

〔6〕<プログラム転送のサイズの指定>
項1乃至5の何れかのデータプロセッサにおいて、前記ブートローダコントローラは、前記転送制御情報が示すスタートアドレスからプログラムのダウンロードを開始し、前記転送制御情報が示す容量のプログラムをダウンロードする。
[6] <Specify program transfer size>
In the data processor according to any one of Items 1 to 5, the boot loader controller starts downloading a program from a start address indicated by the transfer control information, and downloads a program having a capacity indicated by the transfer control information.

転送制御情報としてスタートアドレスとエンドアドレスを持つ場合に限定されない。   The transfer control information is not limited to having a start address and an end address.

〔7〕<プログラム転送終了の通知>
項1乃至5の何れかのデータプロセッサにおいて、前記ブートローダコントローラは、前記RAMへのプログラムの転送終了(PGMTR)を外部に通知する。
[7] <Program transfer end notification>
In the data processor according to any one of Items 1 to 5, the boot loader controller notifies the outside of the transfer of the program to the RAM (PGMTR).

データプロセッサによるプログラム実行可能な状態を外部で一早く把握することが可能になり、データプロセッサに接続する上位階層システムの動作開始若しくは初期化のトリガなどに適用可能になる。   The state in which the program can be executed by the data processor can be quickly ascertained externally, and can be applied to trigger the start of operation or initialization of an upper layer system connected to the data processor.

〔8〕<プログラム転送失敗の通知>
項3乃至7のデータプロセッサにおいて、前記ブートローダコントローラは、前記RAMへのプログラムの転送完了の失敗(BLERR)を外部に通知する。
[8] <Notification of program transfer failure>
In the data processor according to any one of Items 3 to 7, the boot loader controller notifies the outside of failure to transfer the program to the RAM (BLERR).

データプロセッサによるプログラム実行不可能な状態を外部で一早く把握することが可能になり、インジケータへの表示或いはリカバリ処理へのトリガ等に適用可能になる。   A state in which the program cannot be executed by the data processor can be quickly ascertained externally, and can be applied to display on an indicator or a trigger for recovery processing.

〔9〕<内蔵RAM>
項1乃至8の何れかのデータプロセッサにおいて、前記RAMはデータプロセッサに内蔵されたRAMである。
[9] <Built-in RAM>
In the data processor according to any one of Items 1 to 8, the RAM is a RAM built in the data processor.

〔10〕<外付けRAM>
項1乃至8の何れかのデータプロセッサにおいて、前記RAMはデータプロセッサの外部に接続されたRAMである。
[10] <External RAM>
In the data processor according to any one of Items 1 to 8, the RAM is a RAM connected to the outside of the data processor.

内蔵RAMの容量が小さい場合にも対応できる。   It can cope with a case where the capacity of the built-in RAM is small.

〔11〕<プログラム転送時間の調整>
項1乃至10の何れかのデータプロセッサにおいて、前記ブートローダコントローラは、前記転送制御情報で指定される周波数(同期クロックで指定されるる周波数)に同期して前記プログラムのダウンロードを行なう。
[11] <Adjustment of program transfer time>
In the data processor according to any one of Items 1 to 10, the boot loader controller downloads the program in synchronization with a frequency specified by the transfer control information (a frequency specified by a synchronization clock).

転送制御情報に基づいて外部メモリからRAMへのプログラムの転送に要する時間を調整することが可能になる。外部メモリからRAMへのプログラムの転送完了によってCPUへのリセット解除が指示されるから、データプロセッサの内外における初期化動作が完了されるまでに要する時間に対して、ブートローダコントローラによるCPUのリセット解除のタイミングが早すぎたり遅すぎたりしないようにすることができる。   Based on the transfer control information, it is possible to adjust the time required to transfer the program from the external memory to the RAM. Since the reset release to the CPU is instructed when the transfer of the program from the external memory to the RAM is completed, the reset of the CPU is canceled by the boot loader controller for the time required to complete the initialization operation inside and outside the data processor. You can avoid timing too early or too late.

〔12〕<プログラム転送時間の調整>
項1乃至10の何れかのデータプロセッサにおいて、前記ブートローダコントローラは、前記転送制御情報で指定されるデータサイズ(転送単位)の単位で複数回に分けて前記プログラムのダウンロードを行なう。
[12] <Adjustment of program transfer time>
In the data processor according to any one of Items 1 to 10, the boot loader controller downloads the program in a plurality of times in units of a data size (transfer unit) specified by the transfer control information.

上記データサイズ単位を小さくすれば分割して行うプログラムダウンロードの動作回数が増えるのでプログラムダウンロードを完了するまでに要する時間が増える。したがって、上記同様に、転送制御情報に基づいて外部メモリからRAMへのプログラムの転送に要する時間を調整することが可能になり、データプロセッサの内外における初期化動作が完了されるまでに要する時間に対して、ブートローダコントローラによるCPUのリセット解除のタイミングが早すぎたり遅すぎたりしないようにすることができる。   If the data size unit is reduced, the number of program download operations to be divided increases, so that the time required to complete the program download increases. Therefore, similarly to the above, it is possible to adjust the time required for transferring the program from the external memory to the RAM based on the transfer control information, and the time required for completing the initialization operation inside and outside the data processor. On the other hand, the reset release timing of the CPU by the boot loader controller can be prevented from being too early or too late.

〔13〕<リセットの要因による再起動レベルの選択>
項1乃至12の何れかのデータプロセッサにおいて、前記ブートローダコントローラが応答する所定のリセット解除の指示は、そのリセット解除の指示が前記RAMの記憶情報の保持を保証しないリセット要因(RES,RES_LVD)に対応するものであり、前記RAMの記憶情報の保持を保証するリセット要因(RES_WDT)に対応するリセット解除の指示に対して、CPUは当該リセット解除の指示に応答して前記RAMのプログラムを実行する。
[13] <Restart level selection by reset factor>
In the data processor according to any one of Items 1 to 12, the predetermined reset release instruction responded by the boot loader controller is a reset factor (RES, RES_LVD) for which the reset release instruction does not guarantee the storage information of the RAM. In response to a reset release instruction corresponding to a reset factor (RES_WDT) that guarantees retention of stored information in the RAM, the CPU executes the program in the RAM in response to the reset release instruction. .

リセット要因に応じてブートローダコントローラを用いたRAMへのプログラムダウンロードを行うか否かを適正に制御することができる。   Whether or not to download the program to the RAM using the boot loader controller can be appropriately controlled according to the reset factor.

〔14〕<リセットの要因による再起動レベルの選択>
項1乃至12の何れかのデータプロセッサにおいて、前記ブートローダコントローラが応答する所定のリセット解除の指示は、外部から供給されるリセット信号(RES)によるリセット要因に対応する指示(res1の立ち上がり)、及び電源電圧レベル低下による内部リセット信号(RES_LVD)によるリセット要因に対応する指示(res1_LVDの立ち上がり)を含む。ウォッチドッグタイマのタイムアウトによる内部リセット信号(RES_WDT)によるリセット要因に対応する指示(res1_WDT)は含まない。前記ブートローダコントローラからのプログラムの転送が完了されたとき、前記RAMはライトプロテクトされ、前記ライトプロテクトは前記外部から供給されるリセット信号によるリセット指示及び前記電源電圧レベル低下による内部リセット信号によるリセット指示によって解除される。
[14] <Selection of restart level by reset factor>
In the data processor according to any one of Items 1 to 12, the predetermined reset release instruction responded by the boot loader controller is an instruction corresponding to a reset factor (rising of res1) by a reset signal (RES) supplied from the outside, and An instruction (rising of res1_LVD) corresponding to a reset factor by an internal reset signal (RES_LVD) due to a decrease in power supply voltage level is included. The instruction (res1_WDT) corresponding to the reset factor by the internal reset signal (RES_WDT) due to timeout of the watchdog timer is not included. When the transfer of the program from the boot loader controller is completed, the RAM is write protected, and the write protection is performed by a reset instruction by a reset signal supplied from the outside and a reset instruction by an internal reset signal by the power supply voltage level drop. Canceled.

リセット要因に応じてブートローダコントローラを用いたRAMへのプログラムダウンロードを行うか否かを適正に制御することができる。   Whether or not to download the program to the RAM using the boot loader controller can be appropriately controlled according to the reset factor.

〔15〕<リセットの要因による再起動レベルの選択>
項1乃至12の何れかのデータプロセッサにおいて、複数のリセット要因がある場合に、リセット要因毎にブートローダコントローラを用いてRAMへのプログラムダウンロードを行うか否かの設定をするリセット要因起動レベル制御レジスタ123を持つ。
[15] <Restart level selection by reset factor>
Item 12. The reset factor activation level control register for setting whether to download a program to the RAM using the boot loader controller for each reset factor when there are a plurality of reset factors in the data processor of any one of Items 1 to 12. 123.

リセット要因に応じてブートローダコントローラを用いたRAMへのプログラムダウンロードを行うか否かを適正に制御することができる。   Whether or not to download the program to the RAM using the boot loader controller can be appropriately controlled according to the reset factor.

〔16〕<スクランブルされたプログラムダウンロード>
項1乃至15の何れかのデータプロセッサにおいて、前記転送制御情報(130)が示すアドレス情報は、外部メモリ上で離散的にマッピングされているダウンロードされるべき所定のプログラム(131A〜131D)の一部のプログラム(131A)の所在を示すアドレス情報である。前記所定のプログラムの一部は前記ブートローダコントローラがダウンロードするブートプログラムであり、前記所定のプログラムの残りは前記中央処理装置が前記ブートプログラムを実行することによって前記外部メモリからダウンロードして前記RAMに転送される離散的にマッピングされたプログラムである。
[16] <Scrambled program download>
In the data processor according to any one of Items 1 to 15, the address information indicated by the transfer control information (130) is one of predetermined programs (131A to 131D) to be downloaded that are discretely mapped on an external memory. Address information indicating the location of the part program (131A). A part of the predetermined program is a boot program downloaded by the boot loader controller, and the rest of the predetermined program is downloaded from the external memory by the central processing unit executing the boot program and transferred to the RAM. Is a discretely mapped program.

これによりダウンロードされるべき所定のプログラムを外部メモリ上でスクランブルして格納することができるので、プログラムの盗用若しくは不正使用を抑制することができるという点で、プログラムに対するセキュリティーを向上させることができる。   As a result, the predetermined program to be downloaded can be scrambled and stored on the external memory, so that the security of the program can be improved in that the theft or illegal use of the program can be suppressed.

〔17〕<リードした転送制御情報に基づくプログラムダウンロード>
本発明の別の実施の形態に係るデータ処理システムは、外部メモリからRAMに転送されたプログラムを実行することにより、外部に接続された入力デバイスの制御を行うデータプロセッサ(102等)と、前記データプロセッサにLPCバスで接続された入出力コントローラハブ(201,205)と、前記入出力コントローラハブにシステムバスで接続されたメインプロセッサ(200)と、を有する。前記データプロセッサは、与えられたリセット解除の指示に応答して前記RAMの所定アドレスを開始アドレスとしてプログラムの実行を開始する中央処理装置を有する。さらに、前記データプロセッサは、所定のリセット解除の指示に応答して、前記外部メモリから転送制御情報をリードし、リードした転送制御情報が示すアドレス情報に基づいて当該外部メモリからプログラムをダウンロードし、ダウンロードしたプログラムを前記RAMに転送し、この転送を完了した後に、前記中央処理装置へリセット解除の指示を与えるブートローダコントローラを有する。
[17] <Program download based on read transfer control information>
A data processing system according to another embodiment of the present invention includes a data processor (102 and the like) that controls an input device connected to the outside by executing a program transferred from an external memory to a RAM; An input / output controller hub (201, 205) connected to the data processor via an LPC bus; and a main processor (200) connected to the input / output controller hub via a system bus. The data processor has a central processing unit that starts execution of a program using a predetermined address in the RAM as a start address in response to a given reset release instruction. Further, the data processor reads transfer control information from the external memory in response to a predetermined reset release instruction, downloads a program from the external memory based on address information indicated by the read transfer control information, A downloaded program is transferred to the RAM, and after the transfer is completed, a boot loader controller is provided that gives a reset release instruction to the central processing unit.

転送制御情報が示すアドレス情報に基づいてプログラムをダウンロードするから、そのプログラムに対して外部メモリ上のマッピングに応じた転送制御情報を用意すればよく、プログラムに対して外部メモリ上の自由なマッピングを簡単な構成によって許容することができる。この点で、データ処理システムのシステムコストの低減に資することができる。   Since the program is downloaded based on the address information indicated by the transfer control information, it is sufficient to prepare transfer control information corresponding to the mapping on the external memory for the program, and free mapping on the external memory for the program. It can be tolerated with a simple configuration. In this respect, the system cost of the data processing system can be reduced.

〔18〕<プログラム転送の誤りを検出>
項17のデータプロセッサにおいて、前記ブートローダコントローラは、前記ダウンロードしたプログラムに対して転送誤りの有無を検出する誤り検出回路(122)を有する。
[18] <Detection of program transfer error>
In the data processor of item 17, the boot loader controller has an error detection circuit (122) for detecting the presence or absence of a transfer error in the downloaded program.

転送誤りによる誤動作を未然に防止することができる。   It is possible to prevent malfunctions due to transfer errors.

〔19〕<プログラム転送の誤りを検出したときのリトライ回数の指定>
項17のデータプロセッサにおいて、前記ブートローダコントローラは、前記誤り検出回路によるプログラム転送の誤りを検出したとき、前記転送制御情報で指定される回数を上限として、転送誤りの無いことが検出されるまでプログラムダウンロードのリトライを行う。
[19] <Specifying the number of retries when a program transfer error is detected>
In the data processor according to item 17, when the boot loader controller detects an error in program transfer by the error detection circuit, the boot loader controller sets a program until the number of times specified by the transfer control information is detected as an upper limit until no transfer error is detected. Retry download.

リトライを許可することによって、解消可能な一時的要因による転送誤りを容易に解消することができる。   By permitting the retry, a transfer error due to a temporary factor that can be eliminated can be easily eliminated.

〔20〕<誤り検出の有効無効切替>
項18又は19のデータプロセッサにおいて、前記ブートローダコントローラは、前記誤り検出回路による検出動作の有効(CRCENの活性)が指示されたときその検出動作を行う。
[20] <Enable / disable switching of error detection>
In the data processor according to item 18 or 19, the boot loader controller performs a detection operation when an instruction to validate the detection operation by the error detection circuit (activation of CRCEN) is given.

転送誤りを殆ど生じない環境下で処理するような場合にブート動作の高速化を優先させることが可能になる。   In the case where processing is performed in an environment in which transfer errors hardly occur, it is possible to give priority to speeding up the boot operation.

〔21〕<プログラム転送のサイズの指定>
項17乃至20の何れかのデータプロセッサにおいて、前記ブートローダコントローラは、前記転送制御情報が示すスタートアドレスからプログラムのダウンロードを開始し、前記転送制御情報が示す容量のプログラムをダウンロードする。
[21] <Specifying program transfer size>
In the data processor according to any one of Items 17 to 20, the boot loader controller starts downloading a program from a start address indicated by the transfer control information, and downloads a program having a capacity indicated by the transfer control information.

転送制御情報としてスタートアドレスとエンドアドレスを持つ場合に限定されない。   The transfer control information is not limited to having a start address and an end address.

〔22〕<プログラム転送終了の通知>
項17乃至21のデータ処理システムにおいて、前記ブートローダコントローラは、前記RAMへのプログラムの転送終了を外部に通知する。
[22] <Program transfer end notification>
In the data processing system according to items 17 to 21, the boot loader controller notifies the outside of the transfer of the program to the RAM.

データプロセッサによるプログラム実行可能な状態を前記入出力コントローラハブ更にはその上流のメインプロセッサで一早く把握することが可能になり、それをデータプロセッサに接続する上位階層システムの動作開始若しくは初期化のトリガなどに適用可能になる。   The input / output controller hub and further the main processor upstream thereof can quickly grasp the program executable state by the data processor, and trigger the operation start or initialization of the higher-level system connected to the data processor. It becomes applicable to.

〔23〕<プログラム転送失敗の通知>
項18乃至22のデータ処理システムにおいて、前記ブートローダコントローラは、前記RAMへのプログラムの転送完了の失敗を外部に通知する。
[23] <Notification of program transfer failure>
In the data processing system according to Items 18 to 22, the boot loader controller notifies the outside of the failure to complete the transfer of the program to the RAM.

データプロセッサによるプログラム実行不可能な状態を前記入出力コントローラハブ更にはその上流のメインプロセッサで一早く把握することが可能になり、それをインジケータへの表示或いはリカバリ処理へのトリガ等に適用可能になる。   It becomes possible to quickly grasp the state in which the program cannot be executed by the data processor by the input / output controller hub and the main processor upstream thereof, and it can be applied to display on an indicator or a trigger for recovery processing. Become.

〔24〕<プログラム転送時間の調整>
項17乃至23の何れかのデータ処理システムにおいて、前記ブートローダコントローラは、前記転送制御情報で指定される周波数に同期して前記プログラムのダウンロードを行なう。
[24] <Adjustment of program transfer time>
In the data processing system according to any one of items 17 to 23, the boot loader controller downloads the program in synchronization with a frequency specified by the transfer control information.

転送制御情報に基づいて外部メモリからRAMへのプログラムの転送に要する時間を調整することが可能になる。外部メモリからRAMへのプログラムの転送完了によってCPUへのリセット解除が指示されるから、データプロセッサのリセット指示によって内部が初期化されるまでに要する時間に対して、更には前記入出力コントローラハブに接続するデバイスの初期化に要する時間に対して、ブートローダコントローラによるCPUのリセット解除のタイミングが早すぎたり遅すぎたりしないようにすることができる。   Based on the transfer control information, it is possible to adjust the time required to transfer the program from the external memory to the RAM. Since the reset release to the CPU is instructed upon completion of the transfer of the program from the external memory to the RAM, the input / output controller hub is further provided for the time required for the internal initialization by the data processor reset instruction. It is possible to prevent the boot loader controller from releasing the reset of the CPU too early or too late with respect to the time required to initialize the connected device.

〔25〕<プログラム転送時間の調整>
項17乃至23の何れかのデータ処理システムにおいて、前記ブートローダコントローラは、前記転送制御情報で指定されるデータサイズ単位で複数回に分けて前記プログラムのダウンロードを行なう。
[25] <Adjustment of program transfer time>
In the data processing system according to any one of items 17 to 23, the boot loader controller downloads the program in a plurality of times in units of data size specified by the transfer control information.

上記データサイズ単位を小さくすれば分割して行うプログラムダウンロードの動作回数が増えるのでプログラムダウンロードを完了するまでに要する時間が増える。したがって、上記同様に、転送制御情報に基づいて外部メモリからRAMへのプログラムの転送に要する時間を調整することが可能になり、データプロセッサのリセット指示によって内部が初期化されるまでに要する時間に対して、更には前記入出力コントローラハブに接続するデバイスの初期化に要する時間に対して、ブートローダコントローラによるCPUのリセット解除のタイミングが早すぎたり遅すぎたりしないようにすることができる。   If the data size unit is reduced, the number of program download operations to be divided increases, so that the time required to complete the program download increases. Therefore, as described above, it is possible to adjust the time required to transfer the program from the external memory to the RAM based on the transfer control information, and to the time required until the internal is initialized by the reset instruction of the data processor. In contrast, it is possible to prevent the boot loader controller from releasing the reset of the CPU too early or too late with respect to the time required to initialize the device connected to the input / output controller hub.

〔26〕<リセットの要因により再起動レベルの選択>
項17乃至25の何れかのデータ処理システムにおいて、前記ブートローダコントローラが応答する所定のリセット解除の指示は、そのリセット指示が前記RAMの記憶情報の保持を保証しないリセット要因に対応するものであり、前記RAMの記憶情報の保持を保証するリセット要因に対応するリセット解除の指示に対して、CPUは当該リセット解除の指示に応答して前記RAMのプログラムを実行する。
[26] <Selection of restart level depending on reset factor>
In the data processing system according to any one of Items 17 to 25, the predetermined reset release instruction responded by the boot loader controller corresponds to a reset factor for which the reset instruction does not guarantee the storage information of the RAM, In response to a reset release instruction corresponding to a reset factor that guarantees retention of storage information in the RAM, the CPU executes the program in the RAM in response to the reset release instruction.

リセット要因に応じてブートローダコントローラを用いたRAMへのプログラムダウンロードを行うか否かを適正に制御することができる。   Whether or not to download the program to the RAM using the boot loader controller can be appropriately controlled according to the reset factor.

〔27〕<リセットの要因により再起動レベルの選択>
項17乃至25の何れかのデータ処理システムにおいて、前記ブートローダコントローラが応答する所定のリセット解除の指示は、外部から供給されるリセット信号によるリセット要因に対応する指示、及び電源電圧レベル低下による内部リセット信号によるリセット要因に対応する指示を含み、ウォッチドッグタイマのタイムアウトによる内部リセット信号によるリセット要因に対応する指示を含まない。前記RAMは前記ブートローダコントローラからのプログラムの転送が完了されたとき、ライトプロテクトされ、前記ライトプロテクトは前記外部から供給されるリセット信号によるリセット指示及び前記電源電圧レベル低下による内部リセット信号によるリセット指示によって解除される。
[27] <Selection of restart level depending on reset factor>
26. In the data processing system according to any one of items 17 to 25, the predetermined reset release instruction to which the boot loader controller responds is an instruction corresponding to a reset factor by a reset signal supplied from the outside, and an internal reset by a power supply voltage level drop The instruction corresponding to the reset factor by the signal is included, and the instruction corresponding to the reset factor by the internal reset signal due to the timeout of the watchdog timer is not included. The RAM is write protected when the transfer of the program from the boot loader controller is completed, and the write protection is performed by a reset instruction by a reset signal supplied from the outside and a reset instruction by an internal reset signal by the power supply voltage level drop. Canceled.

リセット要因に応じてブートローダコントローラを用いたRAMへのプログラムダウンロードを行うか否かを適正に制御することができる。   Whether or not to download the program to the RAM using the boot loader controller can be appropriately controlled according to the reset factor.

〔28〕<リセットの要因により再起動レベルの選択>
項17乃至25の何れかのデータプロセッサにおいて、複数のリセット要因がある場合に、リセット要因毎にブートローダコントローラを用いてRAMへのプログラムダウンロードを行うか否かの設定をするリセット要因起動レベル制御レジスタを持つ。
[28] <Selection of restart level depending on reset factor>
Item 20. The reset factor activation level control register for setting whether to download a program to the RAM using the boot loader controller for each reset factor when there are a plurality of reset factors in the data processor of any one of items 17 to 25. have.

リセット要因に応じてブートローダコントローラを用いたRAMへのプログラムダウンロードを行うか否かを適正に制御することができる。   Whether or not to download the program to the RAM using the boot loader controller can be appropriately controlled according to the reset factor.

〔29〕<スクランブルされたプログラムダウンロード>
項17乃至28の何れかのデータ処理システムにおいて、前記転送制御情報が示すアドレス情報は、外部メモリ上で離散的にマッピングされているダウンロードされるべき所定のプログラムの所在を示すアドレス情報である。前記所定のプログラムの一部は前記ブートローダコントローラがダウンロードするブートプログラムであり、前記所定のプログラムの残りは前記中央処理装置が前記ブートプログラムを実行することによって前記外部メモリからダウンロードして前記RAMに転送される離散的にマッピングされたプログラムである。
[29] <Scrambled program download>
In the data processing system according to any one of Items 17 to 28, the address information indicated by the transfer control information is address information indicating the location of a predetermined program to be downloaded that is discretely mapped on the external memory. A part of the predetermined program is a boot program downloaded by the boot loader controller, and the rest of the predetermined program is downloaded from the external memory by the central processing unit executing the boot program and transferred to the RAM. Is a discretely mapped program.

これによりダウンロードされるべき所定のプログラムを外部メモリ上でスクランブルして格納することができるので、プログラムの盗用若しくは不正使用を抑制することができるという点で、プログラムに対するセキュリティーを向上させることができる。   As a result, the predetermined program to be downloaded can be scrambled and stored on the external memory, so that the security of the program can be improved in that the theft or illegal use of the program can be suppressed.

2.実施の形態の詳細
実施の形態について更に詳述する。
2. Details of Embodiments Embodiments will be further described in detail.

[実施の形態1]
図1には本発明の実施の形態1に係るデータプロセッサが例示される。データプロセッサ(MCU)102は、特に制限されないが、単結晶シリコンなどの1個の半導体基板に相補型MOS集積回路製造技術などにより形成される。データプロセッサ102はその外部に接続された外部メモリ、例えばシリアルフラッシュメモリ101からイニシャルロードしたプログラムを実行する。
[Embodiment 1]
FIG. 1 illustrates a data processor according to Embodiment 1 of the present invention. The data processor (MCU) 102 is not particularly limited, but is formed on a single semiconductor substrate such as single crystal silicon by a complementary MOS integrated circuit manufacturing technique or the like. The data processor 102 executes a program initially loaded from an external memory connected to the outside, for example, the serial flash memory 101.

データプロセッサ102は、代表的に示された中央処理装置(CPU)103、RAM105、システムコントローラ(SYSC)106、及びブートローダコントローラ(BLC)104などを備える。CPU103はバス107を介してRAM105上の所定アドレスを開始アドレスとしてプログラムをアクセスし、それによって順次フェッチした命令を実行する。   The data processor 102 includes a central processing unit (CPU) 103, a RAM 105, a system controller (SYSC) 106, a boot loader controller (BLC) 104, and the like that are representatively shown. The CPU 103 accesses the program via the bus 107 using a predetermined address on the RAM 105 as a start address, thereby executing the sequentially fetched instructions.

SYSC106はデータプロセッサ102の外部から供給されるリセット信号RESやデータプロセッサの内部で生成されるその他のリセット信号(図示を省略)に基づいて内部の初期化信号(リセット信号)を生成し、また、データプロセッサ102の外部から供給されるモード信号(図示を省略)に基づいてデータプロセッサの動作モードを制御する。   The SYSC 106 generates an internal initialization signal (reset signal) based on a reset signal RES supplied from the outside of the data processor 102 and other reset signals (not shown) generated inside the data processor. Based on a mode signal (not shown) supplied from the outside of the data processor 102, the operation mode of the data processor is controlled.

ブートローダコントローラ104は図示を省略するメモリコントローラとしてのシリアルフラッシュメモリインタフェース回路を介してシリアルフラッシュメモリ101に接続される。ブートローダコントローラ104は、SYSC106が出力する初期化信号res1のハイレベルへの変化によるリセット解除の指示に応答して、前記シリアルフラッシュメモリ101から転送制御情報(プログラム転送情報とも記す)130をリードし、リードした転送制御情報130が示すアドレス情報に基づいて当該シリアルフラッシュメモリ101からプログラム131をダウンロードし、ダウンロードしたプログラムを前記RAM105に転送する。ブートローダコントローラ104は、この転送を完了した後に、前記中央処理装置へ初期化信号res2のハイベルへの変化によってリセット解除を指示する。初期化信号res2は初期化信号res1のローレベルへの変化に同期してローレベルにされることによってCPU103にリセットを指示し、初期化信号res2のハイレベルへの変化によってリセット解除が指示され、それによってCPU103は既定のメモリアドレスを開始アドレスとしてRAM105上の命令フェッチを開始して、前記イニシャルロードされたプログラムの実行を開始する。   The boot loader controller 104 is connected to the serial flash memory 101 via a serial flash memory interface circuit as a memory controller (not shown). The boot loader controller 104 reads transfer control information (also referred to as program transfer information) 130 from the serial flash memory 101 in response to a reset release instruction caused by a change of the initialization signal res1 output from the SYSC 106 to a high level. The program 131 is downloaded from the serial flash memory 101 based on the address information indicated by the read transfer control information 130, and the downloaded program is transferred to the RAM 105. After completing this transfer, the boot loader controller 104 instructs the central processing unit to cancel the reset by changing the initialization signal res2 to high level. The initialization signal res2 is set to the low level in synchronization with the change of the initialization signal res1 to the low level, thereby instructing the CPU 103 to reset, and the change of the initialization signal res2 to the high level is instructed to release the reset. As a result, the CPU 103 starts fetching an instruction on the RAM 105 using a predetermined memory address as a start address, and starts executing the initially loaded program.

転送制御情報130が示すアドレス情報に基づいてプログラム131をダウンロードするから、そのプログラム131に対してシリアルフラッシュメモリ101上のマッピングに応じた転送制御情報130を用意すればよく、データプロセッサ102にフラッシュメモリをオンチップしなくてもよい。さらに、プログラム130に対してシリアルフラッシュメモリ101上の自由なマッピングを簡単な構成によって許容することができる。この点で、データプロセッサ102を適用するデータ処理システムのシステムコストの低減に資することができる。   Since the program 131 is downloaded based on the address information indicated by the transfer control information 130, the transfer control information 130 corresponding to the mapping on the serial flash memory 101 may be prepared for the program 131, and the flash memory is stored in the data processor 102. Does not have to be on-chip. Furthermore, free mapping on the serial flash memory 101 can be allowed for the program 130 with a simple configuration. In this respect, the system cost of the data processing system to which the data processor 102 is applied can be reduced.

図2にはブートローダコントローラ104のさらに詳細な構成が例示される。ブートローダコントローラ104はシリアルフラッシュメモリインタフェース回路110を介してシリアルフラッシュメモリ101に接続される。シリアルフラッシュメモリ101は、チップセレクト、メモリクロック、データ入力、データ出力の各シリアル端子を外部インタフェース端子として備え、シリアルフラッシュメモリインタフェース回路110はバス107を経由するアクセス要求やブートローダコントローラ104からのアクセス要求に応答してシリアルフラッシュメモリ101の前記各端子の制御を行なう。メモリ選択はチップ選択端子によって行なわれ、アクセス動作の種別がデータ入力端子に供給するアクセスコマンドによって行い、アドレスはデータ入力端子から供給し、書き込みデータはデータ入力端子から供給し、リードデータはデータ出力端子から出力される。   FIG. 2 illustrates a more detailed configuration of the boot loader controller 104. The boot loader controller 104 is connected to the serial flash memory 101 via the serial flash memory interface circuit 110. The serial flash memory 101 includes serial terminals for chip select, memory clock, data input, and data output as external interface terminals. The serial flash memory interface circuit 110 receives an access request via the bus 107 or an access request from the boot loader controller 104. In response to the control, each terminal of the serial flash memory 101 is controlled. Memory selection is performed by the chip selection terminal, the type of access operation is performed by an access command supplied to the data input terminal, the address is supplied from the data input terminal, the write data is supplied from the data input terminal, and the read data is output from the data Output from the terminal.

ブートローダコントローラ104は制御回路121、CRC演算回路122、及びプログラム転送情報レジスタ120を有する。制御回路121は、SYSC106が出力する初期化信号res1のハイレベルへの変化によるリセット解除の指示に応答して、シリアルフラッシュメモリインタフェース回路110にアクセス要求を発行して、前記シリアルフラッシュメモリ101から転送制御情報(プログラム転送情報)130をリードし、プログラム転送情報レジスタ120に格納する。その際、演算有効信号CRCENによってCRC演算回路122の演算動作が可能にされている場合は、リードしたプログラム転送情報に対するCRCチェックが行なわれ、その結果が信号CRCOKによって制御部121に返され、必要に応じて前記ダウンロード処理のリトライなどが行なわれる。前記シリアルフラッシュメモリ101上の転送制御情報130の格納先は予め決められていて、制御回路121のシーケンス制御ロジックにそのアドレスが組み込まれている。   The boot loader controller 104 includes a control circuit 121, a CRC calculation circuit 122, and a program transfer information register 120. The control circuit 121 issues an access request to the serial flash memory interface circuit 110 and transfers it from the serial flash memory 101 in response to a reset release instruction caused by a change of the initialization signal res1 output from the SYSC 106 to a high level. The control information (program transfer information) 130 is read and stored in the program transfer information register 120. At this time, if the operation operation of the CRC operation circuit 122 is enabled by the operation enable signal CRCEN, a CRC check is performed on the read program transfer information, and the result is returned to the control unit 121 by the signal CRCOK, which is necessary. In response to this, the download process is retried. The storage destination of the transfer control information 130 on the serial flash memory 101 is determined in advance, and the address is incorporated in the sequence control logic of the control circuit 121.

制御回路121は、レジスタ120に転送制御情報130をロードすると、これを読み込んで、その情報が示すアドレスを用いてプログラム130をダウンロードするためのアクセス要求をシリアルフラッシュメモリインタフェース回路110に発行し、これにしたがってシリアルフラッシュメモリインタフェース回路110は前記シリアルフラッシュメモリ101からプログラム131を順次リードする。その際、演算有効信号CRCENによってCRC演算回路122の演算動作が可能にされている場合は、リードしたプログラムに対するCRCチェックが行なわれ、その結果が信号CRCOKによって制御部121に返され、必要に応じてプログラムダウンロード処理のリトライなどが行なわれる。   When the transfer control information 130 is loaded into the register 120, the control circuit 121 reads the transfer control information 130 and issues an access request for downloading the program 130 using the address indicated by the information to the serial flash memory interface circuit 110. Accordingly, the serial flash memory interface circuit 110 sequentially reads the program 131 from the serial flash memory 101. At this time, if the arithmetic operation of the CRC arithmetic circuit 122 is enabled by the arithmetic valid signal CRCEN, the CRC check for the read program is performed, and the result is returned to the control unit 121 by the signal CRCOK, and if necessary The program download process is retried.

リードされ且つ必要に応じてCRCチェックされて誤りのないとされたプログラム131は制御回路121の制御によって前記RAM105の所定の記憶領域に順次格納される。格納先はCPU103によるプログラム実行の先頭アドレスを基点に順次格納される。この先頭アドレスの情報についても制御回路121のシーケンス制御ロジックに組み込まれている。   The program 131 that has been read and CRC-checked as necessary to make no error is sequentially stored in a predetermined storage area of the RAM 105 under the control of the control circuit 121. The storage destination is sequentially stored based on the start address of the program execution by the CPU 103. Information on the head address is also incorporated in the sequence control logic of the control circuit 121.

制御回路121は前記初期化信号res1のローレベルヘの変化によるリセット指示に同期して前記初期化信号res2をローレベルにすることによってCPU103にリセットを指示しており、それによってCPU103の内部の初期化が行なわれ、また、図示は省略するがデータプロセッサ内部のその他の回路に対してもリセットが指示されて初期化動作が行なわれている。制御回路121はRAM105へのプログラム131の転送を完了すると、CPU103への初期化信号res2のハイレベルへの変化によってリセット解除を指示する。初期化信号res2のハイレベルへの変化によってCPU103にリセット解除が指示され、それによってCPU103は既定のメモリアドレスを開始アドレスとしてRAM105から命令フェッチを開始して、前記イニシャルロードされたプログラム131の実行を開始する。   The control circuit 121 instructs the CPU 103 to reset by setting the initialization signal res2 to the low level in synchronization with the reset instruction due to the change of the initialization signal res1 to the low level, whereby the initialization of the CPU 103 is performed. Although not shown, the reset operation is instructed to other circuits in the data processor, and the initialization operation is performed. When the transfer of the program 131 to the RAM 105 is completed, the control circuit 121 instructs the reset release by a change of the initialization signal res2 to the CPU 103 to a high level. The CPU 103 is instructed to release the reset by a change of the initialization signal res2 to the high level, whereby the CPU 103 starts fetching an instruction from the RAM 105 with a predetermined memory address as a start address, and executes the initially loaded program 131. Start.

制御回路121は前記RAM105へのプログラム131の転送終了をプログラム転送信号PGMTRによってデータプロセッサ102の外部に通知する。データプロセッサ102によるプログラム実行可能な状態を外部で一早く把握することが可能になり、データプロセッサに接続する上位階層システムの動作開始若しくは初期化のトリガなどに適用可能になる。   The control circuit 121 notifies the end of the transfer of the program 131 to the RAM 105 to the outside of the data processor 102 by a program transfer signal PGMTR. The state in which the program by the data processor 102 can be executed can be quickly ascertained externally, and can be applied to an operation start or initialization trigger of an upper layer system connected to the data processor.

また、制御回路121は前記CRC演算回路122のCRCチェックによるエラーをリトライなどによっても解消できないなどの事情によるRAMへのプログラムの転送完了の失敗を不具合信号BLERRによってデータプロセッサ102の外部に通知する。これにより、データプロセッサ102によるプログラム実行不可能な状態を外部で一早く把握することが可能になり、インジケータヘの表示或いはリカバリ処理へのトリガ等に適用可能になる。   In addition, the control circuit 121 notifies the outside of the data processor 102 by the failure signal BLERR that the transfer of the program to the RAM is unsuccessful due to circumstances such that the error due to the CRC check of the CRC calculation circuit 122 cannot be resolved even by retrying. As a result, it becomes possible to quickly ascertain the state in which the data processor 102 cannot execute the program, and it can be applied to display on an indicator or a trigger for recovery processing.

シリアルフラッシュメモリ101は前記プログラム131以外のプログラムや制御データを格納する場合も利用され、それらのプログラムや制御情報をCPU103の制御に基づいて規定の回路にロード可能にするために、シリアルフラッシュメモリインタフェース110はバス107に接続され、CPU103のアクセス制御を受け得るようになっている。たとえばPCなどにおいて低帯域のデバイス接続に用いられるLPC(Low Pin Count)バスが接続されるLPCインタフェース回路(LPCIF)111が周辺回路としてバス107に設けられている場合に、シリアルフラッシュメモリ101にBIOS(Basic Input / 0utput System)プログラムが格納されているとすると、CPU103が前記プログラム131を実行することによってLPCインタフェース回路111のレジスタを設定し、LPCバスからの要求によりLPCインタフェース回路111を経由してシリアルフラッシュメモリインタフェース110を介してシリアルフラッシュメモリ101からBIOSプログラムをリードし、これをLPCインタフェース回路111を経由してLPCバスに出力することができる。   The serial flash memory 101 is also used for storing programs other than the program 131 and control data. In order to load these programs and control information into a prescribed circuit based on the control of the CPU 103, a serial flash memory interface is used. 110 is connected to the bus 107 and can receive access control of the CPU 103. For example, when an LPC interface circuit (LPCIF) 111 to which an LPC (Low Pin Count) bus used for low-band device connection in a PC or the like is connected is provided as a peripheral circuit on the bus 107, the serial flash memory 101 has a BIOS. If a (Basic Input / 0utput System) program is stored, the CPU 103 sets the register of the LPC interface circuit 111 by executing the program 131, and passes through the LPC interface circuit 111 in response to a request from the LPC bus. A BIOS program can be read from the serial flash memory 101 via the serial flash memory interface 110 and output to the LPC bus via the LPC interface circuit 111.

図3にはプログラム転送情報130の一例が示される。シリアルフラッシュメモリ101は、プログラム131と共にそれに対応するCRCコード2を備えることによって、CRC演算回路122によるCRCチェックが可能になる。シリアルフラッシュメモリ101は前述のようにプログラム131以外のプログラム133や制御情報134を格納することができる。   FIG. 3 shows an example of the program transfer information 130. The serial flash memory 101 includes the CRC 131 corresponding to the program 131 and the CRC code 2 so that the CRC calculation circuit 122 can perform a CRC check. As described above, the serial flash memory 101 can store the program 133 other than the program 131 and the control information 134.

プログラム転送情報130として、たとえぱ、プログラム131が格納される領域の先頭アドレス、そのプログラム131のサイズ(たとえばバイト数)、CRCチェックによるエラーなどを生じたときのプログラム転送リトライ回数、プログラム転送情報130に対応するCRCコード1を有する。プログラムサイズに代えてプログラム131が格納される領域のエンドアドレスを保持してもよい。あるいは、アドレス領域の上位側アドレス情報を規定し、そのサイズを下位側ビット数で規定されサイズとみなすように、アドレス領域を指定してもよい。   As the program transfer information 130, for example, the start address of the area where the program 131 is stored, the size of the program 131 (for example, the number of bytes), the number of program transfer retries when an error is caused by CRC check, etc., the program transfer information 130 CRC code 1 corresponding to. Instead of the program size, the end address of the area where the program 131 is stored may be held. Alternatively, the address area may be specified so that the higher-order address information of the address area is defined and the size is defined by the lower-order bit number and regarded as the size.

図4にはブートローダコントローラ104によるダウンロード処理のフローチャートが示される。   FIG. 4 shows a flowchart of download processing by the boot loader controller 104.

初期化信号res1のハイレベルによってリセット解除の指示が与えられると(S1)、ブートローダコントローラ104はシリアルフラッメモリ101からプログラム転送情報130を読み込む(S2)。読み込んだ情報に対してCRCチェックが行われ、エラーの有無が判別される(S3)。エラーがあったときは規定のリトライ回数に達するまでS2,S3が繰り返され(S4)、それによってもエラーを解消できないときは不具合信号BLERRを出力する(S8)。   When the reset release instruction is given by the high level of the initialization signal res1 (S1), the boot loader controller 104 reads the program transfer information 130 from the serial flash memory 101 (S2). A CRC check is performed on the read information to determine whether there is an error (S3). If there is an error, S2 and S3 are repeated until the specified number of retries is reached (S4), and if the error cannot be resolved by this, a failure signal BLERR is output (S8).

ステップS3でCRCチェック結果の正常が判別されると、今度は、シリアルフラッシュメモリ101からプログラム131をRAM105に転送する(S5)。RAM105に転送するプログラム131に対してCRCチェックが行われ、エラーの有無が判別される(S6)。エラーがあったときは規定のリトライ回数に達するまでS5,S6が繰り返され(S7)、それによってもエラーを解消できないときは不具合信号BLERRを出力する(S8)。   If it is determined in step S3 that the CRC check result is normal, this time, the program 131 is transferred from the serial flash memory 101 to the RAM 105 (S5). A CRC check is performed on the program 131 to be transferred to the RAM 105 to determine whether there is an error (S6). If there is an error, steps S5 and S6 are repeated until the specified number of retries is reached (S7), and if the error cannot be resolved by this, a failure signal BLERR is output (S8).

ステップS6でCRCチェック結果の正常が判別されると、ブートローダコントローラ104はCPU103への初期化信号res2をハイレベルに変化させてリセット解除の指示を与え(S9)、データプロセッサ102の外部にはプログラム転送信号PGMTRをアサートする(S10)。これによってCPU103はRAM105にダウンロードされたプログラムの実行に遷移する(S11)。   When it is determined that the CRC check result is normal in step S6, the boot loader controller 104 changes the initialization signal res2 to the CPU 103 to a high level and gives a reset release instruction (S9). The transfer signal PGMTR is asserted (S10). As a result, the CPU 103 shifts to execution of the program downloaded to the RAM 105 (S11).

[実施の形態2]
図5には実施の形態2に係るデータプロセッサ102Aが示される。図1のデータプロセッサ102ではBLC104からRAM105へのプログラム131の転送に専用バス108を用いた。図5の例ではその転送に共通バス107を用いる。BLC104Aは共通バスをアクセスするための制御ロジックを持たなければならない。専用バス108を用いる場合にはBLC104はローカルな仕様で簡易な構成によるバスアクセス制御ロジックを持てばよい。
[Embodiment 2]
FIG. 5 shows a data processor 102A according to the second embodiment. In the data processor 102 of FIG. 1, the dedicated bus 108 is used for transferring the program 131 from the BLC 104 to the RAM 105. In the example of FIG. 5, the common bus 107 is used for the transfer. The BLC 104A must have control logic for accessing the common bus. When the dedicated bus 108 is used, the BLC 104 may have a bus access control logic with a local configuration and a simple configuration.

更に外部メモリはシリアルフラッシュメモリ101に限定されず、パラレルインタフェースを持つパラレルフラッシュメモリ101Aを採用することも可能である。   Further, the external memory is not limited to the serial flash memory 101, and a parallel flash memory 101A having a parallel interface may be employed.

[実施の形態3]
図6には実施の形態3に係るデータプロセッサ102Bが示される。図1のデータプロセッサ102ではオンチップのRAM105にダウンロードしたプログラム131をロードした。図6の例ではデータプロセッサ102Bの外部に配置したシンクロナスDRAM等から成る外部RAM105Bにダウンロードプログラムをロードする。この場合、データプロセッサ102Bは外部RAM105Bとのインタフェースを行うメモリコントローラ109を搭載することが必要になる。
[Embodiment 3]
FIG. 6 shows a data processor 102B according to the third embodiment. The data processor 102 in FIG. 1 loads the downloaded program 131 into the on-chip RAM 105. In the example of FIG. 6, the download program is loaded into an external RAM 105B composed of a synchronous DRAM or the like arranged outside the data processor 102B. In this case, the data processor 102B needs to be equipped with a memory controller 109 that interfaces with the external RAM 105B.

[実施の形態4]
実施の形態4として、プログラム転送時間を調整可能とする場合について説明する。図7には実施の形態4で使用するプログラム転送情報130Aの構成が例示される。図3との相違点は、通信クロックの指定情報と転送単位の指定情報を持つことである。
[Embodiment 4]
As a fourth embodiment, a case where the program transfer time can be adjusted will be described. FIG. 7 illustrates the configuration of the program transfer information 130A used in the fourth embodiment. The difference from FIG. 3 is that it has communication clock designation information and transfer unit designation information.

この場合に、例えばブートローダコントローラ104は、前記通信クロックの指定情報で指定される周波数に同期して前記プログラムのダウンロードを行なう。例えばその周波数はシリアルフラッシュメモリ101のメモリクロック端子に供給されるクロック信号の周波数を決定する。これにより、転送制御情報に基づいてシリアルフラッメモリ101からRAM105へのプログラムの転送に要する時間を調整することが可能になる。シリアルフラッシュメモリ101からRAM105へのプログラムの転送完了によいってCPU103へのリセット解除の指示が与えられるから、データプロセッサの内外における初期化動作が完了されるまでに要する時間に対して、ブートローダコントローラ104によるCPU103のリセット解除のタイミングが早すぎたり遅すぎたりしないようにすることができる。   In this case, for example, the boot loader controller 104 downloads the program in synchronization with the frequency designated by the designation information of the communication clock. For example, the frequency determines the frequency of the clock signal supplied to the memory clock terminal of the serial flash memory 101. This makes it possible to adjust the time required to transfer the program from the serial flash memory 101 to the RAM 105 based on the transfer control information. Since the reset release instruction to the CPU 103 is given to the completion of the transfer of the program from the serial flash memory 101 to the RAM 105, the boot loader controller is compared with the time required for the initialization operation inside and outside the data processor to be completed. The timing for releasing the reset of the CPU 103 by 104 can be prevented from being too early or too late.

また、例えば前記ブートコントローラ104は、前記転送単位の情報で指定されるデータサイズ単位で複数回に分けて前記プログラム131のダウンロードを行なう。即ち、上記指定されたデータサイズ単位でシリアルフラッシュメモリ101にアクセスコマンドを発行する。同一サイズのプログラムをリードする場合であっても、アクセスコマンドの発行回数を増やしてアクセス動作を細切れにするほど所要のデータのダウンロードを完了する時間が長くなる。   In addition, for example, the boot controller 104 downloads the program 131 in a plurality of times in units of data size designated by the information of the transfer unit. That is, an access command is issued to the serial flash memory 101 in the specified data size unit. Even when a program of the same size is read, the time required to complete the download of required data becomes longer as the access operation is issued and the access operation is cut into smaller pieces.

図8にはアクセスサイズを16バイトとしてプログラムをダウンロードするときのシリアルフラッシュメモリ101に対するアクセス動作タイミングが示される。図8において、SPISSはチップセレクタ信号、SPICKはメモリクロック信号、SPIDOはデータ出力、SPIDIはデータ入力を示す。Iはアクセスコマンド、Aはプログラム先頭アドレス、Sはプログラムサイズ。Pはプログラムを意味する。   FIG. 8 shows the access operation timing for the serial flash memory 101 when the program is downloaded with an access size of 16 bytes. In FIG. 8, SPIS indicates a chip selector signal, SPICK indicates a memory clock signal, SPIDO indicates a data output, and SPIDI indicates a data input. I is an access command, A is a program start address, and S is a program size. P means a program.

このように、上記データサイズ単位を小さくすれば分割して行うプログラムダウンロードの動作回数が増えるのでプログラムダウンロードを完了するまでに要する時間が増える。したがって、上記同様に、転送制御情報に基づいてシリアルフラッシュメモリ101からRAM105へのプログラムの転送に要する時間を調整することが可能になり、データプロセッサの内外における初期化動作が完了されるまでに要する時間に対して、ブートローダコントローラによるCPUのリセット解除のタイミングが早すぎたり遅すぎたりしないようにすることができる。   As described above, if the data size unit is reduced, the number of program download operations performed in a divided manner increases, so that the time required to complete the program download increases. Therefore, similarly to the above, it is possible to adjust the time required for transferring the program from the serial flash memory 101 to the RAM 105 based on the transfer control information, and it is necessary until the initialization operation inside and outside the data processor is completed. It is possible to prevent the timing of the CPU reset release by the boot loader controller from being too early or too late with respect to time.

[実施の形態5]
図9には実施の形態5に係るデータプロセッサ102Cが示される。図1のデータプロセッサ102では代表として外部リセット信号RESによるリセット指示の解除に着目してプログラムのイニシャルロードを説明した。その他の初期化要因によるリセット指示に対応するリセット解除に対しても同様にプログラムのイニシャルロードを適用することができることはいうまでもない。特に実施の形態5では、リセットの要因に応じたリセット解除による処理形態を選択するようにした構成に付いて説明する。
[Embodiment 5]
FIG. 9 shows a data processor 102C according to the fifth embodiment. In the data processor 102 of FIG. 1, the initial load of the program has been described by paying attention to the release of the reset instruction by the external reset signal RES as a representative. It goes without saying that the initial load of the program can be similarly applied to the reset release corresponding to the reset instruction by other initialization factors. In particular, in the fifth embodiment, a description will be given of a configuration in which a processing mode by reset cancellation corresponding to a reset factor is selected.

図9には図1のデータプロセッサに対して、リセット要求元となる内部回路として代表的にウォッチドッグタイマ(WDT)141と電源電圧低下検出回路(LVD)140の図示を追加したデータプロセッサ102Cを示す。   FIG. 9 shows a data processor 102C in which the illustration of a watchdog timer (WDT) 141 and a power supply voltage drop detection circuit (LVD) 140 is added as an internal circuit that is a reset request source to the data processor of FIG. Show.

LVD140は電源電圧レベルが規定電圧以下になったとき内部リセット信号RES_LVDをローレベルにしてリセットを指示する。WDT141はタイムアウトにより内部リセット信号RES_WDTをローレベルにしてリセットを指示する。電源電圧レベル低下による内部リセット信号RES_LVDによるリセット要因は、外部から供給されるリセット信号RESによるリセット要因と同様に前記RAMの記憶情報の保持を保証しないリセット要因とされる。一方、WDT141のタイムアウトによる内部リセット信号RES_WDTによるリセット要因は、前記RAMの記憶情報の保持を保証するリセット要因である。後者のリセット要因は、前記ブートローダコントローラ104Cからのプログラムの転送が完了されたとき、前記RAM105はライトプロテクトされ、前記ライトプロテクトは前記外部から供給されるリセット信号RESによるリセット指示及び前記電源電圧レベル低下による内部リセット信号RES_LVDによるリセット指示によって解除されることを前提とするものである。内部リセット信号RES_LVDによるリセット指示がされたときでもRAM105が保有するプログラム130は不所望に書き換えられたりすることなく正規の状態に維持されることになる。   The LVD 140 instructs the reset by setting the internal reset signal RES_LVD to a low level when the power supply voltage level becomes equal to or lower than a specified voltage. The WDT 141 instructs the reset by setting the internal reset signal RES_WDT to low level due to timeout. The reset factor caused by the internal reset signal RES_LVD due to the drop in the power supply voltage level is a reset factor that does not guarantee the retention of the stored information in the RAM, similarly to the reset factor caused by the reset signal RES supplied from the outside. On the other hand, the reset factor by the internal reset signal RES_WDT due to timeout of the WDT 141 is a reset factor that guarantees retention of the storage information of the RAM. The latter reset factor is that when the transfer of the program from the boot loader controller 104C is completed, the RAM 105 is write protected, and the write protect is a reset instruction by the reset signal RES supplied from the outside and the power supply voltage level drop. This is premised on being released by a reset instruction by the internal reset signal RES_LVD. Even when a reset instruction is given by the internal reset signal RES_LVD, the program 130 held in the RAM 105 is maintained in a normal state without being undesirably rewritten.

実施の形態5では上記リセット指示の要因の相違に応じてブートロードコントローラ104Cを動作させるようにしたものである。res1はRESに対応する初期化信号、res1_WDTはRES_WDTに対応する初期化信号、res1_LVDはRES_LVDに対応する初期化信号である。   In the fifth embodiment, the boot load controller 104C is operated in accordance with the difference in the cause of the reset instruction. res1 is an initialization signal corresponding to RES, res1_WDT is an initialization signal corresponding to RES_WDT, and res1_LVD is an initialization signal corresponding to RES_LVD.

ブートローダコントローラ104Cが応答する所定のリセット解除の指示は、res1のハイレベルへの変化によるリセット解除の指示、及びres1_LVDのハイレベルへの変化によるリセット解除の指示とされ、res1_WDTのハイレベルへの変化によるリセット解除の指示は対象外とする。   The predetermined reset release instruction to which the boot loader controller 104C responds is a reset release instruction due to a change of res1 to a high level and a reset release instruction due to a change of res1_LVD to a high level, and the change of res1_WDT to a high level The reset release instruction by is not covered.

これにより、リセット要因に応じてブートローダコントローラ104Cを用いたRAM105へのプログラムダウンロードを行うか否かを適正に制御することができる。既に有効なプログラムを保持していることが保証されている状態でリセットが指示されたときには無駄なプログラムダウンロードを行わずにCPU103にリセット解除を指示することができる。要するに、初期化信号res1_WDTがハイレベルにされてリセット解除の指示が与えられたとき、ブートローダコントローラ104Cの制御121は即座にリセット信号res2をローレベルからハイレベルに変化させてCPU103のリセット状態を解除する。   Thereby, it is possible to appropriately control whether or not to download the program to the RAM 105 using the boot loader controller 104C according to the reset factor. When reset is instructed in a state where it is guaranteed that a valid program is already held, it is possible to instruct the CPU 103 to cancel reset without performing useless program download. In short, when the reset signal res1_WDT is set to the high level and the reset release instruction is given, the control 121 of the boot loader controller 104C immediately changes the reset signal res2 from the low level to the high level to cancel the reset state of the CPU 103. To do.

図10にはリセット要因毎に初期化が行なわれるか否かを機能ブロック(CPU,ブートローダコントローラ、RAM、その他)単位で示して有る。「初期化」は対応するリセット指示によって初期化が行われることを意味し、[保持]は対応するリセット指示によって初期化が行われないことを意味する。」「CPUリセット解除」の欄はCPUのリセットが解除されたとき動作される回路ブロックと動作されない回路ブロックを確認的に示している。   FIG. 10 shows whether initialization is performed for each reset factor in units of functional blocks (CPU, boot loader controller, RAM, etc.). “Initialization” means that initialization is performed by a corresponding reset instruction, and “hold” means that initialization is not performed by a corresponding reset instruction. The “CPU reset release” column shows the circuit blocks that are operated when the CPU reset is released and the circuit blocks that are not operated.

[実施の形態6]
実施の形態6として、実施の形態5のリセットの要因に応じたリセット解除による処理形態を選択する機能をリセット要因毎にリセット要因起動レベル制御レジスタ123に設定する機能に付いて説明する。
[Embodiment 6]
As a sixth embodiment, a function of selecting a processing mode by reset release according to a reset factor of the fifth embodiment will be described for setting a reset factor activation level control register 123 for each reset factor.

例えば、LVD140は内部リセット信号RES_LVDをローレベルにしてリセットを指示する電源電圧レベルを自由に設定可能なレジスタを持っている。レジスタに設定したリセットを指示する電源電圧レベルがRAM105のデータ保持の規定電圧レベルより高い場合はRAM105のデータは保障されているので、リセット信号RES_LVDにより、RAM105へのプログラムダウンロードを行う必要はない。このような場合は、リセット要因起動レベル制御レジスタ123に、リセット要因RES_LVDはプログラムダウンロード不要と設定すればよい。   For example, the LVD 140 has a register that can freely set a power supply voltage level for instructing a reset by setting the internal reset signal RES_LVD to a low level. Since the data in the RAM 105 is guaranteed when the power supply voltage level instructing the reset set in the register is higher than the specified voltage level for data retention in the RAM 105, it is not necessary to download the program to the RAM 105 by the reset signal RES_LVD. In such a case, the reset factor RES_LVD may be set in the reset factor activation level control register 123 so that no program download is necessary.

[実施の形態7]
実施の形態7ではスクランブルされてシリアルフラッメモリ101に格納されたプログラムをRAMにダウンロードするようにした構成について説明する。
[Embodiment 7]
In the seventh embodiment, a configuration in which a scrambled program stored in the serial flash memory 101 is downloaded to the RAM will be described.

図11には実施の形態7におけるシリアルフラッシュメモリ101上におけるプログラムの配置とRAMにダウンロードされたプログラムの配置が例示される。実施の形態7では、前記転送制御情報130が示すアドレス情報は、外部メモリ上で離散的にマッピングされているダウンロードされるべき所定のプログラム1321A〜131Dの一部のプログラム131Aの所在を示すアドレス情報であり、前記所定のプログラムの一部131Aは前記ブートローダコントローラ104がダウンロードするブートプログラムである。前記所定のプログラムの残り131B〜131D(メインプログラム)は前記CPU103が前記ブートプログラム131Aを実行することによって前記シリアルフラッシュメモリ101からダウンロードしてRAM105に転送される離散的にマッピングされたプログラムである。   FIG. 11 illustrates the arrangement of the program on the serial flash memory 101 and the arrangement of the program downloaded to the RAM in the seventh embodiment. In the seventh embodiment, the address information indicated by the transfer control information 130 is address information indicating the location of some programs 131A of the predetermined programs 1321A to 131D to be downloaded that are discretely mapped on the external memory. The part 131A of the predetermined program is a boot program downloaded by the boot loader controller 104. The remaining 131B to 131D (main program) of the predetermined program are discretely mapped programs that are downloaded from the serial flash memory 101 and transferred to the RAM 105 when the CPU 103 executes the boot program 131A.

RSADR1はRAM105上におけるブートプログラム131Aの先頭アドレスであり、CPU103はブートプログラムのダウンロードの後にリセット解除されたとき、RSADR1で示されるアドレスからプログラムの実行を開始する。RSADR2はRAM105上におけるメインプログラム131B〜131Dの先頭アドレスであり、CPU103はブートプログラムを実行してメインプログラム131B〜131DをRAM105にダウンロードした後に、RSADR2で示されるアドレスからプログラムの実行を開始する。   RSADR1 is the head address of the boot program 131A on the RAM 105. When the reset is released after the boot program is downloaded, the CPU 103 starts executing the program from the address indicated by RSADR1. RSADR2 is the start address of the main programs 131B to 131D on the RAM 105, and after the CPU 103 executes the boot program and downloads the main programs 131B to 131D to the RAM 105, execution of the program starts from the address indicated by RSADR2.

これによりダウンロードされるべき所定のプログラムをシリアルフラッシュメモリ101上でスクランブルして格納することができるので、プログラムの盗用若しくは不正使用を抑制することができるという点で、プログラムに対するセキュリティーを向上させることができる。   As a result, a predetermined program to be downloaded can be scrambled and stored on the serial flash memory 101, so that it is possible to improve the security for the program in that theft or illegal use of the program can be suppressed. it can.

[実施の形態8]
図12には上記実施の形態で説明したデータプロセッサ、例えばデータプロセッサ102をキーボード及び電源制御用コントローラとして採用したノートPCの概略的な構成が示される。
[Embodiment 8]
FIG. 12 shows a schematic configuration of a data processor described in the above embodiment, for example, a notebook PC adopting the data processor 102 as a keyboard and a power supply controller.

データ処理システムとしてのノートPCにおいて、データプロセッサ102は、シリアルフラッシュメモリ101からRAM105に転送されたプログラムを実行することにより、外部に接続された入力デバイスの制御を行う。入力出力デバイスとして、LEDインジケータ235、バッテリシステム241、冷却ファン236、キースキャン回路237、サーミスタ230、電力モニタ231、カードインタフェース232、ディスプレイ調光回路233、マウス等のポインティングデバイス234、および拡張プロセッサ244等が接続される。LPCバスにはFWH242,スーパーI/O243、ユーザ固有のASIC240等が接続される。前記信号PGMTRは、特に制限されないが、周辺回路のリセット信号として利用される。   In a notebook PC as a data processing system, the data processor 102 controls an input device connected to the outside by executing a program transferred from the serial flash memory 101 to the RAM 105. As an input / output device, an LED indicator 235, a battery system 241, a cooling fan 236, a key scan circuit 237, a thermistor 230, a power monitor 231, a card interface 232, a display dimming circuit 233, a pointing device 234 such as a mouse, and an expansion processor 244 Etc. are connected. An FWH 242, a super I / O 243, a user-specific ASIC 240, and the like are connected to the LPC bus. The signal PGMTR is not particularly limited, but is used as a peripheral circuit reset signal.

データプロセッサ102はLPCバスを介して入出力コントローラハブ205に接続される。例えば入出力コントローラハブ205はサウスブリッジ(ICH)を構成し、入出力コントローラハブ201はノースブリッジ(MCH)を構成する。サウスブリッジ(ICH)205にはローカルエリアネットワークコントローラ206を介してLANポート207、シリアルATAインタフェースを持つHDD210、カードンバス220、無線LAN221、スピーカ223を駆動するアンプ222、USBコントローラ211,212、USBポート208、及びPCIコントローラ等が接続される。ノースブリッジ(MCH)201にはディスプレイ204の表示制御等を行うグラフィックコントローラ203、メインメモリ202及びメインプロセッサ200が接続される。   The data processor 102 is connected to the input / output controller hub 205 via the LPC bus. For example, the input / output controller hub 205 constitutes a south bridge (ICH), and the input / output controller hub 201 constitutes a north bridge (MCH). A south bridge (ICH) 205 includes a local area network controller 206 through a LAN port 207, an HDD 210 having a serial ATA interface, a card bus 220, a wireless LAN 221, an amplifier 222 for driving a speaker 223, USB controllers 211 and 212, a USB. A port 208, a PCI controller, and the like are connected. The north bridge (MCH) 201 is connected to a graphic controller 203 that performs display control of the display 204, a main memory 202, and a main processor 200.

前述のように、シリアルフラッシュメモリ101に格納されたプログラムを転送制御情報が示すアドレス情報に基づいてRAM105にダウンロードするから、そのプログラムに対してシリアルフラッシュメモリ101上のマッピングに応じた転送制御情報を用意すればよい。プログラムに対してシリアルフラッシュメモリ101上の自由なマッピングを簡単な構成によって許容することができるという点で、ノートPCのシステムコストの低減に資することができる。シリアルフラッシュメモリ101のBIOSプログラムが格納されている場合にはCPU103の制御でLPCを介してICH205等の上位層へ転送することも可能にされている。   As described above, since the program stored in the serial flash memory 101 is downloaded to the RAM 105 based on the address information indicated by the transfer control information, the transfer control information corresponding to the mapping on the serial flash memory 101 is transferred to the program. Just prepare. Since free mapping on the serial flash memory 101 can be permitted with respect to the program with a simple configuration, it is possible to contribute to reduction of the system cost of the notebook PC. When the BIOS program of the serial flash memory 101 is stored, it can be transferred to an upper layer such as the ICH 205 through the LPC under the control of the CPU 103.

以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist thereof.

102 データプロセッサ(MCU)
101 シリアルフラッシュメモリ(SIFLSH)
103 中央処理装置(CPU)
105 RAM
106 システムコントローラ(SYSC)
104 ブートローダコントローラ(BLC)
107 バス
RES リセット信号
res1 初期化信号
res2 初期化信号
130 転送制御情報
131 プログラム
121 制御回路
122 CRC演算回路
120 プログラム転送情報レジスタ
102 Data processor (MCU)
101 Serial flash memory (SIFLSH)
103 Central processing unit (CPU)
105 RAM
106 System controller (SYSC)
104 Boot loader controller (BLC)
107 bus RES reset signal res1 initialization signal res2 initialization signal 130 transfer control information 131 program 121 control circuit 122 CRC arithmetic circuit 120 program transfer information register

Claims (29)

外部メモリからRAMに転送されたプログラムを実行するデータプロセッサであって、
与えられたリセット解除の指示に応答して前記RAMの所定アドレスを開始アドレスとしてプログラムの実行を開始する中央処理装置と、
所定のリセット解除の指示に応答して、前記外部メモリから転送制御情報をリードし、リードした転送制御情報が示すアドレス情報に基づいて当該外部メモリからプログラムをダウンロードし、ダウンロードしたプログラムを前記RAMに転送し、この転送を完了した後に、前記中央処理装置へリセット解除の指示を与えるブートローダコントローラと、を有するデータプロセッサ。
A data processor for executing a program transferred from an external memory to a RAM,
A central processing unit for starting execution of a program with a predetermined address of the RAM as a start address in response to a given reset release instruction;
In response to a predetermined reset release instruction, the transfer control information is read from the external memory, the program is downloaded from the external memory based on the address information indicated by the read transfer control information, and the downloaded program is stored in the RAM. A data processor comprising: a boot loader controller that transfers and completes the transfer and gives a reset release instruction to the central processing unit.
前記ブートローダコントローラから前記RAMへプログラムを転送するための専用経路を有する、請求項1記載のデータプロセッサ。   The data processor according to claim 1, further comprising a dedicated path for transferring a program from the boot loader controller to the RAM. 前記ブートローダコントローラは、前記ダウンロードしたプログラムに対して転送誤りの有無を検出する誤り検出回路を有する、請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the boot loader controller includes an error detection circuit that detects the presence or absence of a transfer error in the downloaded program. 前記ブートローダコントローラは、前記誤り検出回路によるプログラム転送の誤りを検出したとき、前記転送制御情報で指定される回数を上限として、転送誤りの無いことが検出されるまでプログラムダウンロードのリトライを行う、請求項3記載のデータプロセッサ。   When the boot loader controller detects an error in program transfer by the error detection circuit, the boot loader controller performs a program download retry until it is detected that there is no transfer error, with the upper limit being the number of times specified by the transfer control information. Item 4. The data processor according to item 3. 前記ブートローダコントローラは、前記誤り検出回路による検出動作の有効が指示されたときその検出動作を行う、請求項3記載のデータプロセッサ。   4. The data processor according to claim 3, wherein the boot loader controller performs the detection operation when an instruction to validate the detection operation by the error detection circuit is given. 前記ブートローダコントローラは、前記転送制御情報が示すスタートアドレスからプログラムのダウンロードを開始し、前記転送制御情報が示す容量のプログラムをダウンロードする、請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the boot loader controller starts downloading a program from a start address indicated by the transfer control information, and downloads a program having a capacity indicated by the transfer control information. 前記ブートローダコントローラは、前記RAMへのプログラムの転送終了を外部に通知する、請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the boot loader controller notifies the end of transfer of the program to the RAM. 前記ブートローダコントローラは、前記RAMへのプログラムの転送完了の失敗を外部に通知する、請求項6記載のデータプロセッサ。   The data processor according to claim 6, wherein the boot loader controller notifies a failure of completion of transfer of the program to the RAM to the outside. 前記RAMはデータプロセッサに内蔵されたRAMである、請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the RAM is a RAM built in the data processor. 前記RAMはデータプロセッサの外部に接続されたRAMである、請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the RAM is a RAM connected to the outside of the data processor. 前記ブートローダコントローラは、前記転送制御情報で指定される周波数に同期して前記プログラムのダウンロードを行なう、請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the boot loader controller downloads the program in synchronization with a frequency specified by the transfer control information. 前記ブートローダコントローラは、前記転送制御情報で指定されるデータサイズ単位で複数回に分けて前記プログラムのダウンロードを行なう、請求項1記載のデータプロセッサ。   The data processor according to claim 1, wherein the boot loader controller downloads the program in a plurality of times in units of data size specified by the transfer control information. 前記ブートローダコントローラが応答する所定のリセット解除の指示は、そのリセット解除の指示が前記RAMの記憶情報の保持を保証しないリセット要因に対応するものであり、
前記RAMの記憶情報の保持を保証するリセット要因に対するリセット解除の指示に対して、CPUは当該リセット解除の指示に応答して前記RAMのプログラムを実行する、請求項1記載のデータプロセッサ。
The predetermined reset release instruction to which the boot loader controller responds corresponds to a reset factor for which the reset release instruction does not guarantee the storage information of the RAM,
2. The data processor according to claim 1, wherein the CPU executes the program of the RAM in response to the reset release instruction with respect to a reset factor that guarantees retention of the storage information in the RAM.
前記ブートローダコントローラが応答する所定のリセット解除の指示は、外部から供給されるリセット信号によるリセット要因に対応する指示、及び電源電圧レベル低下による内部リセット信号によるリセット要因に対応する指示を含み、ウォッチドッグタイマのタイムアウトによる内部リセット信号によるリセット要因に対応する指示を含まず、
前記ブートローダコントローラからのプログラムの転送が完了されたとき、前記RAMはライトプロテクトされ、前記ライトプロテクトは前記外部から供給されるリセット信号によるリセット指示及び前記電源電圧レベル低下による内部リセット信号によるリセット指示によって解除される、請求項1記載のデータプロセッサ。
The predetermined reset release instruction responded by the boot loader controller includes an instruction corresponding to a reset factor by an externally supplied reset signal and an instruction corresponding to a reset factor by an internal reset signal due to a power supply voltage level drop, and a watchdog Does not include an instruction corresponding to the reset cause by the internal reset signal due to timer timeout,
When the transfer of the program from the boot loader controller is completed, the RAM is write protected, and the write protection is performed by a reset instruction by a reset signal supplied from the outside and a reset instruction by an internal reset signal by the power supply voltage level drop. The data processor of claim 1, wherein the data processor is released.
前記ブートローダコントローラが応答する所定のリセット解除の指示は、そのリセット解除の指示が前記RAMの記憶情報の保持を保証しないリセット要因に対応するものであり、
リセット要因毎にブートローダコントローラがプログラム転送を実施する否かを設定するレジスタを持つ、請求項17記載のデータプロセッサ。
The predetermined reset release instruction to which the boot loader controller responds corresponds to a reset factor for which the reset release instruction does not guarantee the storage information of the RAM,
18. The data processor according to claim 17, further comprising a register for setting whether or not the boot loader controller executes program transfer for each reset factor.
前記転送制御情報が示すアドレス情報は、外部メモリ上で離散的にマッピングされているダウンロードされるべき所定のプログラムの一部の所在を示すアドレス情報であり、
前記所定のプログラムの一部は前記ブートローダコントローラがダウンロードするブートプログラムであり、
前記所定のプログラムの残りは前記中央処理装置が前記ブートプログラムを実行することによって前記外部メモリからダウンロードして前記RAMに転送される離散的にマッピングされたプログラムである、請求項1記載のデータプロセッサ。
The address information indicated by the transfer control information is address information indicating the location of a part of a predetermined program to be downloaded that is discretely mapped on an external memory,
A part of the predetermined program is a boot program downloaded by the boot loader controller,
The data processor according to claim 1, wherein the remainder of the predetermined program is a discretely mapped program that is downloaded from the external memory and transferred to the RAM when the central processing unit executes the boot program. .
外部メモリからRAMに転送されたプログラムを実行することにより、外部に接続された入力デバイスの制御を行うデータプロセッサと、
前記データプロセッサにLPCバスで接続された入出力コントローラハブと、
前記入出力コントローラハブにシステムバスで接続されたメインプロセッサと、を有するデータ処理システムであって、
前記データプロセッサは、与えられたリセット解除の指示に応答して前記RAMの所定アドレスを開始アドレスとしてプログラムの実行を開始する中央処理装置と、
所定のリセット解除の指示に応答して、前記外部メモリから転送制御情報をリードし、リードした転送制御情報が示すアドレス情報に基づいて当該外部メモリからプログラムをダウンロードし、ダウンロードしたプログラムを前記RAMに転送し、この転送を完了した後に、前記中央処理装置へリセット解除の指示を与えるブートローダコントローラと、を有する、データ処理システム。
A data processor for controlling an input device connected to the outside by executing a program transferred from the external memory to the RAM;
An input / output controller hub connected to the data processor via an LPC bus;
A data processor having a main processor connected to the input / output controller hub via a system bus,
The data processor, in response to a given reset release instruction, a central processing unit for starting execution of a program with a predetermined address of the RAM as a start address;
In response to a predetermined reset release instruction, the transfer control information is read from the external memory, the program is downloaded from the external memory based on the address information indicated by the read transfer control information, and the downloaded program is stored in the RAM. And a boot loader controller for giving a reset release instruction to the central processing unit after completing the transfer.
前記ブートローダコントローラは、前記ダウンロードしたプログラムに対して転送誤りの有無を検出する誤り検出回路を有する、請求項17記載のデータプロセッサ。   The data processor according to claim 17, wherein the boot loader controller has an error detection circuit that detects the presence or absence of a transfer error in the downloaded program. 前記ブートローダコントローラは、前記誤り検出回路によるプログラム転送の誤りを検出したとき、前記転送制御情報で指定される回数を上限として、転送誤りの無いことが検出されるまでプログラムダウンロードのリトライを行う、請求項17記載のデータプロセッサ。   When the boot loader controller detects an error in program transfer by the error detection circuit, the boot loader controller performs a program download retry until it is detected that there is no transfer error, with the upper limit being the number of times specified by the transfer control information. Item 18. The data processor according to Item 17. 前記ブートローダコントローラは、前記誤り検出回路による検出動作の有効が指示されたときその検出動作を行う、請求項17記載のデータプロセッサ。   18. The data processor according to claim 17, wherein the boot loader controller performs the detection operation when an instruction to validate the detection operation by the error detection circuit is given. 前記ブートローダコントローラは、前記転送制御情報が示すスタートアドレスからプログラムのダウンロードを開始し、前記転送制御情報が示す容量のプログラムをダウンロードする、請求項17記載のデータプロセッサ。   18. The data processor according to claim 17, wherein the boot loader controller starts downloading a program from a start address indicated by the transfer control information, and downloads a program having a capacity indicated by the transfer control information. 前記ブートローダコントローラは、前記RAMへのプログラムの転送終了を外部に通知する、請求項17記載のデータ処理システム。   The data processing system according to claim 17, wherein the boot loader controller notifies the outside of the transfer of the program to the RAM. 前記ブートローダコントローラは、前記RAMへのプログラムの転送完了の失敗を外部に通知する、請求項17記載のデータ処理システム。   The data processing system according to claim 17, wherein the boot loader controller notifies a failure of completion of transfer of the program to the RAM. 前記ブートローダコントローラは、前記転送制御情報で指定される周波数に同期して前記プログラムのダウンロードを行なう、請求項17記載のデータ処理システム。   The data processing system according to claim 17, wherein the boot loader controller downloads the program in synchronization with a frequency specified by the transfer control information. 前記ブートローダコントローラは、前記転送制御情報で指定されるデータサイズ単位で複数回に分けて前記プログラムのダウンロードを行なう、請求項17記載のデータ処理システム。   The data processing system according to claim 17, wherein the boot loader controller downloads the program in a plurality of times for each data size specified by the transfer control information. 前記ブートローダコントローラが応答する所定のリセット解除の指示は、そのリセット指示が前記RAMの記憶情報の保持を保証しないリセット要因に対応するものであり、
前記RAMの記憶情報の保持を保証するリセット要因に対応するリセット解除の指示に対して、CPUは当該リセット解除の指示に応答して前記RAMのプログラムを実行する、請求項17記載のデータ処理システム。
The predetermined reset release instruction to which the boot loader controller responds corresponds to a reset factor for which the reset instruction does not guarantee retention of the storage information in the RAM,
18. The data processing system according to claim 17, wherein the CPU executes the program of the RAM in response to a reset release instruction corresponding to a reset factor for guaranteeing retention of storage information in the RAM in response to the reset release instruction. .
前記ブートローダコントローラが応答する所定のリセット解除の指示は、外部から供給されるリセット信号によるリセット要因に対応する指示、及び電源電圧レベル低下による内部リセット信号によるリセット要因に対応する指示を含み、ウォッチドッグタイマのタイムアウトによる内部リセット信号によるリセット要因に対応する指示を含まず、
前記RAMは前記ブートローダコントローラからのプログラムの転送が完了されたとき、ライトプロテクトされ、前記ライトプロテクトは前記外部から供給されるリセット信号によるリセット指示及び前記電源電圧レベル低下による内部リセット信号によるリセット指示によって解除される、請求項17記載のデータ処理システム。
The predetermined reset release instruction responded by the boot loader controller includes an instruction corresponding to a reset factor by an externally supplied reset signal and an instruction corresponding to a reset factor by an internal reset signal due to a power supply voltage level drop, and a watchdog Does not include an instruction corresponding to the reset cause by the internal reset signal due to timer timeout,
The RAM is write protected when the transfer of the program from the boot loader controller is completed, and the write protection is performed by a reset instruction by a reset signal supplied from the outside and a reset instruction by an internal reset signal by the power supply voltage level drop. The data processing system of claim 17, wherein the data processing system is released.
前記ブートローダコントローラが応答する所定のリセット解除の指示は、そのリセット解除の指示が前記RAMの記憶情報の保持を保証しないリセット要因に対応するものであり、
リセット要因毎にブートローダコントローラがプログラム転送を実施する否かを設定するレジスタを持つ、請求項17記載のデータプロセッサ。
The predetermined reset release instruction to which the boot loader controller responds corresponds to a reset factor for which the reset release instruction does not guarantee the storage information of the RAM,
18. The data processor according to claim 17, further comprising a register for setting whether or not the boot loader controller executes program transfer for each reset factor.
前記転送制御情報が示すアドレス情報は、外部メモリ上で離散的にマッピングされているダウンロードされるべき所定のプログラムの一部の所在を示すアドレス情報であり、
前記所定のプログラムの一部は前記ブートローダコントローラがダウンロードするブートプログラムであり、
前記所定のプログラムの残りは前記中央処理装置が前記ブートプログラムを実行することによって前記外部メモリからダウンロードして前記RAMに転送される離散的にマッピングされたプログラムである、請求項17記載のデータ処理システム。
The address information indicated by the transfer control information is address information indicating the location of a part of a predetermined program to be downloaded that is discretely mapped on an external memory,
A part of the predetermined program is a boot program downloaded by the boot loader controller,
18. The data processing according to claim 17, wherein the remainder of the predetermined program is a discretely mapped program that is downloaded from the external memory and transferred to the RAM when the central processing unit executes the boot program. system.
JP2010094647A 2010-04-16 2010-04-16 Data processor and data processing system Withdrawn JP2011227592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010094647A JP2011227592A (en) 2010-04-16 2010-04-16 Data processor and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010094647A JP2011227592A (en) 2010-04-16 2010-04-16 Data processor and data processing system

Publications (1)

Publication Number Publication Date
JP2011227592A true JP2011227592A (en) 2011-11-10

Family

ID=45042883

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010094647A Withdrawn JP2011227592A (en) 2010-04-16 2010-04-16 Data processor and data processing system

Country Status (1)

Country Link
JP (1) JP2011227592A (en)

Similar Documents

Publication Publication Date Title
US8296528B2 (en) Methods and systems for microcode patching
KR101407835B1 (en) Providing platform independent memory logic
US9037812B2 (en) Method, apparatus and system for memory validation
JP6433198B2 (en) System and method for secure boot ROM patch
JP5307196B2 (en) Providing a system integrated with silicon code
JP2007206885A (en) Computer system and system starting method
US9075751B2 (en) Secure data protection with improved read-only memory locking during system pre-boot
TW201015323A (en) Secure information processing
US20070220244A1 (en) Chipset-independent method for locally and remotely updating and configuring system BIOS
US7711941B2 (en) Method and apparatus for booting independent operating systems in a multi-processor core integrated circuit
US10909247B2 (en) Computing device having two trusted platform modules
US20140181495A1 (en) System on chip including boot shell debugging hardware and driving method thereof
US10777296B2 (en) Information handling system and method to dynamically detect and recover from thermally induced memory failures
JP5622429B2 (en) Microcomputer
JP5561791B2 (en) Information processing apparatus, information processing method, and information processing program
JP2011238211A (en) Data processor and data processing system
JP2006221606A (en) Data processor
JP2011227592A (en) Data processor and data processing system
JP5823000B2 (en) Microcomputer
Yin et al. Verification-based multi-backup firmware architecture, an assurance of trusted boot process for the embedded systems
JP2004152020A (en) Microcontroller application system
JP2010129037A (en) Information processor and electronic equipment
JP2004078757A (en) Write protect circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20130702