JP2004310580A - Memory map optimizing system, and memory map optimizing method - Google Patents

Memory map optimizing system, and memory map optimizing method Download PDF

Info

Publication number
JP2004310580A
JP2004310580A JP2003105100A JP2003105100A JP2004310580A JP 2004310580 A JP2004310580 A JP 2004310580A JP 2003105100 A JP2003105100 A JP 2003105100A JP 2003105100 A JP2003105100 A JP 2003105100A JP 2004310580 A JP2004310580 A JP 2004310580A
Authority
JP
Japan
Prior art keywords
memory map
performance measurement
load module
measurement result
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003105100A
Other languages
Japanese (ja)
Inventor
Takehiro Ito
岳広 伊藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2003105100A priority Critical patent/JP2004310580A/en
Publication of JP2004310580A publication Critical patent/JP2004310580A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)
  • Memory System (AREA)
  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce a workload of a user in memory map optimization. <P>SOLUTION: The memory map optimizing system is provided with a memory map table 1l storing a plurality of entries using a memory map configuration defining configurations of a plurality of different types of memories as one entry, a program storing part 1v storing a user program, an execute form generating means 1w for generating a load module 4h of an execute form by reading the user program and one entry and using the read program and one entry, performance measuring means (an execution time measuring means 1j and an electric power consumption measuring means 1k) for executing the load module 4h and measuring performance, a performance measurement result table 1r storing a performance measurement result measured by the performance measuring means, and a startup program activating means 1i for activating the load module 4h and the performance measuring means and storing the performance measurement result in the performance measurement result table by the performance measuring means. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
この発明は、アクセス速度や容量が異なる複数種類のメモリを実装したシステム上で動作するプログラムにおいて、最もシステムに適したメモリマップを構築する手法に関するものである。
【0002】
【従来の技術】
従来、特開2000−3268にあるように、各プログラムの優先順位をあらかじめ決定し、優先順位の高いプログラムから順に高速なメモリへマッピングすることで、メモリマップの最適化を実現していた(特許文献1)。
【0003】
【特許文献1】
特開2000−3268号公報
【0004】
【発明が解決しようとする課題】
上述したように従来の方式では、各プログラムの優先順位をあらかじめ決定しているが、各プログラムの優先順位をユーザが決定する場合は、最適な優先順位を決定するために、”メモリマップ構築”、”ロードモジュール生成”、”性能測定”といった、一連の作業をユーザが繰返し実施する必要があり、ユーザへの負担が大きい。また優先順位をリンカおよびプロファイルによる各関数、変数、定数へのアクセス頻度を基に決定する場合は、アクセス頻度が低くても高速処理が必要な関数などは優先順位が低く設定されることがあり、確実に最適なメモリマップが構築される保証がないという問題があった。
【0005】
この発明は上記の問題点を解決するためになされたもので、”メモリマップ構築”、”ロードモジュール生成”、”性能測定”といった、メモリマップ最適化に必要な一連の作業を自動的に繰返すことで、ユーザの負担を軽減し、メモリマップ最適化作業を容易にし、また、実際に性能測定を行った結果から最適なメモリマップを見つけ出すことで、確実に最適なメモリマップを構築することを目的とする。
【0006】
【課題を解決するための手段】
この発明に係るメモリマップ最適化方式は、種類の異なる複数のメモリの構成を定義するメモリマップ構成を一つのエントリとして、複数のエントリを格納するメモリマップテーブルと、
ユーザプログラムを記憶するプログラム記憶部と、
上記プログラム記憶部に記憶されたユーザプログラムと上記メモリマップテーブルに格納された一つのエントリとを読み出し、読み出したプログラムと一つのエントリとを用いて、実行形式のロードモジュールを生成する実行形式生成手段と、
上記ロードモジュールを実行させて性能を測定する性能測定手段と、
上記性能測定手段が測定した性能測定結果を格納する性能測定結果テーブルと、
上記ロードモジュールと上記性能測定手段とを起動し、上記性能測定手段が上記性能測定結果テーブルへ性能測定結果を格納することを指示する起動手段とを備えることを特徴とする。
【0007】
【発明の実施の形態】
実施の形態1.
本発明の実施例について図面を参照して説明する。
図1はこの発明の一実施例を示す構成図である。
図1のメモリマップ最適化方式(「メモリマップ最適化方式」は、「メモリマップ生成方式」、あるいは、「メモリマップ構築方式」ともいう)は、ホスト端末1、タイマ2、電力計3、ターゲットデバイス4を備える。
ホスト端末1は、ホスト端末上のデータを格納する記憶装置1a、ホスト端末とタイマ、電力計、ターゲットデバイス間の通信を制御するホスト端末通信制御部1bとを備える。また、図1には明記していないが、最適化手順全体を制御する制御部(最適化制御部)を備え、プロセッサを含むものとする。制御部は、記憶装置1aに格納される各手段(後述する)を実行する際に、制御を行なう。
【0008】
1c〜1sは記憶装置1a内に格納されている構成要素であり、スタートアッププログラムのソースコードであるスタートアッププログラムソース1c、ユーザプログラムのソースコードであるユーザプログラムソース1d、コンパイラ1e、リンカ1f、ユーザプログラムのロードモジュールをターゲットデバイス上のフラッシュROMに書込むフラッシュROM書込みプログラム1g、ユーザプログラムのロードモジュールを生成するロードモジュール生成手段1h、ターゲットデバイス上のスタートアッププログラムを起動するスタートアッププログラム起動手段1i、ユーザプログラムの実行時間をタイマ2を使用して測定する実行時間測定手段1j、ユーザプログラム実行時のターゲットデバイスの消費電力を電力計3を使用して測定する消費電力測定手段1k、ロードモジュールを生成し性能測定を行う、ユーザプログラムのメモリマップ構成が記述されたメモリマップテーブル1l、各メモリマップ構成にて実施した性能測定結果が記述された性能測定結果テーブル1r、メモリマップテーブル1lおよび性能測定結果テーブル1rにおいて、ロードモジュール生成及び性能測定を実施するメモリマップ構成を指し示すエントリ番号を保持するメモリマップテーブルエントリ番号保持部1sとを含む。
【0009】
また、スタートアッププログラム起動手段1iは、起動手段ともいう。
起動手段は、スタートアッププログラムによって実現される機能を実行する場合であれば、必ずしもスタートアッププログラムあるいは同等のプログラムによって実行する場合ではなく、起動手段そのものによって実行する場合であってもよい。
実行時間測定手段1jと消費電力測定手段1kとを性能測定手段ともいう。
【0010】
プログラム格納部1vは、スタートアッププログラムソース1cとユーザプログラムソース1dとを格納する記憶装置1aの記憶領域を示す。
実行形式生成手段1wは、コンパイラ1eとリンカ1fとフラッシュROM書込みプログラム1gとを格納する記憶装置1aの記憶領域を示す。なお、実行形式生成手段格納部1wは、フラッシュROM書込みプログラム1gを含まない場合もある。
【0011】
タイマ2は、ホスト端末1間との通信を制御するタイマ通信制御部2a、ユーザプログラムの実行時間を測定する実行時間測定部2b、測定した実行時間値を格納する実行時間格納用バッファ2cを備える。
電力計3は、ホスト端末間との通信を制御する電力計通信制御部3a、ターゲットデバイスの消費電力を測定する消費電力測定部3b、測定した消費電力値を格納する消費電力格納用バッファ3cを備える。
ターゲットデバイス4は、CPU(Central Processing Unit)4a、SRAM(Static Random Access Memory)4b、I/O(In/Out)コントローラ4c、ホスト端末間との通信を制御するターゲットデバイス通信制御部4d、フラッシュROM(Read Only Memory)4e、SDRAMコントローラ4f、SDRAM(Static Dynamic Random Access Memory)4g、フラッシュROM上に書込まれたロードモジュール4h、ロードモジュール内のスタートアッププログラム4i、ロードモジュール内のユーザプログラム4j、プログラム実行フラグ4kとを備える。プログラム実行フラグ4kは、SDRAM上に存在し、スタートアッププログラムによってユーザプログラム起動時に1がセットされ、ユーザプログラム終了時に0(零)がセットされる。
【0012】
次に、図2,図3を用いて、メモリマップテーブル1l及び性能測定結果テーブル1rについて説明する。
図2はメモリマップテーブル1lの一例を表した図である。
図3は性能測定結果テーブル1rの一例を表した図である。
メモリマップテーブル1l及び性能測定結果テーブル1rとは、複数のエントリを有し、それぞれのエントリにエントリ番号が付されている。
メモリマップテーブル1lは、複数種類のメモリの構成を定義するテーブルである。メモリ構成は、ターゲットデバイス4のメモリ構成を定義し、ターゲットデバイスのメモリ構成は、ユーザプログラム(関数、セクション、オブジェクト)の容量に基づいて構成される。図2では、リセットベクタ、割込みベクタ、スタック領域、コード領域、変数領域の種類のメモリマップ構成を示した例である。
性能測定結果テーブル1rは、上記メモリマップテーブル1lに定義されたメモリマップ構成でユーザプログラムを実行した場合の性能結果を格納する。メモリマップテーブル1lのエントリ番号と、性能測定結果テーブル1rのエントリ番号とは対応している。メモリマップテーブル1lのエントリ番号に対応づけられるメモリマップ構成を用いて測定した結果は、性能測定結果テーブル1rにおいて、同じエントリ番号を付与したエントリに格納される。
【0013】
次に、メモリマップ最適化手順の動作の一例を説明する。
図4はメモリマップ最適化の動作の一例を表すフローチャート図である。
以下では、ユーザが作成したメモリマップテーブルに記述された各メモリマップ構成ごとにロードモジュールを生成し、各ロードモジュールの性能測定を実施し、測定結果を性能測定結果テーブルに記述し、ユーザが性能測定結果テーブル上の性能測定結果から最適なメモリマップ構成を探し出す場合のメモリマップ最適化手順について図2,図3,図4を用いて説明する。
以下の説明において、次に示す用語を用いる。
オブジェクトモジュールは、プログラム(ユーザプログラム)をコンパイラ1eによってコンパイルして生成されたモジュールである。
ロードモジュールは、上記オブジェクトモジュールをメモリマップテーブル1lに記述されたメモリマップ構成で、リンカ1fによってリンクして生成されたモジュールであり、ユーザプログラムを計算機上で実行させる実行形式である。
また、コンパイラ1eとリンカ1fとを併せて実行形式生成手段ともいう。実行形式生成手段には、フラッシュROM書込みプログラム1gあるいは同様の機能を含む場合もある。
【0014】
まず、ユーザプログラムのロードモジュールを生成するステップ(図4ステップ101〜107)について説明する。
図4のステップ101において、ユーザは複数種類のメモリマップ構成を作成し、図2に示すメモリマップテーブル1lに記述する。このメモリマップ構成ごとにロードモジュールの生成、性能測定を実施し、最も優れた性能結果となったメモリマップ構成が最適なメモリマップ構成となる。メモリマップテーブル1lの最終エントリ(N)の次のエントリ(N+1)にはオールF(0xFFFFFFFF)を設定し、メモリマップテーブル1lが終わったことを示す。
【0015】
ステップ102において、エントリ番号保持部1sに記憶しているメモリマップテーブル1lおよび性能測定結果テーブル1rのエントリ番号をリセットする(各テーブルの先頭を指し示す値にする)。図2に示した例の場合、エントリ番号を1にリセットすることになる。
ステップ103において、ロードモジュール生成手段1hは、コンパイラ1eを使用して、ホスト端末1上のスタートアッププログラムソース1cとユーザプログラムソース1dをコンパイルしてオブジェクトモジュール(図示しない)を生成する。生成したオブジェクトモジュールは、記憶装置1aの所定の領域に記憶される。
ステップ104において、ロードモジュール生成手段1hは、エントリ番号保持部1sからエントリ番号を読出し、メモリマップテーブル1lから対応するエントリ番号のメモリマップ構成を読込む。
【0016】
ステップ105において、読込んだメモリマップ構成値がオールF(0xFFFFFFFF)の場合(メモリマップテーブル1lのエントリが終わったことを示す)はメモリマップテーブル1l上の全てのメモリ構成について性能測定を実施したと判断し、ステップ115に進む。オールF以外の場合はステップ106に進む。
ステップ106において、ロードモジュール生成手段1hは、メモリマップテーブル1lから読込んだメモリマップ構成をリンカ1fに与えてオブジェクトモジュールをリンクし、ロードモジュールを生成する。
ステップ107において、ロードモジュール生成手段1hは、フラッシュROM書込みプログラム1gを使用して、ロードモジュールをターゲットデバイス4のフラッシュROM4eに書き込む。
【0017】
次に、ユーザプログラムの性能測定を実施し、その結果から最適なメモリマップ構成を見つけ出すステップ(図4ステップ108〜115)について説明する。
図4のステップ108において、スタートアッププログラム起動手段1iによって、ターゲットデバイス上のスタートアッププログラム4iが起動される。
ステップ109において、スタートアッププログラム4iはターゲットデバイス4のSDRAM4g上に存在するプログラム実行フラグ4kを1にセットし、ステップ110において、ユーザプログラム4jを起動する。
【0018】
ステップ111において、ホスト端末上の実行時間測定手段1jおよび消費電力測定手段1kは、ターゲットデバイス4のSDRAM4g上のプログラム実行フラグ4kを監視し、フラグ値が1にセットされたことを検出すると、実行時間測定手段1jはタイマ2を、消費電力測定手段1kは電力計3をそれぞれ起動し、性能測定を開始する。消費電力測定手段1kは、一定の間隔で電力計3に対してターゲットデバイス4の消費電力測定を要求し、これを受けた電力計3は消費電力を測定し測定値を消費電力格納用バッファ3cに格納する。
ステップ112において、スタートアッププログラム4iはユーザプログラム4jが終了したことを検知すると、プログラム実行フラグ4kを0(零)にセットする。実行時間測定手段1jは、ターゲットデバイス上のプログラム実行フラグ4kが0にセットされたことを検出すると、タイマ2による測定を停止する。
タイマ2は測定した実行時間を実行時間格納用バッファ2cに書き込む。また、消費電力測定手段1kは、ターゲットデバイス上のプログラム実行フラグ4kが0にクリアされたことを検出すると、電力計3による測定を停止する。
【0019】
ステップ113において、実行時間測定手段1jは、タイマ2から実行時間格納用バッファ2cに格納された実行時間値を読込み、性能測定結果テーブル1r上において、エントリ番号保持部1sに記録されたエントリ番号に対応した「処理時間」の欄に書き込む。また消費電力測定手段1kは、電力計3から消費電力格納用バッファ3cに格納された消費電力値を読込み、消費電力値の平均値を算出し、性能測定結果テーブル1r上において、エントリ番号保持部1sに記録されたエントリ番号に対応した「消費電力」の欄に書き込む。
ステップ114においてエントリ番号保持部1sのエントリ番号を1インクリメントしてステップ104に進む。
ステップ105において、メモリマップテーブル1l上の全てのメモリ構成について性能測定を実施したと判断した場合は、ステップ115において、ホスト端末1の画面上にメモリマップテーブル1lおよび性能測定結果テーブル1rを表示する。ユーザはこれらのテーブルから最適なメモリマップを見つけ出して、最適なメモリマップのロードモジュールを生成することで、メモリマップ最適化処理を終了する。
【0020】
このように、実施の形態1では、アクセス速度や容量が異なる複数種類のメモリを実装したシステムのメモリマップ最適化方式(及び方法)において、複数種類のメモリマップ構成が記述されたメモリマップテーブル1lと、メモリマップテーブル1lに記述されたメモリマップ構成を読み込み、コンパイラ1e、リンカ1fを用いてユーザプログラムソース1dのソースコードからロードモジュールを生成するロードモジュール生成手段1hと、ターゲットデバイス4上のユーザプログラム4jを起動するスタートアッププログラム起動手段1iと、前記スタートアッププログラム起動手段1iで起動したユーザプログラムの性能を測定する性能測定実行手段(一例として、実行時間測定手段1j、消費電力測定手段1k)と、前記性能測定実行手段により測定された結果を記述する性能測定結果テーブル1rを備えるメモリマップ最適化方式を説明した。
【0021】
また、前記性能測定実行手段において、ユーザプログラムの実行時間を測定するタイマ2と、前記タイマ2による測定の開始/停止制御と測定結果を読込み前記性能測定結果テーブル1rへの書込みを行う実行時間測定手段1jと、ユーザプログラム実行時のターゲットデバイス4の消費電力を測定する電力計3と、前記電力計3による測定の開始/停止制御と測定結果を読込み前記性能測定結果テーブル1rへの書込みを行う消費電力測定手段1kを備える点について説明した。
以上のように、実施の形態1のメモリマップ最適化方式及び方法は、ロードモジュールの生成、ロードモジュールのフラッシュROM4eへの書込み、スタートアッププログラムの起動、性能測定の実施までの作業を自動化することにより、メモリマップの最適化作業を容易にすることが可能になる。
【0022】
実施の形態2.
以上の実施の形態1では、性能測定を実施する複数種類のメモリマップ構成の作成をユーザが行い、また最終的に最適なメモリマップ構成をユーザが探すようにしたものであるが、次にこれらメモリマップ構成の作成及び最適なメモリマップ構成の検出を自動的に行う実施の形態を示す。
図5はメモリマップ構成の作成及び最適なメモリマップ構成の検出を自動的に行なう場合の一実施例を示す構成図である。
図5に示した構成要素のうち、図1と同じ符号の構成要素は同様であるため、説明を省略する。
【0023】
記憶装置1aは、実施の形態1の構成要素に加え、メモリマップ構築手段1m、最適メモリマップ検索手段(メモリマップ検索手段)1n、メモリ構成テーブル1p、最適条件テーブル(条件テーブル)1qとを含む。
メモリマップ構築手段1mは、ユーザプログラムのオブジェクトモジュールから各プログラム(各機能)(関数、セクション、オブジェクト)の容量を読み取り、メモリ構成テーブル1pに記述されたターゲットデバイス4の各メモリの容量に収まるように、またメモリマップテーブル1lに既に記述されたメモリマップ構成と重複しないように、メモリマップを構築する手段である。
最適メモリマップ検索手段1nは、実行時間測定手段1j、消費電力測定手段1kによって性能測定結果テーブル1r上に記述された測定結果から、最適条件テーブル1qに記述された最適メモリマップの条件を満足するメモリマップ構成を検索する手段である。最適メモリマップ検索手段1nは、メモリマップ検索手段ともいう。
メモリ構成テーブル1pは、ターゲットデバイス4のメモリ構成が記述されたテーブルである。
最適条件テーブル1qは、ユーザによって設定され、最適なメモリマップ構成の条件が記述されたテーブルである。最適条件テーブル1qは、条件テーブルともいう。
【0024】
次に動作について図2,図3,図6,図7,図8を用いて説明する。
図6は、メモリ構成テーブルの一例を表す図である。
図7は、最適条件テーブルの一例を表す図である。
図8は、メモリマップ最適化の動作の一例を表すフローチャート図である。
【0025】
まず、ユーザプログラムのロードモジュールを生成するステップ(図8ステップ201〜207)について説明する。
図8のステップ201において、ユーザはホスト端末1上に、図6に示すメモリ構成テーブル1pと図7に示す最適条件テーブル1qを作成する。
ステップ202において、エントリ番号保持部1sに記憶しているメモリマップテーブル1lおよび性能測定結果テーブル1rのエントリ番号をリセットする(各テーブルの先頭を指し示す値にする)。
ステップ203において、ロードモジュール生成手段1hは、コンパイラ1eを使用して、ホスト端末1上のスタートアッププログラムソース1cとユーザプログラムソース1dをコンパイルしてオブジェクトモジュール(図示しない)を生成する。
【0026】
ステップ204において、メモリマップ構築手段1mはオブジェクトモジュールから各プログラム(関数、セクション、オブジェクト)の容量を読取り、メモリ構成テーブル1pに記述されたターゲットデバイス4の各メモリの容量に収まるように、また図2に示すメモリマップテーブル1lに既に記述されたメモリマップ構成と重複しないように、メモリマップを構築する。
ステップ205において、メモリマップが構築できたかどうか判断し、構築できた場合はメモリマップテーブル1l上においてエントリ番号保持部1sに記憶されたエントリ番号に対応する欄に構築したメモリマップを記述しステップ206に進む。メモリマップを構築できなかった場合はステップ215に進む。
【0027】
ステップ206において、ロードモジュール生成手段1hは、メモリマップテーブル1lからステップ204〜205で構築したメモリマップ構成を読み取りリンカ1fに与えてリンクし、ロードモジュールを生成する。
ステップ207において、ロードモジュール生成手段1hは、フラッシュROM書込みプログラム1gを使用して、ロードモジュールをターゲットデバイス4のフラッシュROM4eに書き込む。
【0028】
次に、ユーザプログラムの性能測定を実施し、その結果から最適なメモリマップ構成を見つけ出すステップ(図8ステップ208〜219)ついて説明する。図8のステップ208において、スタートアッププログラム起動手段1iによって、ターゲットデバイス4上のスタートアッププログラム4iが起動される。
ステップ209において、スタートアッププログラム4iはターゲットデバイス4のSDRAM4g上に存在するプログラム実行フラグ4kを1にセットし、ステップ210において、ユーザプログラム4jを起動する。
ステップ211において、ホスト端末1上の実行時間測定手段1jおよび消費電力測定手段1kは、ターゲットデバイス4のSDRAM4g上のプログラム実行フラグ4kを監視し、フラグ値が1にセットされたことを検出すると、実行時間測定手段1jはタイマ2を、消費電力測定手段1kは電力計3をそれぞれ起動し性能測定を開始する。消費電力測定手段1kは、一定の間隔で電力計3に対してターゲットデバイス4の消費電力測定を要求し、これを受けた電力計3は消費電力を測定し測定値を消費電力格納用バッファ3cに格納する。
【0029】
ステップ212において、スタートアッププログラム4iがユーザプログラム4jが終了したことを検知すると、プログラム実行フラグ4kを0にセットする。実行時間測定手段1jは、ターゲットデバイス4上のプログラム実行フラグ4kが0にセットされたことを検出すると、タイマ2による測定を停止する。タイマ2は測定した実行時間を実行時間格納用バッファ2cに書き込む。また、消費電力測定手段1kは、ターゲットデバイス4上のプログラム実行フラグ4kが0にクリアされたことを検出すると、電力計3による測定を停止する。
ステップ213において、実行時間測定手段1jは、タイマ2から実行時間格納用バッファ2cに格納された実行時間値を読込み、性能測定結果テーブル1r上において、エントリ番号保持部1sに記録されたエントリ番号に対応した「処理時間」の欄に書き込む。また消費電力測定手段1kは、電力計3から消費電力格納用バッファ3cに格納された消費電力値を読込み、消費電力値の平均値を算出し、性能測定結果テーブル1r上において、エントリ番号保持部1sに記録されたエントリ番号に対応した「消費電力」の欄に書き込む。
【0030】
ステップ214においてエントリ番号保持部1sのエントリ番号を1インクリメントしてステップ204に進む。
ステップ204〜205において、メモリマップ構築手段1mがメモリマップを構築できなかった場合は、ステップ215において、最適メモリマップ検索手段1nがメモリマップテーブル1lおよび性能測定結果テーブル1rから、最適条件テーブル1qに記述された最適メモリマップの条件を満たすメモリマップ構成を検索する。ステップ216において、最適メモリマップの条件を満たすメモリマップ構成が検出された場合は、ステップ217において、ロードモジュール生成手段1hが検出されたメモリマップ構成のロードモジュールを生成し、ステップ218において、フラッシュROM書込みプログラム1gを使用して、最適なメモリマップ構成のロードモジュールをターゲットデバイス4のフラッシュROM4eに書き込み、メモリマップ最適化作業を終了する。ステップ216において、最適メモリマップの条件を満足するメモリマップ構成が検出されなかった場合は、ホスト端末1の画面上にエラー表示を行い、メモリマップ最適化作業を終了する。
【0031】
以上のように、この実施の形態のメモリマップ最適化方式(及び方法)は、実施の形態1で説明した方式に加え、前記ロードモジュール生成手段1hにおいて、ターゲットデバイス4のメモリ構成が記述されたメモリ構成テーブル1pと、前記メモリ構成テーブル1pから読込んだ各メモリの容量に収まるように各プログラムを自動的にマッピングして結果を前記メモリマップテーブル1lに記述するメモリマップ構築手段1mを備える点を説明した。
【0032】
さらに、前記性能測定実行手段において、前記性能測定結果テーブル1rに記述された性能測定結果から最も性能が優れたメモリマップ構成を検索する最適メモリマップ検索手段1nを備えること、あるいは、前記性能測定実行手段において、最適なメモリマップ構成として満足する必要がある条件が記述された最適条件テーブル1qを備え、前記メモリマップ検索手段1nが前記性能測定結果テーブル1rから前記最適条件テーブル1qに記述された条件を満足するメモリマップ構成を検索することについて説明した。
【0033】
以上のように、実施の形態2のメモリマップ最適化方式及び方法によれば、メモリマップ構築、ロードモジュールの生成、ロードモジュールのフラッシュROMへの書込み、スタートアッププログラムの起動、性能測定の実施、最適メモリマップの検出までの作業を自動化することにより、メモリマップの最適化作業を容易にすることが可能になる。
【0034】
実施の形態3.
上記実施の形態1及び実施の形態2において説明したメモリマップ最適化方式及び方法は、ソフトウェアによって実現することが可能である。メモリマップ最適化方式及び方法を実行する手順を、計算機で実行可能なプログラム(メモリマップ最適化プログラム)によって実現することができる。また、メモリマップ最適化プログラムは、計算機で読み取り可能な記録媒体へ格納することが可能である。
上記メモリマップ最適化プログラムは、計算機上で、プロセッサの制御のもとに実行される。
【0035】
メモリマップ最適化プログラムは、少なくとも、下記(1)〜(7)の処理(手順)を含む。
(1)複数種類のメモリによって構成されるメモリマップ構成を一つのエントリとして、複数のエントリをメモリマップテーブルへ格納する処理。
(2)ユーザプログラムをプログラム記憶部へ記憶する処理。
(3)上記プログラム記憶部に記憶されたユーザプログラムと上記メモリマップテーブルに格納された一つのエントリを読み出し、読み出したプログラムとを用いて、実行形式のロードモジュールを生成する処理。
(4)ロードモジュールを実行させたときに測定する性能測定結果を格納する性能測定結果テーブルを設置する処理。
(5)上記ロードモジュールを起動する処理。
(6)上記ロードモジュールを実行することによって性能を測定する処理。
(7)測定した性能測定結果を上記性能測定結果テーブルへ格納する処理。
【0036】
また、上記の処理(手順)には、図1及び図5で示した、記憶装置1aに含まれる手段を追加することができる。
【0037】
【発明の効果】
この発明のメモリマップ最適化方式及び方法によれば、メモリマップの最適化ロードモジュールの生成、ロードモジュールのフラッシュROMへの書込み、スタートアッププログラムの起動、性能測定の実施までの作業を自動化することにより、メモリマップの最適化作業を容易し、ユーザの作業量を抑制することが可能になる。
【図面の簡単な説明】
【図1】この発明の一実施例を示す構成図。
【図2】メモリマップテーブル1lの一例を表した図。
【図3】性能測定結果テーブル1rの一例を表した図。
【図4】メモリマップ最適化の動作の一例を表すフローチャート図。
【図5】メモリマップ構成の作成及び最適なメモリマップ構成の検出を自動的に行なう場合の一実施例を示す構成図。
【図6】メモリ構成テーブルの一例を表す図。
【図7】最適条件テーブルの一例を表す図。
【図8】メモリマップ最適化の動作の一例を表すフローチャート図。
【符号の説明】
1 ホスト端末、1a 記憶装置、1b ホスト端末通信制御部、1c スタートアッププログラムソース、1d ユーザプログラムソース、1e コンパイラ、1f リンカ、1g フラッシュROM書込みプログラム、1h ロードモジュール生成手段、1i スタートアッププログラム起動手段、1j 実行時間測定手段、1k 消費電力測定手段、1l メモリマップテーブル、1m メモリマップ構築手段、1n 最適メモリマップ検索手段、1p メモリ構成テーブル、1q 最適条件テーブル、1r 性能測定結果テーブル、1s エントリ番号保持部、1v プログラム格納部、1w 実行形式生成手段、2 タイマ、2a タイマ通信制御部、2b 実行時間測定部、2c 実行時間格納用バッファ、3 電力計、3a 電力計通信制御部、3b 消費電力測定部、3c 消費電力格納用バッファ、4 ターゲットデバイス、4a CPU、4b SRAM、4c I/Oコントローラ、4d ターゲットデバイス通信制御部、4e フラッシュROM、4f SDRAMコントローラ、4g SDRAM、4h ロードモジュール、4i スタートアッププログラム、4j ユーザプログラム、4k プログラム実行フラグ。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method of constructing a memory map most suitable for a system that operates on a system in which a plurality of types of memories having different access speeds and capacities are mounted.
[0002]
[Prior art]
Conventionally, as disclosed in Japanese Patent Application Laid-Open No. 2000-3268, the priority of each program is determined in advance, and the memory map is optimized by mapping the programs in the order of higher priority to the higher-speed memory. Reference 1).
[0003]
[Patent Document 1]
JP-A-2000-3268
[0004]
[Problems to be solved by the invention]
As described above, in the conventional method, the priority of each program is determined in advance, but when the user determines the priority of each program, "memory map construction" is performed in order to determine the optimum priority. , "Load module generation", and "performance measurement" need to be repeatedly performed by the user, which imposes a heavy burden on the user. If the priority is determined based on the frequency of access to functions, variables, and constants by the linker and profile, functions that require low-speed access but require high-speed processing may have low priority. However, there is a problem that there is no guarantee that an optimal memory map is reliably constructed.
[0005]
The present invention has been made to solve the above problems, and automatically repeats a series of operations required for memory map optimization such as "memory map construction", "load module generation", and "performance measurement". This reduces the burden on the user, simplifies the work of optimizing the memory map, and ensures that the optimum memory map is constructed by finding the optimum memory map from the results of actual performance measurements. Aim.
[0006]
[Means for Solving the Problems]
A memory map optimization method according to the present invention includes: a memory map table that stores a plurality of entries, with a memory map configuration defining a configuration of a plurality of different types of memories as one entry;
A program storage unit for storing a user program,
Executable format generation means for reading a user program stored in the program storage unit and one entry stored in the memory map table, and using the read program and one entry to generate an executable load module When,
Performance measurement means for executing the load module to measure performance,
A performance measurement result table storing performance measurement results measured by the performance measurement means,
It is characterized in that the load module and the performance measurement unit are activated, and the performance measurement unit is provided with an activation unit that instructs to store the performance measurement result in the performance measurement result table.
[0007]
BEST MODE FOR CARRYING OUT THE INVENTION
Embodiment 1 FIG.
An embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing one embodiment of the present invention.
The memory map optimization method in FIG. 1 (“memory map optimization method” is also referred to as “memory map generation method” or “memory map construction method”) includes a host terminal 1, a timer 2, a wattmeter 3, a target A device 4 is provided.
The host terminal 1 includes a storage device 1a for storing data on the host terminal, and a host terminal communication control unit 1b for controlling communication between the host terminal and a timer, a wattmeter, and a target device. Although not explicitly shown in FIG. 1, it is assumed that a control unit (optimization control unit) for controlling the entire optimization procedure is provided and a processor is included. The control unit performs control when executing each unit (described later) stored in the storage device 1a.
[0008]
Reference numerals 1c to 1s denote components stored in the storage device 1a. The startup program source 1c is a source code of a startup program, the user program source 1d is a user program source code, a compiler 1e, a linker 1f, and a user program. Flash ROM writing program 1g for writing the load module of the target device into the flash ROM on the target device, load module generating means 1h for generating the load module of the user program, startup program starting means 1i for starting the startup program on the target device, user program Execution time measuring means 1 j for measuring the execution time of the target device using the timer 2, A power consumption measuring means 1k, a load module is generated, and a performance measurement is performed. A memory map table 11 describing a memory map configuration of a user program is described. A performance measurement describing performance measurement results performed in each memory map configuration is described. The result table 1r, the memory map table 11 and the performance measurement result table 1r include a memory map table entry number holding unit 1s for holding an entry number indicating a memory map configuration for performing load module generation and performance measurement.
[0009]
Further, the startup program starting means 1i is also referred to as starting means.
The start-up unit is not necessarily executed by the start-up program or an equivalent program, but may be executed by the start-up unit itself, as long as the function is realized by the start-up program.
The execution time measuring means 1j and the power consumption measuring means 1k are also called performance measuring means.
[0010]
The program storage unit 1v indicates a storage area of the storage device 1a that stores the startup program source 1c and the user program source 1d.
The execution format generation unit 1w indicates a storage area of the storage device 1a that stores the compiler 1e, the linker 1f, and the flash ROM writing program 1g. In some cases, the execution format generation unit storage unit 1w does not include the flash ROM writing program 1g.
[0011]
The timer 2 includes a timer communication control unit 2a that controls communication with the host terminal 1, an execution time measurement unit 2b that measures the execution time of the user program, and an execution time storage buffer 2c that stores the measured execution time value. .
The power meter 3 includes a power meter communication control unit 3a that controls communication with the host terminal, a power consumption measurement unit 3b that measures the power consumption of the target device, and a power consumption storage buffer 3c that stores the measured power consumption value. Prepare.
The target device 4 includes a CPU (Central Processing Unit) 4a, an SRAM (Static Random Access Memory) 4b, an I / O (In / Out) controller 4c, a target device communication control unit 4d for controlling communication between host terminals, and a flash. ROM (Read Only Memory) 4e, SDRAM controller 4f, SDRAM (Static Dynamic Random Access Memory) 4g, load module 4h written in flash ROM, start-up program 4i in load module, user program 4j in load module, A program execution flag 4k. The program execution flag 4k exists on the SDRAM, and is set to 1 when the user program is started by a startup program, and is set to 0 (zero) when the user program ends.
[0012]
Next, the memory map table 11 and the performance measurement result table 1r will be described with reference to FIGS.
FIG. 2 is a diagram illustrating an example of the memory map table 11.
FIG. 3 is a diagram illustrating an example of the performance measurement result table 1r.
The memory map table 11 and the performance measurement result table 1r have a plurality of entries, and each entry is assigned an entry number.
The memory map table 11 is a table that defines a configuration of a plurality of types of memories. The memory configuration defines the memory configuration of the target device 4, and the memory configuration of the target device is configured based on the capacity of the user program (function, section, object). FIG. 2 is an example showing a memory map configuration of types of a reset vector, an interrupt vector, a stack area, a code area, and a variable area.
The performance measurement result table 1r stores performance results when the user program is executed with the memory map configuration defined in the memory map table 11. The entry numbers of the memory map table 11 correspond to the entry numbers of the performance measurement result table 1r. The result measured using the memory map configuration associated with the entry number of the memory map table 11 is stored in the entry with the same entry number in the performance measurement result table 1r.
[0013]
Next, an example of the operation of the memory map optimization procedure will be described.
FIG. 4 is a flowchart illustrating an example of the operation of the memory map optimization.
In the following, a load module is generated for each memory map configuration described in the memory map table created by the user, the performance of each load module is measured, the measurement result is described in the performance measurement result table, and the user A memory map optimization procedure for finding an optimum memory map configuration from the performance measurement results on the measurement result table will be described with reference to FIGS.
In the following description, the following terms are used.
The object module is a module generated by compiling a program (user program) by the compiler 1e.
The load module is a module generated by linking the object module with the linker 1f in a memory map configuration described in the memory map table 11 and has an execution format for executing a user program on a computer.
Further, the compiler 1e and the linker 1f are also collectively referred to as an executable format generation unit. The execution format generation means may include a flash ROM writing program 1g or a similar function.
[0014]
First, the steps of generating the load module of the user program (steps 101 to 107 in FIG. 4) will be described.
In step 101 of FIG. 4, the user creates a plurality of types of memory map configurations and describes them in the memory map table 11 shown in FIG. A load module is generated and performance is measured for each memory map configuration, and the memory map configuration with the best performance result is the optimal memory map configuration. All-F (0xFFFFFFFF) is set in the entry (N + 1) next to the last entry (N) in the memory map table 11 to indicate that the memory map table 11 has ended.
[0015]
In step 102, the entry numbers of the memory map table 11 and the performance measurement result table 1r stored in the entry number holding unit 1s are reset (to a value indicating the head of each table). In the case of the example shown in FIG. 2, the entry number is reset to 1.
In step 103, the load module generation means 1h compiles the start-up program source 1c and the user program source 1d on the host terminal 1 using the compiler 1e to generate an object module (not shown). The generated object module is stored in a predetermined area of the storage device 1a.
In step 104, the load module generation unit 1h reads the entry number from the entry number holding unit 1s, and reads the memory map configuration of the corresponding entry number from the memory map table 11.
[0016]
In step 105, when the read memory map configuration value is all F (0xFFFFFFFF) (indicating that the entry of the memory map table 11 has been completed), the performance was measured for all the memory configurations on the memory map table 11 It proceeds to step 115. In the case other than all F, the process proceeds to step 106.
In step 106, the load module generation unit 1h gives the memory map configuration read from the memory map table 11 to the linker 1f, links the object modules, and generates a load module.
In step 107, the load module generation unit 1h writes the load module to the flash ROM 4e of the target device 4 using the flash ROM writing program 1g.
[0017]
Next, the steps of performing the performance measurement of the user program and finding the optimum memory map configuration from the results (steps 108 to 115 in FIG. 4) will be described.
In step 108 of FIG. 4, the start-up program 4i on the target device is started by the start-up program starting means 1i.
In step 109, the startup program 4i sets the program execution flag 4k existing on the SDRAM 4g of the target device 4 to 1, and in step 110, activates the user program 4j.
[0018]
In step 111, the execution time measuring means 1j and the power consumption measuring means 1k on the host terminal monitor the program execution flag 4k on the SDRAM 4g of the target device 4, and when detecting that the flag value is set to 1, execute the program. The time measuring means 1j activates the timer 2 and the power consumption measuring means 1k activates the wattmeter 3, respectively, to start performance measurement. The power consumption measuring unit 1k requests the power meter 3 to measure the power consumption of the target device 4 at regular intervals, and upon receiving the request, the power meter 3 measures the power consumption and stores the measured value in the power consumption storage buffer 3c. To be stored.
In step 112, when detecting that the user program 4j has ended, the startup program 4i sets the program execution flag 4k to 0 (zero). Upon detecting that the program execution flag 4k on the target device has been set to 0, the execution time measuring means 1j stops the measurement by the timer 2.
The timer 2 writes the measured execution time into the execution time storage buffer 2c. When detecting that the program execution flag 4k on the target device has been cleared to 0, the power consumption measuring unit 1k stops the measurement by the power meter 3.
[0019]
In step 113, the execution time measuring means 1j reads the execution time value stored in the execution time storage buffer 2c from the timer 2, and stores the execution time value in the entry number recorded in the entry number holding unit 1s on the performance measurement result table 1r. Write in the corresponding "Processing time" column. The power consumption measuring means 1k reads the power consumption value stored in the power consumption storage buffer 3c from the wattmeter 3, calculates the average value of the power consumption value, and stores the entry number holding unit in the performance measurement result table 1r. Write in the "power consumption" column corresponding to the entry number recorded in 1s.
In step 114, the entry number of the entry number holding unit 1s is incremented by one, and the process proceeds to step 104.
If it is determined in step 105 that the performance measurement has been performed for all the memory configurations on the memory map table 11, the memory map table 11 and the performance measurement result table 1 r are displayed on the screen of the host terminal 1 in step 115. . The user finds an optimal memory map from these tables and generates a load module for the optimal memory map, thereby ending the memory map optimizing process.
[0020]
As described above, in the first embodiment, in the memory map optimization method (and method) of a system in which a plurality of types of memories having different access speeds and capacities are mounted, a memory map table 11l in which a plurality of types of memory map configurations are described. A load module generating means 1h for reading a memory map configuration described in the memory map table 11l and generating a load module from a source code of the user program source 1d using a compiler 1e and a linker 1f; A start-up program starting unit 1i for starting the program 4j, a performance measurement executing unit (for example, an execution time measuring unit 1j, a power consumption measuring unit 1k) for measuring the performance of the user program started by the start-up program starting unit 1i, The performance measurement The results measured by the execution unit described memory map optimization method comprising the performance measurement result table 1r described.
[0021]
A timer 2 for measuring the execution time of the user program; and an execution time measurement for controlling start / stop of the measurement by the timer 2 and reading the measurement result and writing the result in the performance measurement result table 1r. Means 1j, a wattmeter 3 for measuring power consumption of the target device 4 during execution of the user program, start / stop control of measurement by the wattmeter 3, and reading of a measurement result and writing to the performance measurement result table 1r. The point that the power consumption measuring unit 1k is provided has been described.
As described above, the memory map optimization method and method according to the first embodiment automates operations up to generation of a load module, writing of the load module to the flash ROM 4e, activation of a startup program, and performance measurement. This makes it easy to optimize the memory map.
[0022]
Embodiment 2 FIG.
In the above-described first embodiment, the user creates a plurality of types of memory map configurations for performing performance measurement, and finally searches for the optimal memory map configuration by the user. An embodiment of automatically creating a memory map configuration and automatically detecting an optimal memory map configuration will be described.
FIG. 5 is a configuration diagram showing an embodiment in which the creation of the memory map configuration and the detection of the optimum memory map configuration are automatically performed.
5 are the same as those in FIG. 1 and the description thereof is omitted.
[0023]
The storage device 1a includes a memory map construction unit 1m, an optimum memory map search unit (memory map search unit) 1n, a memory configuration table 1p, and an optimum condition table (condition table) 1q, in addition to the components of the first embodiment. .
The memory map construction unit 1m reads the capacity of each program (each function) (function, section, object) from the object module of the user program, and fits the capacity of each memory of the target device 4 described in the memory configuration table 1p. This is a means for constructing a memory map so as not to overlap the memory map configuration already described in the memory map table 11.
The optimum memory map search means 1n satisfies the conditions of the optimum memory map described in the optimum condition table 1q from the measurement results described on the performance measurement result table 1r by the execution time measuring means 1j and the power consumption measuring means 1k. This is a means for searching the memory map configuration. The optimal memory map search unit 1n is also called a memory map search unit.
The memory configuration table 1p is a table in which the memory configuration of the target device 4 is described.
The optimum condition table 1q is a table which is set by a user and describes conditions of an optimum memory map configuration. The optimal condition table 1q is also called a condition table.
[0024]
Next, the operation will be described with reference to FIGS. 2, 3, 6, 7, and 8. FIG.
FIG. 6 is a diagram illustrating an example of the memory configuration table.
FIG. 7 is a diagram illustrating an example of the optimum condition table.
FIG. 8 is a flowchart illustrating an example of the operation of the memory map optimization.
[0025]
First, the steps of generating the load module of the user program (steps 201 to 207 in FIG. 8) will be described.
In step 201 in FIG. 8, the user creates a memory configuration table 1p shown in FIG. 6 and an optimum condition table 1q shown in FIG. 7 on the host terminal 1.
In step 202, the entry numbers of the memory map table 11 and the performance measurement result table 1r stored in the entry number holding unit 1s are reset (to a value indicating the head of each table).
In step 203, the load module generating means 1h compiles the start-up program source 1c and the user program source 1d on the host terminal 1 using the compiler 1e to generate an object module (not shown).
[0026]
In step 204, the memory map construction unit 1m reads the capacity of each program (function, section, object) from the object module, and adjusts the size so as to fit in the capacity of each memory of the target device 4 described in the memory configuration table 1p. The memory map is constructed so as not to overlap the memory map configuration already described in the memory map table 11 shown in FIG.
In step 205, it is determined whether or not the memory map has been constructed, and if constructed, the constructed memory map is described in a column corresponding to the entry number stored in the entry number holding unit 1s on the memory map table 11 and step 206 is performed. Proceed to. If the memory map cannot be constructed, the process proceeds to step 215.
[0027]
In step 206, the load module generation means 1h reads the memory map configuration constructed in steps 204 to 205 from the memory map table 11 and gives it to the linker 1f for linking to generate a load module.
In step 207, the load module generation unit 1h writes the load module to the flash ROM 4e of the target device 4 using the flash ROM writing program 1g.
[0028]
Next, the step of measuring the performance of the user program and finding the optimum memory map configuration from the result (steps 208 to 219 in FIG. 8) will be described. In step 208 of FIG. 8, the start-up program 4i on the target device 4 is started by the start-up program starting means 1i.
In step 209, the startup program 4i sets the program execution flag 4k existing on the SDRAM 4g of the target device 4 to 1, and in step 210, starts the user program 4j.
In step 211, the execution time measuring means 1j and the power consumption measuring means 1k on the host terminal 1 monitor the program execution flag 4k on the SDRAM 4g of the target device 4, and when detecting that the flag value is set to 1, The execution time measuring means 1j starts the timer 2 and the power consumption measuring means 1k starts the wattmeter 3 to start performance measurement. The power consumption measuring unit 1k requests the power meter 3 to measure the power consumption of the target device 4 at regular intervals, and upon receiving the request, the power meter 3 measures the power consumption and stores the measured value in the power consumption storage buffer 3c. To be stored.
[0029]
In step 212, when the startup program 4i detects that the user program 4j has ended, it sets the program execution flag 4k to 0. When detecting that the program execution flag 4k on the target device 4 has been set to 0, the execution time measuring means 1j stops the measurement by the timer 2. The timer 2 writes the measured execution time into the execution time storage buffer 2c. When detecting that the program execution flag 4k on the target device 4 has been cleared to 0, the power consumption measuring unit 1k stops the measurement by the power meter 3.
In step 213, the execution time measuring means 1j reads the execution time value stored in the execution time storage buffer 2c from the timer 2, and adds the execution time value to the entry number recorded in the entry number holding unit 1s on the performance measurement result table 1r. Write in the corresponding "Processing time" column. The power consumption measuring means 1k reads the power consumption value stored in the power consumption storage buffer 3c from the wattmeter 3, calculates the average value of the power consumption value, and stores the entry number holding unit in the performance measurement result table 1r. Write in the "power consumption" column corresponding to the entry number recorded in 1s.
[0030]
In step 214, the entry number of the entry number holding unit 1s is incremented by one, and the process proceeds to step 204.
If the memory map constructing means 1m cannot construct the memory map in Steps 204 to 205, the optimal memory map searching means 1n converts the memory map table 11l and the performance measurement result table 1r into the optimal condition table 1q in Step 215. A memory map configuration that satisfies the condition of the described optimal memory map is searched. If a memory map configuration that satisfies the condition of the optimal memory map is detected in step 216, the load module generation unit 1h generates a load module having the detected memory map configuration in step 217. Using the write program 1g, the load module having the optimal memory map configuration is written into the flash ROM 4e of the target device 4, and the memory map optimization operation is completed. In step 216, if a memory map configuration that satisfies the condition of the optimal memory map is not detected, an error is displayed on the screen of the host terminal 1, and the memory map optimizing operation ends.
[0031]
As described above, in the memory map optimization method (and method) of this embodiment, in addition to the method described in the first embodiment, the memory configuration of the target device 4 is described in the load module generation unit 1h. A memory configuration table 1p and a memory map constructing means 1m for automatically mapping each program so as to fit in the capacity of each memory read from the memory configuration table 1p and describing a result in the memory map table 11; Was explained.
[0032]
Further, the performance measurement execution means includes an optimum memory map search means 1n for searching a memory map configuration having the best performance from the performance measurement results described in the performance measurement result table 1r. Means for providing an optimum condition table 1q in which conditions that must be satisfied as an optimum memory map configuration are described, and the memory map search means 1n converts the conditions described in the optimum condition table 1q from the performance measurement result table 1r. Searching for a memory map configuration satisfying the above has been described.
[0033]
As described above, according to the memory map optimization method and method of the second embodiment, a memory map is constructed, a load module is generated, a load module is written to a flash ROM, a startup program is started, performance measurement is performed, By automating the operation up to the detection of the memory map, the operation of optimizing the memory map can be facilitated.
[0034]
Embodiment 3 FIG.
The memory map optimization method and method described in the first and second embodiments can be realized by software. The procedure for executing the memory map optimization method and method can be realized by a computer-executable program (memory map optimization program). Further, the memory map optimization program can be stored in a computer-readable recording medium.
The memory map optimization program is executed on a computer under the control of a processor.
[0035]
The memory map optimization program includes at least the following processes (1) to (7) (procedure).
(1) A process of storing a plurality of entries in a memory map table using a memory map configuration constituted by a plurality of types of memories as one entry.
(2) Processing for storing a user program in a program storage unit.
(3) A process of reading the user program stored in the program storage unit and one entry stored in the memory map table, and generating an executable load module using the read program.
(4) A process of setting a performance measurement result table for storing a performance measurement result measured when the load module is executed.
(5) Processing for starting the load module.
(6) A process of measuring performance by executing the load module.
(7) Processing for storing the measured performance measurement result in the performance measurement result table.
[0036]
Further, the means included in the storage device 1a shown in FIGS. 1 and 5 can be added to the above processing (procedure).
[0037]
【The invention's effect】
According to the memory map optimizing method and method of the present invention, it is possible to automate operations of generating a memory map optimizing load module, writing a load module to a flash ROM, starting a startup program, and performing performance measurement. This makes it easy to optimize the memory map and suppresses the amount of work performed by the user.
[Brief description of the drawings]
FIG. 1 is a configuration diagram showing one embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a memory map table 11;
FIG. 3 is a diagram illustrating an example of a performance measurement result table 1r.
FIG. 4 is a flowchart illustrating an example of an operation of memory map optimization.
FIG. 5 is a configuration diagram showing an embodiment in which creation of a memory map configuration and detection of an optimum memory map configuration are automatically performed.
FIG. 6 is a diagram illustrating an example of a memory configuration table.
FIG. 7 is a diagram illustrating an example of an optimum condition table.
FIG. 8 is a flowchart illustrating an example of an operation of memory map optimization.
[Explanation of symbols]
Reference Signs List 1 host terminal, 1a storage device, 1b host terminal communication control unit, 1c startup program source, 1d user program source, 1e compiler, 1f linker, 1g flash ROM writing program, 1h load module generation means, 1i startup program activation means, 1j Execution time measurement means, 1k power consumption measurement means, 1l memory map table, 1m memory map construction means, 1n optimum memory map search means, 1p memory configuration table, 1q optimum condition table, 1r performance measurement result table, 1s entry number holding section 1v program storage unit, 1w execution format generation unit, 2 timer, 2a timer communication control unit, 2b execution time measurement unit, 2c execution time storage buffer, 3 wattmeter, 3a wattmeter communication control unit, 3b power consumption measurement unit , 3c power consumption storage buffer, 4 target device, 4a CPU, 4b SRAM, 4c I / O controller, 4d target device communication controller, 4e flash ROM, 4f SDRAM controller, 4g SDRAM, 4h load module, 4i startup program, 4j User program, 4k program execution flag.

Claims (7)

種類の異なる複数のメモリの構成を定義するメモリマップ構成を一つのエントリとして、複数のエントリを格納するメモリマップテーブルと、
ユーザプログラムを記憶するプログラム記憶部と、
上記プログラム記憶部に記憶されたユーザプログラムと上記メモリマップテーブルに格納された一つのエントリとを読み出し、読み出したプログラムと一つのエントリとを用いて、実行形式のロードモジュールを生成する実行形式生成手段と、
上記ロードモジュールを実行させて性能を測定する性能測定手段と、
上記性能測定手段が測定した性能測定結果を格納する性能測定結果テーブルと、
上記ロードモジュールと上記性能測定手段とを起動し、上記性能測定手段が上記性能測定結果テーブルへ性能測定結果を格納することを指示する起動手段とを備えることを特徴とするメモリマップ最適化方式。
A memory map table that stores a plurality of entries, with a memory map configuration defining a configuration of a plurality of different types of memories as one entry,
A program storage unit for storing a user program,
Executable format generation means for reading a user program stored in the program storage unit and one entry stored in the memory map table, and using the read program and one entry to generate an executable load module When,
Performance measurement means for executing the load module to measure performance,
A performance measurement result table storing performance measurement results measured by the performance measurement means,
A memory map optimizing method, comprising: an activation unit that activates the load module and the performance measurement unit, and instructs the performance measurement unit to store a performance measurement result in the performance measurement result table.
上記メモリマップ最適化方式は、さらに、
ロードモジュールの実行時間を計測するタイマと、
上記ロードモジュールの実行の開始と停止とを検出し、上記タイマへ実行時間の測定の開始と停止とを指示し、上記タイマが計測した実行時間を上記性能測定結果テーブルへ書き込む実行時間測定手段と、
ロードモジュールが実行によって消費する電力を計測する消費電力測定部と、上記ロードモジュールの実行の開始と停止とを検出し、上記消費電力測定部へ電力の測定の開始と停止とを指示し、上記消費電力測定部が測定した消費電力を上記性能測定結果テーブルへ書き込む消費電力測定手段とを備えることを特徴とする請求項1記載のメモリマップ最適化方式。
The memory map optimization method further includes:
A timer for measuring the execution time of the load module,
Execution time measuring means for detecting start and stop of execution of the load module, instructing the timer to start and stop measurement of execution time, and writing the execution time measured by the timer to the performance measurement result table; ,
A power consumption measuring unit that measures the power consumed by the load module, detecting start and stop of the execution of the load module, instructing the power consumption measuring unit to start and stop the power measurement, 2. The memory map optimizing method according to claim 1, further comprising a power consumption measuring unit that writes the power consumption measured by the power consumption measuring unit to the performance measurement result table.
上記メモリマップ最適化方式は、さらに、
上記ロードモジュールを実行させる実行環境に備えられる複数のメモリそれぞれの容量を定義するメモリ構成を格納するメモリ構成テーブルと、
上記メモリ構成テーブルに格納されたメモリ構成と、ユーザプログラムとに基づいて、メモリマップ構成を生成し、生成したメモリマップ構成を上記メモリマップテーブルへ格納するメモリマップ構築手段とを備えることを特徴とする請求項1または2記載のメモリマップ最適化方式。
The memory map optimization method further includes:
A memory configuration table that stores a memory configuration that defines a capacity of each of a plurality of memories provided in an execution environment for executing the load module;
A memory map configuration unit that generates a memory map configuration based on the memory configuration stored in the memory configuration table and a user program, and stores the generated memory map configuration in the memory map table. 3. The memory map optimization method according to claim 1, wherein
上記メモリマップ最適化方式は、さらに、上記メモリマップテーブルに格納された複数のエントリから所定の条件を満たすエントリを検索するメモリマップ検索手段を有することを特徴とする請求項1記載のメモリマップ最適化方式。2. The memory map optimization method according to claim 1, wherein said memory map optimization method further comprises a memory map search means for searching an entry satisfying a predetermined condition from a plurality of entries stored in said memory map table. System. 上記メモリマップ最適化方式は、さらに、
メモリマップ構成の条件を定義した条件テーブルを備え、
上記メモリマップ検索手段は、上記条件テーブルに定義された条件を満たすエントリを検索することを特徴とする請求項4記載のメモリマップ最適化方式。
The memory map optimization method further includes:
It has a condition table that defines the conditions of the memory map configuration,
5. The memory map optimization method according to claim 4, wherein said memory map search means searches for an entry satisfying a condition defined in said condition table.
上記メモリマップテーブルは、複数のエントリそれぞれを識別するエントリ識別子を含み、
上記性能測定結果テーブルは、上記複数のエントリの数の性能測定結果を上記エントリ識別子に対応づけて格納し、
上記実行形式生成手段は、上記メモリマップテーブルに格納された複数のエントリの数、ロードモジュールを生成することを繰り返し、
上記起動手段は、上記複数のエントリの数、上記性能測定手段によって上記エントリ識別子に対応させて性能測定結果を上記性能測定結果テーブルへ格納させることを特徴とする請求項1から5いずれかに記載のメモリマップ最適化方式。
The memory map table includes an entry identifier for identifying each of the plurality of entries,
The performance measurement result table stores the performance measurement results of the number of the plurality of entries in association with the entry identifiers,
The execution format generation unit repeatedly generates the number of the plurality of entries stored in the memory map table and the load module,
6. The performance measurement result table according to claim 1, wherein the activation unit causes the performance measurement result table to store the performance measurement result in correspondence with the number of the plurality of entries and the entry identifier by the performance measurement unit. Memory map optimization method.
複数種類のメモリによって構成されるメモリマップ構成を一つのエントリとして、複数のエントリをメモリマップテーブルへ格納し、
ユーザプログラムをプログラム記憶部へ記憶し、
上記プログラム記憶部に記憶されたユーザプログラムと上記メモリマップテーブルに格納された一つのエントリを読み出し、読み出したプログラムとを用いて、実行形式のロードモジュールを生成し、
ロードモジュールを実行させたときに測定する性能測定結果を格納する性能測定結果テーブルを設置し、
上記ロードモジュールを起動し、
上記ロードモジュールを実行することによって性能を測定し、
測定した性能測定結果を上記性能測定結果テーブルへ格納することを特徴とするメモリマップ最適化方法。
A plurality of entries are stored in a memory map table, with a memory map configuration configured by a plurality of types of memories as one entry,
Storing the user program in the program storage unit,
The user program stored in the program storage unit and one entry stored in the memory map table are read, and an executable load module is generated using the read program,
Install a performance measurement result table that stores the performance measurement results measured when the load module is executed,
Start the above load module,
Measure performance by running the above load module,
A memory map optimizing method, wherein a measured performance measurement result is stored in the performance measurement result table.
JP2003105100A 2003-04-09 2003-04-09 Memory map optimizing system, and memory map optimizing method Pending JP2004310580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003105100A JP2004310580A (en) 2003-04-09 2003-04-09 Memory map optimizing system, and memory map optimizing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003105100A JP2004310580A (en) 2003-04-09 2003-04-09 Memory map optimizing system, and memory map optimizing method

Publications (1)

Publication Number Publication Date
JP2004310580A true JP2004310580A (en) 2004-11-04

Family

ID=33467714

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003105100A Pending JP2004310580A (en) 2003-04-09 2003-04-09 Memory map optimizing system, and memory map optimizing method

Country Status (1)

Country Link
JP (1) JP2004310580A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008276280A (en) * 2007-04-25 2008-11-13 Sony Corp Image processor and camera system
JP2013508813A (en) * 2009-10-15 2013-03-07 マイクロソフト コーポレーション Relocation of memory objects for power saving
JP2015528597A (en) * 2012-08-07 2015-09-28 クアルコム,インコーポレイテッド Method, system and device for hybrid memory management

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008276280A (en) * 2007-04-25 2008-11-13 Sony Corp Image processor and camera system
JP2013508813A (en) * 2009-10-15 2013-03-07 マイクロソフト コーポレーション Relocation of memory objects for power saving
JP2015528597A (en) * 2012-08-07 2015-09-28 クアルコム,インコーポレイテッド Method, system and device for hybrid memory management

Similar Documents

Publication Publication Date Title
CN108345477B (en) Design method and device for sharing conf partition file by double images
CN111475215A (en) Server starting method, device and related equipment
CN103226505A (en) Method and equipment for checking basic input output system (BIOS)
US20120233451A1 (en) Method for fast resuming computer system and computer system
JP2011095952A (en) Method for updating firmware and electronic equipment
JP2004310580A (en) Memory map optimizing system, and memory map optimizing method
US8775768B2 (en) Information processing apparatus and method of controlling the same
CN114327574A (en) Differential upgrading method, electronic device and storage medium
CN110825421B (en) Firmware upgrading method, system and readable storage medium
CN111124760B (en) Uboot-based embedded equipment starting method and apparatus
JPH09282169A (en) Input/output data managing system
JP2005234872A (en) Computer, computer start method, bios program and information storage medium
CN110134454B (en) Method and device for starting application program
US20080052682A1 (en) Debug device and debug processing method
US6625060B2 (en) Microcomputer with efficient program storage
CN112784276B (en) Method and device for realizing trusted measurement
WO2012039143A1 (en) Dma controller and data readout device
CN114528141A (en) Method and device for repairing program defects in embedded system kernel mode
JP2002091783A (en) Information processor
JP2004246787A (en) Information processor and method for controlling program
JPH0540637A (en) Load system for basic input/output ststem
JP6525267B2 (en) Out-of-range reference detection device, method and program
CN111857739B (en) Method and device for storing program of Scratch measurement and control board
KR100970933B1 (en) Apparatus and method for high speed booting an operating system
CN110795297B (en) Electronic equipment testing method and device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20041026